Created
March 7, 2018 20:36
-
-
Save epexa/1fb21d4d37913634b12a4d33f6b0f0aa to your computer and use it in GitHub Desktop.
get_transaction from blockchain Golos on HTML
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://cdn.jsdelivr.net/npm/golos-js@0.5.30/dist/golos.min.js"></script> | |
<script> | |
// switch to testnet | |
golos.config.set('websocket', 'wss://ws.testnet3.golos.io'); | |
golos.config.set('chain_id', '5876894a41e6361bde2e73278f07340f2eb8b41c2facd29099de9deef6cdb679'); | |
let trx = { | |
ref_block_num: 49191, | |
ref_block_prefix: 2024493436 | |
}; | |
// https://github.com/GolosChain/golos-js/blob/master/doc/README.md#get-transaction-hex | |
golos.api.getTransactionHex(trx, function(err, transaction) { | |
console.log(err, 'getTransactionHex: ' + transaction); | |
// https://github.com/GolosChain/golos-js/blob/master/doc/README.md#get-transaction | |
let transaction_id = 'e3aa587c665c222061694ece21deb1910c35f75b'; | |
golos.api.getTransaction(transaction_id, function(err, result) { | |
console.log(err, 'getTransaction: ', result); | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment