Extends Message
This implements basic functions relating to Dfinity Transactions
Parameters
versionNumber the tx version (optional, default0)toBuffer the function reference (optional, default0)capsNumber the number of response capabilities this message has (optional, default0)ticksNumber the number of to allocate for this message (optional, default0)ticksPriceNumber the price by ticks (optional, default0)nonceNumber (optional, default0)dataBuffer (optional, default0)publicKeyBuffer (optional, defaultnewUint8Array(32))signatureBuffer (optional, defaultnewUint8Array([]))recoveryNumber (optional, default0)
serializes the message
Parameters
includeSig(optional, defaultthis.signature.length!==0)
Returns Buffer
signs a message and returns the serialized and signed message
Parameters
secretKeyBuffer a 32 bytes buffer to use as a secret key
Returns Promise resolve with a Buffer containing the signed message
Recovers a public key from a signed message
Parameters
hashsigrecoveryserializedBuffer the serialized message
Returns Promise resolves with a 32 byte public key
deserializes the message and returns a new instance of DfinityTx
Parameters
rawBuffer the serialized raw message
Returns Promise resolve with a new instance of DfinityTx