Wallets

A Wallet resource is reachable using an associated Address or PublicKey.

Note that a PublicKey might not yet be associated with a Wallet if a particular Address has never sent funds.

Properties

  • Name
    address
    Type
    string
    Description

    The unique address associated with the wallet.

  • Name
    publicKey
    Type
    string
    Description

    The public key associated with the wallet.

  • Name
    balance
    Type
    string
    Description

    The current balance of the wallet, in the smallest denomination (e.g., Satoshi).

  • Name
    nonce
    Type
    string
    Description

    The number of transactions sent from this wallet.

  • Name
    attributes
    Type
    object
    Description

    Additional attributes associated with the wallet, including vote information, validator details, and other metadata.

  • Name
    updated_at
    Type
    string
    Description

    The last update height of the wallet.


GET/wallets

List All Wallets

This endpoint retrieves a paginated list of all wallets, including empty ones.

Query Parameters

  • Name
    page
    Type
    integer
    Description

    The number of the page that will be returned.

  • Name
    limit
    Type
    integer
    Description

    The number of resources per page.

  • Name
    offset
    Type
    integer
    Description

    The number of resources to be skipped.

  • Name
    orderBy
    Type
    string
    Description

    The column by which the resources will be sorted.

  • Name
    address
    Type
    string
    Description

    The address of the wallet to be retrieved.

  • Name
    publicKey
    Type
    string
    Description

    The public key of the wallet to be retrieved.

  • Name
    balance
    Type
    integer
    Description

    The balance of the wallet to be retrieved.

  • Name
    balance.from
    Type
    integer
    Description

    The minimum balance of the wallet to be retrieved.

  • Name
    balance.to
    Type
    integer
    Description

    The maximum balance of the wallet to be retrieved.

  • Name
    nonce
    Type
    integer
    Description

    The nonce of the wallet to be retrieved.

  • Name
    nonce.from
    Type
    integer
    Description

    The minimum nonce of the wallet to be retrieved.

  • Name
    nonce.to
    Type
    integer
    Description

    The maximum nonce of the wallet to be retrieved.

  • Name
    attributes
    Type
    object
    Description

    The attributes of the wallet to be retrieved.

Request

GET
/wallets
curl https://testnet.mainsailhq.com/api/wallets

Response

{
  "meta": {
    "totalCountIsEstimate": true,
    "count": 62,
    "first": "/wallets?transform=true&limit=100&page=1",
    "last": "/wallets?transform=true&limit=100&page=1",
    "next": null,
    "pageCount": 1,
    "previous": null,
    "self": "/wallets?transform=true&limit=100&page=1",
    "totalCount": 62
  },
  "data": [
    {
      "address": "0xBE47E4E73DC8c82f0fF2f5BFa8900aA57624144B",
      "publicKey": "0344f117129787f5f36c40c33f0aa62310f45f00a94361efa3e178e402f539af98",
      "balance": "238187076603773",
      "nonce": "3",
      "attributes": {
        "vote": "0344f117129787f5f36c40c33f0aa62310f45f00a94361efa3e178e402f539af98",
        "nonce": "3",
        "balance": "238187076603773",
        "username": "genesis_3",
        "publicKey": "0344f117129787f5f36c40c33f0aa62310f45f00a94361efa3e178e402f539af98",
        "validatorRank": 1,
        "validatorApproval": 1.91,
        "validatorLastBlock": {
          "hash": "a7d00ea4c86f261d63be4fb0116db772cb509d0bb885b64a01df2510414a2c37",
          "number": 673384,
          "timestamp": 1725489568898
        },
        "validatorPublicKey": "a058709acee67dd7c005f3b301ad201def1a764fca5dfd632c2c0a8280182075e34379ce604908ef9729e930fc97262d",
        "validatorForgedFees": "20000000",
        "validatorForgedTotal": "2288020000000",
        "validatorVoteBalance": "238187076603773",
        "validatorForgedRewards": "2288000000000",
        "validatorProducedBlocks": 12868
      },
      "updated_at": "673418"
    }
  ]
}

GET/wallets/{id}

Retrieve a Wallet

This endpoint retrieves details for a specific wallet by its address or public key.

Path Parameters

  • Name
    id
    Type
    string
    Description

    The unique identifier of the wallet to be retrieved.

Request

GET
/wallets/{id}
curl https://testnet.mainsailhq.com/api/wallets/{id}

Response

{
  "data": {
    "address": "0xBE47E4E73DC8c82f0fF2f5BFa8900aA57624144B",
    "publicKey": "0344f117129787f5f36c40c33f0aa62310f45f00a94361efa3e178e402f539af98",
    "balance": "238187276603773",
    "nonce": "3",
    "attributes": {
      "vote": "0344f117129787f5f36c40c33f0aa62310f45f00a94361efa3e178e402f539af98",
      "nonce": "3",
      "balance": "238187276603773",
      "username": "genesis_3",
      "publicKey": "0344f117129787f5f36c40c33f0aa62310f45f00a94361efa3e178e402f539af98",
      "validatorRank": 1,
      "validatorApproval": 1.91,
      "validatorLastBlock": {
        "hash": "9417def621290ff2432469677d9caaf649853527b3efbf504553c0c350d289d4",
        "number": 673455,
        "timestamp": 1725490145789
      },
      "validatorPublicKey": "a058709acee67dd7c005f3b301ad201def1a764fca5dfd632c2c0a8280182075e34379ce604908ef9729e930fc97262d",
      "validatorForgedFees": "20000000",
      "validatorForgedTotal": "2288220000000",
      "validatorVoteBalance": "238187276603773",
      "validatorForgedRewards": "2288200000000",
      "validatorProducedBlocks": 12869
    },
    "updated_at": "673471"
  }
}

GET/wallets/{walletId}/transactions

List All Transactions of a Wallet

This endpoint retrieves all transactions associated with a specific wallet, identified by its address or public key. It provides a paginated list of transactions that the wallet has participated in, either as a sender or a recipient.

Query Parameters

  • Name
    page
    Type
    integer
    Description

    The number of the page that will be returned.

  • Name
    limit
    Type
    integer
    Description

    The number of resources per page.

  • Name
    offset
    Type
    integer
    Description

    The number of resources to be skipped.

  • Name
    transform
    Type
    boolean
    Description

    The structure of response to be retrieved.

  • Name
    orderBy
    Type
    string
    Description

    The column by which the resources will be sorted.

Request

GET
/wallets/{walletId}/transactions
curl https://testnet.mainsailhq.com/api/wallets/{walletId}/transactions

Response

{
  "meta": {
    "totalCountIsEstimate": true,
    "count": 5,
    "first": "/wallets/0344f117129787f5f36c40c33f0aa62310f45f00a94361efa3e178e402f539af98/transactions?orderBy=timestamp%3Adesc&orderBy=sequence%3Adesc&transform=true&limit=100&page=1",
    "last": "/wallets/0344f117129787f5f36c40c33f0aa62310f45f00a94361efa3e178e402f539af98/transactions?orderBy=timestamp%3Adesc&orderBy=sequence%3Adesc&transform=true&limit=100&page=1",
    "next": null,
    "pageCount": 1,
    "previous": null,
    "self": "/wallets/0344f117129787f5f36c40c33f0aa62310f45f00a94361efa3e178e402f539af98/transactions?orderBy=timestamp%3Adesc&orderBy=sequence%3Adesc&transform=true&limit=100&page=1",
    "totalCount": 5
  },
  "data": [
    {
      "value": "50000000000",
      "asset": null,
      "blockHash": "fc8457d6e82af453ca7090cfc505f78438b8c63584b3fd10482729a595fc47ab",
      "confirmations": 524542,
      "fee": "10000000",
      "hash": "14d1d5834f8ce1499937538eda3eeed5c1686fed9549283b46b0362ad96fa693",
      "nonce": "14",
      "recipient": "0xBE47E4E73DC8c82f0fF2f5BFa8900aA57624144B",
      "senderPublicKey": "03f25455408f9a7e6c6a056b121e68fbda98f3511d22e9ef27b0ebaf1ef9e4eabc",
      "signature": "5f68f01a22aef1cd33f3a47a9cf308e2d133243600b8ca54f8994807d9cc6d488e8358cd5c9aadcaa0b5c051a1d8abe4fd1116513d7ee8af1a9dcc2b068cb499",
      "signatures": null,
      "timestamp": "1721211557144",
      "type": 0,
      "typeGroup": 1,
      "vendorField": null,
      "version": 1
    }
  ]
}


