@youam/sdk 0.2.1 → 0.4.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/README.md +7 -2
- package/dist/cli/index.cjs +448 -176
- package/dist/index.cjs +1053 -131
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +184 -7
- package/dist/index.d.ts +184 -7
- package/dist/index.js +1047 -129
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/index.d.cts
CHANGED
|
@@ -108,6 +108,18 @@ declare class InvalidContactCardError extends UAMError {
|
|
|
108
108
|
declare class KeyPinningError extends UAMError {
|
|
109
109
|
constructor(message?: string);
|
|
110
110
|
}
|
|
111
|
+
/**
|
|
112
|
+
* The relay refused a message sent over WebSocket.
|
|
113
|
+
*
|
|
114
|
+
* `code` is the relay's error code (e.g. "rate_limited"), `detail` its
|
|
115
|
+
* explanation. Over HTTP the same refusal is an HTTP error.
|
|
116
|
+
*/
|
|
117
|
+
declare class SendRefusedError extends UAMError {
|
|
118
|
+
readonly messageId: string;
|
|
119
|
+
readonly code: string;
|
|
120
|
+
readonly detail: string | undefined;
|
|
121
|
+
constructor(messageId: string, code: string, detail?: string);
|
|
122
|
+
}
|
|
111
123
|
|
|
112
124
|
/**
|
|
113
125
|
* UAM address parsing and validation.
|
|
@@ -378,6 +390,119 @@ declare function createContactCard(address: string, displayName: string, relay:
|
|
|
378
390
|
*/
|
|
379
391
|
declare function verifyContactCard(card: ContactCard): void;
|
|
380
392
|
|
|
393
|
+
/**
|
|
394
|
+
* Signed owner objects: profile, canonical form, hash and schemas.
|
|
395
|
+
*
|
|
396
|
+
* Mirrors uam.protocol.signed in the Python SDK; both are checked against
|
|
397
|
+
* the same vectors (tests/vectors/signed/). Every owner object (key log
|
|
398
|
+
* entries, links, invites, redemptions, grants) is a JSON body in a
|
|
399
|
+
* restricted profile, hashed as
|
|
400
|
+
*
|
|
401
|
+
* h = base64url(SHA-256("UAM-<type>-v1\n" || JCS(body))) (no padding)
|
|
402
|
+
*
|
|
403
|
+
* The profile: printable ASCII strings, integers within +/-(2^53-1), no
|
|
404
|
+
* floats, no nulls, no duplicate keys, and no members a type doesn't define
|
|
405
|
+
* (new ones go under `ext`, with `crit` naming those a verifier must know).
|
|
406
|
+
* A body that breaks any rule is refused, never repaired.
|
|
407
|
+
*/
|
|
408
|
+
|
|
409
|
+
type Body = Record<string, unknown>;
|
|
410
|
+
/** A signed-object body outside the profile or its type's schema. */
|
|
411
|
+
declare class SignedObjectError extends UAMError {
|
|
412
|
+
constructor(message?: string);
|
|
413
|
+
}
|
|
414
|
+
/** Parse a body, refusing anything outside the profile. */
|
|
415
|
+
declare function parseBody(text: string | Uint8Array): Body;
|
|
416
|
+
/** RFC 8785 canonical form (inside the profile: sorted keys, no whitespace). */
|
|
417
|
+
declare function canonical(body: Body): Uint8Array;
|
|
418
|
+
/** The object's hash; the body is validated first. */
|
|
419
|
+
declare function objectHash(body: Body): string;
|
|
420
|
+
/** Refuse a body outside the profile or its type's schema. */
|
|
421
|
+
declare function validate(body: unknown): asserts body is Body;
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* did:key for the two key types owner objects carry (as the Python SDK).
|
|
425
|
+
*
|
|
426
|
+
* Ed25519 (an agent's key, `did:key:z6Mk...`, multicodec 0xed) and P-256
|
|
427
|
+
* (a passkey, `did:key:zDn...`, multicodec 0x1200, compressed point).
|
|
428
|
+
*/
|
|
429
|
+
|
|
430
|
+
type DidKeyKind = "ed25519" | "p256";
|
|
431
|
+
/** A did:key string that isn't one of the two supported key types. */
|
|
432
|
+
declare class InvalidDidKeyError extends UAMError {
|
|
433
|
+
constructor(message?: string);
|
|
434
|
+
}
|
|
435
|
+
/** `did:key:z...` for an Ed25519 key (32 bytes) or a compressed P-256 point (33 bytes). */
|
|
436
|
+
declare function encodeDidKey(kind: DidKeyKind, publicKey: Uint8Array): string;
|
|
437
|
+
/** The key type and raw public key in a did:key string. */
|
|
438
|
+
declare function decodeDidKey(did: string): {
|
|
439
|
+
kind: DidKeyKind;
|
|
440
|
+
key: Uint8Array;
|
|
441
|
+
};
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* Passkeys (WebAuthn): registration, assertions and the approval challenge.
|
|
445
|
+
*
|
|
446
|
+
* Mirrors uam.protocol.webauthn in the Python SDK; both are checked against
|
|
447
|
+
* the same vectors (tests/vectors/webauthn/).
|
|
448
|
+
*
|
|
449
|
+
* - registration: `webauthn.create`, attestation format `none` only, user
|
|
450
|
+
* present and verified, ES256 only;
|
|
451
|
+
* - assertion: `webauthn.get`, the exact challenge, the owner origin exactly,
|
|
452
|
+
* no cross-origin frame, rpIdHash = SHA-256(RP ID), user present and
|
|
453
|
+
* verified, backup eligibility unchanged, an ES256 signature over
|
|
454
|
+
* `authenticatorData || SHA-256(clientDataJSON)` (high-S accepted), and,
|
|
455
|
+
* where the stored counter is known, a counter that went up whenever either
|
|
456
|
+
* count is non-zero (synced passkeys report 0 throughout; a count that
|
|
457
|
+
* drops to 0 may be a clone).
|
|
458
|
+
*
|
|
459
|
+
* ES256 only: a passkey's did:key must never look like an agent key.
|
|
460
|
+
*/
|
|
461
|
+
|
|
462
|
+
/** A registration or assertion that fails a check. */
|
|
463
|
+
declare class WebAuthnError extends UAMError {
|
|
464
|
+
constructor(message?: string);
|
|
465
|
+
}
|
|
466
|
+
/** A registered passkey: its id, algorithm, compressed P-256 key and flags. */
|
|
467
|
+
interface Credential {
|
|
468
|
+
readonly id: Uint8Array;
|
|
469
|
+
readonly alg: number;
|
|
470
|
+
readonly publicKey: Uint8Array;
|
|
471
|
+
readonly backupEligible: boolean;
|
|
472
|
+
readonly signCount: number;
|
|
473
|
+
}
|
|
474
|
+
declare function credentialDid(credential: Credential): string;
|
|
475
|
+
/** Check a `webauthn.create` response; the passkey it registers. */
|
|
476
|
+
declare function verifyRegistration(args: {
|
|
477
|
+
attestationObject: Uint8Array;
|
|
478
|
+
clientDataJSON: Uint8Array;
|
|
479
|
+
challenge: Uint8Array;
|
|
480
|
+
origin: string;
|
|
481
|
+
rpId: string;
|
|
482
|
+
}): Credential;
|
|
483
|
+
/**
|
|
484
|
+
* Check a `webauthn.get` response from `credential`; its new sign count.
|
|
485
|
+
*
|
|
486
|
+
* `checkCounter: false` is for a verifier without the stored counter (an
|
|
487
|
+
* agent checking an approval offline); the relay always checks it.
|
|
488
|
+
*/
|
|
489
|
+
declare function verifyAssertion(credential: Credential, args: {
|
|
490
|
+
authenticatorData: Uint8Array;
|
|
491
|
+
clientDataJSON: Uint8Array;
|
|
492
|
+
signature: Uint8Array;
|
|
493
|
+
challenge: Uint8Array;
|
|
494
|
+
origin: string;
|
|
495
|
+
rpId: string;
|
|
496
|
+
checkCounter?: boolean;
|
|
497
|
+
}): number;
|
|
498
|
+
/**
|
|
499
|
+
* The challenge one Face ID signs to approve `items` (type, hash) as shown.
|
|
500
|
+
*
|
|
501
|
+
* `screen` is the exact text the page showed; the challenge commits to its
|
|
502
|
+
* SHA-256, so the page can't show one thing and get another signed.
|
|
503
|
+
*/
|
|
504
|
+
declare function approvalChallenge(items: Array<[string, string]>, screen: string): Uint8Array;
|
|
505
|
+
|
|
381
506
|
/**
|
|
382
507
|
* UAM Protocol -- Universal Agent Messaging protocol library.
|
|
383
508
|
*
|
|
@@ -388,6 +513,7 @@ type index_Address = Address;
|
|
|
388
513
|
type index_ContactCard = ContactCard;
|
|
389
514
|
type index_DecryptionError = DecryptionError;
|
|
390
515
|
declare const index_DecryptionError: typeof DecryptionError;
|
|
516
|
+
type index_DidKeyKind = DidKeyKind;
|
|
391
517
|
type index_EncryptionError = EncryptionError;
|
|
392
518
|
declare const index_EncryptionError: typeof EncryptionError;
|
|
393
519
|
type index_EnvelopeTooLargeError = EnvelopeTooLargeError;
|
|
@@ -396,6 +522,8 @@ type index_InvalidAddressError = InvalidAddressError;
|
|
|
396
522
|
declare const index_InvalidAddressError: typeof InvalidAddressError;
|
|
397
523
|
type index_InvalidContactCardError = InvalidContactCardError;
|
|
398
524
|
declare const index_InvalidContactCardError: typeof InvalidContactCardError;
|
|
525
|
+
type index_InvalidDidKeyError = InvalidDidKeyError;
|
|
526
|
+
declare const index_InvalidDidKeyError: typeof InvalidDidKeyError;
|
|
399
527
|
type index_InvalidEnvelopeError = InvalidEnvelopeError;
|
|
400
528
|
declare const index_InvalidEnvelopeError: typeof InvalidEnvelopeError;
|
|
401
529
|
type index_KeyPinningError = KeyPinningError;
|
|
@@ -407,32 +535,45 @@ type index_MessageEnvelope = MessageEnvelope;
|
|
|
407
535
|
type index_MessageType = MessageType;
|
|
408
536
|
declare const index_MessageType: typeof MessageType;
|
|
409
537
|
type index_Seed = Seed;
|
|
538
|
+
type index_SendRefusedError = SendRefusedError;
|
|
539
|
+
declare const index_SendRefusedError: typeof SendRefusedError;
|
|
410
540
|
type index_SignatureError = SignatureError;
|
|
411
541
|
declare const index_SignatureError: typeof SignatureError;
|
|
412
542
|
type index_SignatureVerificationError = SignatureVerificationError;
|
|
413
543
|
declare const index_SignatureVerificationError: typeof SignatureVerificationError;
|
|
544
|
+
type index_SignedObjectError = SignedObjectError;
|
|
545
|
+
declare const index_SignedObjectError: typeof SignedObjectError;
|
|
414
546
|
type index_SigningKey = SigningKey;
|
|
415
547
|
type index_UAMError = UAMError;
|
|
416
548
|
declare const index_UAMError: typeof UAMError;
|
|
417
549
|
declare const index_UAM_VERSION: typeof UAM_VERSION;
|
|
418
550
|
type index_VerifyKey = VerifyKey;
|
|
551
|
+
type index_WebAuthnError = WebAuthnError;
|
|
552
|
+
declare const index_WebAuthnError: typeof WebAuthnError;
|
|
553
|
+
declare const index_approvalChallenge: typeof approvalChallenge;
|
|
419
554
|
declare const index_b64Decode: typeof b64Decode;
|
|
420
555
|
declare const index_b64Encode: typeof b64Encode;
|
|
556
|
+
declare const index_canonical: typeof canonical;
|
|
421
557
|
declare const index_canonicalize: typeof canonicalize;
|
|
422
558
|
declare const index_contactCardFromDict: typeof contactCardFromDict;
|
|
423
559
|
declare const index_contactCardToDict: typeof contactCardToDict;
|
|
424
560
|
declare const index_createContactCard: typeof createContactCard;
|
|
425
561
|
declare const index_createEnvelope: typeof createEnvelope;
|
|
562
|
+
declare const index_credentialDid: typeof credentialDid;
|
|
563
|
+
declare const index_decodeDidKey: typeof decodeDidKey;
|
|
426
564
|
declare const index_decryptPayload: typeof decryptPayload;
|
|
427
565
|
declare const index_decryptPayloadAnonymous: typeof decryptPayloadAnonymous;
|
|
428
566
|
declare const index_deserializeSigningKey: typeof deserializeSigningKey;
|
|
429
567
|
declare const index_deserializeVerifyKey: typeof deserializeVerifyKey;
|
|
568
|
+
declare const index_encodeDidKey: typeof encodeDidKey;
|
|
430
569
|
declare const index_encryptPayload: typeof encryptPayload;
|
|
431
570
|
declare const index_encryptPayloadAnonymous: typeof encryptPayloadAnonymous;
|
|
432
571
|
declare const index_fromWireDict: typeof fromWireDict;
|
|
433
572
|
declare const index_generateKeypair: typeof generateKeypair;
|
|
434
573
|
declare const index_generateNonce: typeof generateNonce;
|
|
574
|
+
declare const index_objectHash: typeof objectHash;
|
|
435
575
|
declare const index_parseAddress: typeof parseAddress;
|
|
576
|
+
declare const index_parseBody: typeof parseBody;
|
|
436
577
|
declare const index_publicKeyFingerprint: typeof publicKeyFingerprint;
|
|
437
578
|
declare const index_serializeSigningKey: typeof serializeSigningKey;
|
|
438
579
|
declare const index_serializeVerifyKey: typeof serializeVerifyKey;
|
|
@@ -441,11 +582,13 @@ declare const index_sodiumReady: typeof sodiumReady;
|
|
|
441
582
|
declare const index_toWireDict: typeof toWireDict;
|
|
442
583
|
declare const index_utcTimestamp: typeof utcTimestamp;
|
|
443
584
|
declare const index_validateEnvelopeSize: typeof validateEnvelopeSize;
|
|
585
|
+
declare const index_verifyAssertion: typeof verifyAssertion;
|
|
444
586
|
declare const index_verifyContactCard: typeof verifyContactCard;
|
|
445
587
|
declare const index_verifyEnvelope: typeof verifyEnvelope;
|
|
588
|
+
declare const index_verifyRegistration: typeof verifyRegistration;
|
|
446
589
|
declare const index_verifySignature: typeof verifySignature;
|
|
447
590
|
declare namespace index {
|
|
448
|
-
export { type index_Address as Address, type index_ContactCard as ContactCard, index_DecryptionError as DecryptionError, index_EncryptionError as EncryptionError, index_EnvelopeTooLargeError as EnvelopeTooLargeError, index_InvalidAddressError as InvalidAddressError, index_InvalidContactCardError as InvalidContactCardError, index_InvalidEnvelopeError as InvalidEnvelopeError, index_KeyPinningError as KeyPinningError, type index_Keypair as Keypair, index_MAX_ENVELOPE_AGE as MAX_ENVELOPE_AGE, index_MAX_ENVELOPE_SIZE as MAX_ENVELOPE_SIZE, type index_MessageEnvelope as MessageEnvelope, index_MessageType as MessageType, type index_Seed as Seed, index_SignatureError as SignatureError, index_SignatureVerificationError as SignatureVerificationError, type index_SigningKey as SigningKey, index_UAMError as UAMError, index_UAM_VERSION as UAM_VERSION, type index_VerifyKey as VerifyKey, index_b64Decode as b64Decode, index_b64Encode as b64Encode, index_canonicalize as canonicalize, index_contactCardFromDict as contactCardFromDict, index_contactCardToDict as contactCardToDict, index_createContactCard as createContactCard, index_createEnvelope as createEnvelope, index_decryptPayload as decryptPayload, index_decryptPayloadAnonymous as decryptPayloadAnonymous, index_deserializeSigningKey as deserializeSigningKey, index_deserializeVerifyKey as deserializeVerifyKey, index_encryptPayload as encryptPayload, index_encryptPayloadAnonymous as encryptPayloadAnonymous, index_fromWireDict as fromWireDict, index_generateKeypair as generateKeypair, index_generateNonce as generateNonce, index_parseAddress as parseAddress, index_publicKeyFingerprint as publicKeyFingerprint, index_serializeSigningKey as serializeSigningKey, index_serializeVerifyKey as serializeVerifyKey, index_signMessage as signMessage, index_sodiumReady as sodiumReady, index_toWireDict as toWireDict, index_utcTimestamp as utcTimestamp, index_validateEnvelopeSize as validateEnvelopeSize, index_verifyContactCard as verifyContactCard, index_verifyEnvelope as verifyEnvelope, index_verifySignature as verifySignature };
|
|
591
|
+
export { type index_Address as Address, type index_ContactCard as ContactCard, index_DecryptionError as DecryptionError, type index_DidKeyKind as DidKeyKind, index_EncryptionError as EncryptionError, index_EnvelopeTooLargeError as EnvelopeTooLargeError, index_InvalidAddressError as InvalidAddressError, index_InvalidContactCardError as InvalidContactCardError, index_InvalidDidKeyError as InvalidDidKeyError, index_InvalidEnvelopeError as InvalidEnvelopeError, index_KeyPinningError as KeyPinningError, type index_Keypair as Keypair, index_MAX_ENVELOPE_AGE as MAX_ENVELOPE_AGE, index_MAX_ENVELOPE_SIZE as MAX_ENVELOPE_SIZE, type index_MessageEnvelope as MessageEnvelope, index_MessageType as MessageType, type Credential as PasskeyCredential, type index_Seed as Seed, index_SendRefusedError as SendRefusedError, index_SignatureError as SignatureError, index_SignatureVerificationError as SignatureVerificationError, type Body as SignedBody, index_SignedObjectError as SignedObjectError, type index_SigningKey as SigningKey, index_UAMError as UAMError, index_UAM_VERSION as UAM_VERSION, type index_VerifyKey as VerifyKey, index_WebAuthnError as WebAuthnError, index_approvalChallenge as approvalChallenge, index_b64Decode as b64Decode, index_b64Encode as b64Encode, index_canonical as canonical, index_canonicalize as canonicalize, index_contactCardFromDict as contactCardFromDict, index_contactCardToDict as contactCardToDict, index_createContactCard as createContactCard, index_createEnvelope as createEnvelope, index_credentialDid as credentialDid, index_decodeDidKey as decodeDidKey, index_decryptPayload as decryptPayload, index_decryptPayloadAnonymous as decryptPayloadAnonymous, index_deserializeSigningKey as deserializeSigningKey, index_deserializeVerifyKey as deserializeVerifyKey, index_encodeDidKey as encodeDidKey, index_encryptPayload as encryptPayload, index_encryptPayloadAnonymous as encryptPayloadAnonymous, index_fromWireDict as fromWireDict, index_generateKeypair as generateKeypair, index_generateNonce as generateNonce, index_objectHash as objectHash, index_parseAddress as parseAddress, index_parseBody as parseBody, index_publicKeyFingerprint as publicKeyFingerprint, index_serializeSigningKey as serializeSigningKey, index_serializeVerifyKey as serializeVerifyKey, index_signMessage as signMessage, index_sodiumReady as sodiumReady, index_toWireDict as toWireDict, index_utcTimestamp as utcTimestamp, index_validateEnvelopeSize as validateEnvelopeSize, validate as validateSignedObject, index_verifyAssertion as verifyAssertion, index_verifyContactCard as verifyContactCard, index_verifyEnvelope as verifyEnvelope, index_verifyRegistration as verifyRegistration, index_verifySignature as verifySignature };
|
|
449
592
|
}
|
|
450
593
|
|
|
451
594
|
/**
|
|
@@ -533,6 +676,30 @@ interface ReceivedMessage {
|
|
|
533
676
|
readonly mediaType?: string;
|
|
534
677
|
readonly verified: boolean;
|
|
535
678
|
}
|
|
679
|
+
/** What a relay can say it did with a sent message (as the Python SDK). */
|
|
680
|
+
declare const SEND_STATUSES: readonly ["delivered", "stored", "relayed", "queued", "duplicate", "dropped", "pending", "accepted", "unknown"];
|
|
681
|
+
type SendStatus = (typeof SEND_STATUSES)[number];
|
|
682
|
+
/**
|
|
683
|
+
* What Agent.send() returns.
|
|
684
|
+
*
|
|
685
|
+
* `status` is one of SEND_STATUSES: "pending" means the recipient only
|
|
686
|
+
* takes messages from approved contacts and the relay kept nothing.
|
|
687
|
+
* `delivered` is true only when the relay says the recipient has it.
|
|
688
|
+
*/
|
|
689
|
+
interface SendResult {
|
|
690
|
+
readonly messageId: string;
|
|
691
|
+
readonly status: SendStatus;
|
|
692
|
+
readonly delivered: boolean;
|
|
693
|
+
}
|
|
694
|
+
/**
|
|
695
|
+
* True when a relay's features include `name` at `version` or later.
|
|
696
|
+
*
|
|
697
|
+
* "name" is version 1; "name:N" means version N or later.
|
|
698
|
+
*/
|
|
699
|
+
declare function supports(features: Iterable<string>, name: string, version?: number): boolean;
|
|
700
|
+
/** What to tell whoever sent a message the relay answered "pending". */
|
|
701
|
+
declare const PENDING_NOTE: string;
|
|
702
|
+
declare function pendingNote(to: string): string;
|
|
536
703
|
|
|
537
704
|
/**
|
|
538
705
|
* SQLite-backed local contact storage (HAND-03).
|
|
@@ -696,7 +863,7 @@ interface AgentLike {
|
|
|
696
863
|
readonly signingKey: Uint8Array;
|
|
697
864
|
};
|
|
698
865
|
readonly _transport: {
|
|
699
|
-
send(envelope: Record<string, unknown>): Promise<
|
|
866
|
+
send(envelope: Record<string, unknown>): Promise<unknown>;
|
|
700
867
|
} | null;
|
|
701
868
|
}
|
|
702
869
|
declare class HandshakeManager {
|
|
@@ -758,8 +925,13 @@ declare abstract class TransportBase {
|
|
|
758
925
|
abstract connect(): Promise<void>;
|
|
759
926
|
/** Close the connection. */
|
|
760
927
|
abstract disconnect(): Promise<void>;
|
|
761
|
-
/**
|
|
762
|
-
|
|
928
|
+
/**
|
|
929
|
+
* Send a message envelope to the relay.
|
|
930
|
+
*
|
|
931
|
+
* Resolves with the relay's answer (`{status, ...}`), or null when none
|
|
932
|
+
* came in time: the message may still have arrived.
|
|
933
|
+
*/
|
|
934
|
+
abstract send(envelope: Record<string, unknown>): Promise<Record<string, unknown> | null>;
|
|
763
935
|
/** Retrieve pending messages from the relay. */
|
|
764
936
|
abstract receive(limit?: number): Promise<Record<string, unknown>[]>;
|
|
765
937
|
/**
|
|
@@ -897,12 +1069,17 @@ declare class Agent {
|
|
|
897
1069
|
*/
|
|
898
1070
|
close(): Promise<void>;
|
|
899
1071
|
/**
|
|
900
|
-
* Send an encrypted, signed message.
|
|
1072
|
+
* Send an encrypted, signed message.
|
|
1073
|
+
*
|
|
1074
|
+
* Returns the message id with what the relay did with it: `status`
|
|
1075
|
+
* "pending" means the recipient only takes approved contacts, and the
|
|
1076
|
+
* message was not kept (don't resend it). `delivered` is true only when
|
|
1077
|
+
* the relay says the recipient has it.
|
|
901
1078
|
*/
|
|
902
1079
|
send(toAddress: string, message: string, options?: {
|
|
903
1080
|
threadId?: string;
|
|
904
1081
|
attachments?: Array<Record<string, unknown>>;
|
|
905
|
-
}): Promise<
|
|
1082
|
+
}): Promise<SendResult>;
|
|
906
1083
|
/**
|
|
907
1084
|
* Retrieve, decrypt, and verify pending messages.
|
|
908
1085
|
*
|
|
@@ -1092,4 +1269,4 @@ declare class Agent {
|
|
|
1092
1269
|
*/
|
|
1093
1270
|
declare function verifyWebhookSignature(payload: Buffer | Uint8Array, signatureHeader: string, secret: string): boolean;
|
|
1094
1271
|
|
|
1095
|
-
export { Agent, ContactBook, type ReceivedMessage, index as protocol, verifyWebhookSignature };
|
|
1272
|
+
export { Agent, ContactBook, PENDING_NOTE, type ReceivedMessage, SEND_STATUSES, type SendResult, type SendStatus, pendingNote, index as protocol, supports, verifyWebhookSignature };
|
package/dist/index.d.ts
CHANGED
|
@@ -108,6 +108,18 @@ declare class InvalidContactCardError extends UAMError {
|
|
|
108
108
|
declare class KeyPinningError extends UAMError {
|
|
109
109
|
constructor(message?: string);
|
|
110
110
|
}
|
|
111
|
+
/**
|
|
112
|
+
* The relay refused a message sent over WebSocket.
|
|
113
|
+
*
|
|
114
|
+
* `code` is the relay's error code (e.g. "rate_limited"), `detail` its
|
|
115
|
+
* explanation. Over HTTP the same refusal is an HTTP error.
|
|
116
|
+
*/
|
|
117
|
+
declare class SendRefusedError extends UAMError {
|
|
118
|
+
readonly messageId: string;
|
|
119
|
+
readonly code: string;
|
|
120
|
+
readonly detail: string | undefined;
|
|
121
|
+
constructor(messageId: string, code: string, detail?: string);
|
|
122
|
+
}
|
|
111
123
|
|
|
112
124
|
/**
|
|
113
125
|
* UAM address parsing and validation.
|
|
@@ -378,6 +390,119 @@ declare function createContactCard(address: string, displayName: string, relay:
|
|
|
378
390
|
*/
|
|
379
391
|
declare function verifyContactCard(card: ContactCard): void;
|
|
380
392
|
|
|
393
|
+
/**
|
|
394
|
+
* Signed owner objects: profile, canonical form, hash and schemas.
|
|
395
|
+
*
|
|
396
|
+
* Mirrors uam.protocol.signed in the Python SDK; both are checked against
|
|
397
|
+
* the same vectors (tests/vectors/signed/). Every owner object (key log
|
|
398
|
+
* entries, links, invites, redemptions, grants) is a JSON body in a
|
|
399
|
+
* restricted profile, hashed as
|
|
400
|
+
*
|
|
401
|
+
* h = base64url(SHA-256("UAM-<type>-v1\n" || JCS(body))) (no padding)
|
|
402
|
+
*
|
|
403
|
+
* The profile: printable ASCII strings, integers within +/-(2^53-1), no
|
|
404
|
+
* floats, no nulls, no duplicate keys, and no members a type doesn't define
|
|
405
|
+
* (new ones go under `ext`, with `crit` naming those a verifier must know).
|
|
406
|
+
* A body that breaks any rule is refused, never repaired.
|
|
407
|
+
*/
|
|
408
|
+
|
|
409
|
+
type Body = Record<string, unknown>;
|
|
410
|
+
/** A signed-object body outside the profile or its type's schema. */
|
|
411
|
+
declare class SignedObjectError extends UAMError {
|
|
412
|
+
constructor(message?: string);
|
|
413
|
+
}
|
|
414
|
+
/** Parse a body, refusing anything outside the profile. */
|
|
415
|
+
declare function parseBody(text: string | Uint8Array): Body;
|
|
416
|
+
/** RFC 8785 canonical form (inside the profile: sorted keys, no whitespace). */
|
|
417
|
+
declare function canonical(body: Body): Uint8Array;
|
|
418
|
+
/** The object's hash; the body is validated first. */
|
|
419
|
+
declare function objectHash(body: Body): string;
|
|
420
|
+
/** Refuse a body outside the profile or its type's schema. */
|
|
421
|
+
declare function validate(body: unknown): asserts body is Body;
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* did:key for the two key types owner objects carry (as the Python SDK).
|
|
425
|
+
*
|
|
426
|
+
* Ed25519 (an agent's key, `did:key:z6Mk...`, multicodec 0xed) and P-256
|
|
427
|
+
* (a passkey, `did:key:zDn...`, multicodec 0x1200, compressed point).
|
|
428
|
+
*/
|
|
429
|
+
|
|
430
|
+
type DidKeyKind = "ed25519" | "p256";
|
|
431
|
+
/** A did:key string that isn't one of the two supported key types. */
|
|
432
|
+
declare class InvalidDidKeyError extends UAMError {
|
|
433
|
+
constructor(message?: string);
|
|
434
|
+
}
|
|
435
|
+
/** `did:key:z...` for an Ed25519 key (32 bytes) or a compressed P-256 point (33 bytes). */
|
|
436
|
+
declare function encodeDidKey(kind: DidKeyKind, publicKey: Uint8Array): string;
|
|
437
|
+
/** The key type and raw public key in a did:key string. */
|
|
438
|
+
declare function decodeDidKey(did: string): {
|
|
439
|
+
kind: DidKeyKind;
|
|
440
|
+
key: Uint8Array;
|
|
441
|
+
};
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* Passkeys (WebAuthn): registration, assertions and the approval challenge.
|
|
445
|
+
*
|
|
446
|
+
* Mirrors uam.protocol.webauthn in the Python SDK; both are checked against
|
|
447
|
+
* the same vectors (tests/vectors/webauthn/).
|
|
448
|
+
*
|
|
449
|
+
* - registration: `webauthn.create`, attestation format `none` only, user
|
|
450
|
+
* present and verified, ES256 only;
|
|
451
|
+
* - assertion: `webauthn.get`, the exact challenge, the owner origin exactly,
|
|
452
|
+
* no cross-origin frame, rpIdHash = SHA-256(RP ID), user present and
|
|
453
|
+
* verified, backup eligibility unchanged, an ES256 signature over
|
|
454
|
+
* `authenticatorData || SHA-256(clientDataJSON)` (high-S accepted), and,
|
|
455
|
+
* where the stored counter is known, a counter that went up whenever either
|
|
456
|
+
* count is non-zero (synced passkeys report 0 throughout; a count that
|
|
457
|
+
* drops to 0 may be a clone).
|
|
458
|
+
*
|
|
459
|
+
* ES256 only: a passkey's did:key must never look like an agent key.
|
|
460
|
+
*/
|
|
461
|
+
|
|
462
|
+
/** A registration or assertion that fails a check. */
|
|
463
|
+
declare class WebAuthnError extends UAMError {
|
|
464
|
+
constructor(message?: string);
|
|
465
|
+
}
|
|
466
|
+
/** A registered passkey: its id, algorithm, compressed P-256 key and flags. */
|
|
467
|
+
interface Credential {
|
|
468
|
+
readonly id: Uint8Array;
|
|
469
|
+
readonly alg: number;
|
|
470
|
+
readonly publicKey: Uint8Array;
|
|
471
|
+
readonly backupEligible: boolean;
|
|
472
|
+
readonly signCount: number;
|
|
473
|
+
}
|
|
474
|
+
declare function credentialDid(credential: Credential): string;
|
|
475
|
+
/** Check a `webauthn.create` response; the passkey it registers. */
|
|
476
|
+
declare function verifyRegistration(args: {
|
|
477
|
+
attestationObject: Uint8Array;
|
|
478
|
+
clientDataJSON: Uint8Array;
|
|
479
|
+
challenge: Uint8Array;
|
|
480
|
+
origin: string;
|
|
481
|
+
rpId: string;
|
|
482
|
+
}): Credential;
|
|
483
|
+
/**
|
|
484
|
+
* Check a `webauthn.get` response from `credential`; its new sign count.
|
|
485
|
+
*
|
|
486
|
+
* `checkCounter: false` is for a verifier without the stored counter (an
|
|
487
|
+
* agent checking an approval offline); the relay always checks it.
|
|
488
|
+
*/
|
|
489
|
+
declare function verifyAssertion(credential: Credential, args: {
|
|
490
|
+
authenticatorData: Uint8Array;
|
|
491
|
+
clientDataJSON: Uint8Array;
|
|
492
|
+
signature: Uint8Array;
|
|
493
|
+
challenge: Uint8Array;
|
|
494
|
+
origin: string;
|
|
495
|
+
rpId: string;
|
|
496
|
+
checkCounter?: boolean;
|
|
497
|
+
}): number;
|
|
498
|
+
/**
|
|
499
|
+
* The challenge one Face ID signs to approve `items` (type, hash) as shown.
|
|
500
|
+
*
|
|
501
|
+
* `screen` is the exact text the page showed; the challenge commits to its
|
|
502
|
+
* SHA-256, so the page can't show one thing and get another signed.
|
|
503
|
+
*/
|
|
504
|
+
declare function approvalChallenge(items: Array<[string, string]>, screen: string): Uint8Array;
|
|
505
|
+
|
|
381
506
|
/**
|
|
382
507
|
* UAM Protocol -- Universal Agent Messaging protocol library.
|
|
383
508
|
*
|
|
@@ -388,6 +513,7 @@ type index_Address = Address;
|
|
|
388
513
|
type index_ContactCard = ContactCard;
|
|
389
514
|
type index_DecryptionError = DecryptionError;
|
|
390
515
|
declare const index_DecryptionError: typeof DecryptionError;
|
|
516
|
+
type index_DidKeyKind = DidKeyKind;
|
|
391
517
|
type index_EncryptionError = EncryptionError;
|
|
392
518
|
declare const index_EncryptionError: typeof EncryptionError;
|
|
393
519
|
type index_EnvelopeTooLargeError = EnvelopeTooLargeError;
|
|
@@ -396,6 +522,8 @@ type index_InvalidAddressError = InvalidAddressError;
|
|
|
396
522
|
declare const index_InvalidAddressError: typeof InvalidAddressError;
|
|
397
523
|
type index_InvalidContactCardError = InvalidContactCardError;
|
|
398
524
|
declare const index_InvalidContactCardError: typeof InvalidContactCardError;
|
|
525
|
+
type index_InvalidDidKeyError = InvalidDidKeyError;
|
|
526
|
+
declare const index_InvalidDidKeyError: typeof InvalidDidKeyError;
|
|
399
527
|
type index_InvalidEnvelopeError = InvalidEnvelopeError;
|
|
400
528
|
declare const index_InvalidEnvelopeError: typeof InvalidEnvelopeError;
|
|
401
529
|
type index_KeyPinningError = KeyPinningError;
|
|
@@ -407,32 +535,45 @@ type index_MessageEnvelope = MessageEnvelope;
|
|
|
407
535
|
type index_MessageType = MessageType;
|
|
408
536
|
declare const index_MessageType: typeof MessageType;
|
|
409
537
|
type index_Seed = Seed;
|
|
538
|
+
type index_SendRefusedError = SendRefusedError;
|
|
539
|
+
declare const index_SendRefusedError: typeof SendRefusedError;
|
|
410
540
|
type index_SignatureError = SignatureError;
|
|
411
541
|
declare const index_SignatureError: typeof SignatureError;
|
|
412
542
|
type index_SignatureVerificationError = SignatureVerificationError;
|
|
413
543
|
declare const index_SignatureVerificationError: typeof SignatureVerificationError;
|
|
544
|
+
type index_SignedObjectError = SignedObjectError;
|
|
545
|
+
declare const index_SignedObjectError: typeof SignedObjectError;
|
|
414
546
|
type index_SigningKey = SigningKey;
|
|
415
547
|
type index_UAMError = UAMError;
|
|
416
548
|
declare const index_UAMError: typeof UAMError;
|
|
417
549
|
declare const index_UAM_VERSION: typeof UAM_VERSION;
|
|
418
550
|
type index_VerifyKey = VerifyKey;
|
|
551
|
+
type index_WebAuthnError = WebAuthnError;
|
|
552
|
+
declare const index_WebAuthnError: typeof WebAuthnError;
|
|
553
|
+
declare const index_approvalChallenge: typeof approvalChallenge;
|
|
419
554
|
declare const index_b64Decode: typeof b64Decode;
|
|
420
555
|
declare const index_b64Encode: typeof b64Encode;
|
|
556
|
+
declare const index_canonical: typeof canonical;
|
|
421
557
|
declare const index_canonicalize: typeof canonicalize;
|
|
422
558
|
declare const index_contactCardFromDict: typeof contactCardFromDict;
|
|
423
559
|
declare const index_contactCardToDict: typeof contactCardToDict;
|
|
424
560
|
declare const index_createContactCard: typeof createContactCard;
|
|
425
561
|
declare const index_createEnvelope: typeof createEnvelope;
|
|
562
|
+
declare const index_credentialDid: typeof credentialDid;
|
|
563
|
+
declare const index_decodeDidKey: typeof decodeDidKey;
|
|
426
564
|
declare const index_decryptPayload: typeof decryptPayload;
|
|
427
565
|
declare const index_decryptPayloadAnonymous: typeof decryptPayloadAnonymous;
|
|
428
566
|
declare const index_deserializeSigningKey: typeof deserializeSigningKey;
|
|
429
567
|
declare const index_deserializeVerifyKey: typeof deserializeVerifyKey;
|
|
568
|
+
declare const index_encodeDidKey: typeof encodeDidKey;
|
|
430
569
|
declare const index_encryptPayload: typeof encryptPayload;
|
|
431
570
|
declare const index_encryptPayloadAnonymous: typeof encryptPayloadAnonymous;
|
|
432
571
|
declare const index_fromWireDict: typeof fromWireDict;
|
|
433
572
|
declare const index_generateKeypair: typeof generateKeypair;
|
|
434
573
|
declare const index_generateNonce: typeof generateNonce;
|
|
574
|
+
declare const index_objectHash: typeof objectHash;
|
|
435
575
|
declare const index_parseAddress: typeof parseAddress;
|
|
576
|
+
declare const index_parseBody: typeof parseBody;
|
|
436
577
|
declare const index_publicKeyFingerprint: typeof publicKeyFingerprint;
|
|
437
578
|
declare const index_serializeSigningKey: typeof serializeSigningKey;
|
|
438
579
|
declare const index_serializeVerifyKey: typeof serializeVerifyKey;
|
|
@@ -441,11 +582,13 @@ declare const index_sodiumReady: typeof sodiumReady;
|
|
|
441
582
|
declare const index_toWireDict: typeof toWireDict;
|
|
442
583
|
declare const index_utcTimestamp: typeof utcTimestamp;
|
|
443
584
|
declare const index_validateEnvelopeSize: typeof validateEnvelopeSize;
|
|
585
|
+
declare const index_verifyAssertion: typeof verifyAssertion;
|
|
444
586
|
declare const index_verifyContactCard: typeof verifyContactCard;
|
|
445
587
|
declare const index_verifyEnvelope: typeof verifyEnvelope;
|
|
588
|
+
declare const index_verifyRegistration: typeof verifyRegistration;
|
|
446
589
|
declare const index_verifySignature: typeof verifySignature;
|
|
447
590
|
declare namespace index {
|
|
448
|
-
export { type index_Address as Address, type index_ContactCard as ContactCard, index_DecryptionError as DecryptionError, index_EncryptionError as EncryptionError, index_EnvelopeTooLargeError as EnvelopeTooLargeError, index_InvalidAddressError as InvalidAddressError, index_InvalidContactCardError as InvalidContactCardError, index_InvalidEnvelopeError as InvalidEnvelopeError, index_KeyPinningError as KeyPinningError, type index_Keypair as Keypair, index_MAX_ENVELOPE_AGE as MAX_ENVELOPE_AGE, index_MAX_ENVELOPE_SIZE as MAX_ENVELOPE_SIZE, type index_MessageEnvelope as MessageEnvelope, index_MessageType as MessageType, type index_Seed as Seed, index_SignatureError as SignatureError, index_SignatureVerificationError as SignatureVerificationError, type index_SigningKey as SigningKey, index_UAMError as UAMError, index_UAM_VERSION as UAM_VERSION, type index_VerifyKey as VerifyKey, index_b64Decode as b64Decode, index_b64Encode as b64Encode, index_canonicalize as canonicalize, index_contactCardFromDict as contactCardFromDict, index_contactCardToDict as contactCardToDict, index_createContactCard as createContactCard, index_createEnvelope as createEnvelope, index_decryptPayload as decryptPayload, index_decryptPayloadAnonymous as decryptPayloadAnonymous, index_deserializeSigningKey as deserializeSigningKey, index_deserializeVerifyKey as deserializeVerifyKey, index_encryptPayload as encryptPayload, index_encryptPayloadAnonymous as encryptPayloadAnonymous, index_fromWireDict as fromWireDict, index_generateKeypair as generateKeypair, index_generateNonce as generateNonce, index_parseAddress as parseAddress, index_publicKeyFingerprint as publicKeyFingerprint, index_serializeSigningKey as serializeSigningKey, index_serializeVerifyKey as serializeVerifyKey, index_signMessage as signMessage, index_sodiumReady as sodiumReady, index_toWireDict as toWireDict, index_utcTimestamp as utcTimestamp, index_validateEnvelopeSize as validateEnvelopeSize, index_verifyContactCard as verifyContactCard, index_verifyEnvelope as verifyEnvelope, index_verifySignature as verifySignature };
|
|
591
|
+
export { type index_Address as Address, type index_ContactCard as ContactCard, index_DecryptionError as DecryptionError, type index_DidKeyKind as DidKeyKind, index_EncryptionError as EncryptionError, index_EnvelopeTooLargeError as EnvelopeTooLargeError, index_InvalidAddressError as InvalidAddressError, index_InvalidContactCardError as InvalidContactCardError, index_InvalidDidKeyError as InvalidDidKeyError, index_InvalidEnvelopeError as InvalidEnvelopeError, index_KeyPinningError as KeyPinningError, type index_Keypair as Keypair, index_MAX_ENVELOPE_AGE as MAX_ENVELOPE_AGE, index_MAX_ENVELOPE_SIZE as MAX_ENVELOPE_SIZE, type index_MessageEnvelope as MessageEnvelope, index_MessageType as MessageType, type Credential as PasskeyCredential, type index_Seed as Seed, index_SendRefusedError as SendRefusedError, index_SignatureError as SignatureError, index_SignatureVerificationError as SignatureVerificationError, type Body as SignedBody, index_SignedObjectError as SignedObjectError, type index_SigningKey as SigningKey, index_UAMError as UAMError, index_UAM_VERSION as UAM_VERSION, type index_VerifyKey as VerifyKey, index_WebAuthnError as WebAuthnError, index_approvalChallenge as approvalChallenge, index_b64Decode as b64Decode, index_b64Encode as b64Encode, index_canonical as canonical, index_canonicalize as canonicalize, index_contactCardFromDict as contactCardFromDict, index_contactCardToDict as contactCardToDict, index_createContactCard as createContactCard, index_createEnvelope as createEnvelope, index_credentialDid as credentialDid, index_decodeDidKey as decodeDidKey, index_decryptPayload as decryptPayload, index_decryptPayloadAnonymous as decryptPayloadAnonymous, index_deserializeSigningKey as deserializeSigningKey, index_deserializeVerifyKey as deserializeVerifyKey, index_encodeDidKey as encodeDidKey, index_encryptPayload as encryptPayload, index_encryptPayloadAnonymous as encryptPayloadAnonymous, index_fromWireDict as fromWireDict, index_generateKeypair as generateKeypair, index_generateNonce as generateNonce, index_objectHash as objectHash, index_parseAddress as parseAddress, index_parseBody as parseBody, index_publicKeyFingerprint as publicKeyFingerprint, index_serializeSigningKey as serializeSigningKey, index_serializeVerifyKey as serializeVerifyKey, index_signMessage as signMessage, index_sodiumReady as sodiumReady, index_toWireDict as toWireDict, index_utcTimestamp as utcTimestamp, index_validateEnvelopeSize as validateEnvelopeSize, validate as validateSignedObject, index_verifyAssertion as verifyAssertion, index_verifyContactCard as verifyContactCard, index_verifyEnvelope as verifyEnvelope, index_verifyRegistration as verifyRegistration, index_verifySignature as verifySignature };
|
|
449
592
|
}
|
|
450
593
|
|
|
451
594
|
/**
|
|
@@ -533,6 +676,30 @@ interface ReceivedMessage {
|
|
|
533
676
|
readonly mediaType?: string;
|
|
534
677
|
readonly verified: boolean;
|
|
535
678
|
}
|
|
679
|
+
/** What a relay can say it did with a sent message (as the Python SDK). */
|
|
680
|
+
declare const SEND_STATUSES: readonly ["delivered", "stored", "relayed", "queued", "duplicate", "dropped", "pending", "accepted", "unknown"];
|
|
681
|
+
type SendStatus = (typeof SEND_STATUSES)[number];
|
|
682
|
+
/**
|
|
683
|
+
* What Agent.send() returns.
|
|
684
|
+
*
|
|
685
|
+
* `status` is one of SEND_STATUSES: "pending" means the recipient only
|
|
686
|
+
* takes messages from approved contacts and the relay kept nothing.
|
|
687
|
+
* `delivered` is true only when the relay says the recipient has it.
|
|
688
|
+
*/
|
|
689
|
+
interface SendResult {
|
|
690
|
+
readonly messageId: string;
|
|
691
|
+
readonly status: SendStatus;
|
|
692
|
+
readonly delivered: boolean;
|
|
693
|
+
}
|
|
694
|
+
/**
|
|
695
|
+
* True when a relay's features include `name` at `version` or later.
|
|
696
|
+
*
|
|
697
|
+
* "name" is version 1; "name:N" means version N or later.
|
|
698
|
+
*/
|
|
699
|
+
declare function supports(features: Iterable<string>, name: string, version?: number): boolean;
|
|
700
|
+
/** What to tell whoever sent a message the relay answered "pending". */
|
|
701
|
+
declare const PENDING_NOTE: string;
|
|
702
|
+
declare function pendingNote(to: string): string;
|
|
536
703
|
|
|
537
704
|
/**
|
|
538
705
|
* SQLite-backed local contact storage (HAND-03).
|
|
@@ -696,7 +863,7 @@ interface AgentLike {
|
|
|
696
863
|
readonly signingKey: Uint8Array;
|
|
697
864
|
};
|
|
698
865
|
readonly _transport: {
|
|
699
|
-
send(envelope: Record<string, unknown>): Promise<
|
|
866
|
+
send(envelope: Record<string, unknown>): Promise<unknown>;
|
|
700
867
|
} | null;
|
|
701
868
|
}
|
|
702
869
|
declare class HandshakeManager {
|
|
@@ -758,8 +925,13 @@ declare abstract class TransportBase {
|
|
|
758
925
|
abstract connect(): Promise<void>;
|
|
759
926
|
/** Close the connection. */
|
|
760
927
|
abstract disconnect(): Promise<void>;
|
|
761
|
-
/**
|
|
762
|
-
|
|
928
|
+
/**
|
|
929
|
+
* Send a message envelope to the relay.
|
|
930
|
+
*
|
|
931
|
+
* Resolves with the relay's answer (`{status, ...}`), or null when none
|
|
932
|
+
* came in time: the message may still have arrived.
|
|
933
|
+
*/
|
|
934
|
+
abstract send(envelope: Record<string, unknown>): Promise<Record<string, unknown> | null>;
|
|
763
935
|
/** Retrieve pending messages from the relay. */
|
|
764
936
|
abstract receive(limit?: number): Promise<Record<string, unknown>[]>;
|
|
765
937
|
/**
|
|
@@ -897,12 +1069,17 @@ declare class Agent {
|
|
|
897
1069
|
*/
|
|
898
1070
|
close(): Promise<void>;
|
|
899
1071
|
/**
|
|
900
|
-
* Send an encrypted, signed message.
|
|
1072
|
+
* Send an encrypted, signed message.
|
|
1073
|
+
*
|
|
1074
|
+
* Returns the message id with what the relay did with it: `status`
|
|
1075
|
+
* "pending" means the recipient only takes approved contacts, and the
|
|
1076
|
+
* message was not kept (don't resend it). `delivered` is true only when
|
|
1077
|
+
* the relay says the recipient has it.
|
|
901
1078
|
*/
|
|
902
1079
|
send(toAddress: string, message: string, options?: {
|
|
903
1080
|
threadId?: string;
|
|
904
1081
|
attachments?: Array<Record<string, unknown>>;
|
|
905
|
-
}): Promise<
|
|
1082
|
+
}): Promise<SendResult>;
|
|
906
1083
|
/**
|
|
907
1084
|
* Retrieve, decrypt, and verify pending messages.
|
|
908
1085
|
*
|
|
@@ -1092,4 +1269,4 @@ declare class Agent {
|
|
|
1092
1269
|
*/
|
|
1093
1270
|
declare function verifyWebhookSignature(payload: Buffer | Uint8Array, signatureHeader: string, secret: string): boolean;
|
|
1094
1271
|
|
|
1095
|
-
export { Agent, ContactBook, type ReceivedMessage, index as protocol, verifyWebhookSignature };
|
|
1272
|
+
export { Agent, ContactBook, PENDING_NOTE, type ReceivedMessage, SEND_STATUSES, type SendResult, type SendStatus, pendingNote, index as protocol, supports, verifyWebhookSignature };
|