GET request through delegate server
After setting up the server, you can use all methods using get in the same way as usual.
const mitum = new Mitum("http://{mainnet address}", "http://{delegate server address}");
// async request
const addressInfo = async () => {
const address = "0x4874C17C354c498cf44D2946612DBe47fBcE7E87fca";
const accountInfo = await mitum.account.getAccountInfo(address);
console.log(accountInfo.data);
};
addressInfo();
// output
{
_hint: 'mitum-currency-account-value-v0.0.1',
hash: '3TFcphNzrXW7JSfij6EmvbguZoWsqFBtkvAJhncLHxn9',
address: '0x4874C17C354c498cf44D2946612DBe47fBcE7E87fca',
keys: {
_hint: 'mitum-currency-keys-v0.0.1',
hash: '',
keys: [ [Object] ],
threshold: 100
},
balance: [
{
amount: '7999998514',
currency: 'MIT',
_hint: 'mitum-currency-amount-v0.0.1'
}
],
height: 76606,
contract_account_status: {
_hint: 'mitum-currency-contract-account-status-v0.0.1',
owner: null,
is_active: false,
handlers: []
}
}
Last updated