Gas Station
Overview
The Gas Station is a special wallet feature provided by Yativo that allows business users to store assets like BNB (Binance Coin) to facilitate their users’ transactions on the BEP20 blockchain. This setup ensures smooth transaction processing by covering the blockchain's gas fees required for operations such as transfers or token interactions.
Key Features
Facilitation of Transactions:
The Gas Station covers blockchain gas fees on behalf of the business’s end users.
It operates independently of Yativo, meaning the assets stored in the Gas Station are fully managed and funded by the Yativo business user.
Separation from Yativo Fees:
Yativo’s Fees: These are fees charged by Yativo for using its platform or services.
Gas Station: This wallet is exclusively for covering gas fees for blockchain transactions and does not interact with Yativo’s fee structure.
Custom Fees for End Users:
Yativo business users can configure their own service fees to charge end users, allowing them to maintain profitability or cover operational costs while using the Gas Station to facilitate transactions.
Use Case
A business integrating Yativo wants to enable smooth transactions on the BEP20 chain for their customers. They deposit BNB into their Gas Station wallet to ensure transactions proceed without requiring users to manage gas fees themselves. Meanwhile, they set custom fees for their platform users, which they collect separately.
For example:
A customer initiates a transfer of a BEP20 token through the business’s platform.
The business’s Gas Station covers the gas fees required by the blockchain.
The business charges the customer a transaction fee that it determines (e.g., 0.1% of the transaction amount).
API Endpoints for Gas Station
1. Create Gas Station
URL:
POST /api/v1/accounts/gas-station/create
Description: Initializes a Gas Station wallet for the business user.
Request Example:
Response Example:
2. Get All Gas Stations
URL:
GET /api/v1/accounts/gas-station/all
Description: Fetches details of all Gas Stations associated with the business account.
Response Example:
3. Fetch Gas Station by ID
URL:
GET /api/v1/accounts/gas-station/{gas_station_id}
Description: Retrieves details of a specific Gas Station.
Response Example:
4. Connect Wallet to Gas Station
URL:
POST /api/v1/accounts/gas-station/connect-wallet
Description: Connects a wallet to the Gas Station to facilitate transactions.
Request Example:
Response Example:
5. View Wallet Connections
URL:
POST /api/v1/accounts/gas-station/connections
Description: Fetches all wallet connections for a Gas Station.
Request Example:
Response Example:
6. Manage Gas Station Wallets
Edit Connection: Update a wallet connection to the Gas Station (
POST /api/v1/accounts/gas-station/connect-wallet/edit
).Delete Connection: Remove a wallet connection (
POST /api/v1/accounts/gas-station/connect-wallet/delete
).
Best Practices
Ensure Adequate Funding: Always maintain sufficient BNB in the Gas Station to avoid transaction delays or failures due to insufficient gas.
Monitor Usage: Use the
Get All Gas Stations
andFetch Gas Station by ID
endpoints to track gas usage and replenish the wallet as needed.Set Transparent Fees: Inform end users about transaction fees you charge, ensuring transparency and compliance with local regulations.
Example Scenario
Step-by-Step Integration:
Create a Gas Station for the BEP20 chain using the
POST /api/v1/accounts/gas-station/create
endpoint.Deposit BNB into the Gas Station wallet through your business’s admin panel.
Link the Gas Station to user accounts or sub-accounts via the
Connect Wallet to Gas Station
endpoint.Facilitate end-user transactions without requiring them to handle gas fees directly.
Use the
View Wallet Connections
endpoint to monitor which wallets are linked and active.
Last updated