GET/wallets/{id}/transactions/sent

List All Sent Transactions of a Wallet

This endpoint retrieves all outgoing transactions associated with a specific wallet, identified by its address or public key. It provides a paginated list of transactions where the wallet is the sender.

Query Parameters

  • Name
    page
    Type
    integer
    Description

    The number of the page that will be returned.

  • Name
    limit
    Type
    integer
    Description

    The number of resources per page.

  • Name
    offset
    Type
    integer
    Description

    The number of resources to be skipped.

  • Name
    transform
    Type
    boolean
    Description

    The structure of response to be retrieved.

  • Name
    orderBy
    Type
    string
    Description

    The column by which the resources will be sorted.

Request

GET
/wallets/{id}/transactions/sent
curl https://testnet.mainsailhq.com/api/wallets/{id}/transactions/sent

Response

{
  "meta": {
    "totalCountIsEstimate": true,
    "count": 5,
    "first": "/wallets/0344f117129787f5f36c40c33f0aa62310f45f00a94361efa3e178e402f539af98/transactions/sent?orderBy=timestamp%3Adesc&orderBy=sequence%3Adesc&transform=true&limit=100&page=1",
    "last": "/wallets/0344f117129787f5f36c40c33f0aa62310f45f00a94361efa3e178e402f539af98/transactions/sent?orderBy=timestamp%3Adesc&orderBy=sequence%3Adesc&transform=true&limit=100&page=1",
    "next": null,
    "pageCount": 1,
    "previous": null,
    "self": "/wallets/0344f117129787f5f36c40c33f0aa62310f45f00a94361efa3e178e402f539af98/transactions/sent?orderBy=timestamp%3Adesc&orderBy=sequence%3Adesc&transform=true&limit=100&page=1",
    "totalCount": 5
  },
  "data": [
    {
      "value": "50000000000",
      "asset": null,
      "blockHash": "fc8457d6e82af453ca7090cfc505f78438b8c63584b3fd10482729a595fc47ab",
      "confirmations": 524542,
      "fee": "10000000",
      "hash": "14d1d5834f8ce1499937538eda3eeed5c1686fed9549283b46b0362ad96fa693",
      "nonce": "14",
      "recipient": "0xBE47E4E73DC8c82f0fF2f5BFa8900aA57624144B",
      "senderPublicKey": "03f25455408f9a7e6c6a056b121e68fbda98f3511d22e9ef27b0ebaf1ef9e4eabc",
      "signature": "5f68f01a22aef1cd33f3a47a9cf308e2d133243600b8ca54f8994807d9cc6d488e8358cd5c9aadcaa0b5c051a1d8abe4fd1116513d7ee8af1a9dcc2b068cb499",
      "signatures": null,
      "timestamp": "1721211557144",
      "type": 0,
      "typeGroup": 1,
      "vendorField": null,
      "version": 1
    }
  ]
}

GET/wallets/{id}/transactions/received

List All Received Transactions of a Wallet

This endpoint retrieves all incoming transactions associated with a specific wallet, identified by its address or public key. It provides a paginated list of transactions where the wallet is the recipient.

