Get history
Get the history of one or multiple addresses.
Example - address
const params = {
witnesses: await client.getCachedWitnesses()
addresses: [
'ULQA63NGEZACP4N7ZMBUBISH6ZTCUS2Q'
]
};
client.api.getHistory(params, function(err, result) {
if (err) return console.error(err);
console.log(result);
});
Example - requested joints
const params = {
witnesses: await client.getCachedWitnesses()
requested_joints: [
'QjJsukONZ57VBVtLk/0ak1jMYNW0vw7q0So95KBJH2k=',
'H1RSMS/7sBM77rYNiN1rWtbVJthg5BTRIf6ode9vaiE='
]
};
client.api.getHistory(params, function(err, result) {
if (err) return console.error(err);
console.log(result);
});
Returns
{
unstable_mc_joints: [
{
unit: {Object}
},
{
unit: {Object}
},
...
],
witness_change_and_definition_joints: [
{
unit: {Object},
ball: 'CxK1luSnAk5+MaGyaE9wl26JdwAkSPFDqWJdYs9gRng='
}
],
joints: [
{
unit: {Object},
ball: 'HCEsVPYN9g7tGOVWlixTlA7Cg4fXsd1VDQSgUzHZljI='
},
{
unit: {Object},
ball: '7Zk9IQja19XZyJY0MPZZxAhIjV5Uydr+zUvoQXvGBKs='
},
...
],
proofchain_balls: [
{
unit: 'rVuepU0c43PKbqM2BgnpOLaBCGdaxG0w6WBpSjaCHgA=',
ball: 'zTN1OJcGfibm2hxitGnQRx0HSzhfhycFIXsaL7gnUNY=',
parent_balls: [Array]
},
{
unit: 'Mn8nOpIQvhQvPjlnDBbtYwUbRolrt40Igr8txWch0s0=',
ball: 'Ocgs5zd0mWeqWNm/+gT0wqpfnd9+mj5BaaABndamw0E=',
parent_balls: [Array]
},
...
],
aa_responses: [
{
mci: 5570689,
trigger_address: "ULQA63NGEZACP4N7ZMBUBISH6ZTCUS2Q",
aa_address: "NINAQ4KWRURQDX3O7G3KE6IFJKIA4Q25",
trigger_unit: "QjJsukONZ57VBVtLk/0ak1jMYNW0vw7q0So95KBJH2k=",
bounced: 0,
response_unit: "H1RSMS/7sBM77rYNiN1rWtbVJthg5BTRIf6ode9vaiE=",
response: "{\"responseVars\":{\"type\":\"swap\",\"asset1_amount\":6149564711}}",
timestamp: 1595783576,
creation_date: "2020-07-26 17:23:08"
}
]
}
Last updated