Execution
Drive a proposal through policy decryption, dWallet co-signing, and finalization.
Pre-alpha — not production ready
@aura-protocol/sdk-ts targets Solana devnet only. APIs may change without notice. Do not use for real funds until a stable release and audit are published.
After a proposal is created, execution follows a fixed sequence. Public proposals skip policy decryption. Confidential proposals decrypt only the scalar violation code before continuing to dWallet approval.
Flow
Public:
proposeTransaction → executePending → finalizeExecution
Confidential:
proposeConfidentialTransaction
→ requestPolicyDecryption
→ confirmPolicyDecryption
→ executePending
→ finalizeExecutionrequestPolicyDecryption
Request the Ika Encrypt network to decrypt the scalar policy output ciphertext.
await client.requestPolicyDecryption(operator, accounts, now, extraSigners);now accepts BNish — a BN, number, bigint, or numeric string.
interface RequestPolicyDecryptionAccounts {
operator: PublicKey;
treasury: PublicKey;
requestAccount: PublicKey;
ciphertext: PublicKey;
encryptProgram: PublicKey;
config: PublicKey;
deposit: PublicKey;
callerProgram: PublicKey;
cpiAuthority: PublicKey;
networkEncryptionKey: PublicKey;
eventAuthority: PublicKey;
systemProgram: PublicKey;
}confirmPolicyDecryption
Apply the decrypted violation code once the Encrypt network has responded.
await client.confirmPolicyDecryption(operator, accounts, now);interface ConfirmPolicyDecryptionAccounts {
operator: PublicKey;
treasury: PublicKey;
requestAccount: PublicKey;
}executePending
Submit the approved proposal to the dWallet program for co-signing.
await client.executePending(operator, accounts, now);interface ExecutePendingAccounts {
operator: PublicKey;
treasury: PublicKey;
callerProgram: PublicKey; // AURA program ID
systemProgram: PublicKey;
messageApproval?: PublicKey | null;
dwallet?: PublicKey | null;
cpiAuthority?: PublicKey | null; // derive: deriveDwalletCpiAuthority()
dwalletProgram?: PublicKey | null;
dwalletCoordinator?: PublicKey | null;
externalLiveness?: PublicKey | null;
}finalizeExecution
Verify the dWallet signature, close the proposal, and increment the treasury's total transaction counter.
await client.finalizeExecution(operator, accounts, now);interface FinalizeExecutionAccounts {
operator: PublicKey;
treasury: PublicKey;
messageApproval: PublicKey; // MessageApproval PDA from dWallet program
swarmPool?: PublicKey | null;
budgetEnvelope?: PublicKey | null;
exposureGroup?: PublicKey | null;
externalLiveness?: PublicKey | null;
}approvePendingExecution
Satisfy an approval ladder requirement on a pending proposal. Called by the owner or a guardian when the proposal requires explicit approval before executePending can proceed.
await client.approvePendingExecution(
approver,
{ approver: approver.publicKey, treasury },
args, // ApprovePendingExecutionArgs
);setScopedPause
Pause or unpause execution for a specific scope (chain, transaction type, or protocol). More granular than the treasury-wide pauseExecution.
await client.setScopedPause(
operator,
{ operator: operator.publicKey, treasury },
args, // SetScopedPauseArgs
);The operator must have a valid OperatorRole with the scoped-pause permission, or be the treasury owner.