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

Transactions

PreviousFaucetNextBlock

Transactions Api

Fetch chain id

get
Responses
200
current chain id
application/json
Responseinteger · uint8
get
GET /rpc/v1/transactions/chain_id HTTP/1.1
Host: rpc-mainnet.supra.com
Accept: */*
200

current chain id

1

Fetch current recommended gas price

get
Responses
200
current maximum and average gas price
application/json
get
GET /rpc/v1/transactions/estimate_gas_price HTTP/1.1
Host: rpc-mainnet.supra.com
Accept: */*
200

current maximum and average gas price

{
  "mean_gas_price": 1,
  "max_gas_price": 1
}

Get information about a transaction by its hash.

get
Path parameters
hashstringRequired

Hash of the transaction to lookup

Responses
200
Transaction data of the given transaction hash
application/json
Responseall of | nullable
get
GET /rpc/v1/transactions/{hash} HTTP/1.1
Host: rpc-mainnet.supra.com
Accept: */*
200

Transaction data of the given transaction hash

{
  "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 chain id
  • GETFetch current recommended gas price
  • POSTSimulate a transaction in scope of RPC node. Simulated transaction must not have a valid signature.
  • POSTSubmit a transaction to Supra.
  • GETGet information about a transaction by its hash.

Simulate a transaction in scope of RPC node. Simulated transaction must not have a valid signature.

post
Body
one ofOptional
or
Responses
200
Simulation is ready
application/json
post
POST /rpc/v1/transactions/simulate HTTP/1.1
Host: rpc-mainnet.supra.com
Content-Type: application/json
Accept: */*
Content-Length: 43

{
  "Smr": {
    "signer_data": {},
    "transaction": {}
  }
}
200

Simulation is ready

{
  "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"
}

Submit a transaction to Supra.

post
Body
one ofOptional
or
Responses
200
transaction submitted
application/json
Responsestring · binary

Represents a hash digest (32 bytes).

post
POST /rpc/v1/transactions/submit HTTP/1.1
Host: rpc-mainnet.supra.com
Content-Type: application/json
Accept: */*
Content-Length: 43

{
  "Smr": {
    "signer_data": {},
    "transaction": {}
  }
}
200

transaction submitted

binary