@heyanon-arp/sdk 0.0.32 → 0.0.33
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/dist/canonical/canonicalize.d.ts +1 -1
- package/dist/index.js +3 -15
- package/dist/index.mjs +3 -15
- package/dist/purpose.d.ts +0 -11
- package/dist/types/body.d.ts +3 -21
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -28,6 +28,6 @@ export declare function canonicalBytes(value: unknown): Uint8Array;
|
|
|
28
28
|
/**
|
|
29
29
|
* sha256 of `canonical_json(value)`, formatted as the protocol's
|
|
30
30
|
* `sha256:<hex>` string. Used for `body_hash`, `attachments_hash`,
|
|
31
|
-
*
|
|
31
|
+
* etc.
|
|
32
32
|
*/
|
|
33
33
|
export declare function canonicalSha256Hex(value: unknown): Sha256Hex;
|
package/dist/index.js
CHANGED
|
@@ -160,23 +160,12 @@ var Purpose = {
|
|
|
160
160
|
ENVELOPE: "ARP-ENVELOPE-v1",
|
|
161
161
|
/** Receipt domain separator (delegation completion). */
|
|
162
162
|
RECEIPT: "ARP-RECEIPT-v1",
|
|
163
|
-
/** Dispute response domain separator. */
|
|
164
|
-
DISPUTE_RESPONSE: "ARP-DISPUTE-RESPONSE-v1",
|
|
165
163
|
/** Identity ownership challenge proof. */
|
|
166
164
|
CHALLENGE: "ARP-CHALLENGE-v1",
|
|
167
165
|
/** Verifiable Credential issued by the platform. */
|
|
168
166
|
VC: "ARP-VC-v1",
|
|
169
167
|
/** Owner attestation linking identity ↔ settlement keys at registration. */
|
|
170
|
-
KEY_LINK: "ARP-KEY-LINK-v1"
|
|
171
|
-
/**
|
|
172
|
-
* Settlement-key signature authorising an on-chain `release_lock`.
|
|
173
|
-
* The digest binds fee_bps_at_lock + fee_recipient_at_lock.
|
|
174
|
-
*/
|
|
175
|
-
SOLANA_RELEASE: "ARP-SOLANA-RELEASE-v1.5",
|
|
176
|
-
/** Settlement-key signature authorising an on-chain co-signed `refund_lock`. */
|
|
177
|
-
SOLANA_REFUND: "ARP-SOLANA-REFUND-v1",
|
|
178
|
-
/** Admin (platform multisig) signature authorising `resolve_dispute`. */
|
|
179
|
-
SOLANA_RESOLVE_DISPUTE: "ARP-SOLANA-RESOLVE-DISPUTE-v1"
|
|
168
|
+
KEY_LINK: "ARP-KEY-LINK-v1"
|
|
180
169
|
};
|
|
181
170
|
|
|
182
171
|
// src/challenge/challenge.ts
|
|
@@ -465,7 +454,7 @@ var ReceiptVerdicts = {
|
|
|
465
454
|
ACCEPTED_WITH_NOTES: "accepted_with_notes",
|
|
466
455
|
REJECTED: "rejected"
|
|
467
456
|
};
|
|
468
|
-
var BODY_TYPES = ["handshake", "handshake_response", "delegation", "work_request", "work_response", "receipt"
|
|
457
|
+
var BODY_TYPES = ["handshake", "handshake_response", "delegation", "work_request", "work_response", "receipt"];
|
|
469
458
|
function isBodyType(v) {
|
|
470
459
|
return typeof v === "string" && BODY_TYPES.includes(v);
|
|
471
460
|
}
|
|
@@ -475,8 +464,7 @@ var BodyTypes = {
|
|
|
475
464
|
DELEGATION: "delegation",
|
|
476
465
|
WORK_REQUEST: "work_request",
|
|
477
466
|
WORK_RESPONSE: "work_response",
|
|
478
|
-
RECEIPT: "receipt"
|
|
479
|
-
DISPUTE: "dispute"
|
|
467
|
+
RECEIPT: "receipt"
|
|
480
468
|
};
|
|
481
469
|
|
|
482
470
|
// src/types/delegation.ts
|
package/dist/index.mjs
CHANGED
|
@@ -135,23 +135,12 @@ var Purpose = {
|
|
|
135
135
|
ENVELOPE: "ARP-ENVELOPE-v1",
|
|
136
136
|
/** Receipt domain separator (delegation completion). */
|
|
137
137
|
RECEIPT: "ARP-RECEIPT-v1",
|
|
138
|
-
/** Dispute response domain separator. */
|
|
139
|
-
DISPUTE_RESPONSE: "ARP-DISPUTE-RESPONSE-v1",
|
|
140
138
|
/** Identity ownership challenge proof. */
|
|
141
139
|
CHALLENGE: "ARP-CHALLENGE-v1",
|
|
142
140
|
/** Verifiable Credential issued by the platform. */
|
|
143
141
|
VC: "ARP-VC-v1",
|
|
144
142
|
/** Owner attestation linking identity ↔ settlement keys at registration. */
|
|
145
|
-
KEY_LINK: "ARP-KEY-LINK-v1"
|
|
146
|
-
/**
|
|
147
|
-
* Settlement-key signature authorising an on-chain `release_lock`.
|
|
148
|
-
* The digest binds fee_bps_at_lock + fee_recipient_at_lock.
|
|
149
|
-
*/
|
|
150
|
-
SOLANA_RELEASE: "ARP-SOLANA-RELEASE-v1.5",
|
|
151
|
-
/** Settlement-key signature authorising an on-chain co-signed `refund_lock`. */
|
|
152
|
-
SOLANA_REFUND: "ARP-SOLANA-REFUND-v1",
|
|
153
|
-
/** Admin (platform multisig) signature authorising `resolve_dispute`. */
|
|
154
|
-
SOLANA_RESOLVE_DISPUTE: "ARP-SOLANA-RESOLVE-DISPUTE-v1"
|
|
143
|
+
KEY_LINK: "ARP-KEY-LINK-v1"
|
|
155
144
|
};
|
|
156
145
|
|
|
157
146
|
// src/challenge/challenge.ts
|
|
@@ -440,7 +429,7 @@ var ReceiptVerdicts = {
|
|
|
440
429
|
ACCEPTED_WITH_NOTES: "accepted_with_notes",
|
|
441
430
|
REJECTED: "rejected"
|
|
442
431
|
};
|
|
443
|
-
var BODY_TYPES = ["handshake", "handshake_response", "delegation", "work_request", "work_response", "receipt"
|
|
432
|
+
var BODY_TYPES = ["handshake", "handshake_response", "delegation", "work_request", "work_response", "receipt"];
|
|
444
433
|
function isBodyType(v) {
|
|
445
434
|
return typeof v === "string" && BODY_TYPES.includes(v);
|
|
446
435
|
}
|
|
@@ -450,8 +439,7 @@ var BodyTypes = {
|
|
|
450
439
|
DELEGATION: "delegation",
|
|
451
440
|
WORK_REQUEST: "work_request",
|
|
452
441
|
WORK_RESPONSE: "work_response",
|
|
453
|
-
RECEIPT: "receipt"
|
|
454
|
-
DISPUTE: "dispute"
|
|
442
|
+
RECEIPT: "receipt"
|
|
455
443
|
};
|
|
456
444
|
|
|
457
445
|
// src/types/delegation.ts
|
package/dist/purpose.d.ts
CHANGED
|
@@ -15,22 +15,11 @@ export declare const Purpose: {
|
|
|
15
15
|
readonly ENVELOPE: "ARP-ENVELOPE-v1";
|
|
16
16
|
/** Receipt domain separator (delegation completion). */
|
|
17
17
|
readonly RECEIPT: "ARP-RECEIPT-v1";
|
|
18
|
-
/** Dispute response domain separator. */
|
|
19
|
-
readonly DISPUTE_RESPONSE: "ARP-DISPUTE-RESPONSE-v1";
|
|
20
18
|
/** Identity ownership challenge proof. */
|
|
21
19
|
readonly CHALLENGE: "ARP-CHALLENGE-v1";
|
|
22
20
|
/** Verifiable Credential issued by the platform. */
|
|
23
21
|
readonly VC: "ARP-VC-v1";
|
|
24
22
|
/** Owner attestation linking identity ↔ settlement keys at registration. */
|
|
25
23
|
readonly KEY_LINK: "ARP-KEY-LINK-v1";
|
|
26
|
-
/**
|
|
27
|
-
* Settlement-key signature authorising an on-chain `release_lock`.
|
|
28
|
-
* The digest binds fee_bps_at_lock + fee_recipient_at_lock.
|
|
29
|
-
*/
|
|
30
|
-
readonly SOLANA_RELEASE: "ARP-SOLANA-RELEASE-v1.5";
|
|
31
|
-
/** Settlement-key signature authorising an on-chain co-signed `refund_lock`. */
|
|
32
|
-
readonly SOLANA_REFUND: "ARP-SOLANA-REFUND-v1";
|
|
33
|
-
/** Admin (platform multisig) signature authorising `resolve_dispute`. */
|
|
34
|
-
readonly SOLANA_RESOLVE_DISPUTE: "ARP-SOLANA-RESOLVE-DISPUTE-v1";
|
|
35
24
|
};
|
|
36
25
|
export type PurposeValue = (typeof Purpose)[keyof typeof Purpose];
|
package/dist/types/body.d.ts
CHANGED
|
@@ -227,27 +227,11 @@ export interface ReceiptContent {
|
|
|
227
227
|
notes_hash?: Sha256Hex;
|
|
228
228
|
[extra: string]: unknown;
|
|
229
229
|
}
|
|
230
|
-
/**
|
|
231
|
-
* `dispute` — challenge against a delegation outcome. `action`
|
|
232
|
-
* discriminates lifecycle events.
|
|
233
|
-
*/
|
|
234
|
-
export interface DisputeBody extends Body<DisputeContent> {
|
|
235
|
-
type: 'dispute';
|
|
236
|
-
}
|
|
237
|
-
export interface DisputeContent {
|
|
238
|
-
action: 'open' | 'respond' | 'escalate' | 'withdraw';
|
|
239
|
-
dispute_id: string;
|
|
240
|
-
delegation_id: string;
|
|
241
|
-
claim?: string;
|
|
242
|
-
remedy_requested?: 'refund' | 'rework' | 'release';
|
|
243
|
-
evidence_refs?: string[];
|
|
244
|
-
response_text?: string;
|
|
245
|
-
}
|
|
246
230
|
/**
|
|
247
231
|
* Union over every standard body type. Consumers can narrow on
|
|
248
232
|
* `body.type` via discriminated dispatch.
|
|
249
233
|
*/
|
|
250
|
-
export type AnyBody = HandshakeBody | HandshakeResponseBody | DelegationBody | WorkRequestBody | WorkResponseBody | ReceiptBody
|
|
234
|
+
export type AnyBody = HandshakeBody | HandshakeResponseBody | DelegationBody | WorkRequestBody | WorkResponseBody | ReceiptBody;
|
|
251
235
|
/**
|
|
252
236
|
* The closed taxonomy of envelope `body.type` values — the runtime
|
|
253
237
|
* companion to `AnyBody` (`BodyType` is derived from it, so the two
|
|
@@ -255,9 +239,8 @@ export type AnyBody = HandshakeBody | HandshakeResponseBody | DelegationBody | W
|
|
|
255
239
|
* `00-core/protocol.md`.
|
|
256
240
|
*
|
|
257
241
|
* NOTE: this is the FULL taxonomy. A consumer's *acceptance policy* may
|
|
258
|
-
* deliberately admit only a subset
|
|
259
|
-
*
|
|
260
|
-
* thing and must NOT be regenerated from this array.
|
|
242
|
+
* deliberately admit only a subset — that allowlist is a separate,
|
|
243
|
+
* hand-curated thing and must NOT be regenerated from this array.
|
|
261
244
|
*/
|
|
262
245
|
export type BodyType = AnyBody['type'];
|
|
263
246
|
export declare const BODY_TYPES: readonly BodyType[];
|
|
@@ -270,5 +253,4 @@ export declare const BodyTypes: {
|
|
|
270
253
|
readonly WORK_REQUEST: "work_request";
|
|
271
254
|
readonly WORK_RESPONSE: "work_response";
|
|
272
255
|
readonly RECEIPT: "receipt";
|
|
273
|
-
readonly DISPUTE: "dispute";
|
|
274
256
|
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type { Sha256Hex, Ed25519Sig, Did, ProtocolVersion, ProtectedBlock, Body, Attachments, EscrowLockAttachment, Envelope, PersistedEvent, } from './envelope';
|
|
2
2
|
export { SHA256_HEX_RE, isSha256Hex, ED25519_SIG_PREFIX, PROTOCOL_VERSIONS, CURRENT_PROTOCOL_VERSION } from './envelope';
|
|
3
|
-
export type { HandshakeBody, HandshakeContent, HandshakeResponseBody, HandshakeResponseContent, HandshakeDecision, DelegationBody, DelegationContent, DelegationAction, WorkRequestBody, WorkRequestContent, WorkResponseBody, WorkResponseContent, ReceiptBody, ReceiptContent, ReceiptVerdict,
|
|
3
|
+
export type { HandshakeBody, HandshakeContent, HandshakeResponseBody, HandshakeResponseContent, HandshakeDecision, DelegationBody, DelegationContent, DelegationAction, WorkRequestBody, WorkRequestContent, WorkResponseBody, WorkResponseContent, ReceiptBody, ReceiptContent, ReceiptVerdict, AnyBody, BodyType, DeclineReason, AssetIdentifier, } from './body';
|
|
4
4
|
export { DECLINE_REASONS, isDeclineReason, HANDSHAKE_DECISIONS, HandshakeDecisions, isHandshakeDecision, DELEGATION_ACTIONS, DelegationActions, isDelegationAction, RECEIPT_VERDICTS, ReceiptVerdicts, isReceiptVerdict, BODY_TYPES, BodyTypes, isBodyType, } from './body';
|
|
5
5
|
export type { DelegationState } from './delegation';
|
|
6
6
|
export { DELEGATION_STATES, DELEGATION_ACTIVE_STATES, DelegationStates, isDelegationState } from './delegation';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@heyanon-arp/sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.33",
|
|
4
4
|
"description": "TypeScript SDK for the Agent Relationship Protocol — canonical JSON, Ed25519 envelope sign/verify, did:arp identity, scrypt key attestation, chain-audit helpers.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|