@didcid/keymaster 0.4.2 → 0.4.4

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.
@@ -1,5 +1,5 @@
1
1
  import { DidCidDocument, ResolveDIDOptions, Operation, Proof, ProofPurpose } from '@didcid/gatekeeper/types';
2
- import { Challenge, ChallengeResponse, CheckWalletResult, CreateAssetOptions, FileAssetOptions, CreateResponseOptions, DmailItem, DmailMessage, EncryptOptions, FileAsset, FixWalletResult, Group, Vault, VaultOptions, IDInfo, ImageFileAsset, IssueCredentialsOptions, KeymasterInterface, KeymasterOptions, LightningConfig, LightningBalance, LightningInvoice, LightningPayment, LightningPaymentStatus, DecodedLightningInvoice, NostrKeys, NostrEvent, NoticeMessage, PollConfig, PossiblyProofed, ViewBallotResult, StoredWallet, VerifiableCredential, ViewPollResult, WalletFile, WalletEncFile } from '@didcid/keymaster/types';
2
+ import { Challenge, ChallengeResponse, CheckWalletResult, CreateAssetOptions, FileAssetOptions, CreateResponseOptions, DmailItem, DmailMessage, EncryptOptions, FileAsset, FixWalletResult, Group, Vault, VaultOptions, IDInfo, ImageFileAsset, IssueCredentialsOptions, KeymasterInterface, KeymasterOptions, LightningConfig, LightningBalance, LightningInvoice, LightningPayment, LightningPaymentRecord, LightningPaymentStatus, DecodedLightningInvoice, NostrKeys, NostrEvent, NoticeMessage, PollConfig, PossiblyProofed, ViewBallotResult, StoredWallet, VerifiableCredential, ViewPollResult, WalletFile, WalletEncFile } from '@didcid/keymaster/types';
3
3
  import { EcdsaJwkPair, EcdsaJwkPublic } from '@didcid/cipher/types';
