Skip to main content
POST
Stage a rule document

Path Parameters

aa
string
required

The account address (a Safe or a plain address), as 0x and 40 hex digits in any letter case. A 20-byte address as 0x and 40 hex digits. Requests accept any letter case. Responses use lowercase.

Pattern: ^0x[0-9a-fA-F]{40}$
Example:

"0xf9836de53d455019ed985896fce8af80be66b7f9"

Body

application/json

The body of every route that carries a sealed request. The Anafi API passes sealed to the engine unchanged and takes the account from the path.

sealed
object
required

An HPKE-sealed request. Each field is a JSON array of byte values (integers from 0 to 255), not a hex string. The key names are snake_case. See Sealed requests.

Response

The engine staged and attested the document.

The attestation of the engine for one staged document. Pass the values to AnafiDslRegistry.commitDsl without change.

commitment
string
required

The commitment keccak256(salt ‖ yaml). Compare it with your own value before the owner signs. A difference means that the document was changed on the way.

Pattern: ^0x[0-9a-f]{64}$
engineSig
string
required

The signature of the engine over the commit digest. Pass it to commitDsl as engineSig.

Pattern: ^0x([0-9a-fA-F]{2})*$
dslVersion
integer
required

The version that this document gets when it is committed. It is the current on-chain version of the account plus 1. It is not a version of the language or of a contract.

Required range: x >= 1
attestationValidUntil
integer
required

The time at which engineSig expires, about 30 minutes after the stage. Pass this exact value to commitDsl as validUntil. Another value fails the signature check.

Example:

1796305002

adapter
string
required

The adapter that the engine bound into the signature. It must equal the adapter in your frame. Pass it to commitDsl.

Pattern: ^0x[0-9a-fA-F]{40}$
Example:

"0xf9836de53d455019ed985896fce8af80be66b7f9"

sealedWarnings
object
required

Advisory findings about the document, sealed to the caller. The opened JSON is {"messages": ["..."]}. The list is empty for a clean document. The findings do not stop the commit.