npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

temtumjs-lib

v1.0.1

Published

Temtum JavaScript library

Downloads

0

Readme

Temtum JavaScript Library

Covered with

NPM

A JavaScript Temtum library.

About

Temtum is a new, lightweight, peer-to-peer cryptocurrency where anyone can support the Temporal blockchain network, creating a new world of financial freedom away from centralised institutions.

This library will help you to make various operations in Temtum network using simple interface.

How to install

npm install temtumjs-lib --save

How to use

If you want to use this library on Node.js:

const temtumjs = require('temtumjs-lib');

Usage example

const Transaction = require('temtumjs-lib').Transaction;
const Wallet = require('temtumjs-lib').Wallet;

// Your Temtum wallet keys. If you don't have a key pair, you can generate one using Wallet.generateKeyPair method
const PUBLIC_KEY = 'your_temtum_public_key';
const PRIVATE_KEY = 'your_temtum_private_key';

// Create Transaction instance
const transaction = new Transaction();

// Get unspent outputs of your wallet. If you already have any, you can add it using Transaction.addInput method
Wallet.getUnspent(PUBLIC_KEY).then((response) => {
  // Use unspent outputs as inputs for the new transaction
  transaction.txIns = response.unspentTxOuts;
  // Add transaction output
  transaction.addOutput('output_address', 10);
  // Add unused inputs as transaction output back to your address
  transaction.addUnspentInputsToOutput();
  // Sign the transaction using your private key
  transaction.sign(PRIVATE_KEY);

  // Send the transaction to Temtum node
  transaction.send().then(() => {
    console.log('You have successfully sent a transaction!');
  });
});

API doc

Transaction

Properties

|Name|Type| |----|----| |type|String| |txIns|Array[TxIn]| |txOuts|Array[TxOut]| |timestamp|Number| |id|String|

Methods

addInput(txIn: TxIn)

Add transaction input into txIns array. TxIn properties:

|Name|Type| |----|----| |address|String| |amount|Number| |txOutId|String| |txOutIndex|Number| |blockIndex|Number|

addOutput(txOut: TxOut)

Add transaction output into txOuts array. TxOut properties:

|Name|Type| |----|----| |address|String| |amount|Number|

calculateTotalInputsAmount() -> Number

Calculate total amount of TEMs in transaction inputs.

calculateTotalOutputsAmount() -> Number

Calculate total amount of TEMs in transaction outputs.

addUnspentInputsToOutput()

Calculate total amount of TEMs in transaction inputs and, if it's greater than total amount of TEMs in transaction outputs, create new transaction output with unspent inputs amount and the address of inputs.

sign(privateKey: String)

Generate transaction id based on transaction properties and add signatures to transaction inputs.

getHexString() -> String

Return transaction as a hex string.

send() -> Promise(null)

Send transaction to Temtum node.

Wallet

Methods

(static) getUnspent(address: String) -> Promise({ unspentTxOuts: Array[TxIn] })

Get unspent outputs for a specific address.

(static) sendTransaction(from: String, to: String, amount: Number, privateKey: String) -> Promise({ transaction: Object })

Send new transaction to Temtum node using specific properties.

(static) generateKeyPair() -> Promise({ privateKey: String, address: String })

Generate new public and private keys pair.