4
4
  export declare enum DmailTags {
5
5
  DMAIL = "dmail",
@@ -65,6 +65,9 @@ export default class Keymaster implements KeymasterInterface {
65
65
  generateFileAsset(filename: string, buffer: Buffer): Promise<FileAsset>;
66
66
  createFile(buffer: Buffer, options?: FileAssetOptions): Promise<string>;
67
67
  updateFile(id: string, buffer: Buffer, options?: FileAssetOptions): Promise<boolean>;
68
+ generateFileAssetFromStream(filename: string, stream: AsyncIterable<Uint8Array>, contentType: string, bytes: number): Promise<FileAsset>;
69
+ createFileStream(stream: AsyncIterable<Uint8Array>, options?: FileAssetOptions): Promise<string>;
70
+ updateFileStream(id: string, stream: AsyncIterable<Uint8Array>, options?: FileAssetOptions): Promise<boolean>;
68
71
  getFile(id: string): Promise<FileAsset | null>;
69
72
  testFile(id: string): Promise<boolean>;
70
73
  encryptMessage(msg: string, receiver: string, options?: EncryptOptions): Promise<string>;
@@ -78,6 +81,7 @@ export default class Keymaster implements KeymasterInterface {
78
81
  verifyProof<T extends PossiblyProofed>(obj: T): Promise<boolean>;
79
82
  updateDID(id: string, doc: DidCidDocument): Promise<boolean>;
80
83
  revokeDID(id: string): Promise<boolean>;
84
+ changeRegistry(id: string, registry: string): Promise<boolean>;
81
85
  addToOwned(did: string, owner?: string): Promise<boolean>;
82
86
  removeFromOwned(did: string, owner: string): Promise<boolean>;
83
87
  addToHeld(did: string): Promise<boolean>;
@@ -123,6 +127,7 @@ export default class Keymaster implements KeymasterInterface {
123
127
  publishLightning(name?: string): Promise<boolean>;
124
128
  unpublishLightning(name?: string): Promise<boolean>;
125
129
  zapLightning(id: string, amount: number, memo?: string, name?: string): Promise<LightningPayment>;
130
+ getLightningPayments(name?: string): Promise<LightningPaymentRecord[]>;
126
131
  testAgent(id: string): Promise<boolean>;
127
132
  bindCredential(subjectId: string, options?: {
128
133
  schema?: string;
@@ -1,5 +1,5 @@
1
1
  import { Cipher, EcdsaJwkPublic, NostrKeys, NostrEvent } from '@didcid/cipher/types';
2
- import { GatekeeperInterface, DidCidDocument, ResolveDIDOptions, Proof, LightningConfig, LightningBalance, LightningInvoice, LightningPayment, LightningPaymentStatus } from '@didcid/gatekeeper/types';
2
+ import { GatekeeperInterface, DidCidDocument, ResolveDIDOptions, Proof, LightningConfig, LightningBalance, LightningInvoice, LightningPayment, LightningPaymentRecord, LightningPaymentStatus } from '@didcid/gatekeeper/types';
3
3
  export type { NostrKeys, NostrEvent } from '@didcid/cipher/types';
4
4
  export interface Seed {
5
5
  /** Passphrase-encrypted mnemonic */
@@ -52,6 +52,8 @@ export interface CreateAssetOptions {
52
52
  }
53
53
  export interface FileAssetOptions extends CreateAssetOptions {
54
54
  filename?: string;
55
+ contentType?: string;
56
+ bytes?: number;
55
57
  }
56
58
  export interface EncryptOptions extends CreateAssetOptions {
57
59
  encryptForSender?: boolean;
@@ -198,7 +200,7 @@ export interface WalletBase {
198
200
  loadWallet(): Promise<StoredWallet | null>;
199
201
  updateWallet(mutator: (wallet: StoredWallet) => void | Promise<void>): Promise<void>;
200
202
  }
201
- export type { LightningConfig, LightningBalance, LightningInvoice, LightningPayment, LightningPaymentStatus, } from '@didcid/gatekeeper/types';
203
+ export type { LightningConfig, LightningBalance, LightningInvoice, LightningPayment, LightningPaymentRecord, LightningPaymentStatus, } from '@didcid/gatekeeper/types';
202
204
  export interface DecodedLightningInvoice {
203
205
  amount?: string;
204
206
  description?: string;
@@ -284,6 +286,7 @@ export interface KeymasterInterface {
284
286
  }): Promise<string>;
285
287
  removeId(id: string): Promise<boolean>;
286
288
  renameId(id: string, newName: string): Promise<boolean>;
289
+ changeRegistry(id: string, registry: string): Promise<boolean>;
287
290
  backupId(id?: string): Promise<boolean>;
288
291
  recoverId(did: string): Promise<string>;
289
292
  listAliases(): Promise<Record<string, string>>;
@@ -304,6 +307,7 @@ export interface KeymasterInterface {
304
307
  publishLightning(name?: string): Promise<boolean>;
305
308
  unpublishLightning(name?: string): Promise<boolean>;
306
309
  zapLightning(id: string, amount: number, memo?: string, name?: string): Promise<LightningPayment>;
310
+ getLightningPayments(name?: string): Promise<LightningPaymentRecord[]>;
307
311
  resolveDID(did: string, options?: ResolveDIDOptions): Promise<DidCidDocument>;
308
312
  updateDID(id: string, doc: DidCidDocument): Promise<boolean>;
309
313
  createAsset(data: unknown, options?: CreateAssetOptions): Promise<string>;
@@ -381,7 +385,9 @@ export interface KeymasterInterface {
381
385
  getImage(id: string): Promise<ImageFileAsset | null>;
382
386
  testImage(id: string): Promise<boolean>;
383
387
  createFile(data: Buffer, options?: FileAssetOptions): Promise<string>;
388
+ createFileStream(stream: AsyncIterable<Uint8Array>, options?: FileAssetOptions): Promise<string>;
384
389
  updateFile(did: string, data: Buffer, options?: FileAssetOptions): Promise<boolean>;
390
+ updateFileStream(did: string, stream: AsyncIterable<Uint8Array>, options?: FileAssetOptions): Promise<boolean>;
385
391
  getFile(id: string): Promise<FileAsset | null>;
386
392
  testFile(id: string): Promise<boolean>;
387
393
  createVault(options?: VaultOptions): Promise<string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@didcid/keymaster",
3
- "version": "0.4.2",
3
+ "version": "0.4.4",
4
4
  "description": "Archon Keymaster",
5
5
  "type": "module",
6
6
  "module": "./dist/esm/index.js",
@@ -141,9 +141,9 @@
141
141
  "author": "David McFadzean <davidmc@gmail.com>",
142
142
  "license": "MIT",
143
143
  "dependencies": {
144
- "@didcid/cipher": "^0.2.2",
145
- "@didcid/common": "^0.1.4",
146
- "@didcid/gatekeeper": "^0.4.2",
144
+ "@didcid/cipher": "^0.2.4",
145
+ "@didcid/common": "^0.1.6",
146
+ "@didcid/gatekeeper": "^0.4.4",
147
147
  "axios": "^1.7.7",
148
148
  "commander": "^11.1.0",
149
149
  "dotenv": "^16.4.5",
@@ -159,5 +159,5 @@
159
159
  "type": "git",
160
160
  "url": "git+https://github.com/archetech/archon.git"
161
161
  },
162
- "gitHead": "3a01d5def7dc01c473d5016f5c543742fc83cc26"
162
+ "gitHead": "77009ce04fc0ec82715649c899bb6c63d0128033"
163
163
  }