beyondasset-transaction
The encoding/decoding functions for the beyondasset scheme issuance set of OP_CODES
Last updated 7 months ago by tech1k .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install beyondasset-transaction 
SYNC missed versions from official npm registry.

BeyondAsset Transaction

Build Status Coverage Status npm version Slack Status

js-standard-style

BeyondAsset Transaction provides the basic functionality for creating and managing a BeyondAsset Transaction Object

Installation

$ npm install beyondasset-transaction

properties

// which type is the transaction ('issue'/'send'/'burn') [String]
this.type
// [Boolean]
this.noRules
// transfer objects to pass assets from inputs to outputs [Array[Object]] 
this.payments
// [Number]
this.protocol
// BeyondAssets protocol version [Number]
this.version
// how many places after the decimal point can the smallest asset amount be (for example divisibility 2 => smallest asset amount is 0.01) [Number]
this.divisibility
// is an issued asset locked or can it be re-issued [Boolean]
this.lockStatus
// amount of units of an asset to issue [Number]
this.amount
// SHA2 of the metadata [Buffer]
this.sha2
// the torrent hash of the metadata torrent [Buffer]
this.torrentHash
// list of objects which indicate how a multisig stores the hashes (index and type) [Array[Object]]
this.multiSig

TODO - Write documentation to the following functions

function Transaction (rawData)
Transaction.fromHex = function (op_return)
Transaction.newTransaction = function (protocol, version)
Transaction.prototype.addPayment = function (input, amount, output, range,percent)
Transaction.prototype.addBurn = function (input, amount, percent)
Transaction.prototype.setAmount = function (totalAmount, divisibility)
Transaction.prototype.setLockStatus = function (lockStatus)
Transaction.prototype.setAggregationPolicy = function (aggregationPolicy)
Transaction.prototype.setHash = function (torrentHash, sha2)
Transaction.prototype.encode = function ()
Transaction.prototype.shiftOutputs = function(shiftAmount)

Testing

In order to test you need to install mocha globaly on your machine

$ cd /"module-path"/beyondasset-transaction
$ mocha

License

Apache-2.0

Current Tags

  • 1.3.0                                ...           latest (7 months ago)

1 Versions

  • 1.3.0                                ...           7 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dev Dependencies (0)
None

Copyright 2014 - 2017 © taobao.org |