Syscoinjs-lib
A Javascript library for utilising Syscoin blockchain operations in node.js and browsers.
This documentation is currently a WIP. Please let us know if you notice any typos or have any ideas for improvement.
#
assetAllocationBurn#
assetAllocationBurn( assetOpts, txOpts, assetMap, sysChangeAddress, feeRate, sysFromXpubOrAddress, utxos, redeemOrWitnessScript )Burn an asset allocation for the purpose of provably burning. Could be used to create proof-of-burn for SysNEVM bridge by specifying the NEVM address as the destination in assetOpts.
#
assetAllocationMint#
assetAllocationMint( assetOpts, txOpts, assetMap, sysChangeAddress, feeRate, sysFromXpubOrAddress, utxos, redeemOrWitnessScript )Mint a new asset using proof-of-lock on NEVM chain as a proof to mint tokens on Syscoin.
#
assetAllocationSend#
assetAllocationSend( txOpts, assetMap, sysChangeAddress, feeRate, sysFromXpubOrAddress, utxos, redeemOrWitnessScript )Send an asset allocation to other users. Once the assetSend() function has been used to issue a token to an address this function is then used to send the tokens.
#
assetNew#
assetNew( assetOpts, txOpts, sysChangeAddress, sysReceivingAddress, feeRate, sysFromXpubOrAddress, utxos, redeemOrWitnessScript )Create new Syscoin Platform Token (SPT).
#
assetSend#
assetSend( txOpts, assetMap, sysChangeAddress, feeRate, sysFromXpubOrAddress, utxos, redeemOrWitnessScript )Issue supply by sending it from asset to an address holding an allocation of the asset.
#
assetUpdate#
assetUpdate( assetGuid, assetOpts, txOpts, assetMap, sysChangeAddress, sysReceivingAddress, feeRate, sysFromXpubOrAddress, utxos, redeemOrWitnessScript )Update an existing Syscoin Platform Token (SPT).
#
createPSBTFromRes#
createPSBTFromRes( res, redeemOrWitnessScript )Crafts a PSBT from a res object. Detects witness/non-witness UTXOs and sets appropriate data required for bitcoinjs-lib to sign properly.
#
createTransaction#
createTransaction( txOpts, changeAddress, outputsArr, feeRate, fromXpubOrAddress, utxos, redeemOrWitnessScript )This function is used to send Syscoin or Bitcoin or like coins.
#
fetchAndSanitizeUTXOs#
fetchAndSanitizeUTXOs( utxos, fromXpubOrAddress, txOpts, assetMap, excludeZeroConf )Fetch UTXO's for an address or xPub from back-end Blockbook provider and sanitize them for use by upstream libraries.
#
signAndSend#
signAndSend( res, notaryAssets )Signs and Notarizes if necessary and sends a transaction to the network using Signer.
#
signAndSendWithSigner#
signAndSendWithSigner( res, Signer, notaryAssets )Signs and Notarizes if necessary and sends a transaction to the network using Signer.
#
signAndSendWithWIF#
signAndSendWithWIF( res, wif, notaryAssets )Signs and Notarizes if necessary and sends a transaction to the network using Signer.
#
Syscoin#
Syscoin( Signer, blockbookURL, network )Constructor.
Top level object used by consuming libraries to craft Syscoin/Bitcoin transactions. For Syscoin SPT support is provided.
#
syscoinBurnToAssetAllocation#
syscoinBurnToAssetAllocation( txOpts, assetMap, sysChangeAddress, feeRate, sysFromXpubOrAddress, utxos, redeemOrWitnessScript )Burn Syscoin to mint SYSX.