Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

@sec-block/secjs-transactionpool

1.0.10 • Public • Published

JavaScript Style Guide

[JavaScript Style Guide]

SECTransactionPool

This package is for sec blockchain transaction pool

new SECTransactionPool(config)

create a transaction pool with config, such as transaction pool of token chain or transaction chain

Param Type
config Object

secTransactionPool.addTxIntoPool(transaction)

save the transaction into local transaction pool

Kind: instance method of SECTransactionPool

Param Type
transaction Object

secTransactionPool.updateBlockHashArray(blockChain)

upate the block hash array this blockChainHashBuffer is for checking the transaction in transaction pool, just compare the TxHash

Kind: instance method of SECTransactionPool

Param Type
blockChain Object

secTransactionPool.compareTxWithHashTable()

remove transactions in transaction pool, if they are already upload to blockchain

Kind: instance method of SECTransactionPool

secTransactionPool.addTxFromOtherPeerIntoPool(txFromOtherPeer)

to update the local transaction pool with transactions from other peers

Kind: instance method of SECTransactionPool

Param Type
txFromOtherPeer Object

secTransactionPool.getTxStatus(transaction) => Status

get transaction status: pending, success, error

Kind: instance method of SECTransactionPool

Param Type
transaction Object

secTransactionPool.getAllTxFromPool() => Array

return all transaction from pool

Kind: instance method of SECTransactionPool

secTransactionPool.clear()

clear the transaction pool

Kind: instance method of SECTransactionPool

Keywords

none

Install

npm i @sec-block/secjs-transactionpool

DownloadsWeekly Downloads

1

Version

1.0.10

License

ISC

Unpacked Size

9.57 kB

Total Files

5

Last publish

Collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar