@heyanon-arp/sdk 0.0.24 → 0.0.25
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/did/format.d.ts +8 -0
- package/dist/did/index.d.ts +1 -1
- package/dist/errors/codes.d.ts +39 -0
- package/dist/errors/index.d.ts +2 -0
- package/dist/index.js +23 -0
- package/dist/index.mjs +18 -1
- package/dist/types/agent.d.ts +16 -0
- package/dist/types/index.d.ts +3 -2
- package/dist/types/read-model.d.ts +59 -0
- package/package.json +1 -1
package/dist/did/format.d.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Syntactic `did:arp:` shape — prefix + non-empty Bitcoin base58
|
|
3
|
+
* (no 0/O/I/l). A cheap regex gate for class-validator `@Matches` and
|
|
4
|
+
* the like; it does NOT verify the body decodes to a 32-byte pubkey
|
|
5
|
+
* (use {@link isValidDid} / {@link parseDid} for that). Single source
|
|
6
|
+
* of truth so server DTOs stop each hardcoding their own copy.
|
|
7
|
+
*/
|
|
8
|
+
export declare const DID_ARP_REGEX: RegExp;
|
|
1
9
|
/**
|
|
2
10
|
* Format an Ed25519 identity public key as a `did:arp:<base58btc>` DID.
|
|
3
11
|
*
|
package/dist/did/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { formatDid, parseDid, isValidDid } from './format';
|
|
1
|
+
export { formatDid, parseDid, isValidDid, DID_ARP_REGEX } from './format';
|
|
2
2
|
export type { DidDocument, VerificationMethod } from './document';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wire error envelope + the specific error-code sets that BOTH the
|
|
3
|
+
* server (emits) and the CLI (branches on to map remediation hints)
|
|
4
|
+
* depend on. Centralised here so a rename can't silently break the
|
|
5
|
+
* CLI's hint mapping. The full ARP error-code catalogue stays open
|
|
6
|
+
* (see `00-core/errors.md`) — only the cross-consumed sets are pinned.
|
|
7
|
+
*/
|
|
8
|
+
/** Structured error body the server returns on the wire and the CLI parses. */
|
|
9
|
+
export interface ApiErrorBody {
|
|
10
|
+
code: string;
|
|
11
|
+
message: string;
|
|
12
|
+
details?: unknown;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Pre-materialization rejection codes for a delegation OFFER. The CLI
|
|
16
|
+
* maps each to a tailored remediation hint; the server throws them from
|
|
17
|
+
* the offer-validation gates. Same `as const` array + union +
|
|
18
|
+
* const-object shape as the protocol vocabularies.
|
|
19
|
+
*/
|
|
20
|
+
export declare const DELEGATION_OFFER_REJECTION_CODES: readonly ["DELEGATION_ASSET_NOT_ALLOWED", "DELEGATION_PRICING_MISMATCH", "DELEGATION_CAPACITY_EXCEEDED"];
|
|
21
|
+
export type DelegationOfferRejectionCode = (typeof DELEGATION_OFFER_REJECTION_CODES)[number];
|
|
22
|
+
/** Named-member accessor for {@link DelegationOfferRejectionCode}. */
|
|
23
|
+
export declare const DelegationOfferRejectionCodes: {
|
|
24
|
+
readonly ASSET_NOT_ALLOWED: "DELEGATION_ASSET_NOT_ALLOWED";
|
|
25
|
+
readonly PRICING_MISMATCH: "DELEGATION_PRICING_MISMATCH";
|
|
26
|
+
readonly CAPACITY_EXCEEDED: "DELEGATION_CAPACITY_EXCEEDED";
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* CLI-auth bearer-token error codes. The CLI maps either to a
|
|
30
|
+
* "run heyarp login again" recovery hint; the server throws them from
|
|
31
|
+
* token validation + the registration auth guard.
|
|
32
|
+
*/
|
|
33
|
+
export declare const CLI_AUTH_TOKEN_ERROR_CODES: readonly ["AUTH_TOKEN_INVALID", "AUTH_TOKEN_REQUIRED"];
|
|
34
|
+
export type CliAuthTokenErrorCode = (typeof CLI_AUTH_TOKEN_ERROR_CODES)[number];
|
|
35
|
+
/** Named-member accessor for {@link CliAuthTokenErrorCode}. */
|
|
36
|
+
export declare const CliAuthTokenErrorCodes: {
|
|
37
|
+
readonly INVALID: "AUTH_TOKEN_INVALID";
|
|
38
|
+
readonly REQUIRED: "AUTH_TOKEN_REQUIRED";
|
|
39
|
+
};
|
package/dist/errors/index.d.ts
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export { POST_COMMIT_ERROR_CODES, POST_COMMIT_ERROR_CODE_PREFIXES, isPostCommitErrorCode } from './post-commit';
|
|
2
2
|
export type { PostCommitErrorCode } from './post-commit';
|
|
3
|
+
export { DELEGATION_OFFER_REJECTION_CODES, DelegationOfferRejectionCodes, CLI_AUTH_TOKEN_ERROR_CODES, CliAuthTokenErrorCodes } from './codes';
|
|
4
|
+
export type { ApiErrorBody, DelegationOfferRejectionCode, CliAuthTokenErrorCode } from './codes';
|
package/dist/index.js
CHANGED
|
@@ -78,6 +78,7 @@ function verify2(signature, message, publicKey) {
|
|
|
78
78
|
// src/did/format.ts
|
|
79
79
|
var DID_PREFIX = "did:arp:";
|
|
80
80
|
var ED25519_PUBKEY_LENGTH = 32;
|
|
81
|
+
var DID_ARP_REGEX = /^did:arp:[1-9A-HJ-NP-Za-km-z]+$/;
|
|
81
82
|
function formatDid(identityPublicKey) {
|
|
82
83
|
if (identityPublicKey.length !== ED25519_PUBKEY_LENGTH) {
|
|
83
84
|
throw new Error(`formatDid: expected ${ED25519_PUBKEY_LENGTH}-byte Ed25519 pubkey, got ${identityPublicKey.length}`);
|
|
@@ -576,6 +577,9 @@ var CliLoginSessionStates = {
|
|
|
576
577
|
EXPIRED: "expired"
|
|
577
578
|
};
|
|
578
579
|
|
|
580
|
+
// src/types/agent.ts
|
|
581
|
+
var AGENT_TAG_REGEX = /^[a-z0-9][a-z0-9_-]{0,38}[a-z0-9]$|^[a-z0-9]$/;
|
|
582
|
+
|
|
579
583
|
// src/assets.ts
|
|
580
584
|
var SOLANA_CLUSTER_IDS = {
|
|
581
585
|
"solana-mainnet": "5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
|
|
@@ -947,6 +951,20 @@ function isPostCommitErrorCode(code) {
|
|
|
947
951
|
return POST_COMMIT_SET.has(code) || POST_COMMIT_ERROR_CODE_PREFIXES.some((p) => code.startsWith(p));
|
|
948
952
|
}
|
|
949
953
|
|
|
954
|
+
// src/errors/codes.ts
|
|
955
|
+
var DELEGATION_OFFER_REJECTION_CODES = ["DELEGATION_ASSET_NOT_ALLOWED", "DELEGATION_PRICING_MISMATCH", "DELEGATION_CAPACITY_EXCEEDED"];
|
|
956
|
+
var DelegationOfferRejectionCodes = {
|
|
957
|
+
ASSET_NOT_ALLOWED: "DELEGATION_ASSET_NOT_ALLOWED",
|
|
958
|
+
PRICING_MISMATCH: "DELEGATION_PRICING_MISMATCH",
|
|
959
|
+
CAPACITY_EXCEEDED: "DELEGATION_CAPACITY_EXCEEDED"
|
|
960
|
+
};
|
|
961
|
+
var CLI_AUTH_TOKEN_ERROR_CODES = ["AUTH_TOKEN_INVALID", "AUTH_TOKEN_REQUIRED"];
|
|
962
|
+
var CliAuthTokenErrorCodes = {
|
|
963
|
+
INVALID: "AUTH_TOKEN_INVALID",
|
|
964
|
+
REQUIRED: "AUTH_TOKEN_REQUIRED"
|
|
965
|
+
};
|
|
966
|
+
|
|
967
|
+
exports.AGENT_TAG_REGEX = AGENT_TAG_REGEX;
|
|
950
968
|
exports.ASSET_DECIMALS_MAX = ASSET_DECIMALS_MAX;
|
|
951
969
|
exports.ASSET_DECIMALS_MIN = ASSET_DECIMALS_MIN;
|
|
952
970
|
exports.ASSET_SYMBOL_MAX_LEN = ASSET_SYMBOL_MAX_LEN;
|
|
@@ -956,20 +974,25 @@ exports.ASSOCIATED_TOKEN_PROGRAM_ID_BASE58 = ASSOCIATED_TOKEN_PROGRAM_ID_BASE58;
|
|
|
956
974
|
exports.BODY_TYPES = BODY_TYPES;
|
|
957
975
|
exports.BodyTypes = BodyTypes;
|
|
958
976
|
exports.CAIP19_REGEX = CAIP19_REGEX;
|
|
977
|
+
exports.CLI_AUTH_TOKEN_ERROR_CODES = CLI_AUTH_TOKEN_ERROR_CODES;
|
|
959
978
|
exports.CLI_LOGIN_SESSION_STATES = CLI_LOGIN_SESSION_STATES;
|
|
960
979
|
exports.CLI_LOGIN_SESSION_STORED_STATES = CLI_LOGIN_SESSION_STORED_STATES;
|
|
961
980
|
exports.CREATE_LOCK_DISCRIMINATOR = CREATE_LOCK_DISCRIMINATOR;
|
|
962
981
|
exports.CREATE_LOCK_NATIVE_DISCRIMINATOR = CREATE_LOCK_NATIVE_DISCRIMINATOR;
|
|
963
982
|
exports.CURRENT_PROTOCOL_VERSION = CURRENT_PROTOCOL_VERSION;
|
|
983
|
+
exports.CliAuthTokenErrorCodes = CliAuthTokenErrorCodes;
|
|
964
984
|
exports.CliLoginSessionStates = CliLoginSessionStates;
|
|
965
985
|
exports.DECIMAL_AMOUNT_REGEX = DECIMAL_AMOUNT_REGEX;
|
|
966
986
|
exports.DECLINE_REASONS = DECLINE_REASONS;
|
|
967
987
|
exports.DELEGATION_ACTIONS = DELEGATION_ACTIONS;
|
|
968
988
|
exports.DELEGATION_ACTIVE_STATES = DELEGATION_ACTIVE_STATES;
|
|
989
|
+
exports.DELEGATION_OFFER_REJECTION_CODES = DELEGATION_OFFER_REJECTION_CODES;
|
|
969
990
|
exports.DELEGATION_STATES = DELEGATION_STATES;
|
|
970
991
|
exports.DEVNET_MINTS = DEVNET_MINTS;
|
|
992
|
+
exports.DID_ARP_REGEX = DID_ARP_REGEX;
|
|
971
993
|
exports.DISCOVERY_SORTS = DISCOVERY_SORTS;
|
|
972
994
|
exports.DelegationActions = DelegationActions;
|
|
995
|
+
exports.DelegationOfferRejectionCodes = DelegationOfferRejectionCodes;
|
|
973
996
|
exports.DelegationStates = DelegationStates;
|
|
974
997
|
exports.DiscoverySorts = DiscoverySorts;
|
|
975
998
|
exports.ED25519_SIG_PREFIX = ED25519_SIG_PREFIX;
|
package/dist/index.mjs
CHANGED
|
@@ -53,6 +53,7 @@ function verify2(signature, message, publicKey) {
|
|
|
53
53
|
// src/did/format.ts
|
|
54
54
|
var DID_PREFIX = "did:arp:";
|
|
55
55
|
var ED25519_PUBKEY_LENGTH = 32;
|
|
56
|
+
var DID_ARP_REGEX = /^did:arp:[1-9A-HJ-NP-Za-km-z]+$/;
|
|
56
57
|
function formatDid(identityPublicKey) {
|
|
57
58
|
if (identityPublicKey.length !== ED25519_PUBKEY_LENGTH) {
|
|
58
59
|
throw new Error(`formatDid: expected ${ED25519_PUBKEY_LENGTH}-byte Ed25519 pubkey, got ${identityPublicKey.length}`);
|
|
@@ -551,6 +552,9 @@ var CliLoginSessionStates = {
|
|
|
551
552
|
EXPIRED: "expired"
|
|
552
553
|
};
|
|
553
554
|
|
|
555
|
+
// src/types/agent.ts
|
|
556
|
+
var AGENT_TAG_REGEX = /^[a-z0-9][a-z0-9_-]{0,38}[a-z0-9]$|^[a-z0-9]$/;
|
|
557
|
+
|
|
554
558
|
// src/assets.ts
|
|
555
559
|
var SOLANA_CLUSTER_IDS = {
|
|
556
560
|
"solana-mainnet": "5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
|
|
@@ -922,4 +926,17 @@ function isPostCommitErrorCode(code) {
|
|
|
922
926
|
return POST_COMMIT_SET.has(code) || POST_COMMIT_ERROR_CODE_PREFIXES.some((p) => code.startsWith(p));
|
|
923
927
|
}
|
|
924
928
|
|
|
925
|
-
|
|
929
|
+
// src/errors/codes.ts
|
|
930
|
+
var DELEGATION_OFFER_REJECTION_CODES = ["DELEGATION_ASSET_NOT_ALLOWED", "DELEGATION_PRICING_MISMATCH", "DELEGATION_CAPACITY_EXCEEDED"];
|
|
931
|
+
var DelegationOfferRejectionCodes = {
|
|
932
|
+
ASSET_NOT_ALLOWED: "DELEGATION_ASSET_NOT_ALLOWED",
|
|
933
|
+
PRICING_MISMATCH: "DELEGATION_PRICING_MISMATCH",
|
|
934
|
+
CAPACITY_EXCEEDED: "DELEGATION_CAPACITY_EXCEEDED"
|
|
935
|
+
};
|
|
936
|
+
var CLI_AUTH_TOKEN_ERROR_CODES = ["AUTH_TOKEN_INVALID", "AUTH_TOKEN_REQUIRED"];
|
|
937
|
+
var CliAuthTokenErrorCodes = {
|
|
938
|
+
INVALID: "AUTH_TOKEN_INVALID",
|
|
939
|
+
REQUIRED: "AUTH_TOKEN_REQUIRED"
|
|
940
|
+
};
|
|
941
|
+
|
|
942
|
+
export { AGENT_TAG_REGEX, ASSET_DECIMALS_MAX, ASSET_DECIMALS_MIN, ASSET_SYMBOL_MAX_LEN, ASSET_SYMBOL_MIN_LEN, ASSET_WHITELIST, ASSOCIATED_TOKEN_PROGRAM_ID_BASE58, BODY_TYPES, BodyTypes, CAIP19_REGEX, CLI_AUTH_TOKEN_ERROR_CODES, CLI_LOGIN_SESSION_STATES, CLI_LOGIN_SESSION_STORED_STATES, CREATE_LOCK_DISCRIMINATOR, CREATE_LOCK_NATIVE_DISCRIMINATOR, CURRENT_PROTOCOL_VERSION, CliAuthTokenErrorCodes, CliLoginSessionStates, DECIMAL_AMOUNT_REGEX, DECLINE_REASONS, DELEGATION_ACTIONS, DELEGATION_ACTIVE_STATES, DELEGATION_OFFER_REJECTION_CODES, DELEGATION_STATES, DEVNET_MINTS, DID_ARP_REGEX, DISCOVERY_SORTS, DelegationActions, DelegationOfferRejectionCodes, DelegationStates, DiscoverySorts, ED25519_SIG_PREFIX, ESCROW_PDA_SEEDS, ESCROW_PROGRAM_ID_BASE58, ESCROW_RELEASE_METHODS, EscrowReleaseMethods, HANDSHAKE_DECISIONS, HandshakeDecisions, INBOX_BLOCK_SCOPES, InboxBlockScopes, LIVE_RELATIONSHIP_STATE_NAMES, LOCK_ACCOUNT_DISCRIMINATOR, LOCK_ACCOUNT_SIZE, LOCK_STATE_NAMES, LOCK_TERMINAL_STATES, LockStates, LockTerminalStates, MAINNET_MINTS, MAX_CLOCK_SKEW_SECONDS, MAX_ENVELOPE_TTL_SECONDS, NATIVE_SOL_MINT_BASE58, NO_ARG_LIFECYCLE_INSTRUCTIONS, OWNER_SIGNING_METHODS, POST_COMMIT_ERROR_CODES, POST_COMMIT_ERROR_CODE_PREFIXES, PROTOCOL_VERSIONS, Purpose, READ_MODEL_STATUSES, RECEIPT_VERDICTS, RELATIONSHIP_STATE_NAMES, ReadModelStatuses, ReceiptVerdicts, RelationshipStates, SCRYPT_PARAMS, SHA256_HEX_RE, SLIP44_SOLANA, SOLANA_CLUSTER_IDS, SPL_TOKEN_PROGRAM_ID_BASE58, SYSTEM_PROGRAM_ID_BASE58, TOKEN_2022_PROGRAM_ID_BASE58, WELL_KNOWN_ASSETS, WELL_KNOWN_ASSET_KEYS, WORK_LOG_STATES, WorkLogStates, base58btcDecode, base58btcEncode, buildCreateLockIxData, buildLifecycleIxData, buildResolveDisputeIxData, bytes16ToDelegationId, canonicalBytes, canonicalJson, canonicalSha256Hex, computeCreateLockDiscriminator, computeLockAccountDiscriminator, decodeLockAccount, delegationIdToBytes16, deriveDelegationConditionHash, deriveLockId, deriveScryptKey, detectTokenProgramFromOwner, detectTokenProgramFromOwnerBytes, expiresAt, findAssetByAssetId, findFirstChainDivergence, formatDid, generateKeyPair, getPublicKey2 as getPublicKey, instructionDiscriminator, isAssetIdentifier, isBodyType, isCliLoginSessionWireState, isDecimalAmountString, isDeclineReason, isDelegationAction, isDelegationState, isDiscoverySort, isEscrowReleaseMethod, isHandshakeDecision, isInboxBlockScope, isPostCommitErrorCode, isReadModelStatus, isReceiptVerdict, isRelationshipState, isSha256Hex, isValidDid, isWhitelistedAssetId, isWorkLogState, listWhitelistedAssets, parseCaip19SolanaAssetId, parseDid, pollUntil, resolveAsset, rfc3339, scryptPasswordProofSign, scryptPasswordProofVerify, senderNonce, serverEventHash, sign2 as sign, signChallenge, signEnvelope, signKeyLinkAttestation, signedMessageHash, uuidV4, verify2 as verify, verifyChallenge, verifyEnvelope, verifyKeyLinkAttestation };
|
package/dist/types/agent.d.ts
CHANGED
|
@@ -136,6 +136,22 @@ export interface AgentReputation {
|
|
|
136
136
|
computed: boolean;
|
|
137
137
|
lastComputedAt?: string | null;
|
|
138
138
|
}
|
|
139
|
+
/**
|
|
140
|
+
* Agent capability-tag charset — lowercase alphanumeric + dash +
|
|
141
|
+
* underscore, 1-40 chars. Single source of truth for the server's
|
|
142
|
+
* `@Matches` on register + update (both DTOs hardcoded an identical copy
|
|
143
|
+
* before). The catalog filters on the persisted set.
|
|
144
|
+
*/
|
|
145
|
+
export declare const AGENT_TAG_REGEX: RegExp;
|
|
146
|
+
/** Response for `POST /v1/agents/challenge` (server DTO `IssueChallengeResponseDto`). */
|
|
147
|
+
export interface ChallengeResponse {
|
|
148
|
+
/** UUID — opaque handle passed back in challenge-response + register. */
|
|
149
|
+
challengeId: string;
|
|
150
|
+
/** Challenge bytes, base64url-no-pad (32 random bytes). */
|
|
151
|
+
challengeB64: string;
|
|
152
|
+
/** RFC 3339 expiry; after this the challenge is TTL-evicted. */
|
|
153
|
+
expiresAt: string;
|
|
154
|
+
}
|
|
139
155
|
/**
|
|
140
156
|
* Request body for `POST /v1/agents` (registration). The server DTO is
|
|
141
157
|
* `RegisterAgentDto`; `ownerAttestation` mirrors the SDK
|
package/dist/types/index.d.ts
CHANGED
|
@@ -16,7 +16,8 @@ export type { InboxBlockScope, InboxBlock, BlockInboxBody } from './inbox';
|
|
|
16
16
|
export { INBOX_BLOCK_SCOPES, InboxBlockScopes, isInboxBlockScope } from './inbox';
|
|
17
17
|
export type { CliSessionCreated, CliTokenIssued, CliWhoami, MyAgentSummary, CliLoginSessionStoredState, CliLoginSessionWireState, } from './cli-auth';
|
|
18
18
|
export { CLI_LOGIN_SESSION_STORED_STATES, CLI_LOGIN_SESSION_STATES, CliLoginSessionStates, isCliLoginSessionWireState } from './cli-auth';
|
|
19
|
-
export type { AssetIdentifierWire, DelegationPublic, ReceiptPublic, RelationshipPublic, WorkLogPublic, EventPublic, IngestResult } from './read-model';
|
|
20
|
-
export type { AcceptPrefs, AcceptCurrency, AgentRegisteredResponse, AgentPublic, UpdateAgentBody, RegisterAgentRequest, ReputationScores, ReputationCounters, AgentReputation, } from './agent';
|
|
19
|
+
export type { AssetIdentifierWire, DelegationPublic, ReceiptPublic, RelationshipPublic, WorkLogPublic, EventPublic, IngestResult, SenderSequenceResponse, InboxUnblockResult, ListRelationshipsQuery, ListInboxQuery, ListEventsQuery, ListDelegationsQuery, ListWorkLogsQuery, ListReceiptsQuery, } from './read-model';
|
|
20
|
+
export type { AcceptPrefs, AcceptCurrency, AgentRegisteredResponse, AgentPublic, UpdateAgentBody, RegisterAgentRequest, ChallengeResponse, ReputationScores, ReputationCounters, AgentReputation, } from './agent';
|
|
21
|
+
export { AGENT_TAG_REGEX } from './agent';
|
|
21
22
|
export type { OwnerSigningMethod, KeyLinkPayload, ScryptPasswordAttestation } from './identity';
|
|
22
23
|
export { SCRYPT_PARAMS, OWNER_SIGNING_METHODS } from './identity';
|
|
@@ -158,3 +158,62 @@ export interface IngestResult {
|
|
|
158
158
|
serverTimestamp: string;
|
|
159
159
|
relationshipId: string;
|
|
160
160
|
}
|
|
161
|
+
/** Response for `GET /v1/agents/:did/sender-sequence`. */
|
|
162
|
+
export interface SenderSequenceResponse {
|
|
163
|
+
lastSenderSequence: number;
|
|
164
|
+
}
|
|
165
|
+
/** Response for `DELETE /v1/inbox/blocks` (unblock). */
|
|
166
|
+
export interface InboxUnblockResult {
|
|
167
|
+
removed: boolean;
|
|
168
|
+
}
|
|
169
|
+
/** Query for `GET /v1/agents/:did/relationships`. */
|
|
170
|
+
export interface ListRelationshipsQuery {
|
|
171
|
+
/** Filter by relationship state. Omitted ⇒ all live + closed rows. */
|
|
172
|
+
state?: RelationshipState;
|
|
173
|
+
limit?: number;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Query for `GET /v1/agents/:did/inbox`. Two composite cursors:
|
|
177
|
+
* - `(before, beforeEventId)` walks BACK through history.
|
|
178
|
+
* - `(since, sinceEventId)` walks FORWARD from a watermark (polling).
|
|
179
|
+
* Pair each timestamp with its eventId tiebreaker to avoid skipping
|
|
180
|
+
* events that share a millisecond.
|
|
181
|
+
*/
|
|
182
|
+
export interface ListInboxQuery {
|
|
183
|
+
before?: string;
|
|
184
|
+
beforeEventId?: string;
|
|
185
|
+
since?: string;
|
|
186
|
+
sinceEventId?: string;
|
|
187
|
+
limit?: number;
|
|
188
|
+
}
|
|
189
|
+
/** Query for `GET /v1/relationships/:id/events`. */
|
|
190
|
+
export interface ListEventsQuery {
|
|
191
|
+
/** Return events with `relationshipEventIndex >= since` (cursor). */
|
|
192
|
+
since?: number;
|
|
193
|
+
limit?: number;
|
|
194
|
+
/** Server-side read-model-outcome filter (success-only / rejected-only). */
|
|
195
|
+
readModelStatus?: ReadModelStatus;
|
|
196
|
+
}
|
|
197
|
+
/** Query for `GET /v1/relationships/:id/delegations`. */
|
|
198
|
+
export interface ListDelegationsQuery {
|
|
199
|
+
/** Exact-match state filter (NOT a live/terminal classifier). */
|
|
200
|
+
state?: DelegationState;
|
|
201
|
+
/** Opaque per-row cursor — the previous page's last `id`. */
|
|
202
|
+
after?: string;
|
|
203
|
+
limit?: number;
|
|
204
|
+
}
|
|
205
|
+
/** Query for `GET /v1/relationships/:id/work`. */
|
|
206
|
+
export interface ListWorkLogsQuery {
|
|
207
|
+
state?: WorkLogState;
|
|
208
|
+
/** Narrow to work under a specific delegation id. */
|
|
209
|
+
delegationId?: string;
|
|
210
|
+
after?: string;
|
|
211
|
+
limit?: number;
|
|
212
|
+
}
|
|
213
|
+
/** Query for `GET /v1/relationships/:id/receipts`. */
|
|
214
|
+
export interface ListReceiptsQuery {
|
|
215
|
+
/** Narrow to receipts under a specific delegation id. */
|
|
216
|
+
delegationId?: string;
|
|
217
|
+
after?: string;
|
|
218
|
+
limit?: number;
|
|
219
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@heyanon-arp/sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.25",
|
|
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": [
|