Transactions

Transactions Api

Chain id (v1)

get
/rpc/v1/transactions/chain_id

Fetch chain id

Responses
200

Current chain id

application/json
Responseinteger · u-int8
get
/rpc/v1/transactions/chain_id
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
/rpc/v1/transactions/estimate_gas_price

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
/rpc/v1/transactions/estimate_gas_price
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
/rpc/v1/transactions/parameters

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

Responses
200

Acceptable parameters for transaction submission

application/json
get
/rpc/v1/transactions/parameters
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

Simulate a transaction (v1)

post
/rpc/v1/transactions/simulate
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
/rpc/v1/transactions/simulate
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
/rpc/v1/transactions/submit

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
/rpc/v1/transactions/submit
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
Deprecated

Get transaction by hash (v1)

get
/rpc/v1/transactions/{hash}

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
/rpc/v1/transactions/{hash}
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
/rpc/v2/transactions/estimate_gas_price

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
/rpc/v2/transactions/estimate_gas_price
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
}

Simulate a transaction (v2)

post
/rpc/v2/transactions/simulate
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
/rpc/v2/transactions/simulate
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"
}

Get transaction by hash (v2)

get
/rpc/v2/transactions/{hash}

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
/rpc/v2/transactions/{hash}
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"
}

Simulate a transaction (v3)

post
/rpc/v3/transactions/simulate
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
/rpc/v3/transactions/simulate
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
/rpc/v3/transactions/submit

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
/rpc/v3/transactions/submit
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

Get transaction by hash v3

get
/rpc/v3/transactions/{hash}

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
/rpc/v3/transactions/{hash}
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"
}

Last updated