Skip to content

Instantly share code, notes, and snippets.

@KardanovIR
Created February 19, 2020 13:29
Show Gist options
  • Save KardanovIR/22e8ed210381336198ae2fd071fea1b6 to your computer and use it in GitHub Desktop.
Save KardanovIR/22e8ed210381336198ae2fd071fea1b6 to your computer and use it in GitHub Desktop.
const { sponsorship } = require('@waves/waves-transactions')
const seed = 'example seed phrase'
const params = {
assetId: '4uK8i4ThRGbehENwa6MxyLtxAjAo1Rj9fduborGExarC',
minSponsoredAssetFee: 100
}
const signedSponsorshipTx = sponsorship(params, seed)
The code above will create (but not send to the blockchain) a transaction:
{
"id": "A",
"type": 14,
"version": 1,
"senderPublicKey": "3SU7zKraQF8tQAF8Ho75MSVCBfirgaQviFXnseEw4PYg",
"minSponsoredAssetFee": 100,
"assetId": "4uK8i4ThRGbehENwa6MxyLtxAjAo1Rj9fduborGExarC",
"fee": 100000000,
"timestamp": 1575034734209,
"proofs": [
"42vz3SxqxzSzNC7AdVY34fM7QvQLyJfYFv8EJmCgooAZ9Y69YDNDptMZcupYFdN7h3C1dz2z6keKT9znbVBrikyG"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment