@storacha/encrypt-upload-client 1.1.56 → 1.1.58

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.
Files changed (72) hide show
  1. package/dist/config/constants.d.ts +3 -3
  2. package/dist/config/constants.js +4 -3
  3. package/dist/config/env.d.ts +9 -6
  4. package/dist/config/service.d.ts +13 -13
  5. package/dist/core/client.d.ts +54 -41
  6. package/dist/core/client.js +68 -56
  7. package/dist/core/errors.d.ts +6 -6
  8. package/dist/core/metadata/encrypted-metadata.d.ts +13 -8
  9. package/dist/core/metadata/kms-metadata.d.ts +68 -36
  10. package/dist/core/metadata/lit-metadata.d.ts +63 -28
  11. package/dist/crypto/adapters/kms-crypto-adapter.d.ts +172 -137
  12. package/dist/crypto/adapters/lit-crypto-adapter.d.ts +107 -86
  13. package/dist/crypto/factories.browser.d.ts +9 -5
  14. package/dist/crypto/factories.browser.js +15 -7
  15. package/dist/crypto/factories.node.d.ts +13 -6
  16. package/dist/crypto/factories.node.js +19 -13
  17. package/dist/crypto/index.d.ts +5 -5
  18. package/dist/crypto/index.js +5 -5
  19. package/dist/crypto/symmetric/generic-aes-ctr-streaming-crypto.d.ts +58 -54
  20. package/dist/crypto/symmetric/generic-aes-ctr-streaming-crypto.js +174 -146
  21. package/dist/crypto/symmetric/node-aes-cbc-crypto.d.ts +36 -32
  22. package/dist/crypto/symmetric/node-aes-cbc-crypto.js +101 -95
  23. package/dist/examples/decrypt-test.d.ts +2 -2
  24. package/dist/examples/decrypt-test.js +78 -69
  25. package/dist/examples/encrypt-test.d.ts +5 -3
  26. package/dist/examples/encrypt-test.js +58 -55
  27. package/dist/handlers/decrypt-handler.d.ts +19 -5
  28. package/dist/handlers/encrypt-handler.d.ts +9 -3
  29. package/dist/handlers/encrypt-handler.js +93 -57
  30. package/dist/index.d.ts +2 -2
  31. package/dist/index.js +2 -2
  32. package/dist/protocols/lit.d.ts +33 -9
  33. package/dist/protocols/lit.js +134 -98
  34. package/dist/test/cid-verification.spec.d.ts +2 -2
  35. package/dist/test/cid-verification.spec.js +341 -313
  36. package/dist/test/crypto-compatibility.spec.d.ts +2 -2
  37. package/dist/test/crypto-compatibility.spec.js +184 -120
  38. package/dist/test/crypto-counter-security.spec.d.ts +2 -2
  39. package/dist/test/crypto-counter-security.spec.js +177 -138
  40. package/dist/test/crypto-streaming.spec.d.ts +2 -2
  41. package/dist/test/crypto-streaming.spec.js +208 -126
  42. package/dist/test/encrypted-metadata.spec.d.ts +2 -2
  43. package/dist/test/encrypted-metadata.spec.js +89 -62
  44. package/dist/test/factories.spec.d.ts +2 -2
  45. package/dist/test/factories.spec.js +275 -139
  46. package/dist/test/file-metadata.spec.d.ts +2 -2
  47. package/dist/test/file-metadata.spec.js +472 -416
  48. package/dist/test/fixtures/test-fixtures.d.ts +25 -20
  49. package/dist/test/fixtures/test-fixtures.js +61 -53
  50. package/dist/test/helpers/test-file-utils.d.ts +19 -14
  51. package/dist/test/helpers/test-file-utils.js +78 -76
  52. package/dist/test/https-enforcement.spec.d.ts +2 -2
  53. package/dist/test/https-enforcement.spec.js +278 -124
  54. package/dist/test/kms-crypto-adapter.spec.d.ts +2 -2
  55. package/dist/test/kms-crypto-adapter.spec.js +473 -304
  56. package/dist/test/lit-crypto-adapter.spec.d.ts +2 -2
  57. package/dist/test/lit-crypto-adapter.spec.js +206 -118
  58. package/dist/test/memory-efficiency.spec.d.ts +2 -2
  59. package/dist/test/memory-efficiency.spec.js +100 -87
  60. package/dist/test/mocks/key-manager.d.ts +71 -38
  61. package/dist/test/mocks/key-manager.js +129 -113
  62. package/dist/test/node-crypto-adapter.spec.d.ts +2 -2
  63. package/dist/test/node-crypto-adapter.spec.js +155 -102
  64. package/dist/test/node-generic-crypto-adapter.spec.d.ts +2 -2
  65. package/dist/test/node-generic-crypto-adapter.spec.js +134 -94
  66. package/dist/test/setup.d.ts +2 -2
  67. package/dist/test/setup.js +8 -9
  68. package/dist/tsconfig.spec.tsbuildinfo +1 -1
  69. package/dist/types.d.ts +219 -181
  70. package/dist/utils/file-metadata.d.ts +19 -13
  71. package/dist/utils.d.ts +14 -5
  72. package/package.json +4 -4
package/dist/types.d.ts CHANGED
@@ -1,233 +1,271 @@
1
- import { Wallet } from 'ethers';
2
- import { UnknownLink } from 'multiformats';
3
- import { Client as StorachaClient } from '@storacha/client';
4
- import { Result, Failure, Block, Proof } from '@ucanto/interface';
5
- import { AccessControlConditions, AuthMethod, AuthSig, SessionSigsMap } from '@lit-protocol/types';
6
- import type { BlobLike, AnyLink, Signer, DID, SigAlg, UploadOptions } from '@storacha/client/types';
7
- export type { IPLDBlock } from '@ucanto/interface';
8
- export type { SpaceDID } from '@storacha/capabilities/types';
9
- export type { UnknownFormat } from '@storacha/capabilities/types';
10
- export type { Result, UnknownLink };
11
- export type { BlobLike, AnyLink };
12
- export type { UploadOptions } from '@storacha/client/types';
13
- import type { SpaceDID } from '@storacha/capabilities/types';
1
+ import { Wallet } from 'ethers'
2
+ import { UnknownLink } from 'multiformats'
3
+ import { Client as StorachaClient } from '@storacha/client'
4
+ import { Result, Failure, Block, Proof } from '@ucanto/interface'
5
+ import {
6
+ AccessControlConditions,
7
+ AuthMethod,
8
+ AuthSig,
9
+ SessionSigsMap,
10
+ } from '@lit-protocol/types'
11
+ import type {
12
+ BlobLike,
13
+ AnyLink,
14
+ Signer,
15
+ DID,
16
+ SigAlg,
17
+ UploadOptions,
18
+ } from '@storacha/client/types'
19
+ export type { IPLDBlock } from '@ucanto/interface'
20
+ export type { SpaceDID } from '@storacha/capabilities/types'
21
+ export type { UnknownFormat } from '@storacha/capabilities/types'
22
+ export type { Result, UnknownLink }
23
+ export type { BlobLike, AnyLink }
24
+ export type { UploadOptions } from '@storacha/client/types'
25
+ import type { SpaceDID } from '@storacha/capabilities/types'
14
26
  export interface FileMetadata {
15
- name: string;
16
- type: string;
17
- extension: string;
18
- metadata?: Record<string, unknown>;
27
+ name: string
28
+ type: string
29
+ extension: string
30
+ metadata?: Record<string, unknown>
19
31
  }
20
32
  export interface DecryptionResult {
21
- stream: ReadableStream;
22
- fileMetadata?: FileMetadata;
33
+ stream: ReadableStream
34
+ fileMetadata?: FileMetadata
23
35
  }
