Skip to content

Instantly share code, notes, and snippets.

@KardanovIR
Last active April 20, 2020 03:35
Show Gist options
  • Save KardanovIR/5167f437f69bde937706c513ff37d95b to your computer and use it in GitHub Desktop.
Save KardanovIR/5167f437f69bde937706c513ff37d95b to your computer and use it in GitHub Desktop.
WavesKeeper.signAndPublishTransaction({
type: 4, // 4 - transfer transaction
data: {
amount: {
assetId: 'WAVES',
tokens: "0.00100000"
},
fee: {
assetId: 'WAVES',
tokens: "0.00100000"
},
recipient: '3P9E5QeGSF4As6kNtBi8j476gsM8mqnX12f'
}
})
.then(function(res){
// res object will look like:
//{
// "type" : 4,
// "id" : "2p8zC1riEZpC19PHuqndyaBnr9ndS6jGvFKyTbX2Qpyq",
// "sender" : "3PGiGn5K5zRgU7o3EfvqFeTR91shNAPyFaa",
// "senderPublicKey" : "DoQ87i3F9yAX21LrMijEszqMKAHuR867ZFfeXN7UCLe3",
// "fee" : 100000,
// "timestamp" : 1543228114324,
// "proofs" : [ "58U8fr9hUKir9WJkJtHV3eUNV7giCnFX42uDHwtdWW6Rq34P9BMXWEWuVLct1qgp1jhwvAJnvmPqGYZYknSQfW1o" ],
// "version" : 2,
// "recipient" : "3P9E5QeGSF4As6kNtBi8j476gsM8mqnX12f",
// "assetId" : null,
// "feeAssetId" : null,
// "feeAsset" : null,
// "amount" : 100000,
// "attachment" : ""
//}
})
.catch(function(err){
console.log(err);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment