Join our
Discord!
LogoLogo
SupraScan ExplorerStarKey WalletDiscord
MoveVM
  • Network
  • Oracles
  • Automation
  • SupraNova
  • AI Agents
MoveVM
  • Overview
  • Getting Started
    • Introduction to Docker
    • Setup Supra CLI
    • Create a Supra Account
    • Create a Move 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
  • Aptos to Supra Cheatsheet
  • Ethereum to Supra Move Cheatsheet
  • 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
  • Supra Multisig Guide
  • Binary Canonical Serialization (BCS) Standard Guide
  • Developer Resources
    • Supra Dapp Templates
    • Supra Move VS Code Extension
  • Native Oracles
    • Data Feeds (Push)
    • dVRF (Randomness)
    • Automation
    • SupraNova Bridge
Powered by GitBook

Links

  • Whitepapers
  • Bug Bounty
  • Security Audits

‎

  • Supra Dev Hub
  • Supra Labs Github
  • Entropy Foundation Github
On this page
  1. Rest API
  2. Testnet

Transactions

PreviousFaucetNextBlock

Transactions Api

Chain id (v1)

get

Fetch chain id

Responses
200
Current chain id
application/json
Responseinteger · u-int8
get
GET /rpc/v1/transactions/chain_id HTTP/1.1
Host: rpc-testnet.supra.com
Accept: */*
200

Current chain id

1
Deprecated

Estimate gas price (v1)

get

Get statistics derived from the gas prices of recently executed transactions.

Responses
200
Returns the mean and maximum gas prices of recently executed transactions.
application/json
get
GET /rpc/v1/transactions/estimate_gas_price HTTP/1.1
Host: rpc-testnet.supra.com
Accept: */*
200

Returns the mean and maximum gas prices of recently executed transactions.

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

Transaction parameters v1

get

Retrieve limits that a client must respect when composing a transaction.

Responses
200
Acceptable parameters for transaction submission
application/json
get
GET /rpc/v1/transactions/parameters HTTP/1.1
Host: rpc-testnet.supra.com
Accept: */*
200

Acceptable parameters for transaction submission

{
  "max_transaction_time_to_live_seconds": 1
}
Deprecated

Get transaction by hash (v1)

get

Get information about a transaction by its hash.

Path parameters
hashstringRequired

Hash of the transaction to lookup

Responses
200
Transaction data of the given transaction hash
application/json
Responseone of
nullOptional
or
get
GET /rpc/v1/transactions/{hash} HTTP/1.1
Host: rpc-testnet.supra.com
Accept: */*
200

Transaction data of the given transaction hash

No content

Estimate gas price (v2)

get

Get statistics derived from the gas prices of recently executed transactions.

Responses
200
Returns the mean, median and maximum gas prices of recently executed transactions.
application/json
get
GET /rpc/v2/transactions/estimate_gas_price HTTP/1.1
Host: rpc-testnet.supra.com
Accept: */*
200

Returns the mean, median and maximum gas prices of recently executed transactions.

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

Get transaction by hash (v2)

get

Get information about a transaction by its hash.

Path parameters
hashstringRequired

Hash of the transaction to lookup

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

Transaction data of the given transaction hash

{
  "authenticator": {},
  "block_header": null,
  "hash": "text",
  "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 transaction by hash v3

get

Get information about a transaction by its hash.

Path parameters
hashstringRequired

Hash of the transaction to lookup

Query parameters
typestring · enumOptional

Type of the transaction to be queried.

Possible values:
Responses
200
Transaction data of the given transaction hash
application/json
Responseone of
all ofOptional
or
all ofOptional
or
all ofOptional
get
GET /rpc/v3/transactions/{hash} HTTP/1.1
Host: rpc-testnet.supra.com
Accept: */*
200

Transaction data of the given transaction hash

{
  "authenticator": {},
  "block_header": null,
  "hash": "text",
  "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",
  "txn_type": "user"
}
  • GETChain id (v1)
  • GETEstimate gas price (v1)
  • GETTransaction parameters v1
  • POSTSimulate a transaction (v1)
  • POSTSubmit transaction (v1)
  • GETGet transaction by hash (v1)
  • GETEstimate gas price (v2)
  • POSTSimulate a transaction (v2)
  • GETGet transaction by hash (v2)
  • POSTSimulate a transaction (v3)
  • POSTSubmit transaction (v3)
  • GETGet transaction by hash v3
Deprecated

Simulate a transaction (v1)

post
Body
one ofOptional

Transaction variants supported by Supra.

