testnet
GitHub

agent.set_gas_source

set_gas_source(agentId, gasSource, gasSourceAddress?) → GasSourceUpdate

Change which entity pays gas for this agent's transactions. This is a metadata-only update on the WaaS server.

Parameters

Name Type Required Description
agentId string The UUID of the agent.
gasSource enum Must be 'SELF', 'OWNER', or 'PAYMASTER'.
gasSourceAddress string - Required iff gasSource is 'OWNER'.

Returns

Type: object

The updated gas source configuration.

Errors

Code Name Description
INVALID_INPUT InvalidInput Missing address for OWNER mode, or address provided for non-OWNER mode.

Examples

Switch to Self-Funded Gas

{
  "agentId": "123e4567-e89b-12d3-a456-426614174000",
  "gasSource": "SELF"
}
ESC
Type to search