@aura-protocol/cli 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/README.md +307 -0
  2. package/bin/aura.js +8 -0
  3. package/dist/commands/confidential.d.ts +2 -0
  4. package/dist/commands/confidential.js +564 -0
  5. package/dist/commands/confidential.js.map +1 -0
  6. package/dist/commands/config.d.ts +2 -0
  7. package/dist/commands/config.js +123 -0
  8. package/dist/commands/config.js.map +1 -0
  9. package/dist/commands/dashboard.d.ts +2 -0
  10. package/dist/commands/dashboard.js +29 -0
  11. package/dist/commands/dashboard.js.map +1 -0
  12. package/dist/commands/dwallet.d.ts +2 -0
  13. package/dist/commands/dwallet.js +131 -0
  14. package/dist/commands/dwallet.js.map +1 -0
  15. package/dist/commands/execution.d.ts +2 -0
  16. package/dist/commands/execution.js +261 -0
  17. package/dist/commands/execution.js.map +1 -0
  18. package/dist/commands/governance.d.ts +2 -0
  19. package/dist/commands/governance.js +169 -0
  20. package/dist/commands/governance.js.map +1 -0
  21. package/dist/commands/helpers.d.ts +79 -0
  22. package/dist/commands/helpers.js +219 -0
  23. package/dist/commands/helpers.js.map +1 -0
  24. package/dist/commands/treasury.d.ts +2 -0
  25. package/dist/commands/treasury.js +319 -0
  26. package/dist/commands/treasury.js.map +1 -0
  27. package/dist/config.d.ts +35 -0
  28. package/dist/config.js +96 -0
  29. package/dist/config.js.map +1 -0
  30. package/dist/context.d.ts +37 -0
  31. package/dist/context.js +57 -0
  32. package/dist/context.js.map +1 -0
  33. package/dist/dashboard.d.ts +7 -0
  34. package/dist/dashboard.js +95 -0
  35. package/dist/dashboard.js.map +1 -0
  36. package/dist/domain.d.ts +16 -0
  37. package/dist/domain.js +86 -0
  38. package/dist/domain.js.map +1 -0
  39. package/dist/format.d.ts +9 -0
  40. package/dist/format.js +92 -0
  41. package/dist/format.js.map +1 -0
  42. package/dist/ika.d.ts +76 -0
  43. package/dist/ika.js +178 -0
  44. package/dist/ika.js.map +1 -0
  45. package/dist/index.d.ts +3 -0
  46. package/dist/index.js +43 -0
  47. package/dist/index.js.map +1 -0
  48. package/dist/output.d.ts +32 -0
  49. package/dist/output.js +134 -0
  50. package/dist/output.js.map +1 -0
  51. package/dist/protocol.d.ts +99 -0
  52. package/dist/protocol.js +353 -0
  53. package/dist/protocol.js.map +1 -0
  54. package/dist/sdk.d.ts +6 -0
  55. package/dist/sdk.js +6 -0
  56. package/dist/sdk.js.map +1 -0
  57. package/dist/treasury-view.d.ts +11 -0
  58. package/dist/treasury-view.js +103 -0
  59. package/dist/treasury-view.js.map +1 -0
  60. package/dist/vendor/encrypt/generated/grpc/encrypt_service.d.ts +195 -0
  61. package/dist/vendor/encrypt/generated/grpc/encrypt_service.js +514 -0
  62. package/dist/vendor/encrypt/generated/grpc/encrypt_service.js.map +1 -0
  63. package/dist/vendor/encrypt/grpc.d.ts +70 -0
  64. package/dist/vendor/encrypt/grpc.js +108 -0
  65. package/dist/vendor/encrypt/grpc.js.map +1 -0
  66. package/dist/vendor/ika/bcs-types.d.ts +1045 -0
  67. package/dist/vendor/ika/bcs-types.js +185 -0
  68. package/dist/vendor/ika/bcs-types.js.map +1 -0
  69. package/dist/vendor/ika/generated/grpc/ika_dwallet.d.ts +141 -0
  70. package/dist/vendor/ika/generated/grpc/ika_dwallet.js +531 -0
  71. package/dist/vendor/ika/generated/grpc/ika_dwallet.js.map +1 -0
  72. package/dist/vendor/ika/grpc.d.ts +16 -0
  73. package/dist/vendor/ika/grpc.js +129 -0
  74. package/dist/vendor/ika/grpc.js.map +1 -0
  75. package/dist/wallet.d.ts +2 -0
  76. package/dist/wallet.js +21 -0
  77. package/dist/wallet.js.map +1 -0
  78. package/package.json +54 -0
