Transaction Relayer
Transaction Relayer, allows you to seamlessly enable gas-less transactions for your users.
It first creates a custodial wallet which gets mapped to your Shyft API key. On creation, it returns the wallet address associated with you SHYFT API key. You have to use this wallet address as,fee_payer
while constructing your transactions. Then, you can send the transactions that need to be signed on the relayerâs sign endpoint
. Relayer will retrieve the credentials associated with your API key, sign the transaction and send it to the blockchain.
Create Relayer
Create a new transaction relayer.
POST /sol/v1/txn_relayer/create
Headers:
x-api-key
: Your API key
Sign Transaction
Sign and send a transaction using the relayer. Takes encoded_transaction
and network
as input request parameters.
POST /sol/v1/txn_relayer/sign
Params:
network
:
Solana blockchain environment (testnet/devnet/mainnet-beta)encoded_transaction:
Serialized transaction (base64 string).
Sign Multiple Transactions
Sign and send multiple transactions using the relayer. Takes encoded_transactions
and network
as input request parameters.
POST /sol/v1/txn_relayer/sign_many
Params:
network
:
Solana blockchain environment (testnet/devnet/mainnet-beta)encoded_transactions:
An array of serialized transactions (base64 string).commitment (optional): If the response is needed after a certain commitment level reaches all the transactions, pass the desired commitment level (allowed
processed
,confirmed
,finalized
).
If the commitment
level is specified, the response time may increase because the system will wait for all transactions to reach the requested commitment
level before responding.
Last updated