or
Responses
200
Simulate a transaction against the current state of the RPC node. The transaction must have an invalid signature.
application/json
post
POST /rpc/v1/transactions/simulate HTTP/1.1
Host: rpc-testnet.supra.com
Content-Type: application/json
Accept: */*
Content-Length: 796

{
  "Move": {
    "raw_txn": {
      "sender": "3ef46383308ad31c00ce1ca02bf113a9327a94e302d934f32f70954bb4cba035",
      "sequence_number": 0,
      "payload": {
        "EntryFunction": {
          "module": {
            "address": "0x0000000000000000000000000000000000000000000000000000000000000001",
            "name": "supra_account"
          },
          "function": "transfer",
          "ty_args": [],
          "args": [
            [
              234,
              100,
              210,
              42,
              5,
              4,
              135,
              249,
              11,
              193,
              212,
              28,
              224,
              115,
              170,
              202,
              20,
              90,
              51,
              180,
              133,
              54,
              138,
              63,
              213,
              95,
              209,
              36,
              173,
              235,
              38,
              224
            ],
            [
              0,
              45,
              49,
              1,
              0,
              0,
              0,
              0
            ]
          ]
        }
      },
      "max_gas_amount": 500000,
      "gas_unit_price": 100,
      "expiration_timestamp_secs": 1841875694,
      "chain_id": 255
    },
    "authenticator": {
      "Ed25519": {
        "public_key": "0x7b017e7c4b83e06ad2dab990ff3b091f9995a2a2610dee1d665dc8a2510b539f",
        "signature": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
      }
    }
  }
}
200

Simulate a transaction against the current state of the RPC node. The transaction must have an invalid signature.

{
  "authenticator": {},
  "block_header": null,
  "hash": "text",
  "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 transaction (v1)

post

Submit a transaction to Supra.

Body
one ofOptional

Transaction variants supported by Supra.

or
Responses
200
transaction submitted
application/json
Responsestring

Hex encoded hash

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

{
  "Smr": {
    "signer_data": {
      "signer": {},
      "signature": {}
    },
    "transaction": {
      "header": {
        "chain_id": 1,
        "expiration_timestamp": {
          "timestamp": 1
        },
        "sender": "text",
        "sequence_number": 1,
        "gas_unit_price": 1,
        "max_gas_amount": 1
      },
      "payload": {}
    }
  }
}
200

transaction submitted

text

Simulate a transaction (v2)

post
Body
one ofOptional

Transaction variants supported by Supra.

or
Responses
200
Simulate a transaction against the current state of the RPC node. The transaction must have an invalid signature.
application/json
post
POST /rpc/v2/transactions/simulate HTTP/1.1
Host: rpc-testnet.supra.com
Content-Type: application/json
Accept: */*
Content-Length: 218

{
  "Smr": {
    "signer_data": {
      "signer": {},
      "signature": {}
    },
    "transaction": {
      "header": {
        "chain_id": 1,
        "expiration_timestamp": {
          "timestamp": 1
        },
        "sender": "text",
        "sequence_number": 1,
        "gas_unit_price": 1,
        "max_gas_amount": 1
      },
      "payload": {}
    }
  }
}
200

Simulate a transaction against the current state of the RPC node. The transaction must have an invalid signature.

{
  "authenticator": {},
  "block_header": null,
  "hash": "text",
  "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"
}

Simulate a transaction (v3)

post
Body
one ofOptional

Transaction variants supported by Supra.

or
Responses
200
Simulate a transaction against the current state of the RPC node. The transaction must have an invalid signature.
application/json
post
POST /rpc/v3/transactions/simulate HTTP/1.1
Host: rpc-testnet.supra.com
Content-Type: application/json
Accept: */*
Content-Length: 218

{
  "Smr": {
    "signer_data": {
      "signer": {},
      "signature": {}
    },
    "transaction": {
      "header": {
        "chain_id": 1,
        "expiration_timestamp": {
          "timestamp": 1
        },
        "sender": "text",
        "sequence_number": 1,
        "gas_unit_price": 1,
        "max_gas_amount": 1
      },
      "payload": {}
    }
  }
}
200

Simulate a transaction against the current state of the RPC node. The transaction must have an invalid signature.

{
  "authenticator": {},
  "block_header": null,
  "hash": "text",
  "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 transaction (v3)

post

Submit a transaction to Supra.

Body
one ofOptional

Transaction variants supported by Supra.

or
Responses
200
transaction submitted
application/json
Responsestring

Hex encoded hash

post
POST /rpc/v3/transactions/submit HTTP/1.1
Host: rpc-testnet.supra.com
Content-Type: application/json
Accept: */*
Content-Length: 218

{
  "Smr": {
    "signer_data": {
      "signer": {},
      "signature": {}
    },
    "transaction": {
      "header": {
        "chain_id": 1,
        "expiration_timestamp": {
          "timestamp": 1
        },
        "sender": "text",
        "sequence_number": 1,
        "gas_unit_price": 1,
        "max_gas_amount": 1
      },
      "payload": {}
    }
  }
}
200

transaction submitted

text