Query Parameters

  • Name
    page
    Type
    integer
    Description

    The number of the page that will be returned.

  • Name
    limit
    Type
    integer
    Description

    The number of resources per page.

  • Name
    offset
    Type
    integer
    Description

    The number of resources to be skipped.

  • Name
    transform
    Type
    boolean
    Description

    The structure of response to be retrieved.

  • Name
    orderBy
    Type
    string
    Description

    The column by which the resources will be sorted.

Request

GET
/wallets/{id}/transactions/received
curl https://testnet.mainsailhq.com/api/wallets/{id}/transactions/received

Response

{
  "meta": {
    "totalCountIsEstimate": true,
    "count": 5,
    "first": "/wallets/0344f117129787f5f36c40c33f0aa62310f45f00a94361efa3e178e402f539af98/transactions/received?orderBy=timestamp%3Adesc&orderBy=sequence%3Adesc&transform=true&limit=100&page=1",
    "last": "/wallets/0344f117129787f5f36c40c33f0aa62310f45f00a94361efa3e178e402f539af98/transactions/received?orderBy=timestamp%3Adesc&orderBy=sequence%3Adesc&transform=true&limit=100&page=1",
    "next": null,
    "pageCount": 1,
    "previous": null,


    "self": "/wallets/0344f117129787f5f36c40c33f0aa62310f45f00a94361efa3e178e402f539af98/transactions/received?orderBy=timestamp%3Adesc&orderBy=sequence%3Adesc&transform=true&limit=100&page=1",
    "totalCount": 5
  },
  "data": [
    {
      "value": "50000000000",
      "asset": null,
      "blockHash": "fc8457d6e82af453ca7090cfc505f78438b8c63584b3fd10482729a595fc47ab",
      "confirmations": 524542,
      "fee": "10000000",
      "hash": "14d1d5834f8ce1499937538eda3eeed5c1686fed9549283b46b0362ad96fa693",
      "nonce": "14",
      "recipient": "0xBE47E4E73DC8c82f0fF2f5BFa8900aA57624144B",
      "senderPublicKey": "03f25455408f9a7e6c6a056b121e68fbda98f3511d22e9ef27b0ebaf1ef9e4eabc",
      "signature": "5f68f01a22aef1cd33f3a47a9cf308e2d133243600b8ca54f8994807d9cc6d488e8358cd5c9aadcaa0b5c051a1d8abe4fd1116513d7ee8af1a9dcc2b068cb499",
      "signatures": null,
      "timestamp": "1721211557144",
      "type": 0,
      "typeGroup": 1,
      "vendorField": null,
      "version": 1
    }
  ]
}

GET/wallets/{id}/votes

List All Votes of a Wallet

This endpoint retrieves all votes cast by a specific wallet, identified by its address or public key. It provides a paginated list of transactions representing the votes.

Query Parameters

  • Name
    page
    Type
    integer
    Description

    The number of the page that will be returned.

  • Name
    limit
    Type
    integer
    Description

    The number of resources per page.

  • Name
    offset
    Type
    integer
    Description

    The number of resources to be skipped.

  • Name
    transform
    Type
    boolean
    Description

    The structure of response to be retrieved.

  • Name
    orderBy
    Type
    string
    Description

    The column by which the resources will be sorted.

Request

GET
/wallets/{id}/votes
curl https://testnet.mainsailhq.com/api/wallets/{id}/votes

Response

