Join our
Discord!
LogoLogo
SupraScan ExplorerStarKey WalletDiscord
MoveVM
  • Network
  • Oracles
  • Automation
  • SupraNova
  • Guides
MoveVM
  • Overview
  • Getting Started
    • Install Supra CLI with Docker
    • Create a Supra Account
    • Create a Move Package
      • Initialize a Package
      • Write a Module
      • Compile and Publish
      • Interact with a Package
    • Create a dApp with StarKey
  • Network Information
  • Token Standards
  • Learn Move 101
    • Getting Started with Move
    • Unsigned Integers in Move
    • Math Operations in Move
    • Using Vectors in Move
    • Reading Resource Data with borrow_global
    • Passing Data in Move: Value vs. Reference
    • Adding Elements with vector::push_back
    • Emitting Events with event::emit
  • Move Book
    • Getting Started
      • Modules and Scripts
      • Move Tutorial
    • Primitive Types
      • Integers
      • Bool
      • Address
      • Vector
      • Signer
      • References
      • Tuples and Unit
    • Basic Concepts
      • Local Variables and Scope
      • Equality
      • Abort and Assert
      • Conditionals
      • While, For, and Loop
      • Functions
      • Structs and Resources
      • Constants
      • Generics
      • Type Abilities
      • Uses and Aliases
      • Friends
      • Packages
      • Package Upgrades
      • Unit Tests
    • Global Storage
      • Structure
      • Operators
    • Reference
      • Standard Library
      • Coding Conventions
  • TypeScript SDK
    • Guides
      • Create Supra Accounts
      • Publish a Package
    • Documentation
    • Repository
  • Rest API
    • Mainnet
      • Accounts
      • Faucet
      • Transactions
      • Block
      • View
      • Consensus
      • Events
      • Tables
    • Testnet
      • Accounts
      • Faucet
      • Transactions
      • Block
      • View
      • Events
      • Tables
  • Developer Resources
    • Supra Dapp Templates
    • Supra Move VS Code Extension
  • Links
    • Supra DevHub
    • SupraScan Block Explorer
    • StarKey Wallet
    • Live Data Feeds
    • Whitepapers
    • Security Audits
    • Supra's Official GitHub
Powered by GitBook
On this page
  1. Rest API
  2. Mainnet

Accounts

PreviousMainnetNextFaucet

Accounts Api

Fetch account info

get

contains auth key & sequence number for the account

Path parameters
addressstringRequired

address of the account to lookup

Responses
200
account information
application/json
get
GET /rpc/v1/accounts/{address} HTTP/1.1
Host: rpc-mainnet.supra.com
Accept: */*
200

account information

{
  "sequence_number": 1,
  "authentication_key": "binary"
}

List of finalized coin withdraw/deposit transactions relevant to the move account. Return max 100 transactions per request.

get

It includes both transactions sent from and received by the account.

Path parameters
addressstringRequired

Hex encoded move address for the account

Query parameters
countinteger | nullableOptional

Maximum number of items to return. Default is 20.

startinteger ยท uint64 | nullableOptional

The cursor that the search should start from. The cursor for a given transaction can be derived by adding its index (where indexes start from zero) in the block in which it became finalized to the timestamp of the block.

During a paginated query, the cursor returned in the previous page should be used as the starting cursor of the next page.

If provided, return :count of transactions starting from this cursor in ascending order. If not provided, return :count of most recent transactions in descending order.

Responses
200
List of transactions sent from and received by the move account.
application/json
get
GET /rpc/v1/accounts/{address}/coin_transactions HTTP/1.1
Host: rpc-mainnet.supra.com
Accept: */*
200

List of transactions sent from and received by the move account.

