registerReferrer
Registers a referral code for the account, so other users can bind to it with setReferrer. The action is signed by an approved agent, for the account itself.
registerReferrerCreate the account’s own referral code once it is eligible.Agent-signed
6–15 characters, uppercase letters `A–Z` and digits `0–9` only.
Must be `registerReferrer`.
"registerReferrer"Referral channel. Omit, or send `0`, for the default platform channel. When sent, it is part of the signed body.
curl -X POST https://rpc.txflow-testnet.xyz/exchange \
-H "Content-Type: application/json" \
-H "x-api-version: 2026-08-16" \
-d '{
"action": {
"type": "registerReferrer",
"code": "TXFLOW2026"
},
"signature": {
"r": "0x<r>",
"s": "0x<s>",
"v": 27
},
"nonce": 1757992743994,
"vaultAddress": null,
"signatureChainId": null
}'`0` on success.
The action's internal name, which does not always match the request `type`.
"RegisterReferrer"A rejected request returns `err` with a non-zero `code` and the reason in `message` (or `response`).
"ok"{
"status": "ok",
"code": 0,
"data": {
"type": "RegisterReferrer",
"data": {
"statuses": [
"success"
]
}
}
}The account can register a code once referral reports referrerState.stage as needToCreateCode. Send the envelope vaultAddress as null. The signed body is { "code": … }, followed by exchangeId only when you send it.
Next steps
Once registered, referrerState.stage in referral is ready and referrerState.data.code holds the code.