Response Format and Types

Response Data

Format data of any response

type Response<T> = {
  data: T;
  method: string;
  status: number;
};

Example data

{
    status: 200, // check at Status codes
    method: "<method name>",
    data: <data>
}

Check list of status number at Status codes

Public Account

type PublicAccount = {
  address: string;
  publicKey: string;
};

Example data

{
    "address": "0x20364f4121f608f2a09830bc0ab6980fdccff45c2f5df6c41c17f40e511fe80e",
    "publicKey": "0x89a10bded6d812d21299ee129410d53a74f12f91183989c19282fa24ce629b49"
}

Other data types

Other data types will be obtained from Aptos SDK

Last updated