{
  "record": [
    {
      "authenticator": {},
      "block_header": {
        "hash": "binary",
        "height": 1,
        "timestamp": {
          "timestamp": 1
        }
      },
      "hash": "binary",
      "header": {
        "chain_id": 1,
        "expiration_timestamp": {
          "timestamp": 1
        },
        "sender": "text",
        "sequence_number": 1,
        "gas_unit_price": 1,
        "max_gas_amount": 1
      },
      "payload": {},
      "output": {
        "Dkg": "Success"
      },
      "status": "Success"
    }
  ]
}

Get account modules by address

get
Path parameters
addressstringRequired

account address to lookup

Query parameters
countinteger | nullableOptional

Maximum number of items to return. Default is 20.

startstring | nullableOptional

Cursor specifying where to start for pagination use the curser returned by the API

Responses
200
account module list
application/json
Responseone of
or
get
GET /rpc/v1/accounts/{address}/modules HTTP/1.1
Host: rpc-mainnet.supra.com
Accept: */*
200

account module list

{
  "Resources": {}
}
get
Path parameters
addressstringRequired

account address to lookup

module_namestringRequired

Move module identifier

Responses
200
View account module by Move module name
application/json
get
GET /rpc/v1/accounts/{address}/modules/{module_name} HTTP/1.1
Host: rpc-mainnet.supra.com
Accept: */*
200

View account module by Move module name

{
  "result": [
    {
      "U8": 1
    }
  ]
}

Get account resources by address

get
Path parameters
addressstringRequired

account address to lookup

Query parameters
countinteger | nullableOptional

Maximum number of items to return. Default is 20.

startstring | nullableOptional

Cursor specifying where to start for pagination use the curser returned by the API

Responses
200
account resource list
application/json
Responseone of
or
get
GET /rpc/v1/accounts/{address}/resources HTTP/1.1
Host: rpc-mainnet.supra.com
Accept: */*
200

account resource list

{
  "Resources": {}
}

View account resource by Move type

get
Path parameters
addressstringRequired

account address to lookup

struct_tagstringRequired

Move struct tag

Example: 0x1::coin::CoinStore<0x1::supra_coin::SupraCoin>
Responses
200
View account resource by Move Struct type
application/json
get
GET /rpc/v1/accounts/{address}/resources/{struct_tag} HTTP/1.1
Host: rpc-mainnet.supra.com
Accept: */*
200

View account resource by Move Struct type

{
  "result": [
    {
      "U8": 1
    }
  ]
}

List of finalized transactions sent by the move account. Return max 100 transactions per request.

get
Path parameters
addressstringRequired

Hex encoded move address for the account

Query parameters
countinteger | nullableOptional

Maximum number of items to return. Default is 20.

startinteger ยท uint64 | nullableOptional

Starting sequence number. If provided, return :count of transactions starting from this sequence number in ascending order. If not provided, return :count of most recent transactions in descending order.

Responses
200
List of transactions from the move account.
application/json
get
GET /rpc/v1/accounts/{address}/transactions HTTP/1.1
Host: rpc-mainnet.supra.com
Accept: */*
200

List of transactions from the move account.

{
  "record": [
    {
      "authenticator": {},
      "block_header": {
        "hash": "binary",
        "height": 1,
        "timestamp": {
          "timestamp": 1
        }
      },
      "hash": "binary",
      "header": {
        "chain_id": 1,
        "expiration_timestamp": {
          "timestamp": 1
        },
        "sender": "text",
        "sequence_number": 1,
        "gas_unit_price": 1,
        "max_gas_amount": 1
      },
      "payload": {},
      "output": {
        "Dkg": "Success"
      },
      "status": "Success"
    }
  ]
}
  • GETFetch account info
  • GETList of finalized coin withdraw/deposit transactions relevant to the move account. Return max 100 transactions per request.
  • GETGet account modules by address
  • GET/rpc/v1/accounts/{address}/modules/{module_name}
  • GETGet account resources by address
  • GETView account resource by Move type
  • GETList of finalized transactions sent by the move account. Return max 100 transactions per request.