@@ -0,0 +1,564 @@
1
+ import { PublicKey, SystemProgram } from "@solana/web3.js";
2
+ import {} from "commander";
3
+ import { buildCliContext } from "../context.js";
4
+ import { printBanner, printSuccess, emitJson, serializeInstruction, startSpinner } from "../output.js";
5
+ import { buildDryRunKeypair, deriveEncryptAccounts, ensureEncryptDeposit, markInstructionSigner, resolvePendingPolicyOutput, resolvePendingRequestAccount, resolveScalarGuardrails, resolveVectorGuardrail, sendInstructionsWithBudget, waitForCiphertextVerified, waitForDecryptionReady, } from "../protocol.js";
6
+ import { encryptU64, encryptU64Batch, readU64Ciphertext, } from "../ika.js";
7
+ import { renderTreasurySections } from "../treasury-view.js";
8
+ import { loadKeypair } from "../wallet.js";
9
+ import { buildProposeConfidentialArgs, promptChain, promptNumber, promptString, promptTransactionType, resolveTreasuryAccount, } from "./helpers.js";
10
+ function parsePublicKey(value, label) {
11
+ try {
12
+ return new PublicKey(value);
13
+ }
14
+ catch {
15
+ throw new Error(`${label} must be a valid base58 pubkey`);
16
+ }
17
+ }
18
+ function normalizeDigestHex(value, label) {
19
+ if (!value) {
20
+ return null;
21
+ }
22
+ if (!/^[0-9a-fA-F]{64}$/.test(value)) {
23
+ throw new Error(`${label} must be a 32-byte hex digest`);
24
+ }
25
+ return value.toLowerCase();
26
+ }
27
+ function normalizePublicKeyHex(value) {
28
+ if (!value) {
29
+ return null;
30
+ }
31
+ if (!/^[0-9a-fA-F]+$/.test(value) || value.length % 2 !== 0) {
32
+ throw new Error("publicKeyHex must contain valid hex bytes");
33
+ }
34
+ return value.toLowerCase();
35
+ }
36
+ async function sendPreparedInstruction(options) {
37
+ const { ctx, instruction, extraSigners = [] } = options;
38
+ if (!ctx.wallet) {
39
+ throw new Error("A wallet is required for this command.");
40
+ }
41
+ return await sendInstructionsWithBudget({
42
+ connection: ctx.connection,
43
+ payer: ctx.wallet,
44
+ instructions: [instruction],
45
+ extraSigners,
46
+ });
47
+ }
48
+ export function registerConfidentialCommands(program) {
49
+ const confidential = program
50
+ .command("confidential")
51
+ .description("Manage confidential guardrails and policy decryption");
52
+ const deposit = confidential.command("deposit").description("Manage Encrypt deposit accounts");
53
+ deposit
54
+ .command("ensure")
55
+ .description("Ensure the configured wallet has an Encrypt deposit account")
56
+ .action(async function confidentialDepositEnsure() {
57
+ const ctx = buildCliContext(this);
58
+ if (!ctx.wallet) {
59
+ throw new Error("A wallet is required to manage Encrypt deposit accounts.");
60
+ }
61
+ const dryRunAccounts = deriveEncryptAccounts(ctx.wallet.publicKey, {
62
+ auraProgramId: ctx.programId,
63
+ });
64
+ if (ctx.dryRun) {
65
+ emitJson(ctx.output, {
66
+ action: "confidential.deposit.ensure",
67
+ accounts: dryRunAccounts,
68
+ });
69
+ return;
70
+ }
71
+ const spinner = startSpinner(ctx.output, "Ensuring Encrypt deposit account...");
72
+ const result = await ensureEncryptDeposit({
73
+ connection: ctx.connection,
74
+ payer: ctx.wallet,
75
+ auraProgramId: ctx.programId,
76
+ });
77
+ spinner.succeed(result.created ? "Encrypt deposit created" : "Encrypt deposit ready");
78
+ if (ctx.output.json) {
79
+ emitJson(ctx.output, result);
80
+ return;
81
+ }
82
+ printSuccess(ctx.output, result.created
83
+ ? `Encrypt deposit created: ${result.accounts.deposit.toBase58()}`
84
+ : `Encrypt deposit ready: ${result.accounts.deposit.toBase58()}`);
85
+ });
86
+ const guardrails = confidential
87
+ .command("guardrails")
88
+ .description("Configure confidential guardrail ciphertexts");
89
+ guardrails
90
+ .command("scalar")
91
+ .description("Attach scalar guardrail ciphertext accounts")
92
+ .option("--agent-id <id>", "treasury agent ID")
93
+ .option("--treasury <pda>", "treasury PDA")
94
+ .option("--daily-limit <usd>", "daily limit in USD — auto-encrypted via Ika Encrypt", Number)
95
+ .option("--per-tx-limit <usd>", "per-transaction limit in USD — auto-encrypted via Ika Encrypt", Number)
96
+ .option("--spent-today <usd>", "current spent-today counter in USD (default: 0) — auto-encrypted", Number)
97
+ .option("--daily-limit-ciphertext <pubkey>", "use a pre-created daily limit ciphertext account instead")
98
+ .option("--per-tx-ciphertext <pubkey>", "use a pre-created per-tx limit ciphertext account instead")
99
+ .option("--spent-today-ciphertext <pubkey>", "use a pre-created spent-today ciphertext account instead")
100
+ .action(async function confidentialGuardrailsScalar() {
101
+ const ctx = buildCliContext(this);
102
+ if (!ctx.wallet) {
103
+ throw new Error("A wallet is required to configure guardrails.");
104
+ }
105
+ const options = this.opts();
106
+ const treasuryState = await resolveTreasuryAccount(ctx, {
107
+ agentId: typeof options["agentId"] === "string" ? options["agentId"] : undefined,
108
+ treasury: typeof options["treasury"] === "string" ? options["treasury"] : undefined,
109
+ });
110
+ const existing = treasuryState.account.confidentialGuardrails;
111
+ let dailyLimitCiphertext;
112
+ let perTxLimitCiphertext;
113
+ let spentTodayCiphertext;
114
+ // If pre-created ciphertext pubkeys are provided, use them directly.
115
+ // Otherwise encrypt the plaintext values via the Ika Encrypt gRPC.
116
+ if (typeof options["dailyLimitCiphertext"] === "string" &&
117
+ typeof options["perTxCiphertext"] === "string" &&
118
+ typeof options["spentTodayCiphertext"] === "string") {
119
+ dailyLimitCiphertext = parsePublicKey(options["dailyLimitCiphertext"], "Daily limit ciphertext");
120
+ perTxLimitCiphertext = parsePublicKey(options["perTxCiphertext"], "Per-tx limit ciphertext");
121
+ spentTodayCiphertext = parsePublicKey(options["spentTodayCiphertext"], "Spent-today ciphertext");
122
+ }
123
+ else {
124
+ // Prompt for plaintext values and auto-encrypt
125
+ const dailyLimit = await promptNumber(typeof options["dailyLimit"] === "number" ? options["dailyLimit"] : undefined, "Daily limit (USD)", { validate: (v) => { if (v <= 0)
126
+ throw new Error("Must be > 0"); } });
127
+ const perTxLimit = await promptNumber(typeof options["perTxLimit"] === "number" ? options["perTxLimit"] : undefined, "Per-transaction limit (USD)", { validate: (v) => { if (v <= 0)
128
+ throw new Error("Must be > 0"); } });
129
+ const spentToday = typeof options["spentToday"] === "number" ? options["spentToday"] : 0;
130
+ if (ctx.dryRun) {
131
+ emitJson(ctx.output, {
132
+ action: "confidential.guardrails.scalar",
133
+ treasury: treasuryState.treasury,
134
+ note: "dry-run: would encrypt dailyLimit, perTxLimit, spentToday via Ika Encrypt gRPC",
135
+ values: { dailyLimit, perTxLimit, spentToday },
136
+ });
137
+ return;
138
+ }
139
+ const spinner = startSpinner(ctx.output, "Encrypting guardrail values via Ika Encrypt...");
140
+ const [daily, perTx, spent] = await encryptU64Batch([dailyLimit, perTxLimit, spentToday], ctx.programId);
141
+ spinner.setText("Waiting for ciphertexts to be verified on-chain...");
142
+ await Promise.all([
143
+ waitForCiphertextVerified(ctx.connection, daily),
144
+ waitForCiphertextVerified(ctx.connection, perTx),
145
+ waitForCiphertextVerified(ctx.connection, spent),
146
+ ]);
147
+ dailyLimitCiphertext = daily;
148
+ perTxLimitCiphertext = perTx;
149
+ spentTodayCiphertext = spent;
150
+ spinner.setText("Configuring scalar guardrails...");
151
+ const now = Math.floor(Date.now() / 1000);
152
+ const signature = await ctx.client.configureConfidentialGuardrails(ctx.wallet, {
153
+ owner: ctx.wallet.publicKey,
154
+ treasury: treasuryState.treasury,
155
+ dailyLimitCiphertext,
156
+ perTxLimitCiphertext,
157
+ spentTodayCiphertext,
158
+ }, now);
159
+ spinner.succeed("Scalar guardrails configured");
160
+ if (ctx.output.json) {
161
+ emitJson(ctx.output, {
162
+ treasury: treasuryState.treasury,
163
+ signature,
164
+ dailyLimitCiphertext,
165
+ perTxLimitCiphertext,
166
+ spentTodayCiphertext,
167
+ });
168
+ return;
169
+ }
170
+ printSuccess(ctx.output, `Scalar guardrails configured: ${signature}`);
171
+ return;
172
+ }
173
+ // Pre-created ciphertext path
174
+ const now = Math.floor(Date.now() / 1000);
175
+ if (ctx.dryRun) {
176
+ const instruction = await ctx.client.configureConfidentialGuardrailsInstruction({
177
+ owner: ctx.wallet.publicKey,
178
+ treasury: treasuryState.treasury,
179
+ dailyLimitCiphertext,
180
+ perTxLimitCiphertext,
181
+ spentTodayCiphertext,
182
+ }, now);
183
+ emitJson(ctx.output, {
184
+ action: "confidential.guardrails.scalar",
185
+ treasury: treasuryState.treasury,
186
+ instruction: serializeInstruction(instruction),
187
+ });
188
+ return;
189
+ }
190
+ const spinner = startSpinner(ctx.output, "Configuring scalar guardrails...");
191
+ const signature = await ctx.client.configureConfidentialGuardrails(ctx.wallet, {
192
+ owner: ctx.wallet.publicKey,
193
+ treasury: treasuryState.treasury,
194
+ dailyLimitCiphertext,
195
+ perTxLimitCiphertext,
196
+ spentTodayCiphertext,
197
+ }, now);
198
+ spinner.succeed("Scalar guardrails configured");
199
+ if (ctx.output.json) {
200
+ emitJson(ctx.output, { treasury: treasuryState.treasury, signature });
201
+ return;
202
+ }
203
+ printSuccess(ctx.output, `Scalar guardrails configured: ${signature}`);
204
+ });
205
+ guardrails
206
+ .command("vector")
207
+ .description("Attach a vector guardrail ciphertext account")
208
+ .option("--agent-id <id>", "treasury agent ID")
209
+ .option("--treasury <pda>", "treasury PDA")
210
+ .option("--guardrail-ciphertext <pubkey>", "guardrail vector ciphertext account")
211
+ .action(async function confidentialGuardrailsVector() {
212
+ const ctx = buildCliContext(this);
213
+ if (!ctx.wallet) {
214
+ throw new Error("A wallet is required to configure vector guardrails.");
215
+ }
216
+ const options = this.opts();
217
+ const treasuryState = await resolveTreasuryAccount(ctx, {
218
+ agentId: typeof options["agentId"] === "string" ? options["agentId"] : undefined,
219
+ treasury: typeof options["treasury"] === "string" ? options["treasury"] : undefined,
220
+ });
221
+ const existing = treasuryState.account.confidentialGuardrails?.guardrailVectorCiphertext;
222
+ const guardrailVectorCiphertext = parsePublicKey(await promptString(typeof options["guardrailCiphertext"] === "string"
223
+ ? options["guardrailCiphertext"]
224
+ : existing?.toBase58(), "Guardrail vector ciphertext"), "Guardrail vector ciphertext");
225
+ const now = Math.floor(Date.now() / 1000);
226
+ if (ctx.dryRun) {
227
+ const instruction = await ctx.client.configureConfidentialVectorGuardrailsInstruction({
228
+ owner: ctx.wallet.publicKey,
229
+ treasury: treasuryState.treasury,
230
+ guardrailVectorCiphertext,
231
+ }, now);
232
+ emitJson(ctx.output, {
233
+ action: "confidential.guardrails.vector",
234
+ treasury: treasuryState.treasury,
235
+ instruction: serializeInstruction(instruction),
236
+ });
237
+ return;
238
+ }
239
+ const spinner = startSpinner(ctx.output, "Configuring vector guardrails...");
240
+ const signature = await ctx.client.configureConfidentialVectorGuardrails(ctx.wallet, {
241
+ owner: ctx.wallet.publicKey,
242
+ treasury: treasuryState.treasury,
243
+ guardrailVectorCiphertext,
244
+ }, now);
245
+ spinner.succeed("Vector guardrails configured");
246
+ if (ctx.output.json) {
247
+ emitJson(ctx.output, { treasury: treasuryState.treasury, signature });
248
+ return;
249
+ }
250
+ printSuccess(ctx.output, `Vector guardrails configured: ${signature}`);
251
+ });
252
+ confidential
253
+ .command("status")
254
+ .description("Show confidential guardrails and pending confidential state")
255
+ .option("--agent-id <id>", "treasury agent ID")
256
+ .option("--treasury <pda>", "treasury PDA")
257
+ .action(async function confidentialStatus() {
258
+ const ctx = buildCliContext(this);
259
+ const options = this.opts();
260
+ const treasuryState = await resolveTreasuryAccount(ctx, {
261
+ agentId: typeof options["agentId"] === "string" ? options["agentId"] : undefined,
262
+ treasury: typeof options["treasury"] === "string" ? options["treasury"] : undefined,
263
+ });
264
+ const sections = renderTreasurySections(treasuryState.treasury, treasuryState.account);
265
+ if (ctx.output.json) {
266
+ emitJson(ctx.output, {
267
+ treasury: treasuryState.treasury,
268
+ guardrails: treasuryState.account.confidentialGuardrails,
269
+ pending: treasuryState.account.pending,
270
+ });
271
+ return;
272
+ }
273
+ printBanner(ctx.output, `Confidential: ${treasuryState.account.agentId}`);
274
+ if (sections.confidential) {
275
+ console.log(sections.confidential);
276
+ }
277
+ else {
278
+ console.log("No confidential guardrails configured.");
279
+ }
280
+ if (sections.pending) {
281
+ console.log("");
282
+ console.log(sections.pending);
283
+ }
284
+ });
285
+ confidential
286
+ .command("propose")
287
+ .description("Propose a confidential scalar transaction")
288
+ .option("--agent-id <id>", "treasury agent ID")
289
+ .option("--treasury <pda>", "treasury PDA")
290
+ .option("--amount <usd>", "amount in USD — auto-encrypted via Ika Encrypt", Number)
291
+ .option("--chain <name|number>", "target chain")
292
+ .option("--recipient <address>", "recipient address or contract")
293
+ .option("--tx-type <type>", "transaction type")
294
+ .option("--protocol-id <id>", "protocol ID", Number)
295
+ .option("--expected-output <usd>", "expected output in USD", Number)
296
+ .option("--actual-output <usd>", "actual output in USD", Number)
297
+ .option("--quote-age <secs>", "quote age in seconds", Number)
298
+ .option("--counterparty-risk <score>", "counterparty risk score", Number)
299
+ .option("--amount-ciphertext <pubkey>", "use a pre-created verified Encrypt ciphertext instead of auto-encrypting")
300
+ .option("--policy-output-keypair <path>", "optional keypair path for the output ciphertext")
301
+ .option("--wait", "wait until the policy output ciphertext is verified")
302
+ .action(async function confidentialPropose() {
303
+ const ctx = buildCliContext(this);
304
+ if (!ctx.wallet) {
305
+ throw new Error("A wallet is required to submit a confidential proposal.");
306
+ }
307
+ const options = this.opts();
308
+ const treasuryState = await resolveTreasuryAccount(ctx, {
309
+ agentId: typeof options["agentId"] === "string" ? options["agentId"] : undefined,
310
+ treasury: typeof options["treasury"] === "string" ? options["treasury"] : undefined,
311
+ });
312
+ const guardrails = resolveScalarGuardrails(treasuryState.account);
313
+ const amountUsd = await promptNumber(typeof options["amount"] === "number" ? options["amount"] : undefined, "Amount (USD)", { validate: (value) => { if (value <= 0)
314
+ throw new Error("Amount must be > 0"); } });
315
+ const chain = await promptChain(typeof options["chain"] === "string" || typeof options["chain"] === "number"
316
+ ? options["chain"]
317
+ : undefined, "Chain");
318
+ const recipient = await promptString(typeof options["recipient"] === "string" ? options["recipient"] : undefined, "Recipient");
319
+ const txType = await promptTransactionType(typeof options["txType"] === "string" || typeof options["txType"] === "number"
320
+ ? options["txType"]
321
+ : undefined, "Transaction type");
322
+ const args = buildProposeConfidentialArgs({
323
+ amountUsd,
324
+ chain,
325
+ txType,
326
+ recipient,
327
+ protocolId: typeof options["protocolId"] === "number" ? options["protocolId"] : undefined,
328
+ expectedOutputUsd: typeof options["expectedOutput"] === "number" ? options["expectedOutput"] : undefined,
329
+ actualOutputUsd: typeof options["actualOutput"] === "number" ? options["actualOutput"] : undefined,
330
+ quoteAgeSecs: typeof options["quoteAge"] === "number" ? options["quoteAge"] : undefined,
331
+ counterpartyRiskScore: typeof options["counterpartyRisk"] === "number"
332
+ ? options["counterpartyRisk"]
333
+ : undefined,
334
+ });
335
+ const policyOutputSigner = buildDryRunKeypair(typeof options["policyOutputKeypair"] === "string"
336
+ ? options["policyOutputKeypair"]
337
+ : undefined, loadKeypair);
338
+ const encryptAccounts = deriveEncryptAccounts(ctx.wallet.publicKey, {
339
+ auraProgramId: ctx.programId,
340
+ });
341
+ if (ctx.dryRun) {
342
+ emitJson(ctx.output, {
343
+ action: "confidential.propose",
344
+ treasury: treasuryState.treasury,
345
+ policyOutputCiphertext: policyOutputSigner.publicKey,
346
+ encryptAccounts,
347
+ args,
348
+ note: typeof options["amountCiphertext"] === "string"
349
+ ? "using pre-created amount ciphertext"
350
+ : "would auto-encrypt amount via Ika Encrypt gRPC",
351
+ });
352
+ return;
353
+ }
354
+ const spinner = startSpinner(ctx.output, "Ensuring Encrypt deposit account...");
355
+ await ensureEncryptDeposit({
356
+ connection: ctx.connection,
357
+ payer: ctx.wallet,
358
+ auraProgramId: ctx.programId,
359
+ });
360
+ // Resolve the amount ciphertext — auto-encrypt if not provided
361
+ let amountCiphertext;
362
+ if (typeof options["amountCiphertext"] === "string") {
363
+ amountCiphertext = parsePublicKey(options["amountCiphertext"], "Amount ciphertext");
364
+ }
365
+ else {
366
+ spinner.setText(`Encrypting amount (${amountUsd} USD) via Ika Encrypt...`);
367
+ amountCiphertext = await encryptU64(amountUsd, ctx.programId);
368
+ spinner.setText("Waiting for amount ciphertext to be verified on-chain...");
369
+ await waitForCiphertextVerified(ctx.connection, amountCiphertext);
370
+ }
371
+ const instruction = await ctx.client.proposeConfidentialTransactionInstruction({
372
+ aiAuthority: ctx.wallet.publicKey,
373
+ treasury: treasuryState.treasury,
374
+ dailyLimitCiphertext: guardrails.dailyLimitCiphertext,
375
+ perTxLimitCiphertext: guardrails.perTxLimitCiphertext,
376
+ spentTodayCiphertext: guardrails.spentTodayCiphertext,
377
+ amountCiphertext,
378
+ policyOutputCiphertext: policyOutputSigner.publicKey,
379
+ encryptProgram: encryptAccounts.encryptProgram,
380
+ config: encryptAccounts.config,
381
+ deposit: encryptAccounts.deposit,
382
+ callerProgram: ctx.programId,
383
+ cpiAuthority: encryptAccounts.cpiAuthority,
384
+ networkEncryptionKey: encryptAccounts.networkEncryptionKey,
385
+ eventAuthority: encryptAccounts.eventAuthority,
386
+ systemProgram: SystemProgram.programId,
387
+ }, args);
388
+ markInstructionSigner(instruction, policyOutputSigner.publicKey);
389
+ spinner.setText("Submitting confidential proposal...");
390
+ const signature = await sendPreparedInstruction({
391
+ ctx,
392
+ instruction,
393
+ extraSigners: [policyOutputSigner],
394
+ });
395
+ if (options["wait"] === true) {
396
+ spinner.setText("Waiting for output ciphertext verification...");
397
+ await waitForCiphertextVerified(ctx.connection, policyOutputSigner.publicKey);
398
+ }
399
+ spinner.succeed("Confidential proposal submitted");
400
+ if (ctx.output.json) {
401
+ emitJson(ctx.output, {
402
+ treasury: treasuryState.treasury,
403
+ signature,
404
+ amountCiphertext,
405
+ policyOutputCiphertext: policyOutputSigner.publicKey,
406
+ });
407
+ return;
408
+ }
409
+ printSuccess(ctx.output, `Confidential proposal submitted: ${signature}\n amount ciphertext: ${amountCiphertext.toBase58()}\n output ciphertext: ${policyOutputSigner.publicKey.toBase58()}`);
410
+ });
411
+ confidential
412
+ .command("request-decryption")
413
+ .description("Request Encrypt decryption for the pending policy output")
414
+ .option("--agent-id <id>", "treasury agent ID")
415
+ .option("--treasury <pda>", "treasury PDA")
416
+ .option("--ciphertext <pubkey>", "override the pending policy output ciphertext")
417
+ .option("--request-keypair <path>", "optional keypair path for the decryption request account")
418
+ .option("--wait", "wait until the plaintext is ready on-chain")
419
+ .action(async function confidentialRequestDecryption() {
420
+ const ctx = buildCliContext(this);
421
+ if (!ctx.wallet) {
422
+ throw new Error("A wallet is required to request policy decryption.");
423
+ }
424
+ const options = this.opts();
425
+ const treasuryState = await resolveTreasuryAccount(ctx, {
426
+ agentId: typeof options["agentId"] === "string" ? options["agentId"] : undefined,
427
+ treasury: typeof options["treasury"] === "string" ? options["treasury"] : undefined,
428
+ });
429
+ const ciphertext = typeof options["ciphertext"] === "string"
430
+ ? parsePublicKey(options["ciphertext"], "Ciphertext")
431
+ : resolvePendingPolicyOutput(treasuryState.account);
432
+ const requestSigner = buildDryRunKeypair(typeof options["requestKeypair"] === "string"
433
+ ? options["requestKeypair"]
434
+ : undefined, loadKeypair);
435
+ const encryptAccounts = deriveEncryptAccounts(ctx.wallet.publicKey, {
436
+ auraProgramId: ctx.programId,
437
+ });
438
+ const now = Math.floor(Date.now() / 1000);
439
+ const instruction = await ctx.client.requestPolicyDecryptionInstruction({
440
+ operator: ctx.wallet.publicKey,
441
+ treasury: treasuryState.treasury,
442
+ requestAccount: requestSigner.publicKey,
443
+ ciphertext,
444
+ encryptProgram: encryptAccounts.encryptProgram,
445
+ config: encryptAccounts.config,
446
+ deposit: encryptAccounts.deposit,
447
+ callerProgram: ctx.programId,
448
+ cpiAuthority: encryptAccounts.cpiAuthority,
449
+ networkEncryptionKey: encryptAccounts.networkEncryptionKey,
450
+ eventAuthority: encryptAccounts.eventAuthority,
451
+ systemProgram: SystemProgram.programId,
452
+ }, now);
453
+ markInstructionSigner(instruction, requestSigner.publicKey);
454
+ if (ctx.dryRun) {
455
+ emitJson(ctx.output, {
456
+ action: "confidential.request-decryption",
457
+ treasury: treasuryState.treasury,
458
+ ciphertext,
459
+ requestAccount: requestSigner.publicKey,
460
+ instruction: serializeInstruction(instruction),
461
+ });
462
+ return;
463
+ }
464
+ const spinner = startSpinner(ctx.output, "Ensuring Encrypt deposit account...");
465
+ const depositResult = await ensureEncryptDeposit({
466
+ connection: ctx.connection,
467
+ payer: ctx.wallet,
468
+ auraProgramId: ctx.programId,
469
+ });
470
+ spinner.setText("Submitting decryption request...");
471
+ const signature = await sendPreparedInstruction({
472
+ ctx,
473
+ instruction,
474
+ extraSigners: [requestSigner],
475
+ });
476
+ if (options["wait"] === true) {
477
+ spinner.setText("Waiting for decrypted plaintext...");
478
+ await waitForDecryptionReady(ctx.connection, requestSigner.publicKey);
479
+ }
480
+ spinner.succeed("Policy decryption requested");
481
+ if (ctx.output.json) {
482
+ emitJson(ctx.output, {
483
+ treasury: treasuryState.treasury,
484
+ signature,
485
+ requestAccount: requestSigner.publicKey,
486
+ deposit: depositResult,
487
+ });
488
+ return;
489
+ }
490
+ printSuccess(ctx.output, `Policy decryption requested: ${signature} (request ${requestSigner.publicKey.toBase58()})`);
491
+ });
492
+ confidential
493
+ .command("confirm-decryption")
494
+ .description("Confirm a completed policy decryption request on-chain")
495
+ .option("--agent-id <id>", "treasury agent ID")
496
+ .option("--treasury <pda>", "treasury PDA")
497
+ .option("--request-account <pubkey>", "override the pending decryption request account")
498
+ .action(async function confidentialConfirmDecryption() {
499
+ const ctx = buildCliContext(this);
500
+ if (!ctx.wallet) {
501
+ throw new Error("A wallet is required to confirm policy decryption.");
502
+ }
503
+ const options = this.opts();
504
+ const treasuryState = await resolveTreasuryAccount(ctx, {
505
+ agentId: typeof options["agentId"] === "string" ? options["agentId"] : undefined,
506
+ treasury: typeof options["treasury"] === "string" ? options["treasury"] : undefined,
507
+ });
508
+ const requestAccount = typeof options["requestAccount"] === "string"
509
+ ? parsePublicKey(options["requestAccount"], "Request account")
510
+ : resolvePendingRequestAccount(treasuryState.account);
511
+ const now = Math.floor(Date.now() / 1000);
512
+ if (ctx.dryRun) {
513
+ const instruction = await ctx.client.confirmPolicyDecryptionInstruction({
514
+ operator: ctx.wallet.publicKey,
515
+ treasury: treasuryState.treasury,
516
+ requestAccount,
517
+ }, now);
518
+ emitJson(ctx.output, {
519
+ action: "confidential.confirm-decryption",
520
+ treasury: treasuryState.treasury,
521
+ requestAccount,
522
+ instruction: serializeInstruction(instruction),
523
+ });
524
+ return;
525
+ }
526
+ const spinner = startSpinner(ctx.output, "Confirming policy decryption...");
527
+ const signature = await ctx.client.confirmPolicyDecryption(ctx.wallet, {
528
+ operator: ctx.wallet.publicKey,
529
+ treasury: treasuryState.treasury,
530
+ requestAccount,
531
+ }, now);
532
+ // Read the decrypted policy output from the Encrypt network to show the result
533
+ let violationCode = null;
534
+ try {
535
+ spinner.setText("Reading decrypted policy result from Encrypt network...");
536
+ const policyOutput = resolvePendingPolicyOutput(treasuryState.account);
537
+ violationCode = await readU64Ciphertext(policyOutput, ctx.wallet.publicKey);
538
+ }
539
+ catch {
540
+ // Non-fatal — the on-chain state is the source of truth
541
+ }
542
+ spinner.succeed("Policy decryption confirmed");
543
+ const refreshed = await ctx.client.getTreasuryAccount(treasuryState.treasury);
544
+ const decision = refreshed.pending?.decision;
545
+ if (ctx.output.json) {
546
+ emitJson(ctx.output, {
547
+ treasury: treasuryState.treasury,
548
+ requestAccount,
549
+ signature,
550
+ approved: decision?.approved ?? null,
551
+ violation: decision?.violation ?? null,
552
+ violationCode: violationCode !== null ? violationCode.toString() : null,
553
+ });
554
+ return;
555
+ }
556
+ const resultLine = decision
557
+ ? decision.approved
558
+ ? "approved ✓"
559
+ : `denied — violation code ${violationCode ?? decision.violation}`
560
+ : "";
561
+ printSuccess(ctx.output, `Policy decryption confirmed: ${signature}${resultLine ? `\n result: ${resultLine}` : ""}`);
562
+ });
563
+ }
564
+ //# sourceMappingURL=confidential.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confidential.js","sourceRoot":"","sources":["../../src/commands/confidential.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAA+B,MAAM,iBAAiB,CAAC;AACxF,OAAO,EAAgB,MAAM,WAAW,CAAC;AAEzC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACvG,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,0BAA0B,EAC1B,4BAA4B,EAC5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