Home Reference Source

References

summary
public

F createChangeBlock(secretKey: string, data: Object): Object

Create a change block.

public

F createOpenBlock(secretKey: string, data: Object): Object

Create an open block.

public

F createReceiveBlock(secretKey: string, data: Object): Object

Create a receive block.

public

F createSendBlock(secretKey: string, data: Object): Object

Create a send block.

public

F checkAddress(address: string): boolean

Check if the given address is valid.

public

F checkBalance(balance: string): boolean

Check if the given balance is valid.

public

Check if the given hash is valid.

public

Check if the given public or secret key is valid.

public
public

Check if the given seed is valid.

public

F checkSignature(signature: string): boolean

Check if the given signature is valid.

public

Check if the given work is valid.

public

Initialize the library.

public

Get whether or not the library is ready to be used (#module_NanoCurrency.init has been called).

public

F hashChangeBlock(previous: string, representative: string): string

Hash a change block.

public

F hashOpenBlock(source: string, representative: string, account: string): string

Hash an open block.

public

F hashReceiveBlock(previous: string, source: string): string

Hash a receive block.

public

F hashSendBlock(previous: string, destination: string, balance: string): string

Hash a send block.

public

F getRandomBytes(count: *): *

public

F deriveAddress(publicKey: string): string

Derive address from a public key.

public

F derivePublicKey(secretKey: string): string

Derive a public key from a secret key.

public

F deriveSecretKey(seed: string, index: number): string

Derive a secret key from a seed, given an index.

public

Generate a cryptographically secure seed.

public

F signBlock(blockHash: string, secretKey: string): string

Sign a block.

public

F verifyBlock(blockHash: string, signature: string, publicKey: string): boolean

Verify a block against a public key.

public

F validateWork(blockHash: string, work: string): boolean

Validate whether or not the work value meets the difficulty for the given hash.

public

F work(blockHash: string, workerIndex: number, workerCount: number): string

Find a work value that meets the difficulty for the given hash.

public

V C_BINDING: {"instance_": *, "work": *, "validateWork": *, "deriveSecretKey": *, "derivePublicKey": *, "deriveAddress": *, "hashReceiveBlock": *, "hashOpenBlock": *, "hashChangeBlock": *, "hashSendBlock": *, "signBlock": *, "verifyBlock": *, "convertAmountDecimalIntegerToHex": *}