Global

Methods




isValidWIF(key, network) → {Boolean}

Check if a WIF is valid for a specific CoinNetwork

Parameters:
Name Type Description
key string

Base58 WIF Private Key

network CoinNetwork
Source:
Returns:
Type:
Boolean

Type Definitions




CoinInfo :Object

An object that contains information about a coins Name, Network, and access to an explorer

Properties:
Name Type Description
name string

All lowercase "name" of the CoinInfo, this is what is passed in to the supported_coins check. This cannot include spaces.

displayName string

The Display Name for the Coin, this would be the full official name and can include spaces.

ticker string

The "Ticker" that is used to track the Coin on Exchanges

satPerCoin number

The number of satoshis per single coin

feePerKb number

The amount of fee in satoshis to pay per kilobyte of data being put into the blockchain

feePerByte number

The amount of fee in satoshis to pay per byte of data being put into the blockchain

maxFeePerByte number

The maximum fee to pay per byte of data being put into the blockchain

minFee number

The minimum fee that should ever be paid

dust number

Amount in Satoshis of the minimum value allowed to be sent around the network

txVersion number

The current TX version number for the coin

explorer InsightExplorer

An InsightExplorer for the current coin so that data can be retreived from the network

getExtraBytes function

A function that is passed options from TransactionBuilder when a transaction is being built/sent. You can use this to add custom logic/tx hex building.

network CoinNetwork

The specific coin network variables, same as used in bitcoinjs-lib

Source:
Example
{
	name: 'flo',
	displayName: 'Flo',
	ticker: 'FLO',
	satPerCoin: 1e8,
	feePerKb: floFeePerKb,
	feePerByte: floFeePerKb / 1024,
	maxFeePerByte: 100,
	minFee: floFeePerKb,
	dust: 100000,

	txVersion: 2,

	explorer: new Insight('https://livenet.flocha.in/api'),

	getExtraBytes: function(options){
		var fData = options.floData || ""
		return varIntBuffer(fData.length).toString("hex") + Buffer.from(fData).toString("hex")
	},

	network: CoinNetwork
}



CoinNetwork :Object

An object that contains version variables specific to the Coin

Properties:
Name Type Description
bip32 Object

BIP32 Variables

Properties
Name Type Description
public number

The Extended Public Key version bytes

private number

The Extended Private Key version bytes

slip44 number

The coin_type number for the coin, must match SLIP-0044

messagePrefix string

The Prefix to add on when checking/signing a message

pubKeyHash number

The coin specific "version" used when creating a Public Key Hash (Public Address)

scriptHash number

The coin specific "version" used when creating a Script Hash

wif number

Wallet Import Format "version" for this specific coin

Source:
Example
{
	bip32: {
		public: 0x0134406b,
		private: 0x01343c31
	},
	slip44: 216,
	messagePrefix: '\x1bFlorincoin Signed Message:\n',
	pubKeyHash: 35,
	scriptHash: 94,
	wif: 163
}



StatusObject :Object

Properties:
Name Type Description
success Boolean

If the attempt was successful

error string

The error text (if there was an error)

Deprecated:
  • Yes

Source:



StatusObject :Object

Properties:
Name Type Description
success Boolean

If the attempt was successful

error string

The error text (if there was an error)

Source:



TXID :string

The Transaction ID on the Blockchain.

Source:
Examples

Full TXID Reference

8a83ecb7812ca2770814d996529e153b07b103424cd389b800b743baa9604c5b

Shortened TXID Reference

8a83ec