24
36
  export interface EncryptedClient {
25
- encryptAndUploadFile(file: BlobLike, config: EncryptionConfig, uploadOptions?: UploadOptions): Promise<AnyLink>;
26
- retrieveAndDecryptFile(cid: AnyLink, decryptionConfig: DecryptionConfig): Promise<DecryptionResult>;
37
+ encryptAndUploadFile(
38
+ file: BlobLike,
39
+ config: EncryptionConfig,
40
+ uploadOptions?: UploadOptions
41
+ ): Promise<AnyLink>
42
+ retrieveAndDecryptFile(
43
+ cid: AnyLink,
44
+ decryptionConfig: DecryptionConfig
45
+ ): Promise<DecryptionResult>
27
46
  }
28
47
  export type EncryptedClientOptions = {
29
- storachaClient: StorachaClient;
30
- cryptoAdapter: CryptoAdapter;
31
- gatewayURL?: URL;
32
- };
48
+ storachaClient: StorachaClient
49
+ cryptoAdapter: CryptoAdapter
50
+ gatewayURL?: URL
51
+ }
33
52
  export interface EncryptOutput {
34
- key: Uint8Array;
35
- iv: Uint8Array;
36
- encryptedStream: ReadableStream;
53
+ key: Uint8Array
54
+ iv: Uint8Array
55
+ encryptedStream: ReadableStream
37
56
  }
38
57
  export interface SymmetricCrypto {
39
- encryptStream(data: BlobLike): Promise<EncryptOutput>;
40
- decryptStream(encryptedData: ReadableStream, key: Uint8Array, iv: Uint8Array): Promise<ReadableStream>;
41
- combineKeyAndIV(key: Uint8Array, iv: Uint8Array): Uint8Array;
42
- splitKeyAndIV(combined: Uint8Array): {
43
- key: Uint8Array;
44
- iv: Uint8Array;
45
- };
58
+ encryptStream(data: BlobLike): Promise<EncryptOutput>
59
+ decryptStream(
60
+ encryptedData: ReadableStream,
61
+ key: Uint8Array,
62
+ iv: Uint8Array
63
+ ): Promise<ReadableStream>
64
+ combineKeyAndIV(key: Uint8Array, iv: Uint8Array): Uint8Array
65
+ splitKeyAndIV(combined: Uint8Array): {
66
+ key: Uint8Array
67
+ iv: Uint8Array
68
+ }
46
69
  }
47
70
  export interface CryptoAdapter {
48
- encryptStream(data: BlobLike): Promise<EncryptOutput>;
49
- decryptStream(encryptedData: ReadableStream, key: Uint8Array, iv: Uint8Array): Promise<ReadableStream>;
50
- encryptSymmetricKey(key: Uint8Array, iv: Uint8Array, encryptionConfig: EncryptionConfig): Promise<EncryptedKeyResult>;
51
- decryptSymmetricKey(encryptedKey: string, configs: {
52
- decryptionConfig: DecryptionConfig;
53
- metadata: ExtractedMetadata;
54
- resourceCID: AnyLink;
55
- issuer: Signer<DID, SigAlg>;
56
- audience: DID;
57
- }): Promise<{
58
- key: Uint8Array;
59
- iv: Uint8Array;
60
- }>;
61
- extractEncryptedMetadata(car: Uint8Array): ExtractedMetadata;
62
- getEncryptedKey(metadata: ExtractedMetadata): string;
63
- encodeMetadata(encryptedDataCID: string, encryptedKey: string, metadata: LitKeyMetadata | KMSKeyMetadata): Promise<{
64
- cid: AnyLink;
65
- bytes: Uint8Array;
66
- }>;
71
+ encryptStream(data: BlobLike): Promise<EncryptOutput>
72
+ decryptStream(
73
+ encryptedData: ReadableStream,
74
+ key: Uint8Array,
75
+ iv: Uint8Array
76
+ ): Promise<ReadableStream>
77
+ encryptSymmetricKey(
78
+ key: Uint8Array,
79
+ iv: Uint8Array,
80
+ encryptionConfig: EncryptionConfig
81
+ ): Promise<EncryptedKeyResult>
82
+ decryptSymmetricKey(
83
+ encryptedKey: string,
84
+ configs: {
85
+ decryptionConfig: DecryptionConfig
86
+ metadata: ExtractedMetadata
87
+ resourceCID: AnyLink
88
+ issuer: Signer<DID, SigAlg>
89
+ audience: DID
90
+ }
91
+ ): Promise<{
92
+ key: Uint8Array
93
+ iv: Uint8Array
94
+ }>
95
+ extractEncryptedMetadata(car: Uint8Array): ExtractedMetadata
96
+ getEncryptedKey(metadata: ExtractedMetadata): string
97
+ encodeMetadata(
98
+ encryptedDataCID: string,
99
+ encryptedKey: string,
100
+ metadata: LitKeyMetadata | KMSKeyMetadata
101
+ ): Promise<{
102
+ cid: AnyLink
103
+ bytes: Uint8Array
104
+ }>
67
105
  }
