Skip to main content

Set Gas Sponsor Wallet

Nominates one of the platform node's wallets to pay users' gas on a network, or clears the nomination. The change applies at once (nothing goes on chain) and the response has no body.

  • The wallet must belong to the platform node and sit on the network's chain. A wallet from another chain could never sign on this network, so it is refused up front rather than stored as a sponsor that can never pay.
  • An empty wallet_id clears the sponsor, which is why the field is not required. After clearing, gas cannot be sent on that network and transactions that need it fail. Clearing a network that has no sponsor succeeds.
  • A network has at most one sponsor: setting a new wallet replaces the previous one.

Only an API client of the platform node (the root of the node hierarchy) may call this. Any other client is refused with 10005. Read the current sponsors with List Gas Sponsor Wallets.

Required permission: node:create-root-wallet

Request​

PUT /v2/gas-sponsor-wallets/networks/{network_id}

Parameters​

NameTypeInDescription
network_idstringpathRequired. Network id from Get Networks (24-character hex)

Headers​

NameDescription
AuthorizationRequired. Bearer <access_token>
Content-TypeRequired. application/json

Body​

FieldTypeRequiredDescription
wallet_idstringNoId of the platform node's wallet that pays gas on this network (24-character hex). Send "" or omit it to clear the sponsor

Example​

curl --request PUT \
--url '{{baseUrl}}/v2/gas-sponsor-wallets/networks/6740e0a20000000000000102' \
--header 'Authorization: Bearer <access_token>' \
--header 'Content-Type: application/json' \
--data '{
"wallet_id": "6a89b68e0c46ca4c941271aa"
}'

Response​

204 No Content, with an empty body.

Errors​

StatusCodeDescription
40310005The caller is not a client of the platform node (domain 2)
40010016network_id or wallet_id is not a valid 24-character hex id
40010015The body is not valid JSON, or no network has this id (message network not found)
40010021The wallet does not exist, does not belong to the platform node, or is not on the network's chain (domain 2, message no wallet on the selected network's chain)
40010001The platform node was not found (domain 2)
50010000Unexpected server-side failure

See Errors for the error format and common codes.