Validator API
Submitting to Validator
Submit a transaction to the validator.
Submit a transaction certificate to the validator.
submitTransaction
Submit a signed transaction to the validator. The validator will check that the signed transaction is valid and then will return its own signature.
The sender's transaction signature is computed using Ed25519 where:
the public key is stored in
Transaction.sender.the message to be signed is the
Transactionstruct serialized using the BCS format with the following special rule:
BCS serialization libraries are available for several languages:
Rust: the zefchain BCS library as a
serdebackendTypescript/Javascript: the Mysten Labs BCS library
transaction
Transaction: It can be of any ClaimType.
signature
SignatureOrMultiSig: Created by Transaction.sender and having the verifier signatures field set to the empty list in the case of ExternalClaims.
If the signed transaction was successfully submitted and validated.
POST / submitTransaction
Curl:
curl -X POST 'https://rpc.fastset.xyz/' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 1,
"method": "submitTransaction",
"params":
{
"transaction":
{
"sender": [200,200,191,145,217,203,135,199,251,88,121,96,64,156,203,156,136,57,94,12,155,183,22,116,8,165,72,238,49,233,30,23],
"recipient": [198,116,158,101,182,199,132,204,46,62,203,247,99,237,110,191,133,193,183,69,227,236,255,231,240,147,33,121,90,170,152,69],
"nonce": 0,
"timestamp_nanos": 1761039590871000000,
"claim":
{
"TokenTransfer":
{
"token_id": [250,87,94,112,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
"amount": "ffff",
"user_data": null
}
}
},
"signature":
{
"Signature": [243,31,62,0,151,90,232,58,19,85,223,180,108,88,58,96,121,162,10,170,165,106,79,50,100,191,137,166,203,176,149,113,211,75,182,33,30,9,1,223,166,3,97,72,62,45,39,110,168,47,70,26,87,33,39,58,152,91,56,129,149,18,172,14]
}
}
}'Server response:
{
"jsonrpc": "2.0",
"id": 1,
"result":
{
"validator": [253,112,52,72,100,69,192,75,235,211,175,165,191,201,31,106,19,138,251,42,229,209,213,131,100,19,223,27,90,91,223,47],
"signature": [63,103,129,188,17,174,83,78,181,10,105,211,249,200,181,150,97,89,88,58,183,39,181,191,193,91,147,215,81,68,118,251,125,107,169,146,23,54,68,229,114,85,186,33,224,69,4,201,127,248,201,125,31,208,209,211,47,220,57,27,101,44,60,0],
"next_nonce": 0,
"transaction_hash": [12,222,137,95,78,167,83,27,133,214,112,214,243,176,118,49,123,178,141,227,199,150,166,113,197,153,215,94,184,120,208,197]
}
}submitTransactionCertificate
Submit a transaction certificate to the validator.
transaction
Transaction: The transaction submitted previously via submitTransaction.
signature
SignatureOrMultiSig: The (multi)signature submitted previously via submitTransaction.
validator_signatures
Vec<(ValidatorName, Signature)>: A list of validator signatures.
If the transaction was successfully submitted.
Querying the Validator
Return a range of transactions stored by this validator.
Return information regarding the validator's recent performance..
Return information regarding a specific account from the validator.
Return information regarding a set of tokens from the validator.
Return the version number of the validator.
getTransactions
Return a range of transactions previously processed and currently stored by the validator.
page
PageRequest: Defines the range of items to be returned.
Page<Timed<TransactionInfo>>
Contains all transactions in the requested range.
getPerformanceInfo
Return information regarding the validator's recent performance.
getAccountInfo
Return information regarding a specific account from the validator.
address
FastSetAddress: The designated account's Fast address.
token_balance_filter
Option<Vec<TokenId>>: The set of token types for which a balance request will be made. If this parameter is omitted, no custom token balances will be returned. If it is present and empty, the balance of all tokens owned by this account will be queried.
state_key_filter
Option<Vec<StateKey>>: The set of state fields created by this account to be returned. If this parameter is omitted, no state fields will be returned. If it is present and empty, all state fields created by this account will be returned.
certificate_by_nonce
Option<NonceRange>: If passed, a list of transaction certificates within the nonce range specified by this parameter submitted by account address will be returned (omitting those which do not exist or have been pruned from the validator database).
getTokenInfo
Return information regarding a set of tokens from the validator.
Contains data for all requested tokens.
getVersion
Return the version number of the validator.
String
Last updated
Was this helpful?