68
106
  export interface EncryptionConfig {
69
- /**
70
- * The issuer of the encryption request
71
- */
72
- issuer: Signer<DID, SigAlg>;
73
- /**
74
- * The DID of the space to encrypt the file for
75
- */
76
- spaceDID: SpaceDID;
77
- /**
78
- * Proofs to access the space
79
- */
80
- proofs?: Proof[];
81
- /**
82
- * The location of the KMS key to use for encryption
83
- */
84
- location?: string;
85
- /**
86
- * The keyring of the KMS key to use for encryption
87
- */
88
- keyring?: string;
89
- /**
90
- * File metadata to embed in encrypted file
91
- */
92
- fileMetadata?: FileMetadata;
107
+ /**
108
+ * The issuer of the encryption request
109
+ */
110
+ issuer: Signer<DID, SigAlg>
111
+ /**
112
+ * The DID of the space to encrypt the file for
113
+ */
114
+ spaceDID: SpaceDID
115
+ /**
116
+ * Proofs to access the space
117
+ */
118
+ proofs?: Proof[]
119
+ /**
120
+ * The location of the KMS key to use for encryption
121
+ */
122
+ location?: string
123
+ /**
124
+ * The keyring of the KMS key to use for encryption
125
+ */
126
+ keyring?: string
127
+ /**
128
+ * File metadata to embed in encrypted file
129
+ */
130
+ fileMetadata?: FileMetadata
93
131
  }
94
132
  export interface DecryptionConfig {
95
- decryptDelegation: Proof;
96
- spaceDID: SpaceDID;
97
- /**
98
- * Proofs to access the space
99
- */
100
- proofs?: Proof[];
101
- wallet?: Wallet;
102
- sessionSigs?: SessionSigsMap;
103
- pkpPublicKey?: string;
104
- authMethod?: AuthMethod;
133
+ decryptDelegation: Proof
134
+ spaceDID: SpaceDID
135
+ /**
136
+ * Proofs to access the space
137
+ */
138
+ proofs?: Proof[]
139
+ wallet?: Wallet
140
+ sessionSigs?: SessionSigsMap
141
+ pkpPublicKey?: string
142
+ authMethod?: AuthMethod
105
143
  }
106
144
  export interface EncryptedKeyResult {
107
- strategy: EncryptionStrategy;
108
- encryptedKey: string;
109
- metadata: LitKeyMetadata | KMSKeyMetadata;
145
+ strategy: EncryptionStrategy
146
+ encryptedKey: string
147
+ metadata: LitKeyMetadata | KMSKeyMetadata
110
148
  }
111
- export type EncryptionStrategy = 'lit' | 'kms';
149
+ export type EncryptionStrategy = 'lit' | 'kms'
112
150
  export interface LitKeyMetadata {
113
- plaintextKeyHash: string;
114
- accessControlConditions: AccessControlConditions;
151
+ plaintextKeyHash: string
152
+ accessControlConditions: AccessControlConditions
115
153
  }
