The usage of BIP322 enables users to choose between renewing their expiring offchain funds themselves or delegating the renewal of such VTXOs. The delegated intent workflow can be found under Intent Delegation
Intent Structure
This section defines the intent schema that expresses what is being spent and where it goes. It covers the top-level fields, theReceiver format (onchain address vs. offchain pubkey), and the IntentMessage that captures execution parameters and the intent’s validity window.
Intent structure
Intent structure
The
Intent domain is a user-submitted presigned Bitcoin transaction that:- Contains an
IntentId(UUID) - Specifies the
Inputs(VTXOs, UTXOs, or expired coins) - Specifies the
Outputs(viaReceivers). Either:- onchain (via
OnchainAddress) - offchain (via
PubKeyto create new VTXOs)
- onchain (via
- Contains a
Proofof ownership of those funds via abip322signature - Contains a
Message(bip322 message) with intent details
Receiver Structure
Receiver Structure
Receivers is defined via an Amount, an OnchainAddressand a PubKey(of which at least one must be present during Intent submission. Those are used to construct Arkade transaction outputs or direct onchain payments. IntentMessage Format
IntentMessage Format
IntentMessage contains intent details in JSON structure:- The
Typeindicates if the intent is for renewal or ownership proof to delete another InputTapTreesis the revealed Taproot tree of all inputs of the intent. Revelation occurs like witness data in BitcoinOnchainOutputIndexes: Indicates which outputs become UTXOs; others are VTXOsValidAt: Time (seconds) when the intent becomes valid; 0 = valid right awayExpireAt: Time (seconds) when the intent expires; 0 = no expiryCosignersPublicKeys: Public keys signing the VTXO tree; typically one, but can be more to support flexible user needs
Intent Lifecycle
The Arkade event stream (GetEventStream) is a server-side streaming RPC method in the ArkService that provides real-time batch processing coordination events to clients including batch start, finalization, and failure notifications. The server uses this stream to indicate the next required action and corresponding API call. The full Intent lifecycle is as follows:
1
Create a BIP322 Signature
Intents use BIP322 message signing protocol for proving ownership of coins.
Source: TS-SDKThe
Code example: BIP322 signature implementation from the TS-SDK
Code example: BIP322 signature implementation from the TS-SDK
create function takes a string message corresponding to the associated action described below (“Register” or “Delete”).2
Register an Intent
The core of intent registration is the
Source: Typescript SDKThe server then responds with a
RegisterIntentRequest which contains a Bip322Signaturefield and an intent message:Code example: RegisterIntentRequest
Code example: RegisterIntentRequest
Intent message format
Intent message format
The intent message structure includes:
InputTapTrees- Taproot trees for spent inputsOnchainOutputIndexes- Which outputs should be considered onchainValidAt/ExpireAt- Timestamp validity windowsCosignersPublicKeys- Required for offchain outputs
Messages are JSON string encoded with a static format, making the order of the fields relevant
Example: intent message
Example: intent message
RegisterIntentResponsecontaining an intent_idstring for tracking.3
Confirm Registration
After receiving a
BatchStartedEventcontaining their intent ID hash, clients must call ConfirmRegistrationwith a ConfirmRegistrationRequestcontaining the intent_idto confirm participation. The server responds with an empty ConfirmRegistrationResponse.4
Delete Intent
The
Source: Typescript SDK
DeleteIntentmethod accepts a DeleteIntentRequestwith a Bip322Signatureproof that demonstrates ownership of any input VTXOs from the original intent. The server responds with an empty DeleteIntentResponseupon successful deletion.Code example: delete from Typescript SDK
Code example: delete from Typescript SDK
Recovery Mechanisms
The intent system provides additional options for edge cases like recoverable VTXOs:- Expired VTXOs: Recover unspent and swept VTXOs (
recoverVtxos) - Note Redemption: Redeem Arkade notes (
redeemNotes) - Sub-dust VTXOs: Amounts below the Bitcoin dust threshold (`SubDustScript)