Expand description
Public contracts for Arete Protocols.
Every contract is camelCase JSON that rejects unknown fields, floats and
null for optional fields, is bounded, and is hashed with the Arete JCS
profile under its own hash kind. Rust and TypeScript run the shared
vectors in test-vectors/protocol-v1.json and must agree on every hash
and every error code.
Structs§
- Account
Read Result V1 - One account as read from chain. A missing account has
exists: falseand no other data fields. - AtaGlue
V1 - BindV1
- Build
Compiler V1 - Build
Dependency V1 - Build
Outputs V1 - CtxCall
Record V1 - Deployment
Input V1 - The deployment an invocation runs under and the platform keys it names.
The same values are the
deployment.*expression root. - Derive
Rule V1 - EventV1
- Execution
Intent V1 - FeeAdjustment
V1 - Why the platform leg differs from the fee policy’s rate.
- FeeContext
V1 - Field
Schema V1 - Generator
V1 - GlueV1
- GuardV1
- Instance
Input V1 - Intent
Deployment V1 - Intent
Fees V1 - Intent
Signer V1 - Intent
Transaction V1 - Machine
V1 - Machines
V1 - MemoV2
- The fields of an attested Memo v2:
arete:p2:<shortId>:<scope|->:<instance>:<participant|->:<step>:<n>/<count>. - Metadata
Field V1 - Metadata
Schema V1 - Metadata
V1 - Object
Schema V1 - A restricted JSON Schema subset for args, params, resources and metadata.
- Participant
Input V1 - Portable
Account Meta V1 - Portable
Instruction V1 - Prepare
Input V1 - What the API hands the host for one invocation. Every value is fixed by the API before dispatch; handlers have no clock, RPC or randomness.
- Prepared
Operation V1 - What a handler returns.
- Prepared
Transaction V1 - Program
Dependency V1 - Protocol
Build Receipt V1 - Protocol
Contract Error - A contract validation failure with a stable, language-neutral code.
- Protocol
Execution Receipt V1 - A signed execution receipt.
- Protocol
Receipt KeySet V1 - The published receipt keys. A retired key still verifies receipts issued
before
retiredAt, so old receipts stay checkable after a rotation. - Protocol
Receipt KeyV1 - Protocol
Release Review V1 - Protocol
Release V1 - Protocol
Resource V1 - Protocol
Spec V1 - Protocol
Stack Dependency V1 - Protocol
Stack Source V1 - Provider
Snapshot V1 - Reaction
V1 - Read
Input V1 - A declared read: the raw account plus, for
accountreads, the fields decoded with the program’s ProgramSpec. - Receipt
Deployment V1 - Receipt
Fees V1 - The fee legs charged in this intent, in base units of
asset. - Receipt
Signature V1 - Receipt
Transaction V1 - Which transaction of the intent this is:
indexcounts from 0, the memo’s<n>/<count>counts from 1. - Release
Dependencies V1 - Remaining
Account V1 - One trailing account of a template instruction.
pubkeyis an account expression; remaining accounts never sign, sois_signeris always false. - Resource
Decl V1 - RoleV1
- SdkExtension
Dependency V1 - Server
Derived Release - Everything server-side derivation produces from one upload.
- Snapshot
Read V1 - Stack
Activity V1 - Stack
Dependency V1 - Stack
Generation Error - A spec or option the generator cannot turn into a stack. The messages match the TypeScript generator’s.
- Stack
Instance Account V1 - Stack
Instance Field V1 - Stack
Source Options - Options of
generate_stack_source. Field names match the TypeScriptGenerateStackSourceOptions, so the shared vectors deserialize directly. - Stack
Surface V1 - What the generated protocol stack tracks.
- StateV1
- StepV1
- Template
Instruction V1 - Transition
V1 - Wrap
SolV1
Enums§
- Action
V1 - Authority
V1 - BuildV1
- Builtin
Program - CtxMethod
- The closed
ctxmethod set ofarete.protocol-ctx/v1. - FeeAdjustment
Kind - FeeAsset
V1 - FeeBasis
V1 - FeePlacement
- Field
Type - Instance
Visibility - Intent
FeeAsset V1 - Machine
Kind - Metadata
Writer - Object
Type - Protocol
Contract Kind - A contract kind that the shared vectors exercise.
- Protocol
Program V1 - ReadV1
- A declared chain read. Guards, derivations and templates see its result
as
reads.<name>. - Receipt
Status - Release
Derivation Error - A spec, bundle or stack the release cannot be derived from.
- Session
KeyClass - Signer
Class - Stack
Profile - Stack
Program Source - Where a program’s IDL comes from in the generated Stack Source.
- State
Kind - Step
Access - Step
Scope - String
Format - String formats. Integer base units are decimal strings.
- Transaction
Format - Trigger
V1 - Trust
Tier - The trust tier a deployment runs at.
Constants§
- DEFAULT_
MEMO_ PROGRAM_ IDL - The default IDL file of the SPL Memo program in the full profile.
- EXECUTION_
INTENT_ SCHEMA_ V1 - MAX_
CTX_ CALLS - MAX_
HANDLER_ RESULT_ BYTES - MAX_
INSTRUCTION_ ACCOUNTS - MAX_
INSTRUCTION_ DATA_ BYTES - MAX_
INTENT_ TRANSACTIONS - MAX_
OPERATION_ TRANSACTIONS - MAX_
RECEIPT_ KEYS - At most this many keys in a published key set.
- MAX_
RECEIPT_ SIGNATURES - At most this many receipt-key signatures, sorted by
keyId. - MAX_
TRANSACTION_ INSTRUCTIONS - MEMO_
PROGRAM_ ALIAS - The program alias the full profile gives the SPL Memo program.
- MEMO_
V2_ PREFIX - The memo prefix of Memo v2.
- PROTOCOL_
BUILD_ RECEIPT_ SCHEMA_ V1 - PROTOCOL_
CTX_ V1 - PROTOCOL_
ERROR_ CODES - Every stable error code a protocol contract validator can return.
- PROTOCOL_
EXECUTION_ RECEIPT_ SCHEMA_ V1 - PROTOCOL_
HANDLER_ ABI_ V1 - PROTOCOL_
RECEIPT_ KEYS_ SCHEMA_ V1 - PROTOCOL_
RELEASE_ REVIEW_ SCHEMA_ V1 - PROTOCOL_
RELEASE_ SCHEMA_ V1 - PROTOCOL_
RESOURCE_ SCHEMA_ V1 - PROTOCOL_
SPEC_ SCHEMA_ V1 - PROTOCOL_
STACK_ SOURCE_ SCHEMA_ V1 - PROVIDER_
SNAPSHOT_ SCHEMA_ V1 - RESERVED_
GUARD_ CODES - Validate a ProtocolSpec JSON value and return the typed model. Rejection codes a prepare returns for access refusals and terminal lifecycle states. A guard may not use them, so a client can always tell a guard failure from these.
- SERVER_
COMPILER_ ESBUILD - The server never bundles: the uploaded bundle is used as is. The receipt
contract requires a semver here, so the server records
0.0.0. - SERVER_
COMPILER_ NAME - The compiler and stack-generator name of server-side derivation.
- SERVER_
DERIVATION_ VERSION - The version of server-side derivation. It changes only when the derived documents for the same inputs change, never with crate releases, so re-uploading the same spec stays idempotent across server upgrades.
- STACK_
SOURCE_ SCHEMA_ V1
Functions§
- decode_
base64 - Strict standard base64 with padding. Returns
Nonefor any non-canonical encoding. - default_
stack_ generator - The default generator identity: this crate’s name and version.
- derive_
release - The release document of a spec, its handler bundle (exactly when a step
has a handler) and its stack source, under
compiler. - derive_
server_ release - Derive the stack source, release and receipt of an uploaded spec (and
bundle) under
server_compiler. Deterministic: identical inputs give identical documents and hashes. - encode_
base64 - generate_
stack_ source - Generate the protocol stack source of a validated spec.
- hash_
handler_ bundle - The identity of a handler bundle: its exact ESM bytes.
- instance_
owned_ accounts - The accounts the create step binds from one of its ephemeral keys, the
instance’s own accounts: the only accounts the full profile matches direct
activity on (see the TypeScript generator’s “Direct activity”). A binding
qualifies only when its whole expression is a pure derivation of a key the
create step declares (see [
is_fresh_derivation]); one that merely mentionsephemeral.<name>somewhere (underif,??or an operator, say) could evaluate to some other, possibly shared, account. - memo_id
- The memo form of an instance or participant UUID: base58 of its 16
bytes.
Nonefor text that is not a lowercase UUID. - parse_
contract_ json - Parse contract JSON bytes with the strict hash-profile parser, mapping its failures to protocol error codes.
- parse_
memo_ v2 - Parse an attested Memo v2 text.
Nonewhen it is not one. - parse_
prepared_ operation_ v1 - Validate a handler’s result shape and size bounds. Program, account and signer policy is checked afterwards against the step by the trusted transaction compiler.
- parse_
protocol_ spec_ v1 - Parse and fully validate a ProtocolSpec from JSON bytes.
- receipt_
body_ bytes - The body of a receipt JSON value (
signaturesremoved) in Arete JCS form. Works on any receipt-shaped value, so verifiers can hash the body exactly as served. - receipt_
signing_ message - The exact bytes a receipt key signs:
arete.protocol-execution-receipt/v1\n<keyId>\n<bodySha256>. - release_
dependencies - Release dependencies: every ProgramSpec program and stack, sorted by alias; builtins excluded.
- review_
signing_ message - The exact bytes a reviewer signs:
arete.protocol-release-review/v1\n<keyId>\n<trustTier>\n<releaseHash>. Hosts and the API verify against these bytes with the same public keys. - server_
compiler - The compiler identity of server-side derivation.
- server_
stack_ generator - The stack generator identity of server-side derivation.
- server_
stack_ source_ options - Stack-source options of server-side derivation: the interim profile, the generator defaults for program sources, and the server generator identity.
- validate_
execution_ intent_ value - validate_
prepared_ operation_ value - validate_
protocol_ build_ receipt_ value - validate_
protocol_ execution_ receipt_ value - validate_
protocol_ receipt_ key_ set_ value - validate_
protocol_ release_ review_ value - validate_
protocol_ release_ value - validate_
protocol_ resource_ value - validate_
protocol_ spec_ value - validate_
protocol_ stack_ source_ value - validate_
provider_ snapshot_ value
Type Aliases§
- Contract
Value - Parsed form of the canonical JSON value of any contract.
- Protocol
Result