116
154
  export interface KMSKeyMetadata {
117
- space: SpaceDID;
118
- kms: {
119
- provider: string;
120
- keyId: string;
121
- algorithm: string;
122
- };
155
+ space: SpaceDID
156
+ kms: {
157
+ provider: string
158
+ keyId: string
159
+ algorithm: string
160
+ }
123
161
  }
124
162
  export type EncryptionPayload = {
125
- strategy: EncryptionStrategy;
126
- encryptedKey: string;
127
- metadata: LitKeyMetadata | KMSKeyMetadata;
128
- encryptedBlobLike: BlobLike;
129
- };
130
- export type GenericAccessControlCondition = [Record<string, any>];
163
+ strategy: EncryptionStrategy
164
+ encryptedKey: string
165
+ metadata: LitKeyMetadata | KMSKeyMetadata
166
+ encryptedBlobLike: BlobLike
167
+ }
168
+ export type GenericAccessControlCondition = [Record<string, any>]
131
169
  export interface LitMetadataInput {
132
- encryptedDataCID: string;
133
- identityBoundCiphertext: string;
134
- plaintextKeyHash: string;
135
- accessControlConditions: AccessControlConditions;
170
+ encryptedDataCID: string
171
+ identityBoundCiphertext: string
172
+ plaintextKeyHash: string
173
+ accessControlConditions: AccessControlConditions
136
174
  }
137
175
  export interface LitMetadata {
138
- encryptedDataCID: UnknownLink;
139
- identityBoundCiphertext: Uint8Array;
140
- plaintextKeyHash: Uint8Array;
141
- accessControlConditions: AccessControlConditions;
176
+ encryptedDataCID: UnknownLink
177
+ identityBoundCiphertext: Uint8Array
178
+ plaintextKeyHash: Uint8Array
179
+ accessControlConditions: AccessControlConditions
142
180
  }
143
181
  export interface LitMetadataView extends LitMetadata {
144
- /** Encode it to a CAR file. */
145
- archiveBlock(): Promise<Block>;
146
- toJSON(): LitMetadataInput;
182
+ /** Encode it to a CAR file. */
183
+ archiveBlock(): Promise<Block>
184
+ toJSON(): LitMetadataInput
147
185
  }
148
186
  export interface KMSMetadata {
149
- encryptedDataCID: UnknownLink;
150
- encryptedSymmetricKey: string;
151
- space: SpaceDID;
152
- kms: {
153
- provider: string;
154
- keyId: string;
155
- algorithm: string;
156
- };
187
+ encryptedDataCID: UnknownLink
188
+ encryptedSymmetricKey: string
189
+ space: SpaceDID
190
+ kms: {
191
+ provider: string
192
+ keyId: string
193
+ algorithm: string
194
+ }
157
195
  }
158
196
  export interface KMSMetadataInput {
159
- encryptedDataCID: string;
160
- encryptedSymmetricKey: string;
161
- space: string;
162
- kms: {
163
- provider: string;
164
- keyId: string;
165
- algorithm: string;
166
- };
197
+ encryptedDataCID: string
198
+ encryptedSymmetricKey: string
199
+ space: string
200
+ kms: {
201
+ provider: string
202
+ keyId: string
203
+ algorithm: string
204
+ }
167
205
  }
168
206
  export interface KMSMetadataView extends KMSMetadata {
169
- /** Encode it to a CAR file. */
170
- archiveBlock(): Promise<Block>;
171
- toJSON(): KMSMetadataInput;
207
+ /** Encode it to a CAR file. */
208
+ archiveBlock(): Promise<Block>
209
+ toJSON(): KMSMetadataInput
172
210
  }
173
211
  export interface DecodeFailure extends Failure {
174
- name: 'DecodeFailure';
212
+ name: 'DecodeFailure'
175
213
  }
