@certen.io/cli 0.5.0 → 0.7.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.
- package/CHANGELOG.md +407 -0
- package/README.md +232 -160
- package/dist/chains.d.ts +67 -0
- package/dist/chains.js +242 -0
- package/dist/chains.js.map +1 -0
- package/dist/commands/admin.js +49 -4
- package/dist/commands/admin.js.map +1 -1
- package/dist/commands/auth.js +145 -12
- package/dist/commands/auth.js.map +1 -1
- package/dist/commands/billing.js +648 -40
- package/dist/commands/billing.js.map +1 -1
- package/dist/commands/call.d.ts +2 -0
- package/dist/commands/call.js +168 -0
- package/dist/commands/call.js.map +1 -0
- package/dist/commands/chains.d.ts +2 -0
- package/dist/commands/chains.js +123 -0
- package/dist/commands/chains.js.map +1 -0
- package/dist/commands/doctor.d.ts +2 -0
- package/dist/commands/doctor.js +171 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/errors-catalogue.d.ts +2 -0
- package/dist/commands/errors-catalogue.js +83 -0
- package/dist/commands/errors-catalogue.js.map +1 -0
- package/dist/commands/identity.js +269 -19
- package/dist/commands/identity.js.map +1 -1
- package/dist/commands/init.d.ts +2 -0
- package/dist/commands/init.js +307 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/keys.js +2 -0
- package/dist/commands/keys.js.map +1 -1
- package/dist/commands/oauth-clients.d.ts +2 -0
- package/dist/commands/oauth-clients.js +131 -0
- package/dist/commands/oauth-clients.js.map +1 -0
- package/dist/commands/orgs.d.ts +2 -0
- package/dist/commands/orgs.js +117 -0
- package/dist/commands/orgs.js.map +1 -0
- package/dist/commands/pending.js +13 -1
- package/dist/commands/pending.js.map +1 -1
- package/dist/commands/portfolio.js +34 -1
- package/dist/commands/portfolio.js.map +1 -1
- package/dist/commands/proof.d.ts +2 -0
- package/dist/commands/proof.js +400 -0
- package/dist/commands/proof.js.map +1 -0
- package/dist/commands/signup.d.ts +14 -0
- package/dist/commands/signup.js +271 -0
- package/dist/commands/signup.js.map +1 -0
- package/dist/commands/transaction.js +139 -21
- package/dist/commands/transaction.js.map +1 -1
- package/dist/commands/webhooks.d.ts +2 -0
- package/dist/commands/webhooks.js +200 -0
- package/dist/commands/webhooks.js.map +1 -0
- package/dist/commands/whoami.d.ts +16 -0
- package/dist/commands/whoami.js +98 -0
- package/dist/commands/whoami.js.map +1 -0
- package/dist/config.d.ts +56 -0
- package/dist/config.js +51 -0
- package/dist/config.js.map +1 -1
- package/dist/errors.d.ts +14 -1
- package/dist/errors.js +15 -1
- package/dist/errors.js.map +1 -1
- package/dist/funding-guard.d.ts +40 -0
- package/dist/funding-guard.js +120 -0
- package/dist/funding-guard.js.map +1 -0
- package/dist/help-root.d.ts +2 -0
- package/dist/help-root.js +94 -0
- package/dist/help-root.js.map +1 -0
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -1
- package/dist/output.d.ts +23 -0
- package/dist/output.js +46 -0
- package/dist/output.js.map +1 -1
- package/dist/passphrase.d.ts +18 -0
- package/dist/passphrase.js +35 -3
- package/dist/passphrase.js.map +1 -1
- package/dist/payment-uri.d.ts +76 -0
- package/dist/payment-uri.js +135 -0
- package/dist/payment-uri.js.map +1 -0
- package/dist/signer.js +6 -3
- package/dist/signer.js.map +1 -1
- package/dist/solidity-args.d.ts +31 -0
- package/dist/solidity-args.js +111 -0
- package/dist/solidity-args.js.map +1 -0
- package/dist/wait.d.ts +79 -0
- package/dist/wait.js +168 -0
- package/dist/wait.js.map +1 -0
- package/package.json +5 -4
package/dist/commands/pending.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CertenClient } from '@certen.io/sdk';
|
|
2
2
|
import { getApiKey, getApiUrl } from '../config.js';
|
|
3
|
-
import { printOutput } from '../output.js';
|
|
3
|
+
import { printOutput, hint, isJsonMode } from '../output.js';
|
|
4
4
|
import { resolveSignature } from '../signer.js';
|
|
5
5
|
async function getClient() {
|
|
6
6
|
return new CertenClient({ apiKey: await getApiKey(), baseUrl: getApiUrl() });
|
|
@@ -44,6 +44,18 @@ export function registerPendingCommands(program) {
|
|
|
44
44
|
vote: opts.vote,
|
|
45
45
|
});
|
|
46
46
|
printOutput(result);
|
|
47
|
+
if (isJsonMode())
|
|
48
|
+
return;
|
|
49
|
+
// This command creates a sign REQUEST; it does not cast the vote. The two-step shape is not
|
|
50
|
+
// obvious from the name, and stopping here leaves the approval uncast.
|
|
51
|
+
const r = result;
|
|
52
|
+
const requestId = r.sign_request_id;
|
|
53
|
+
const hash = r.signing_data?.data_for_signature ?? r.signing_data?.hash_to_sign;
|
|
54
|
+
if (requestId && hash) {
|
|
55
|
+
hint('');
|
|
56
|
+
hint('This opened a sign request — the vote is not cast until the signature is submitted:');
|
|
57
|
+
hint(` certen pending submit ${requestId} --sign-with <key> --hash ${hash}`);
|
|
58
|
+
}
|
|
47
59
|
});
|
|
48
60
|
pending
|
|
49
61
|
.command('submit <id>')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pending.js","sourceRoot":"","sources":["../../src/commands/pending.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"pending.js","sourceRoot":"","sources":["../../src/commands/pending.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,KAAK,UAAU,SAAS;IACtB,OAAO,IAAI,YAAY,CAAC,EAAE,MAAM,EAAE,MAAM,SAAS,EAAE,EA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E,IAAI,CAAC,QAAQ;YACvB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,SAAS,EAAE,CAAC;QACjC,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,CAAC;QAC/E,WAAW,CAAC,MAA4C,CAAC,CAAC;IAC5D,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { CertenClient } from '@certen.io/sdk';
|
|
2
2
|
import { getApiKey, getApiUrl } from '../config.js';
|
|
3
|
-
import { printOutput } from '../output.js';
|
|
3
|
+
import { printOutput, hint, isJsonMode } from '../output.js';
|
|
4
|
+
import { faucetFor } from '../funding-guard.js';
|
|
5
|
+
import { normalizeChain } from '../chains.js';
|
|
4
6
|
async function getClient() {
|
|
5
7
|
return new CertenClient({ apiKey: await getApiKey(), baseUrl: getApiUrl() });
|
|
6
8
|
}
|
|
@@ -13,6 +15,37 @@ export function registerPortfolioCommands(program) {
|
|
|
13
15
|
const client = await getClient();
|
|
14
16
|
const result = await client.portfolio.get(opts.identity);
|
|
15
17
|
printOutput(result);
|
|
18
|
+
if (isJsonMode())
|
|
19
|
+
return;
|
|
20
|
+
if ((result.identities ?? []).length === 0) {
|
|
21
|
+
hint('');
|
|
22
|
+
hint('No identities yet. Next: certen identity create --name <name> --sign-with <key>');
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
// An abstract account with no gas is the difference between an intent that executes and one
|
|
26
|
+
// that parks at `anchoring` forever. This is the view where that is visible, so say it here
|
|
27
|
+
// rather than leaving it to be discovered at submit time.
|
|
28
|
+
const empty = [];
|
|
29
|
+
for (const identity of result.identities) {
|
|
30
|
+
for (const chain of identity.chains ?? []) {
|
|
31
|
+
const native = (chain.balances ?? []).find((b) => !b.token || b.token === 'ETH' || b.token === 'native');
|
|
32
|
+
// Normalized: the same chain arrives as a slug on one account and a numeric EVM id on
|
|
33
|
+
// another, so the raw values would list one chain twice.
|
|
34
|
+
if (native && Number(native.balance) === 0)
|
|
35
|
+
empty.push(normalizeChain(chain.chain_id));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
if (empty.length > 0) {
|
|
39
|
+
const chains = [...new Set(empty)];
|
|
40
|
+
hint('');
|
|
41
|
+
hint(`Abstract accounts with no gas on: ${chains.join(', ')}.`);
|
|
42
|
+
hint('An intent that moves value from these is accepted and then never executes.');
|
|
43
|
+
for (const chain of chains) {
|
|
44
|
+
const faucet = faucetFor(chain);
|
|
45
|
+
if (faucet)
|
|
46
|
+
hint(` ${chain}: ${faucet}`);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
16
49
|
});
|
|
17
50
|
}
|
|
18
51
|
//# sourceMappingURL=portfolio.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"portfolio.js","sourceRoot":"","sources":["../../src/commands/portfolio.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"portfolio.js","sourceRoot":"","sources":["../../src/commands/portfolio.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM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ACzG,sFAAsF;gBACtF,yDAAyD;gBACzD,IAAI,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;oBAAE,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;YACzF,CAAC;QACH,CAAC;QACD,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACrB,MAAM,MAAM,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;YACnC,IAAI,CAAC,EAAE,CAAC,CAAC;YACT,IAAI,CAAC,qCAAqC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAChE,IAAI,CAAC,4EAA4E,CAAC,CAAC;YACnF,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;gBAC3B,MAAM,MAAM,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;gBAChC,IAAI,MAAM;oBAAE,IAAI,CAAC,KAAK,KAAK,KAAK,MAAM,EAAE,CAAC,CAAC;YAC5C,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
import { writeFileSync, readFileSync } from 'node:fs';
|
|
2
|
+
import { CertenClient, CertenError, fetchSharedProof } from '@certen.io/sdk';
|
|
3
|
+
import { getApiKey, getApiUrl } from '../config.js';
|
|
4
|
+
import { printOutput, hint, human, isJsonMode } from '../output.js';
|
|
5
|
+
import { CliError, UsageError, EXIT } from '../errors.js';
|
|
6
|
+
/**
|
|
7
|
+
* `certen proof` — the evidence the whole product exists to produce.
|
|
8
|
+
*
|
|
9
|
+
* Eleven proof endpoints shipped with no CLI surface at all, so retrieving the deliverable meant
|
|
10
|
+
* curl. That is the gap this closes.
|
|
11
|
+
*
|
|
12
|
+
* **The design is shaped by a fact about production: the proof-service and Accumulate fail
|
|
13
|
+
* independently.** `proof/{id}`, `/bundle` and `/custody` come from the proof-service;
|
|
14
|
+
* `proof/tx/{hash}/receipt` is read live from Accumulate. When the proof-service is down the
|
|
15
|
+
* first three return 502 — with a plain-text body — while the receipt keeps working. On the live
|
|
16
|
+
* gateway today, that is exactly the state: every proof-service read 502s and every receipt
|
|
17
|
+
* succeeds.
|
|
18
|
+
*
|
|
19
|
+
* So a command that reported "no proof" on a 502 would be wrong in the most damaging way
|
|
20
|
+
* available: telling someone their evidence does not exist when it does. Every read here falls
|
|
21
|
+
* back to the receipt and says which source answered.
|
|
22
|
+
*/
|
|
23
|
+
async function getClient() {
|
|
24
|
+
return new CertenClient({ apiKey: await getApiKey(), baseUrl: getApiUrl() });
|
|
25
|
+
}
|
|
26
|
+
const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
27
|
+
const HEX64 = /^(0x)?[0-9a-f]{64}$/i;
|
|
28
|
+
/**
|
|
29
|
+
* Pull a 64-hex transaction hash out of whatever the gateway called one.
|
|
30
|
+
*
|
|
31
|
+
* `accum_tx_hash` arrives as a full ACME URL in practice —
|
|
32
|
+
* `acc://<64hex>@campaign-714942.acme/data` — not as a bare hash. Passing that string to
|
|
33
|
+
* `/v1/proof/tx/{hash}/receipt` 404s, and the reason is invisible unless you know the shape.
|
|
34
|
+
*/
|
|
35
|
+
function extractTxHash(value) {
|
|
36
|
+
if (!value)
|
|
37
|
+
return undefined;
|
|
38
|
+
return String(value).match(/([a-f0-9]{64})/i)?.[1];
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* The verdict, applied identically in both output modes.
|
|
42
|
+
*
|
|
43
|
+
* Shared so that adding an output branch can never again skip it. A verification command that
|
|
44
|
+
* exits 0 on an unverified proof is worse than no command at all.
|
|
45
|
+
*/
|
|
46
|
+
function failIfNotIncluded(inclusion) {
|
|
47
|
+
if (inclusion)
|
|
48
|
+
return;
|
|
49
|
+
throw new CliError('Inclusion could not be established from this receipt.', 'INCLUSION_NOT_ESTABLISHED', EXIT.FAILED);
|
|
50
|
+
}
|
|
51
|
+
/** A 5xx means the source is unavailable, which is categorically not "the proof does not exist". */
|
|
52
|
+
function isUnavailable(err) {
|
|
53
|
+
return err instanceof CertenError && err.status >= 500;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Work out what the user gave us and what it points at.
|
|
57
|
+
*
|
|
58
|
+
* Accepts a proof id, an intent id, or a transaction hash, because at the moment someone wants a
|
|
59
|
+
* proof they have whichever of the three their last command printed — and making them work out
|
|
60
|
+
* which kind it is, then pick a matching subcommand, is a step that buys nothing.
|
|
61
|
+
*/
|
|
62
|
+
async function resolveTarget(client, id) {
|
|
63
|
+
if (HEX64.test(id))
|
|
64
|
+
return { txHash: id.replace(/^0x/, '') };
|
|
65
|
+
if (!UUID.test(id)) {
|
|
66
|
+
throw new UsageError(`"${id}" is not a proof id, an intent id, or a transaction hash. `
|
|
67
|
+
+ 'Pass a UUID or a 64-character hex hash.', 'INVALID_PROOF_TARGET');
|
|
68
|
+
}
|
|
69
|
+
// A UUID could be either a proof id or an intent id. Try it as an intent first: that read is
|
|
70
|
+
// served by the gateway's own database rather than the proof-service, so it answers even when
|
|
71
|
+
// the proof-service is down — and it is the id a user is far more likely to be holding.
|
|
72
|
+
try {
|
|
73
|
+
const intent = await client.transaction.get(id);
|
|
74
|
+
return {
|
|
75
|
+
intentId: id,
|
|
76
|
+
// Empty string, not undefined, is what a proof-less intent actually carries. Every
|
|
77
|
+
// completed intent on the live gateway today has `proof_id: ""`.
|
|
78
|
+
proofId: intent.proof_id || undefined,
|
|
79
|
+
txHash: extractTxHash(intent.accum_tx_hash),
|
|
80
|
+
status: intent.status,
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
catch (err) {
|
|
84
|
+
if (err instanceof CertenError && err.status === 404)
|
|
85
|
+
return { proofId: id };
|
|
86
|
+
throw err;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
/** Render a receipt for a human, leading with the field that decides whether it proves anything. */
|
|
90
|
+
function describeReceipt(receipt) {
|
|
91
|
+
human('');
|
|
92
|
+
human(` Accumulate receipt for ${receipt.tx_hash}`);
|
|
93
|
+
human(` status ${receipt.status}`);
|
|
94
|
+
human(` anchored ${receipt.anchored}`);
|
|
95
|
+
if (receipt.tx_type)
|
|
96
|
+
human(` tx_type ${receipt.tx_type}`);
|
|
97
|
+
if (receipt.principal)
|
|
98
|
+
human(` principal ${receipt.principal}`);
|
|
99
|
+
if (receipt.block_time)
|
|
100
|
+
human(` block_time ${receipt.block_time}`);
|
|
101
|
+
if (receipt.receipt?.anchor)
|
|
102
|
+
human(` anchor ${receipt.receipt.anchor}`);
|
|
103
|
+
human('');
|
|
104
|
+
if (!receipt.anchored) {
|
|
105
|
+
// Delivered and anchored are different claims. Only the second is checkable against a root a
|
|
106
|
+
// counterparty obtained independently, which is the only kind of check that means anything.
|
|
107
|
+
human(' NOT ANCHORED YET — delivered, but there is no inclusion proof to check against a');
|
|
108
|
+
human(' block root until it anchors. Try again shortly.');
|
|
109
|
+
human('');
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
export function registerProofCommands(program) {
|
|
113
|
+
const proof = program.command('proof').description('Proofs — the evidence you hand a counterparty');
|
|
114
|
+
proof
|
|
115
|
+
.command('get <id>')
|
|
116
|
+
.description('Get a proof by proof id, intent id, or transaction hash')
|
|
117
|
+
.action(async (id) => {
|
|
118
|
+
const client = await getClient();
|
|
119
|
+
const target = await resolveTarget(client, id);
|
|
120
|
+
let serviceDown = 0;
|
|
121
|
+
if (target.proofId) {
|
|
122
|
+
try {
|
|
123
|
+
const artifact = await client.proof.get(target.proofId);
|
|
124
|
+
printOutput({ source: 'proof-service', proof_id: target.proofId, proof: artifact });
|
|
125
|
+
if (!isJsonMode()) {
|
|
126
|
+
hint('');
|
|
127
|
+
hint(`Full bundle: certen proof bundle ${target.proofId}`);
|
|
128
|
+
}
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
catch (err) {
|
|
132
|
+
if (!isUnavailable(err))
|
|
133
|
+
throw err;
|
|
134
|
+
serviceDown = err.status;
|
|
135
|
+
if (!isJsonMode() && target.txHash) {
|
|
136
|
+
hint(`The proof-service is unavailable (${serviceDown}). `
|
|
137
|
+
+ 'Falling back to the Accumulate receipt, which is read from the network directly.');
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
if (!target.txHash) {
|
|
142
|
+
// Three genuinely different situations, and only one of them is "there is nothing here".
|
|
143
|
+
// Reporting a 502 as "nothing found" tells someone their evidence does not exist when it
|
|
144
|
+
// does — the worst available answer, and the one the naive version gave.
|
|
145
|
+
if (serviceDown) {
|
|
146
|
+
throw new CliError(`The proof-service is unavailable (${serviceDown}), so proof ${target.proofId} could not `
|
|
147
|
+
+ 'be read. This does NOT mean the proof is missing — it means the service that serves '
|
|
148
|
+
+ 'it is down. If you have the intent id, its Accumulate receipt is readable directly: '
|
|
149
|
+
+ 'certen proof get <intent-id>', 'PROOF_SERVICE_UNAVAILABLE',
|
|
150
|
+
// Retryable: the proof is presumably fine and the service will come back.
|
|
151
|
+
EXIT.FAILED, true);
|
|
152
|
+
}
|
|
153
|
+
throw new CliError(target.intentId
|
|
154
|
+
? `Intent ${target.intentId} is "${target.status ?? 'unknown'}" and carries neither a proof `
|
|
155
|
+
+ 'nor an Accumulate transaction hash yet. Wait for it to reach a terminal state: '
|
|
156
|
+
+ `certen tx status ${target.intentId} --wait`
|
|
157
|
+
: `Nothing found for ${id}.`, 'NO_PROOF_AVAILABLE', EXIT.FAILED);
|
|
158
|
+
}
|
|
159
|
+
// The receipt path. This is the normal case for governance and authorization transactions,
|
|
160
|
+
// which have no proof_id by design — an empty proof lookup there is not a bug.
|
|
161
|
+
const receipt = await client.proof.receipt(target.txHash);
|
|
162
|
+
// The merkle path is the substance of the receipt and is the point of the JSON output — and
|
|
163
|
+
// it is fourteen sibling hashes, which the table renderer flattens onto one unreadable line.
|
|
164
|
+
// Machines get all of it; the human summary below carries the anchor, which is the part a
|
|
165
|
+
// person actually checks.
|
|
166
|
+
if (isJsonMode()) {
|
|
167
|
+
printOutput({
|
|
168
|
+
source: 'accumulate-receipt',
|
|
169
|
+
tx_hash: receipt.tx_hash,
|
|
170
|
+
status: receipt.status,
|
|
171
|
+
anchored: receipt.anchored,
|
|
172
|
+
tx_type: receipt.tx_type ?? null,
|
|
173
|
+
principal: receipt.principal ?? null,
|
|
174
|
+
block_time: receipt.block_time ?? null,
|
|
175
|
+
receipt: receipt.receipt ?? null,
|
|
176
|
+
});
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
describeReceipt(receipt);
|
|
180
|
+
hint(`Full merkle path: certen --json proof get ${id}`);
|
|
181
|
+
hint(`What this does and does not prove: certen proof verify ${id}`);
|
|
182
|
+
});
|
|
183
|
+
proof
|
|
184
|
+
.command('bundle <proofId>')
|
|
185
|
+
.description('Download the full proof bundle to a file')
|
|
186
|
+
.option('--out <path>', 'Where to write it (default ./proof-<id>.<ext>)')
|
|
187
|
+
.action(async (proofId, opts) => {
|
|
188
|
+
const client = await getClient();
|
|
189
|
+
const { data, contentType } = await client.proof.bundle(proofId).catch((err) => {
|
|
190
|
+
if (isUnavailable(err)) {
|
|
191
|
+
throw new CliError(`The proof-service is unavailable (${err.status}), so the bundle cannot `
|
|
192
|
+
+ 'be downloaded right now. The proof is not lost — this is the service that packages '
|
|
193
|
+
+ `it. The Accumulate receipt is still readable: certen proof get ${proofId}`, 'PROOF_SERVICE_UNAVAILABLE', EXIT.FAILED);
|
|
194
|
+
}
|
|
195
|
+
throw err;
|
|
196
|
+
});
|
|
197
|
+
// The gateway streams octet-stream for binary downstreams and JSON otherwise, so the
|
|
198
|
+
// extension follows what actually arrived rather than an assumption.
|
|
199
|
+
const ext = contentType.includes('json') ? 'json' : 'bin';
|
|
200
|
+
const path = opts.out ?? `./proof-${proofId}.${ext}`;
|
|
201
|
+
writeFileSync(path, data);
|
|
202
|
+
printOutput({ proof_id: proofId, path, bytes: data.length, content_type: contentType });
|
|
203
|
+
if (!isJsonMode()) {
|
|
204
|
+
hint('');
|
|
205
|
+
hint(`Hand this to your counterparty. What they should check: certen proof verify @${path}`);
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
proof
|
|
209
|
+
.command('custody <proofId>')
|
|
210
|
+
.description('Show the custody chain for a proof')
|
|
211
|
+
.action(async (proofId) => {
|
|
212
|
+
const client = await getClient();
|
|
213
|
+
const custody = await client.proof.custody(proofId).catch((err) => {
|
|
214
|
+
if (isUnavailable(err)) {
|
|
215
|
+
throw new CliError(`The proof-service is unavailable (${err.status}). Custody is served by `
|
|
216
|
+
+ 'that service and has no independent fallback.', 'PROOF_SERVICE_UNAVAILABLE', EXIT.FAILED);
|
|
217
|
+
}
|
|
218
|
+
throw err;
|
|
219
|
+
});
|
|
220
|
+
printOutput(custody);
|
|
221
|
+
});
|
|
222
|
+
// ── sharing ───────────────────────────────────────────────────────────────────────────────────
|
|
223
|
+
proof
|
|
224
|
+
.command('share <proofId>')
|
|
225
|
+
.description('Mint a link a counterparty can open without an API key')
|
|
226
|
+
.option('--label <label>', 'What this share is for — shown in `proof shares`')
|
|
227
|
+
.option('--expires-in <seconds>', 'Lifetime in seconds', parseInt)
|
|
228
|
+
.action(async (proofId, opts) => {
|
|
229
|
+
const client = await getClient();
|
|
230
|
+
const share = await client.proof.share(proofId, {
|
|
231
|
+
label: opts.label,
|
|
232
|
+
expiresIn: opts.expiresIn,
|
|
233
|
+
});
|
|
234
|
+
printOutput(share);
|
|
235
|
+
if (isJsonMode())
|
|
236
|
+
return;
|
|
237
|
+
human('');
|
|
238
|
+
if (share.url)
|
|
239
|
+
human(` ${share.url}`);
|
|
240
|
+
else if (share.token)
|
|
241
|
+
human(` Token: ${share.token}`);
|
|
242
|
+
human('');
|
|
243
|
+
// The token is shown once. Saying so after the fact is useless, so say it here.
|
|
244
|
+
human(' This token is shown ONCE. Later reads show only its prefix.');
|
|
245
|
+
if (share.expires_at)
|
|
246
|
+
human(` Expires ${share.expires_at}.`);
|
|
247
|
+
hint('');
|
|
248
|
+
hint(`Revoke it: certen proof shares revoke ${share.id ?? '<share-id>'}`);
|
|
249
|
+
});
|
|
250
|
+
proof
|
|
251
|
+
.command('open <link>')
|
|
252
|
+
.description('Read a proof someone shared with you (no API key needed)')
|
|
253
|
+
.option('--out <file>', 'Write the bundle to a file instead of printing it')
|
|
254
|
+
.action(async (link, opts) => {
|
|
255
|
+
// NO getApiKey() and no client. This is the one command a counterparty runs, and the endpoint
|
|
256
|
+
// takes no credential precisely because requiring a CERTEN account to verify a CERTEN proof
|
|
257
|
+
// would defeat the purpose. Every other operation on a share existed - create, list, revoke,
|
|
258
|
+
// all for the SENDER - and the person the feature is actually for had nothing.
|
|
259
|
+
//
|
|
260
|
+
// The share URL is accepted as handed over, origin included, so nothing needs configuring:
|
|
261
|
+
// asking someone to strip the token out of a link and then name the gateway it came from is
|
|
262
|
+
// work invented for no reason.
|
|
263
|
+
const shared = await fetchSharedProof(link);
|
|
264
|
+
if (opts.out) {
|
|
265
|
+
writeFileSync(opts.out, JSON.stringify(shared.bundle, null, 2));
|
|
266
|
+
printOutput({
|
|
267
|
+
proof_id: shared.proof_id, expires_at: shared.expires_at,
|
|
268
|
+
view_count: shared.view_count, written_to: opts.out,
|
|
269
|
+
});
|
|
270
|
+
if (!isJsonMode()) {
|
|
271
|
+
human('');
|
|
272
|
+
human(` Proof ${shared.proof_id} written to ${opts.out}.`);
|
|
273
|
+
human(` This link expires ${shared.expires_at}.`);
|
|
274
|
+
}
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
if (isJsonMode()) {
|
|
278
|
+
printOutput({ ...shared });
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
// The bundle is the payload; printing it through the key/value table would render it as one
|
|
282
|
+
// unreadable line.
|
|
283
|
+
human('');
|
|
284
|
+
human(` Proof ${shared.proof_id}`);
|
|
285
|
+
human(` Link expires ${shared.expires_at} - viewed ${shared.view_count} time(s).`);
|
|
286
|
+
human('');
|
|
287
|
+
process.stdout.write(`${JSON.stringify(shared.bundle, null, 2)}\n`);
|
|
288
|
+
hint('certen proof open <link> --out proof.json # keep a copy');
|
|
289
|
+
});
|
|
290
|
+
const shares = proof.command('shares').description('Share links this organization has created');
|
|
291
|
+
shares
|
|
292
|
+
.command('list', { isDefault: true })
|
|
293
|
+
.description('List every share link, including revoked and expired ones')
|
|
294
|
+
.action(async () => {
|
|
295
|
+
const client = await getClient();
|
|
296
|
+
const result = await client.proof.shares();
|
|
297
|
+
const all = result.shares ?? [];
|
|
298
|
+
if (all.length === 0) {
|
|
299
|
+
printOutput([]);
|
|
300
|
+
hint('No share links yet. Create one: certen proof share <proof-id>');
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
const now = Date.now();
|
|
304
|
+
printOutput(all.map((share) => ({
|
|
305
|
+
id: share.id ?? '-',
|
|
306
|
+
proof_id: share.proof_id ?? '-',
|
|
307
|
+
label: share.label ?? '-',
|
|
308
|
+
// One column for the answer to "can someone use this right now", rather than three
|
|
309
|
+
// timestamp columns the reader has to combine themselves.
|
|
310
|
+
state: share.revoked_at
|
|
311
|
+
? 'revoked'
|
|
312
|
+
: share.expires_at && new Date(share.expires_at).getTime() < now ? 'expired' : 'active',
|
|
313
|
+
views: share.view_count ?? 0,
|
|
314
|
+
expires_at: share.expires_at ?? '-',
|
|
315
|
+
})));
|
|
316
|
+
});
|
|
317
|
+
shares
|
|
318
|
+
.command('revoke <shareId>')
|
|
319
|
+
.description('Revoke a share link (the proof itself is untouched)')
|
|
320
|
+
.action(async (shareId) => {
|
|
321
|
+
const client = await getClient();
|
|
322
|
+
const result = await client.proof.revokeShare(shareId);
|
|
323
|
+
printOutput(result);
|
|
324
|
+
if (!isJsonMode()) {
|
|
325
|
+
human(`Share ${shareId} revoked. The token no longer resolves; the proof is unaffected.`);
|
|
326
|
+
}
|
|
327
|
+
});
|
|
328
|
+
// ── verify ────────────────────────────────────────────────────────────────────────────────────
|
|
329
|
+
proof
|
|
330
|
+
.command('verify <target>')
|
|
331
|
+
.description('Check a proof, and state plainly what was and was not verified')
|
|
332
|
+
.action(async (target) => {
|
|
333
|
+
// A saved bundle is checked as a file; anything else is fetched.
|
|
334
|
+
const fromFile = target.startsWith('@');
|
|
335
|
+
const client = fromFile ? null : await getClient();
|
|
336
|
+
let receipt = null;
|
|
337
|
+
let bundle = null;
|
|
338
|
+
if (fromFile) {
|
|
339
|
+
const path = target.slice(1);
|
|
340
|
+
try {
|
|
341
|
+
bundle = JSON.parse(readFileSync(path, 'utf8'));
|
|
342
|
+
}
|
|
343
|
+
catch (err) {
|
|
344
|
+
throw new UsageError(`Could not read ${path} as a JSON bundle: ${err instanceof Error ? err.message : String(err)}. `
|
|
345
|
+
+ 'A binary bundle cannot be checked locally.', 'UNREADABLE_BUNDLE');
|
|
346
|
+
}
|
|
347
|
+
const hash = extractTxHash(String(bundle.tx_hash ?? bundle.accum_tx_hash ?? ''));
|
|
348
|
+
if (hash)
|
|
349
|
+
receipt = (bundle.receipt ? bundle : null);
|
|
350
|
+
}
|
|
351
|
+
else {
|
|
352
|
+
const resolved = await resolveTarget(client, target);
|
|
353
|
+
if (!resolved.txHash) {
|
|
354
|
+
throw new CliError(`Nothing to verify for ${target} — no Accumulate transaction hash.`, 'NOTHING_TO_VERIFY', EXIT.FAILED);
|
|
355
|
+
}
|
|
356
|
+
receipt = await client.proof.receipt(resolved.txHash);
|
|
357
|
+
}
|
|
358
|
+
const inclusion = Boolean(receipt?.anchored && receipt?.receipt?.anchor);
|
|
359
|
+
const summary = {
|
|
360
|
+
checked: {
|
|
361
|
+
inclusion: inclusion ? 'asserted by the gateway' : 'not established',
|
|
362
|
+
authorization: 'NOT CHECKED — requires your own record of what was agreed',
|
|
363
|
+
outcome: 'NOT CHECKED — requires reading the destination chain',
|
|
364
|
+
},
|
|
365
|
+
anchored: receipt?.anchored ?? null,
|
|
366
|
+
anchor: receipt?.receipt?.anchor ?? null,
|
|
367
|
+
tx_hash: receipt?.tx_hash ?? null,
|
|
368
|
+
independent: false,
|
|
369
|
+
};
|
|
370
|
+
// JSON only for the payload: the `checked` object is three sentences the table renderer
|
|
371
|
+
// puts on one line, directly above the rendered version of the same thing.
|
|
372
|
+
//
|
|
373
|
+
// The mode check gates the OUTPUT, never the verdict. An earlier arrangement returned here
|
|
374
|
+
// in JSON mode and so skipped the failure check entirely — `--json proof verify` could not
|
|
375
|
+
// fail, which is the one thing a verification command must be able to do.
|
|
376
|
+
if (isJsonMode()) {
|
|
377
|
+
printOutput(summary);
|
|
378
|
+
failIfNotIncluded(inclusion);
|
|
379
|
+
return;
|
|
380
|
+
}
|
|
381
|
+
human('');
|
|
382
|
+
human(' A verifier should satisfy themselves of three separate things.');
|
|
383
|
+
human('');
|
|
384
|
+
human(` 1. Inclusion ${inclusion ? 'the gateway returned an anchored merkle receipt' : 'NOT ESTABLISHED — not anchored, or no anchor in the receipt'}`);
|
|
385
|
+
human(' 2. Authorization NOT CHECKED. Compare the operation against your own record of');
|
|
386
|
+
human(' what was agreed — recipient, amount, target, calldata.');
|
|
387
|
+
human(' A valid proof of the WRONG call is still a valid proof.');
|
|
388
|
+
human(' 3. Outcome NOT CHECKED. Read the destination chain for the execution.');
|
|
389
|
+
human('');
|
|
390
|
+
// The load-bearing sentence. Everything above came from the gateway, and a verifier who
|
|
391
|
+
// does not trust the gateway has learned nothing by asking it.
|
|
392
|
+
human(' This command asked the GATEWAY. That is not independent verification.');
|
|
393
|
+
human(' To verify without trusting Certen:');
|
|
394
|
+
human(' - query an Accumulate node directly and check the receipt against roots you fetch;');
|
|
395
|
+
human(' - read the execution and its events on the destination chain.');
|
|
396
|
+
human('');
|
|
397
|
+
failIfNotIncluded(inclusion);
|
|
398
|
+
});
|
|
399
|
+
}
|
|
400
|
+
//# sourceMappingURL=proof.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proof.js","sourceRoot":"","sources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,OAAO,EAAE,QAAQ,IAAI,IAAI;YACnC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,IAAI;YACxC,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,IAAI;YACjC,WAAW,EAAE,KAAK;SACnB,CAAC;QAEF,wFAAwF;QACxF,2EAA2E;QAC3E,EAAE;QACF,2FAA2F;QAC3F,2FAA2F;QAC3F,0EAA0E;QAC1E,IAAI,UAAU,EAAE,EAAE,CAAC;YACjB,WAAW,CAAC,OAAO,CAAC,CAAC;YACrB,iBAAiB,CAAC,SAAS,CAAC,CAAC;YAC7B,OAAO;QACT,CAAC;QAED,KAAK,CAAC,EAAE,CAAC,CAAC;QACV,KAAK,CAAC,kEAAkE,CAAC,CAAC;QAC1E,KAAK,CAAC,EAAE,CAAC,CAAC;QACV,KAAK,CAAC,uBAAuB,SAAS,CAAC,CAAC,CAAC,iDAAiD,CAAC,CAAC,CAAC,6DAA6D,EAAE,CAAC,CAAC;QAC9J,KAAK,CAAC,mFAAmF,CAAC,CAAC;QAC3F,KAAK,CAAC,4EAA4E,CAAC,CAAC;QACpF,KAAK,CAAC,6EAA6E,CAAC,CAAC;QACrF,KAAK,CAAC,gFAAgF,CAAC,CAAC;QACxF,KAAK,CAAC,EAAE,CAAC,CAAC;QACV,wFAAwF;QACxF,+DAA+D;QAC/D,KAAK,CAAC,yEAAyE,CAAC,CAAC;QACjF,KAAK,CAAC,sCAAsC,CAAC,CAAC;QAC9C,KAAK,CAAC,wFAAwF,CAAC,CAAC;QAChG,KAAK,CAAC,mEAAmE,CAAC,CAAC;QAC3E,KAAK,CAAC,EAAE,CAAC,CAAC;QAEV,iBAAiB,CAAC,SAAS,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
/**
|
|
3
|
+
* The device flow, exported so `certen init` can run it as its credential step rather than
|
|
4
|
+
* telling the user to go and run another command first. One flow, two entry points.
|
|
5
|
+
*/
|
|
6
|
+
export declare function runDeviceFlow(opts: {
|
|
7
|
+
browser: boolean;
|
|
8
|
+
keyring: boolean;
|
|
9
|
+
timeoutMs?: number;
|
|
10
|
+
}): Promise<{
|
|
11
|
+
prefix: string;
|
|
12
|
+
orgId?: string;
|
|
13
|
+
}>;
|
|
14
|
+
export declare function registerSignupCommands(program: Command): void;
|