Abstract away gas fees from your user experience
Coming Soon...
This is a sneak peak. Stay tuned for more details!
Shinami's Gas Station API allows apps to sponsor the gas fees for their user's transactions.
Shinami handles the management, refueling and optimization of gas (SUI) to facilitate sponsored transactions. This frees apps to focus on how to apply sponsored transactions to improve onboarding and user engagement. Check out our gas station guide for more details on how it works.
This section details the JSON-RPC methods for interacting with Shinami's gas station.
gas_sponsorTransaction
Description
Send a transaction to the gas station to request gas sponsorship
Params
gasless_tx_bytes
:<Base64>
- encoded gasless transaction datagas_budget
:<uint64>
- the gas budget, the transaction will fail if the gas cost exceed the budget
curl https://gas.shinami.com/api/v1/<<gasApiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0",
"method":"gas_sponsorTransaction",
"params":["{{gasless_tx_bytes}}",
{{gas_budget}}],
"id":1}'
Result
TransactionBytes
:<TransactionBytes>
- digest :
<TransactionDigest>
- signature :
<Base64>
- encoded transaction signature, signed by the gas owner - expireAt : expiration of the assigned gas object in ISO date time format
gas_getSponsoredTransactionStatus
Description
Retrieve the state of the gas object assigned for sponsorship (in flight, invalid, or complete).
Params
digest
:<TransactionDigest>
- the digest of the queried transaction
curl https://gas.shinami.com/api/v1/<<gasApiKey>> \
-X POST \
-H 'Content-Type: application/json' \
-d '{ "jsonrpc":"2.0", "method":"gas_getSponsoredTransactionStatus", "params":["{{digest}}"], "id":1}'
Result
Status
: <String>