176
214
  export interface SessionSignatureOptions {
177
- wallet: Wallet;
178
- accessControlConditions: AccessControlConditions;
179
- dataToEncryptHash: string;
180
- expiration?: string;
181
- capabilityAuthSigs?: AuthSig[];
215
+ wallet: Wallet
216
+ accessControlConditions: AccessControlConditions
217
+ dataToEncryptHash: string
218
+ expiration?: string
219
+ capabilityAuthSigs?: AuthSig[]
182
220
  }
183
221
  export interface PkpSessionSignatureOptions {
184
- pkpPublicKey: string;
185
- authMethod: AuthMethod;
186
- accessControlConditions: AccessControlConditions;
187
- dataToEncryptHash: string;
188
- expiration?: string;
189
- capabilityAuthSigs?: AuthSig[];
222
+ pkpPublicKey: string
223
+ authMethod: AuthMethod
224
+ accessControlConditions: AccessControlConditions
225
+ dataToEncryptHash: string
226
+ expiration?: string
227
+ capabilityAuthSigs?: AuthSig[]
190
228
  }
191
229
  export interface LitPkpSigner {
192
- pkpPublicKey: string;
193
- authMethod: AuthMethod;
230
+ pkpPublicKey: string
231
+ authMethod: AuthMethod
194
232
  }
195
233
  export interface LitWalletSigner {
196
- wallet: Wallet;
234
+ wallet: Wallet
197
235
  }
198
236
  export interface CreateDecryptWrappedInvocationOptions {
199
- decryptDelegation: Proof;
200
- issuer: Signer<DID, SigAlg>;
201
- audience: `did:${string}:${string}`;
202
- spaceDID: `did:key:${string}`;
203
- resourceCID: AnyLink;
204
- expiration: number;
237
+ decryptDelegation: Proof
238
+ issuer: Signer<DID, SigAlg>
239
+ audience: `did:${string}:${string}`
240
+ spaceDID: `did:key:${string}`
241
+ resourceCID: AnyLink
242
+ expiration: number
205
243
  }
206
244
  export interface ExecuteUcanValidationOptions {
207
- sessionSigs: SessionSigsMap;
208
- spaceDID: `did:key:${string}`;
209
- identityBoundCiphertext: string;
210
- plaintextKeyHash: string;
211
- accessControlConditions: AccessControlConditions;
212
- wrappedInvocationJSON: string;
213
- }
214
- export type ExtractedMetadata = LitExtractedMetadata | KMSExtractedMetadata;
245
+ sessionSigs: SessionSigsMap
246
+ spaceDID: `did:key:${string}`
247
+ identityBoundCiphertext: string
248
+ plaintextKeyHash: string
249
+ accessControlConditions: AccessControlConditions
250
+ wrappedInvocationJSON: string
251
+ }
252
+ export type ExtractedMetadata = LitExtractedMetadata | KMSExtractedMetadata
215
253
  export interface LitExtractedMetadata {
216
- strategy: 'lit';
217
- encryptedDataCID: string;
218
- identityBoundCiphertext: string;
219
- plaintextKeyHash: string;
220
- accessControlConditions: AccessControlConditions;
254
+ strategy: 'lit'
255
+ encryptedDataCID: string
256
+ identityBoundCiphertext: string
257
+ plaintextKeyHash: string
258
+ accessControlConditions: AccessControlConditions
221
259
  }