{
  "meta": {
    "totalCountIsEstimate": true,
    "count": 1,
    "first": "/wallets/0344f117129787f5f36c40c33f0aa62310f45f00a94361efa3e178e402f539af98/votes?orderBy=timestamp%3Adesc&orderBy=sequence%3Adesc&transform=true&limit=100&page=1",
    "last": "/wallets/0344f117129787f5f36c40c33f0aa62310f45f00a94361efa3e178e402f539af98/votes?orderBy=timestamp%3Adesc&orderBy=sequence%3Adesc&transform=true&limit=100&page=1",
    "next": null,
    "pageCount": 1,
    "previous": null,
    "self": "/wallets/0344f117129787f5f36c40c33f0aa62310f45f00a94361efa3e178e402f539af98/votes?orderBy=timestamp%3Adesc&orderBy=sequence%3Adesc&transform=true&limit=100&page=1",
    "totalCount": 68
  },
  "data": [
    {
      "value": "0",
      "asset": {
        "votes": [
          "0344f117129787f5f36c40c33f0aa62310f45f00a94361efa3e178e402f539af98"
        ],
        "unvotes": []
      },
      "blockHash": "daca35860611eb5d9d3d2411e207ec37070c9e59ee627c4b71c87e0f6e77e8ce",
      "confirmations": 673539,
      "fee": "0",
      "hash": "26aecd758421fd6d06d6adedc8d01b3da934ed93edaf2012fcf8520785516dee",
      "nonce": "3",
      "recipient": null,
      "senderPublicKey": "0344f117129787f5f36c40c33f0aa62310f45f00a94361efa3e178e402f539af98",
      "signature": "6f388df8669df99eb742e2a751b417c6d6fe2c682c916b47723e649014ab7a215f6a953ea7043e8b44b12fd0654cdf81b34a49ec31b61c58e77a5344e93c598b",
      "signatures": null,
      "timestamp": "1719987477406",
      "type": 3,
      "typeGroup": 1,
      "vendorField": null,
      "version": 1
    }
  ]
}

GET/wallets/top

List Top Wallets

This endpoint retrieves a list of wallets sorted by balance in descending order. It provides a paginated list of the top wallets with the highest balances.

Query Parameters

  • Name
    page
    Type
    integer
    Description

    The number of the page that will be returned.

  • Name
    limit
    Type
    integer
    Description

    The number of resources per page.

  • Name
    offset
    Type
    integer
    Description

    The number of resources to be skipped.

  • Name
    transform
    Type
    boolean
    Description

    The structure of response to be retrieved.

  • Name
    orderBy
    Type
    string
    Description

    The column by which the resources will be sorted.

Request

GET
/wallets/top
curl https://testnet.mainsailhq.com/api/wallets/top

Response

{
  "meta": {
    "totalCountIsEstimate": true,
    "count": 62,
    "first": "/wallets/top?transform=true&limit=100&page=1",
    "last": "/wallets/top?transform=true&limit=100&page=1",
    "next": null,
    "pageCount": 1,
    "previous": null,
    "self": "/wallets/top?transform=true&limit=100&page=1",
    "totalCount": 62
  },
  "data": [
    {
      "address": "0xBE47E4E73DC8c82f0fF2f5BFa8900aA57624144B",
      "publicKey": "0344f117129787f5f36c40c33f0aa62310f45f00a94361efa3e178e402f539af98",
      "balance": "238187876603773",
      "nonce": "3",
      "attributes": {
        "vote": "0344f117129787f5f36c40c33f0aa62310f45f00a94361efa3e178e402f539af98",
        "nonce": "3",
        "balance": "238187876603773",
        "username": "genesis_3",
        "publicKey": "0344f117129787f5f36c40c33f0aa62310f45f00a94361efa3e178e402f539af98",
        "validatorRank": 1,
        "validatorApproval": 1.91,
        "validatorLastBlock": {
          "hash": "13b8135a22f1a67ecba2c07f6fb8ec2acaff7fa77528c3e0c1455dc1bffb9a5e",
          "number": 673592,
          "timestamp": 1725491294998
        },
        "validatorPublicKey": "a058709acee67dd7c005f3b301ad201def1a764fca5dfd632c2c0a8280182075e34379ce604908ef9729e930fc97262d",
        "validatorForgedFees": "20000000",
        "validatorForgedTotal": "2288820000000",
        "validatorVoteBalance": "238187876603773",
        "validatorForgedRewards": "2288800000000",
        "validatorProducedBlocks": 12872
      },
      "updated_at": "673630"
    }
  ]
}