SucessResponse

interface SuccessResponse {
    status?: number;
    method: string | undefined;
    url: string | undefined;
    request_body: string | undefined;
    data: any;
}
  • status: The HTTP response status code. For example, it could be 200 if the request was successful.

  • method: The HTTP method used for the request. For instance, it could be GET, POST, etc.

  • url: The URL address to which the request was sent. This represents the destination of the request.

  • request_body: The data included in the body of the HTTP request. If you're executing a GET function, the request body will be undefined.

  • data: The data received if the request was successful. This may include information returned from the Mitum blockchain.

Example

// import Mitum Object first, see import Mitum section

const mitum = new Mitum("http://127.0.0.1:24321");
const address = "0x41EFb6902ADcb1214a7123b01af66b1D13b89864fca";
const accountInfo = async () => {
  const info = await mitum.account.getAccountInfo(address);
  console.log(info)
};
accountInfo();

// SuccessResponse
{
  status: 200,
  method: 'get',
  url: 'http://127.0.0.1:24321/account/0x41EFb6902ADcb1214a7123b01af66b1D13b89864fca',
  request_body: undefined,
  data: {
    _hint: 'mitum-currency-account-value-v0.0.1',
    hash: '3thwfGVPEQqcutUMmhtn9GLeSxGNkmQqfEtgaQUWwmww',
    address: '0x41EFb6902ADcb1214a7123b01af66b1D13b89864fca',
    keys: {
      _hint: 'mitum-currency-keys-v0.0.1',
      hash: '',
      keys: [Array],
      threshold: 100
    },
    balance: [ [Object] ],
    height: 752899,
    contract_account_status: {
      _hint: 'mitum-currency-contract-account-status-v0.0.1',
      owner: null,
      is_active: false,
      handlers: []
    }
  }
}

Last updated