222
260
  export interface KMSExtractedMetadata {
223
- strategy: 'kms';
224
- encryptedDataCID: string;
225
- encryptedSymmetricKey: string;
226
- space: SpaceDID;
227
- kms: {
228
- provider: string;
229
- keyId: string;
230
- algorithm: string;
231
- };
232
- }
233
- //# sourceMappingURL=types.d.ts.map
261
+ strategy: 'kms'
262
+ encryptedDataCID: string
263
+ encryptedSymmetricKey: string
264
+ space: SpaceDID
265
+ kms: {
266
+ provider: string
267
+ keyId: string
268
+ algorithm: string
269
+ }
270
+ }
271
+ //# sourceMappingURL=types.d.ts.map
@@ -1,14 +1,20 @@
1
- export const FileMetadataSchema: Schema.StructSchema<{
2
- name: Schema.StringSchema<string, unknown>;
3
- type: Schema.StringSchema<string, unknown>;
4
- extension: Schema.StringSchema<string, unknown>;
5
- metadata: Schema.Schema<unknown, any>;
6
- }, unknown>;
7
- export function createFileWithMetadata(file: Type.BlobLike, metadata?: Type.FileMetadata): Blob;
1
+ export const FileMetadataSchema: Schema.StructSchema<
2
+ {
3
+ name: Schema.StringSchema<string, unknown>
4
+ type: Schema.StringSchema<string, unknown>
5
+ extension: Schema.StringSchema<string, unknown>
6
+ metadata: Schema.Schema<unknown, any>
7
+ },
8
+ unknown
9
+ >
10
+ export function createFileWithMetadata(
11
+ file: Type.BlobLike,
12
+ metadata?: Type.FileMetadata
13
+ ): Blob
8
14
  export function extractFileMetadata(decryptedStream: ReadableStream): Promise<{
9
- fileStream: ReadableStream;
10
- fileMetadata?: Type.FileMetadata;
11
- }>;
12
- import { Schema } from '@ucanto/core';
13
- import * as Type from '../types.js';
14
- //# sourceMappingURL=file-metadata.d.ts.map
15
+ fileStream: ReadableStream
16
+ fileMetadata?: Type.FileMetadata
17
+ }>
18
+ import { Schema } from '@ucanto/core'
19
+ import * as Type from '../types.js'
20
+ //# sourceMappingURL=file-metadata.d.ts.map
package/dist/utils.d.ts CHANGED
@@ -3,13 +3,22 @@
3
3
  * @param {string} str
4
4
  * @returns {Uint8Array}
5
5
  */
6
- export function stringToBytes(str: string): Uint8Array;
6
+ export function stringToBytes(str: string): Uint8Array
7
7
  /**
8
8
  *
9
9
  * @param {Uint8Array} bytes
10
10
  * @returns {string}
11
11
  */
12
- export function bytesToString(bytes: Uint8Array): string;
13
- export function createDecryptWrappedInvocation({ decryptDelegation, issuer, spaceDID, resourceCID, audience, expiration, }: Type.CreateDecryptWrappedInvocationOptions): Promise<import("@ucanto/server").ToString<Uint8Array<ArrayBufferLike>, string>>;
14
- import * as Type from './types.js';
15
- //# sourceMappingURL=utils.d.ts.map
12
+ export function bytesToString(bytes: Uint8Array): string
13
+ export function createDecryptWrappedInvocation({
14
+ decryptDelegation,
15
+ issuer,
16
+ spaceDID,
17
+ resourceCID,
18
+ audience,
19
+ expiration,
20
+ }: Type.CreateDecryptWrappedInvocationOptions): Promise<
21
+ import('@ucanto/server').ToString<Uint8Array<ArrayBufferLike>, string>
22
+ >
23
+ import * as Type from './types.js'
24
+ //# sourceMappingURL=utils.d.ts.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@storacha/encrypt-upload-client",
3
3
  "type": "module",
4
- "version": "1.1.56",
4
+ "version": "1.1.58",
5
5
  "license": "Apache-2.0 OR MIT",
6
6
  "description": "Client for upload and download encrypted files",
7
7
  "author": "Storacha",
@@ -80,9 +80,9 @@
80
80
  "ethers": "5.7.1",
81
81
  "ipfs-unixfs-exporter": "^10.0.0",
82
82
  "multiformats": "^13.3.6",
83
- "@storacha/capabilities": "^1.10.0",
84
- "@storacha/client": "^1.8.13",
85
- "@storacha/upload-client": "^1.3.4"
83
+ "@storacha/client": "^1.8.15",
84
+ "@storacha/upload-client": "^1.3.6",
85
+ "@storacha/capabilities": "^1.12.0"
86
86
  },
87
87
  "devDependencies": {
88
88
  "@lit-protocol/types": "^7.0.8",