@certen.io/sdk 0.14.1 → 0.16.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 +44 -0
- package/README.md +20 -0
- package/dist/agent/core.d.ts +7 -0
- package/dist/agent/core.d.ts.map +1 -0
- package/dist/agent/core.js +7 -0
- package/dist/agent/core.js.map +1 -0
- package/dist/agent/mandate.d.ts +141 -0
- package/dist/agent/mandate.d.ts.map +1 -0
- package/dist/agent/mandate.js +158 -0
- package/dist/agent/mandate.js.map +1 -0
- package/dist/agent-enrollment.d.ts +83 -0
- package/dist/agent-enrollment.d.ts.map +1 -0
- package/dist/agent-enrollment.js +102 -0
- package/dist/agent-enrollment.js.map +1 -0
- package/dist/core/bytes.d.ts +38 -0
- package/dist/core/bytes.d.ts.map +1 -0
- package/dist/core/bytes.js +161 -0
- package/dist/core/bytes.js.map +1 -0
- package/dist/core/grant-profile.d.ts +133 -0
- package/dist/core/grant-profile.d.ts.map +1 -0
- package/dist/core/grant-profile.js +323 -0
- package/dist/core/grant-profile.js.map +1 -0
- package/dist/core/hashes.d.ts +59 -0
- package/dist/core/hashes.d.ts.map +1 -0
- package/dist/core/hashes.js +128 -0
- package/dist/core/hashes.js.map +1 -0
- package/dist/core/jcs.d.ts +29 -0
- package/dist/core/jcs.d.ts.map +1 -0
- package/dist/core/jcs.js +371 -0
- package/dist/core/jcs.js.map +1 -0
- package/dist/core/registry-profile.d.ts +47 -0
- package/dist/core/registry-profile.d.ts.map +1 -0
- package/dist/core/registry-profile.js +119 -0
- package/dist/core/registry-profile.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/principal-entries.d.ts +112 -0
- package/dist/principal-entries.d.ts.map +1 -0
- package/dist/principal-entries.js +237 -0
- package/dist/principal-entries.js.map +1 -0
- package/dist/principal-intervention.d.ts +175 -0
- package/dist/principal-intervention.d.ts.map +1 -0
- package/dist/principal-intervention.js +247 -0
- package/dist/principal-intervention.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AGT-3 (transaction-controls docs/agentic/INTERVENTION.md sections 2, 3 and 5): the principal's interventions on an agent.
|
|
3
|
+
*
|
|
4
|
+
* revokeGrant the Grant superseded by a new version with an EMPTY validity (notAfter = notBefore), written through issueGrant
|
|
5
|
+
* (so the core profile judges it first and the principal's own page signs it);
|
|
6
|
+
* revokeAgentKey the owner's book removes the agent's key from the agent's key page: the existing governance remove_key, on the
|
|
7
|
+
* agent's page, signed by the owner's own page (the gateway allows it only when the owner's book governs that book);
|
|
8
|
+
* cancelByRejectVote a required authority casts a REJECT vote on the pending Accumulate transaction (POST /v1/sign, vote reject), the
|
|
9
|
+
* signing data rebuilt and matched to that transaction, vote and signer before the signature exists;
|
|
10
|
+
* replaceAgent the old agent's registration retired, a new agent registered and its own Grant issued, by the principal.
|
|
11
|
+
*
|
|
12
|
+
* What none of these can do, stated with every result (DEC-2): before final approval a required authority's reject vote or key removal
|
|
13
|
+
* stops the action; after certification exposure is limited to the exact approved action inside its window; there is no on-chain cancel.
|
|
14
|
+
* A certified approval is never described as revoked.
|
|
15
|
+
*
|
|
16
|
+
* The seat's record (AGT-F135, INTERVENTION.md lines 3-5): each act is held by a named seat with a reason and is recorded in the seat's
|
|
17
|
+
* decision log as `intervention.recorded` (DECISION.md section 9). That record is a named PERSON's act at the seat: the person submits it to
|
|
18
|
+
* the Console (POST /agents/interventions, a person session), and the Console records only an act it has itself read on chain. The SDK holds
|
|
19
|
+
* no person session and records nothing there; every result carries `seatRecord` (exactly the form that route takes), `recordedAtSeat:
|
|
20
|
+
* false` and SEAT_RECORD_STATEMENT. A transaction hash the result does not have is ABSENT from `seatRecord` with a named reason in
|
|
21
|
+
* `seatRecord.absent`, never a placeholder: the Console refuses a record without `txHash` (intervention_tx_invalid).
|
|
22
|
+
*/
|
|
23
|
+
import { CertenError } from './errors.js';
|
|
24
|
+
import { checkCosigning, checkGovernanceSigning } from './signing-check.js';
|
|
25
|
+
import { hashGrant } from './core/hashes.js';
|
|
26
|
+
import { issueGrant, registerAgent } from './principal-entries.js';
|
|
27
|
+
import { resolveSignTarget } from './sign-target.js';
|
|
28
|
+
/** The revocation model in force (DEC-2), verbatim. Every revoke or cancel result carries it. */
|
|
29
|
+
export const EXPOSURE_WINDOW_STATEMENT = 'Before final approval, a required authority\'s reject vote or key removal stops the action. After certification, exposure is limited to the exact approved action inside its window. No on-chain cancel.';
|
|
30
|
+
export const INTERVENTION_MALFORMED = 'INTERVENTION_MALFORMED';
|
|
31
|
+
const refuse = (message) => { throw new CertenError(message, 0, INTERVENTION_MALFORMED); };
|
|
32
|
+
const isObj = (o) => o !== null && typeof o === 'object' && !Array.isArray(o);
|
|
33
|
+
const SEAT = /^seat:[a-z0-9][a-z0-9._-]{0,62}$/;
|
|
34
|
+
const PAGE = /^acc:\/\/[a-z0-9][a-z0-9._-]*\.acme(\/[a-z0-9][a-z0-9._-]*)+\/[0-9]+$/;
|
|
35
|
+
/** Where the named person submits a seat record (certen-approval-console src/web/app.ts). */
|
|
36
|
+
export const SEAT_RECORD_ROUTE = 'POST /agents/interventions';
|
|
37
|
+
/** The sentence every intervention result carries next to `seatRecord`. */
|
|
38
|
+
export const SEAT_RECORD_STATEMENT = 'This act is recorded in the seat\'s decision log only when the named person submits seatRecord at the seat (POST /agents/interventions) in a person session; the SDK holds no person session and has not recorded it, and the Console records only an act it reads on chain.';
|
|
39
|
+
const ADI = /^acc:\/\/[a-z0-9][a-z0-9._-]*\.acme$/;
|
|
40
|
+
const agentAdi = (v, what) => {
|
|
41
|
+
const a = typeof v === 'string' ? v.trim().toLowerCase().replace(/\/+$/, '') : '';
|
|
42
|
+
if (!ADI.test(a))
|
|
43
|
+
refuse(`${what} must be an agent ADI, acc://<name>.acme`);
|
|
44
|
+
return a;
|
|
45
|
+
};
|
|
46
|
+
/** A gateway's transaction hash read as the Console takes it (64 hex, lower case), or the named reason it is absent. */
|
|
47
|
+
function txOf(field, v, signedBy, operation) {
|
|
48
|
+
if (v === undefined || v === '') {
|
|
49
|
+
return signedBy === 'provider'
|
|
50
|
+
? { absent: { field, code: 'provider_signing_pending', detail: `the identity is provider-signed and the gateway has not returned the transaction hash of ${operation} yet; read it from that operation once submitted` } }
|
|
51
|
+
: { absent: { field, code: 'gateway_returned_none', detail: `the gateway's answer for ${operation} named no transaction hash` } };
|
|
52
|
+
}
|
|
53
|
+
const m = /^(?:acc:\/\/)?(?:0x)?([0-9a-fA-F]{64})(?:@.*)?$/.exec(v.trim());
|
|
54
|
+
if (!m)
|
|
55
|
+
return { absent: { field, code: 'tx_hash_unreadable', detail: `the gateway returned ${JSON.stringify(v)} for ${operation}, not a 64-hex transaction hash or TxID` } };
|
|
56
|
+
return { hash: m[1].toLowerCase() };
|
|
57
|
+
}
|
|
58
|
+
function seatPart(r, hashes, extra = {}) {
|
|
59
|
+
const record = { act: r.act, subject: r.subject, seat: r.seat, reason: r.reason };
|
|
60
|
+
const absent = [...(extra.absent ?? [])];
|
|
61
|
+
for (const [field, h] of hashes) {
|
|
62
|
+
if ('hash' in h)
|
|
63
|
+
record[field] = h.hash;
|
|
64
|
+
else
|
|
65
|
+
absent.push(h.absent);
|
|
66
|
+
}
|
|
67
|
+
if (extra.replacedBy !== undefined)
|
|
68
|
+
record.replacedBy = extra.replacedBy;
|
|
69
|
+
if (absent.length > 0)
|
|
70
|
+
record.absent = absent;
|
|
71
|
+
return { seatRecord: record, recordedAtSeat: false, seatRecordStatement: SEAT_RECORD_STATEMENT };
|
|
72
|
+
}
|
|
73
|
+
/** A person-held act: a named seat and a reason of at least 10 characters (DECISION.md section 6, INTERVENTION.md). */
|
|
74
|
+
function act(a) {
|
|
75
|
+
if (typeof a.seat !== 'string' || !SEAT.test(a.seat))
|
|
76
|
+
refuse('a named seat is required (seat:<name>)');
|
|
77
|
+
if (typeof a.reason !== 'string' || a.reason.trim().length < 10)
|
|
78
|
+
refuse('a reason of at least 10 characters is required');
|
|
79
|
+
return { seat: a.seat, reason: a.reason.trim() };
|
|
80
|
+
}
|
|
81
|
+
/** The superseding version of a Grant: version + 1, prior hash = the head's hash, an EMPTY validity starting where the head's starts. */
|
|
82
|
+
export function revocationOf(head, issuedAt) {
|
|
83
|
+
if (!isObj(head) || !isObj(head.validity) || typeof head.version !== 'number')
|
|
84
|
+
refuse('the current Grant head is required');
|
|
85
|
+
const h = head;
|
|
86
|
+
if (!Number.isSafeInteger(issuedAt) || issuedAt <= 0)
|
|
87
|
+
refuse('issuedAt must be Unix seconds');
|
|
88
|
+
return { ...h, version: h.version + 1, priorHash: hashGrant(h), issuedAt, validity: { notBefore: h.validity.notBefore, notAfter: h.validity.notBefore } };
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Revoke the agent's Grant: write the superseding version with an empty validity (the core judges it; the principal's page signs).
|
|
92
|
+
* `seatRecord`: act revoke, subject the Grant's agent, txHash the Grant write. With the key half (revokeAgentKey), join the two results with
|
|
93
|
+
* revokeSeatRecord into the one record the seat takes.
|
|
94
|
+
*/
|
|
95
|
+
export async function revokeGrant(client, a) {
|
|
96
|
+
const who = act(a);
|
|
97
|
+
const grant = revocationOf(a.head, a.issuedAt ?? Math.floor(Date.now() / 1000));
|
|
98
|
+
const subject = agentAdi(grant.subject?.adi, 'the Grant head\'s subject');
|
|
99
|
+
const r = await issueGrant(client, { principal: a.principal, page: a.page, grant, signer: a.signer });
|
|
100
|
+
const part = seatPart({ act: 'revoke', subject, ...who }, [['txHash', txOf('txHash', r.writeTx, r.writeSignedBy, `the Grant write (operation ${r.writeOperationId})`)]]);
|
|
101
|
+
return { ...r, ...who, exposureWindow: EXPOSURE_WINDOW_STATEMENT, ...part };
|
|
102
|
+
}
|
|
103
|
+
/** The governance operation that removes the agent's key, as the gateway names it. */
|
|
104
|
+
const hash64 = (h, what) => {
|
|
105
|
+
if (typeof h !== 'string' || !/^[0-9a-f]{64}$/.test(h.replace(/^0x/, '').toLowerCase()))
|
|
106
|
+
refuse(`${what} must be 64 hex characters`);
|
|
107
|
+
return h.replace(/^0x/, '').toLowerCase();
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* The key half of a revocation (AGT-F32): ONE updateKeyPage that ADDS the owner-held revocation key and then REMOVES the agent's key.
|
|
111
|
+
* Accumulate refuses to delete the last key of a book's page 1 (internal/core/execute/v2/chain/update_key_page.go:248), so a remove
|
|
112
|
+
* alone fails on chain for a one-key agent page; with the owner's key added first the page stays usable.
|
|
113
|
+
*/
|
|
114
|
+
export function agentKeyRemoval(keyHash, revocationKeyHash) {
|
|
115
|
+
const agent = hash64(keyHash, 'the agent key hash');
|
|
116
|
+
const owner = hash64(revocationKeyHash, 'the owner-held revocation key hash');
|
|
117
|
+
if (agent === owner)
|
|
118
|
+
refuse('the revocation key must not be the agent key');
|
|
119
|
+
return [{ type: 'add_key', public_key_hash: owner }, { type: 'remove_key', public_key_hash: agent }];
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Remove the agent's key from the agent's key page, signed by the OWNER's page. The signing data is rebuilt and must be exactly an
|
|
123
|
+
* updateKeyPage of the agent's page removing exactly that key, signed by the owner's key on the owner's page; nothing is signed otherwise.
|
|
124
|
+
* `seatRecord`: act revoke, subject the agent page's ADI, keyTxHash this key operation; its txHash is ABSENT (grant_write_not_in_this_call)
|
|
125
|
+
* because a revoke's txHash is the Grant write: join this result with revokeGrant's through revokeSeatRecord.
|
|
126
|
+
*/
|
|
127
|
+
export async function revokeAgentKey(client, a) {
|
|
128
|
+
const who = act(a);
|
|
129
|
+
const agentPage = typeof a.agentPage === 'string' ? a.agentPage.toLowerCase() : '';
|
|
130
|
+
if (!PAGE.test(agentPage))
|
|
131
|
+
refuse('the agent key page must be a key page URL');
|
|
132
|
+
const ops = agentKeyRemoval(a.keyHash, a.revocationKeyHash);
|
|
133
|
+
const subject = agentPage.split('/').slice(0, 3).join('/');
|
|
134
|
+
const created = await client.governance.create({ identity: a.principal, operations: ops, keyPageUrl: agentPage, signerKeyPage: a.page, signerPublicKey: a.signer.publicKey });
|
|
135
|
+
if (created.signing_mode !== 'provider' && created.signing_data) {
|
|
136
|
+
await checkGovernanceSigning(created.signing_data, { adiUrl: agentPage.split('/').slice(0, 3).join('/'), operations: ops, signerPublicKey: a.signer.publicKey, signerKeyPage: a.page });
|
|
137
|
+
const hash = String(created.signing_data.hash_to_sign ?? '');
|
|
138
|
+
const submitted = await client.governance.submitSignature(created.governance_op_id, { signature: a.signer.sign(hash), publicKey: a.signer.publicKey });
|
|
139
|
+
const tx = submitted.tx_hash;
|
|
140
|
+
const part = keyPart(created.governance_op_id, tx, 'principal');
|
|
141
|
+
return { governanceOperationId: created.governance_op_id, ...(tx ? { txHash: tx } : {}), agentPage, ...who, exposureWindow: EXPOSURE_WINDOW_STATEMENT, ...part };
|
|
142
|
+
}
|
|
143
|
+
const part = keyPart(created.governance_op_id, created.tx_hash, 'provider');
|
|
144
|
+
return { governanceOperationId: created.governance_op_id, ...(created.tx_hash ? { txHash: created.tx_hash } : {}), agentPage, ...who, exposureWindow: EXPOSURE_WINDOW_STATEMENT, ...part };
|
|
145
|
+
function keyPart(operationId, tx, signedBy) {
|
|
146
|
+
const grantHalf = { field: 'txHash', code: 'grant_write_not_in_this_call', detail: 'a revoke\'s txHash is the Grant write (revokeGrant); join the two results with revokeSeatRecord(grantResult, keyResult)' };
|
|
147
|
+
return seatPart({ act: 'revoke', subject, ...who }, [['keyTxHash', txOf('keyTxHash', tx, signedBy, `the key operation (governance operation ${operationId})`)]], { absent: [grantHalf] });
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* The ONE seat record of a revoke done in two calls (revokeGrant, then revokeAgentKey): txHash from the Grant write, keyTxHash from the key
|
|
152
|
+
* operation, each half's absence carried by name. The halves must be one act: the same agent, seat and reason (refused otherwise).
|
|
153
|
+
*/
|
|
154
|
+
export function revokeSeatRecord(grantResult, keyResult) {
|
|
155
|
+
const g = isObj(grantResult) && isObj(grantResult.seatRecord) ? grantResult.seatRecord : null;
|
|
156
|
+
const k = isObj(keyResult) && isObj(keyResult.seatRecord) ? keyResult.seatRecord : null;
|
|
157
|
+
if (g === null || k === null || g.act !== 'revoke' || k.act !== 'revoke')
|
|
158
|
+
return refuse('revokeSeatRecord takes a revokeGrant result and a revokeAgentKey result');
|
|
159
|
+
const keyHalfOnly = (r) => (r.absent ?? []).some((x) => x.code === 'grant_write_not_in_this_call');
|
|
160
|
+
if (keyHalfOnly(g) || g.keyTxHash !== undefined || !keyHalfOnly(k) || k.txHash !== undefined)
|
|
161
|
+
return refuse('revokeSeatRecord takes the revokeGrant result first and the revokeAgentKey result second');
|
|
162
|
+
if (g.subject !== k.subject)
|
|
163
|
+
refuse(`the two halves revoke different agents (${g.subject}, ${k.subject})`);
|
|
164
|
+
if (g.seat !== k.seat)
|
|
165
|
+
refuse(`the two halves are held by different seats (${g.seat}, ${k.seat}): one record has one seat`);
|
|
166
|
+
if (g.reason !== k.reason)
|
|
167
|
+
refuse('the two halves give different reasons: one record has one reason');
|
|
168
|
+
const record = { act: 'revoke', subject: g.subject, seat: g.seat, reason: g.reason };
|
|
169
|
+
if (g.txHash !== undefined)
|
|
170
|
+
record.txHash = g.txHash;
|
|
171
|
+
if (k.keyTxHash !== undefined)
|
|
172
|
+
record.keyTxHash = k.keyTxHash;
|
|
173
|
+
const absent = [...(g.absent ?? []).filter((x) => x.field === 'txHash'), ...(k.absent ?? []).filter((x) => x.field === 'keyTxHash')];
|
|
174
|
+
if (absent.length > 0)
|
|
175
|
+
record.absent = absent;
|
|
176
|
+
return { seatRecord: record, recordedAtSeat: false, seatRecordStatement: SEAT_RECORD_STATEMENT };
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* The first half of a cancel by reject vote, shared by cancelByRejectVote (which then checks and signs with the key it holds) and the MCP tool
|
|
180
|
+
* certen_agent_cancel_by_reject_vote (which holds no key and returns the signing data to be signed elsewhere): the named seat and reason, the
|
|
181
|
+
* agent (`subject`), the pending transaction and the signing page are checked, the REJECT sign request is opened for `publicKey`, and the seat
|
|
182
|
+
* record is built. Nothing is signed here; the caller checks `created.signing_data` against the transaction, the vote and the signer before any
|
|
183
|
+
* signature exists.
|
|
184
|
+
*/
|
|
185
|
+
export async function openRejectVote(client, a) {
|
|
186
|
+
const who = act(a);
|
|
187
|
+
const subject = agentAdi(a.subject, 'the subject (the agent whose pending transaction is rejected)');
|
|
188
|
+
let tx = '';
|
|
189
|
+
try {
|
|
190
|
+
const t = resolveSignTarget(String(a.txHash));
|
|
191
|
+
if (t.type === 'pending_tx')
|
|
192
|
+
tx = t.targetId;
|
|
193
|
+
}
|
|
194
|
+
catch { /* refused below */ }
|
|
195
|
+
if (tx === '')
|
|
196
|
+
refuse('the pending transaction must be a transaction hash or TxID');
|
|
197
|
+
if (typeof a.signerUrl !== 'string' || !PAGE.test(a.signerUrl.toLowerCase()))
|
|
198
|
+
refuse('the signing page must be a key page URL');
|
|
199
|
+
const part = seatPart({ act: 'reject', subject, ...who }, [['txHash', { hash: tx }]]);
|
|
200
|
+
const created = await client.sign.create({ type: 'pending_tx', targetId: tx, identity: a.identity, signerUrl: a.signerUrl, publicKey: a.publicKey, vote: 'reject' });
|
|
201
|
+
return { created, txHash: tx, ...who, ...part };
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Cancel by reject vote: a required authority's REJECT on the pending transaction. The reject is a verdict only when the book can no
|
|
205
|
+
* longer reach its threshold; then Accumulate rejects the transaction and nothing executes. It stops an action only before final approval.
|
|
206
|
+
* `subject` is the agent ADI whose pending transaction is rejected (the seat record's subject; required). `seatRecord`: act reject, txHash the
|
|
207
|
+
* pending transaction. In provider signing mode the gateway casts the vote; the Console records the act only once it reads the vote on chain.
|
|
208
|
+
*/
|
|
209
|
+
export async function cancelByRejectVote(client, a) {
|
|
210
|
+
const { created, txHash: tx, seat, reason, ...part } = await openRejectVote(client, { identity: a.identity, subject: a.subject, txHash: a.txHash, signerUrl: a.signerUrl, publicKey: a.signer.publicKey, seat: a.seat, reason: a.reason });
|
|
211
|
+
const who = { seat, reason };
|
|
212
|
+
if (created.signing_mode === 'provider' || !created.signing_data) {
|
|
213
|
+
return { signRequestId: created.sign_request_id, status: created.status, txHash: tx, vote: 'reject', ...who, exposureWindow: EXPOSURE_WINDOW_STATEMENT, ...part };
|
|
214
|
+
}
|
|
215
|
+
// The transaction, the vote (reject) and the signer are rebuilt and matched before the signature exists.
|
|
216
|
+
await checkCosigning(created.signing_data, { transactionHash: tx, signerPublicKey: a.signer.publicKey, signerKeyPage: a.signerUrl, vote: 'reject' });
|
|
217
|
+
const hash = String(created.signing_data.hash_to_sign ?? created.signing_data.data_for_signature ?? '');
|
|
218
|
+
const submitted = await client.sign.submitSignature(created.sign_request_id, { signature: a.signer.sign(hash), publicKey: a.signer.publicKey });
|
|
219
|
+
return { signRequestId: created.sign_request_id, status: String(submitted.status ?? created.status), txHash: tx, vote: 'reject', ...who, exposureWindow: EXPOSURE_WINDOW_STATEMENT, ...part };
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Replace: the old agent's registration goes to `retired` (its next version), the new agent is registered under the same principal, and
|
|
223
|
+
* its own Grant is issued (a new grantId: GR-22 keeps a lineage's subject). Each document is judged by the core before anything is signed.
|
|
224
|
+
* `seatRecord`: act replace, subject the retired agent, txHash the retirement's write, replacedBy the new agent ADI.
|
|
225
|
+
*/
|
|
226
|
+
export async function replaceAgent(client, a) {
|
|
227
|
+
const who = act(a);
|
|
228
|
+
if (!isObj(a.retiredRegistration) || a.retiredRegistration.status !== 'retired')
|
|
229
|
+
refuse('the old agent\'s registration must be its next version with status retired');
|
|
230
|
+
if (!isObj(a.newRegistration) || !isObj(a.newGrant))
|
|
231
|
+
refuse('the new registration and the new Grant are required');
|
|
232
|
+
const nr = a.newRegistration;
|
|
233
|
+
const ng = a.newGrant;
|
|
234
|
+
const old = a.retiredRegistration;
|
|
235
|
+
const subject = agentAdi(old.adi, 'the retired registration\'s ADI');
|
|
236
|
+
const replacedBy = agentAdi(nr.adi, 'the new registration\'s ADI');
|
|
237
|
+
if (replacedBy === subject)
|
|
238
|
+
refuse('the new agent must be another ADI than the retired one');
|
|
239
|
+
if (!isObj(ng.subject) || ng.subject.adi !== nr.adi)
|
|
240
|
+
refuse('the new Grant must name the new agent as its subject');
|
|
241
|
+
const retired = await registerAgent(client, { principal: a.principal, page: a.page, registration: old, signer: a.signer });
|
|
242
|
+
const registered = await registerAgent(client, { principal: a.principal, page: a.page, registration: nr, signer: a.signer });
|
|
243
|
+
const grant = await issueGrant(client, { principal: a.principal, page: a.page, grant: ng, signer: a.signer });
|
|
244
|
+
const part = seatPart({ act: 'replace', subject, ...who }, [['txHash', txOf('txHash', retired.writeTx, retired.writeSignedBy, `the retirement write (operation ${retired.writeOperationId})`)]], { replacedBy });
|
|
245
|
+
return { retired, registered, grant, ...who, exposureWindow: EXPOSURE_WINDOW_STATEMENT, ...part };
|
|
246
|
+
}
|
|
247
|
+
//# sourceMappingURL=principal-intervention.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"principal-intervention.js","sourceRoot":"","sources":["../src/principal-intervention.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,aAAa,EAAmD,MAAM,wBAAwB,CAAC;AAEpH,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAGrD,iGAAiG;AACjG,MAAM,CAAC,MAAM,yBAAyB,GACpC,0MAA0M,CAA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AAM,UAAU,GAAG,MAAM,aAAa,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IAC7H,MAAM,KAAK,GAAG,MAAM,UAAU,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IAC9G,MAAM,IAAI,GAAG,QAAQ,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,GAAG,EAAE,EAAE,CAAC,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,aAAa,EAAE,mCAAmC,OAAO,CAAC,gBAAgB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC;IACjN,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,GAAG,EAAE,cAAc,EAAE,yBAAyB,EAAE,GAAG,IAAI,EAAE,CAAC;AACpG,CAAC"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.
|
|
1
|
+
export declare const SDK_VERSION = "0.16.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// GENERATED by scripts/build-package.mjs from package.json. Do not edit: the build rewrites it, and packages/sdk/test/version.test.ts
|
|
2
2
|
// fails if it ever disagrees with package.json.
|
|
3
|
-
export const SDK_VERSION = '0.
|
|
3
|
+
export const SDK_VERSION = '0.16.0';
|
|
4
4
|
//# sourceMappingURL=version.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@certen.io/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "TypeScript client for the CERTEN Gateway API — proof-gated cross-chain execution on Accumulate",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
},
|
|
77
77
|
"//publishConfig": "Provenance is passed as --provenance by .github/workflows/release.yml. Setting it here instead would break every publish outside CI with an error that does not explain itself.",
|
|
78
78
|
"peerDependencies": {
|
|
79
|
-
"@certen.io/proof-verify": "^0.3
|
|
79
|
+
"@certen.io/proof-verify": "^0.4.3"
|
|
80
80
|
},
|
|
81
81
|
"peerDependenciesMeta": {
|
|
82
82
|
"@certen.io/proof-verify": {
|