adopt_refused: The on-chain budget does not match the prepared adoption
POST /owner/v1/budgets/adopt reads every prepared fact back from the version 2 vault before it records anything: the budget's owner, asset, cap, escrow, mandate fingerprint, revocation and expiry, and the root stream's session key, service node, rate, cap and settled value. When one of them differs, the adoption is refused and nothing is adopted. The adoption id stays unused, so you can adopt again once the on-chain budget matches.
With Dynamo-Error-Detail: 1, errorDetail.check names the check that failed, and errorDetail.param names the request field it concerns (budgetRef, streamRef, delegation or payeeOffer). Without it, detail names the check in words.
check | What differs |
|---|---|
budget_exists | No budget with this id exists on this deployment's vault |
stream_exists | No stream with this id exists on this deployment's vault |
budget_owner | The budget was opened by another wallet than the prepared owner |
budget_asset | The budget holds another asset than this deployment's |
asset_listed | The budget's asset is not listed in the vault's asset registry |
budget_cap | The budget's cap differs from the prepared cap |
budget_escrow | The escrow does not cover the cap |
budget_mandate | The mandate fingerprint differs from the prepared mandate |
budget_revoked | The budget is revoked |
budget_expired | The budget has passed its on-chain expiry |
root_stream | The stream is not the budget's root stream |
stream_session_key | The root stream's session key is not the one the core issued |
stream_service_node | The root stream pays another service node |
stream_revoked | The root stream is revoked |
stream_rate | The root stream's rate differs |
stream_cap | The root stream's cap differs |
stream_settled | The root stream has already settled value |
hop_intent | At 1.8.0: the owner's signed root hop intent is missing (required own hops), is not the prepared one, is not bound to this chain and vault, or does not recover (param is delegation) |
hop_signer | At 1.8.0: the root hop intent is signed by a wallet other than the one that opened the budget on chain |
payee_offer | At 1.8.0: the payee's signed offer is missing (required own hops) or does not verify (param is payeeOffer) |
What to do
- Open the budget and its root stream from the prepared owner wallet, on the vault and asset named in the
adopt-prepareanswer, with exactly the prepared values. See user-owned budgets. - Send the
budgetRefandstreamRefof that budget and stream. - At
Dynamo-Version1.8.0, sign thehopIntent.typedDatafrom theadopt-prepareanswer with the same wallet that opened the budget, and send it asdelegationwith the payee's signedpayeeOffer. - If the budget is revoked or expired, prepare and open a new one.
On the wire
HTTP 409, error type state_error, for clients pinned at Dynamo-Version 1.8.0 or later. Clients pinned earlier keep the earlier answer: HTTP 500 internal for the on-chain checks, and HTTP 404 not_found when the budget or stream does not exist (budget_exists, stream_exists). Nothing is adopted either way.
On a single-tenant core, a request that sends no Dynamo-Version gets the earlier answer. On the multi-tenant hosted tier, the front door serves such a request at the account's default version, which is 1.8.0 for new accounts, so it gets adopt_refused.
Without Dynamo-Error-Detail: 1 the body is {"error": "state", "reason": "adopt_refused", "detail": "…"}. With it:
{
"error": "state",
"reason": "adopt_refused",
"detail": "…",
"errorDetail": {
"type": "state_error",
"code": "adopt_refused",
"message": "…",
"param": "budgetRef",
"doc_url": "…/errors/adopt_refused.md",
"fix": "the on-chain budget or root stream does not match the prepared adoption (errorDetail.check names the fact); open the budget from the prepared owner wallet on this deployment's vault with exactly the prepared values, then adopt again (nothing was adopted)",
"check": "budget_owner"
}
}
See all error codes.