Skip to content

Instantly share code, notes, and snippets.

@vlzhr
Created February 10, 2020 12:21
Show Gist options
  • Save vlzhr/448a0a26072960a80ef60ce4d4151ac6 to your computer and use it in GitHub Desktop.
Save vlzhr/448a0a26072960a80ef60ce4d4151ac6 to your computer and use it in GitHub Desktop.
certificado example
function sendData() {
const text = document.querySelector(".data").value;
let data = text.split("\n");
data = data.map(function(x) { return {"key": x.split(" ")[0], "value": x, "type": "string"}} );
const tx = {
type: 12, // data transaction
data: {
data: data,
fee: {
"tokens": "0.001",
"assetId": "WAVES"
}
}
};
WavesKeeper.signAndPublishTransaction(tx);
return text;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment