Address
Creating new Byteball address
Params:
walletId - {string} - Wallet id
await core.createNewAddress('x/i+NasyFy1UFJtZ5MCU4tnKO3NdK0KSF5rDNUrg8QY=')
biot-core createNewAddress x/i+NasyFy1UFJtZ5MCU4tnKO3NdK0KSF5rDNUrg8QY=
client.request('createNewAddress', ['x/i+NasyFy1UFJtZ5MCU4tnKO3NdK0KSF5rDNUrg8QY='], (err, data) => {
if(err)
throw err;
console.log(data);
});
let message_id = id++;
socket.send(JSON.stringify({
id: message_id,
name: 'createNewAddress',
args: ['x/i+NasyFy1UFJtZ5MCU4tnKO3NdK0KSF5rDNUrg8QY=']
}));
socket.onmessage = function (event) {
let data = JSON.parse(event.data);
if (data.id === message_id && data.name === 'createNewAddress') {
console.log('result:', data.result);
}
};
4QNGY75DLQ56LQT72DDOGSXQHQE2PRBN
Getting balance of address
Params:
address - {string} - Byteball address
await core.getAddressBalance('4QNGY75DLQ56LQT72DDOGSXQHQE2PRBN')
biot-core getAddressBalance 4QNGY75DLQ56LQT72DDOGSXQHQE2PRBN
client.request('getAddressBalance', ['4QNGY75DLQ56LQT72DDOGSXQHQE2PRBN'], (err, data) => {
if(err)
throw err;
console.log(data);
});
let message_id = id++;
socket.send(JSON.stringify({
id: message_id,
name: 'getAddressBalance',
args: ['4QNGY75DLQ56LQT72DDOGSXQHQE2PRBN']
}));
socket.onmessage = function (event) {
let data = JSON.parse(event.data);
if (data.id === message_id && data.name === 'getAddressBalance') {
console.log('result:', data.result);
}
};
{ base: { stable: 0, pending: 0 } }
Getting list of transactions by address
Params:
address - {string} - Byteball address
await core.getListTransactionsForAddress('4QNGY75DLQ56LQT72DDOGSXQHQE2PRBN')
biot-core getListTransactionsForAddress 4QNGY75DLQ56LQT72DDOGSXQHQE2PRBN
client.request('getListTransactionsForAddress', ['4QNGY75DLQ56LQT72DDOGSXQHQE2PRBN'], (err, data) => {
if(err)
throw err;
console.log(data);
});
let message_id = id++;
socket.send(JSON.stringify({
id: message_id,
name: 'getListTransactionsForAddress',
args: ['4QNGY75DLQ56LQT72DDOGSXQHQE2PRBN']
}));
socket.onmessage = function (event) {
let data = JSON.parse(event.data);
if (data.id === message_id && data.name === 'getListTransactionsForAddress') {
console.log('result:', data.result);
}
};
[ { action: 'received',
amount: 69000,
my_address: 'BIKYZXVKFOEGG5LQEPE5SWBHNM43FEBB',
arrPayerAddresses: [ 'C4QX5W3FMDNNLT47FHUCTBP75PIHDFZE' ],
confirmations: 1,
unit: 'DCaJ0KjGBqAoPnFau5poKukk9OJtPTwfWDcuDve5tEA=',
fee: 589,
time: '1532789752',
level: null,
mci: 651926,
asset: undefined },
{ action: 'sent',
amount: 4200,
addressTo: 'H6OM5MV7RU2L3KSBY726V7WC2GL4MXXG',
original_address: null,
textAddress: '',
claimed: false,
mnemonic: null,
confirmations: 1,
unit: '/nvKyYwaDysXPhbeWK+Lhb96pg7A3d6lfGGm+J8jjq8=',
fee: 896,
time: '1530967712',
level: null,
mci: 635812,
isTextcoin: false,
asset: undefined },
{ action: 'sent',
amount: 97400,
addressTo: 'LXMCTWKAMC6AB4XHUAPBCEF5AOHC2KRQ',
original_address: null,
textAddress: '',
claimed: false,
mnemonic: null,
confirmations: 1,
unit: '/nvKyYwaDysXPhbeWK+Lhb96pg7A3d6lfGGm+J8jjq8=',
fee: 896,
time: '1530967712',
level: null,
mci: 635812,
isTextcoin: false,
asset: undefined },
{ action: 'sent',
amount: 93504,
addressTo: 'MMEXROUDVOGEKYT2E2PIYFGQCPDWCZJY',
original_address: null,
textAddress: '',
claimed: false,
mnemonic: null,
confirmations: 1,
unit: '/nvKyYwaDysXPhbeWK+Lhb96pg7A3d6lfGGm+J8jjq8=',
fee: 896,
time: '1530967712',
level: null,
mci: 635812,
isTextcoin: false,
asset: undefined },
{ action: 'received',
amount: 96000,
my_address: 'BIKYZXVKFOEGG5LQEPE5SWBHNM43FEBB',
arrPayerAddresses: [ '2GF2PW7NGIXCAG6F5D4KNTRVFS5UF4GA' ],
confirmations: 1,
unit: 'uBRAJ8+IlLpaoHx003oIWDyk1TmJ96MK0+fmlCx5gCM=',
fee: 589,
time: '1530967632',
level: null,
mci: 635796,
asset: undefined } ]
Getting address info
Params:
address - {string} - Byteball address
await core.myAddressInfo('4QNGY75DLQ56LQT72DDOGSXQHQE2PRBN')
biot-core myAddressInfo 4QNGY75DLQ56LQT72DDOGSXQHQE2PRBN
client.request('myAddressInfo', ['4QNGY75DLQ56LQT72DDOGSXQHQE2PRBN'], (err, data) => {
if(err)
throw err;
console.log(data);
});
let message_id = id++;
socket.send(JSON.stringify({
id: id++,
name: 'myAddressInfo',
args: ['4QNGY75DLQ56LQT72DDOGSXQHQE2PRBN']
}));
socket.onmessage = function (event) {
let data = JSON.parse(event.data);
if (data.id === message_id && data.name === 'myAddressInfo') {
console.log('result:', data.result);
}
};
{ account: 3, is_change: 0, address_index: 0 }
Last updated