Skip to content

Change the payout address. Without signature → SetPayout typed data; with signed body → relayed Staking.setPayoutBySig

POST
/v1/subscriptions/{subscription_id}/payout
curl --request POST \
--url https://testnet-rpc.necter.network/v1/subscriptions/example/payout \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "payout_address": "example", "payout": "example" }'

Step 1: body {"payout_address": "0x…"} (payout is accepted as an alias; both present must be equal; or no body and ?payout_address=0x…) → GaslessPayload (action: set_payout, EIP-712 SetPayout(address owner,bytes32 subscriptionId,address payout,uint256 nonce,uint256 deadline), domain Necter Staking). payout = the owner, the zero address or null resets the payout to the owner. Step 2: SignedGasless → 202 TxStatus; the indexer applies PayoutSet and payout_address follows. Only while the subscription is bonded or unbonding on chain (409 invalid_state otherwise, e.g. while it is still pending_collateral).

subscription_id
required
string
/^0x[0-9a-f]{64}$/
payout_address

Lowercase EVM address

string
/^0x[0-9a-f]{40}$/

Step 1 without a body (alias: payout)

Media typeapplication/json
One of:
object
payout_address
One of:

Lowercase EVM address

string
/^0x[0-9a-f]{40}$/
payout
One of:

Lowercase EVM address

string
/^0x[0-9a-f]{40}$/

Example generated

{
"payout_address": "example",
"payout": "example"
}

Payload to sign

Media typeapplication/json

Typed data the owner signs (eth_signTypedData_v4); then POST it back as SignedGasless

object
action
required
string
Allowed values: bond unbond withdraw set_payout register_project publish_version
typed_data
required
object
domain
required
object
key
additional properties
any
types
required
object
key
additional properties
any
primaryType
required
string
message
required
object
key
additional properties
any
permit
One of:
object
domain
required
object
key
additional properties
any
types
required
object
key
additional properties
any
primaryType
required
string
message
required
object
key
additional properties
any
direct_tx
object
chain_id
required
integer
to
required

Lowercase EVM address

string
/^0x[0-9a-f]{40}$/
data
required
string
/^0x([0-9a-f]{2})*$/
value

Token base units

string
/^(0|[1-9][0-9]{0,77})$/
description
string
expires_at
required
integer

Example

{
"action": "bond"
}

Submitted

Media typeapplication/json
object
status
required
string
Allowed values: queued sent confirmed reverted failed
tx_hash
One of:
string
/^0x[0-9a-f]{64}$/
error
string | null

Example

{
"status": "queued"
}

Malformed request (bad_request, invalid_field)

Media typeapplication/json
object
error
required

Stable machine code

string
message
required
string
details
object
key
additional properties
any
request_id
required
string

Example generated

{
"error": "example",
"message": "example",
"details": {},
"request_id": "example"
}

Authenticated but not allowed (forbidden, not_owner, not_enrolled, not_verified, scope_missing)

Media typeapplication/json
object
error
required

Stable machine code

string
message
required
string
details
object
key
additional properties
any
request_id
required
string

Example generated

{
"error": "example",
"message": "example",
"details": {},
"request_id": "example"
}

conflict, duplicate, already_exists, invalid_state

Media typeapplication/json
object
error
required

Stable machine code

string
message
required
string
details
object
key
additional properties
any
request_id
required
string

Example generated

{
"error": "example",
"message": "example",
"details": {},
"request_id": "example"
}

Semantically invalid (invalid_manifest, invalid_binding, invalid_evidence, incompatible, insufficient_collateral)

Media typeapplication/json
object
error
required

Stable machine code

string
message
required
string
details
object
key
additional properties
any
request_id
required
string

Example generated

{
"error": "example",
"message": "example",
"details": {},
"request_id": "example"
}

unavailable, no_validators, faucet_empty

Media typeapplication/json
object
error
required

Stable machine code

string
message
required
string
details
object
key
additional properties
any
request_id
required
string

Example generated

{
"error": "example",
"message": "example",
"details": {},
"request_id": "example"
}