getTransaction
Input Arguments
Parameter
Description
Success Response
Error Response
Parameter
Description
Example
Request
neoline.getTransaction({
txid: '0xfb3ecd6070e819187acaa307fb303fda7ae18577d98f948c4a4e13bce7ece474',
network: 'MainNet'
})
.then(result => {
console.log('Transaction details: ' + JSON.stringify(result));
})
.catch((error) => {
const {type, description, data} = error;
switch(type) {
case 'NO_PROVIDER':
console.log('No provider available.');
break;
case 'RPC_ERROR':
console.log('There was an error when broadcasting this transaction to the network.');
break;
default:
// Not an expected error object. Just write the error to the console.
console.error(error);
break;
}
});Response
最后更新于