@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.
- package/dist/config/constants.d.ts +3 -3
- package/dist/config/constants.js +4 -3
- package/dist/config/env.d.ts +9 -6
- package/dist/config/service.d.ts +13 -13
- package/dist/core/client.d.ts +54 -41
- package/dist/core/client.js +68 -56
- package/dist/core/errors.d.ts +6 -6
- package/dist/core/metadata/encrypted-metadata.d.ts +13 -8
- package/dist/core/metadata/kms-metadata.d.ts +68 -36
- package/dist/core/metadata/lit-metadata.d.ts +63 -28
- package/dist/crypto/adapters/kms-crypto-adapter.d.ts +172 -137
- package/dist/crypto/adapters/lit-crypto-adapter.d.ts +107 -86
- package/dist/crypto/factories.browser.d.ts +9 -5
- package/dist/crypto/factories.browser.js +15 -7
- package/dist/crypto/factories.node.d.ts +13 -6
- package/dist/crypto/factories.node.js +19 -13
- package/dist/crypto/index.d.ts +5 -5
- package/dist/crypto/index.js +5 -5
- package/dist/crypto/symmetric/generic-aes-ctr-streaming-crypto.d.ts +58 -54
- package/dist/crypto/symmetric/generic-aes-ctr-streaming-crypto.js +174 -146
- package/dist/crypto/symmetric/node-aes-cbc-crypto.d.ts +36 -32
- package/dist/crypto/symmetric/node-aes-cbc-crypto.js +101 -95
- package/dist/examples/decrypt-test.d.ts +2 -2
- package/dist/examples/decrypt-test.js +78 -69
- package/dist/examples/encrypt-test.d.ts +5 -3
- package/dist/examples/encrypt-test.js +58 -55
- package/dist/handlers/decrypt-handler.d.ts +19 -5
- package/dist/handlers/encrypt-handler.d.ts +9 -3
- package/dist/handlers/encrypt-handler.js +93 -57
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/protocols/lit.d.ts +33 -9
- package/dist/protocols/lit.js +134 -98
- package/dist/test/cid-verification.spec.d.ts +2 -2
- package/dist/test/cid-verification.spec.js +341 -313
- package/dist/test/crypto-compatibility.spec.d.ts +2 -2
- package/dist/test/crypto-compatibility.spec.js +184 -120
- package/dist/test/crypto-counter-security.spec.d.ts +2 -2
- package/dist/test/crypto-counter-security.spec.js +177 -138
- package/dist/test/crypto-streaming.spec.d.ts +2 -2
- package/dist/test/crypto-streaming.spec.js +208 -126
- package/dist/test/encrypted-metadata.spec.d.ts +2 -2
- package/dist/test/encrypted-metadata.spec.js +89 -62
- package/dist/test/factories.spec.d.ts +2 -2
- package/dist/test/factories.spec.js +275 -139
- package/dist/test/file-metadata.spec.d.ts +2 -2
- package/dist/test/file-metadata.spec.js +472 -416
- package/dist/test/fixtures/test-fixtures.d.ts +25 -20
- package/dist/test/fixtures/test-fixtures.js +61 -53
- package/dist/test/helpers/test-file-utils.d.ts +19 -14
- package/dist/test/helpers/test-file-utils.js +78 -76
- package/dist/test/https-enforcement.spec.d.ts +2 -2
- package/dist/test/https-enforcement.spec.js +278 -124
- package/dist/test/kms-crypto-adapter.spec.d.ts +2 -2
- package/dist/test/kms-crypto-adapter.spec.js +473 -304
- package/dist/test/lit-crypto-adapter.spec.d.ts +2 -2
- package/dist/test/lit-crypto-adapter.spec.js +206 -118
- package/dist/test/memory-efficiency.spec.d.ts +2 -2
- package/dist/test/memory-efficiency.spec.js +100 -87
- package/dist/test/mocks/key-manager.d.ts +71 -38
- package/dist/test/mocks/key-manager.js +129 -113
- package/dist/test/node-crypto-adapter.spec.d.ts +2 -2
- package/dist/test/node-crypto-adapter.spec.js +155 -102
- package/dist/test/node-generic-crypto-adapter.spec.d.ts +2 -2
- package/dist/test/node-generic-crypto-adapter.spec.js +134 -94
- package/dist/test/setup.d.ts +2 -2
- package/dist/test/setup.js +8 -9
- package/dist/tsconfig.spec.tsbuildinfo +1 -1
- package/dist/types.d.ts +219 -181
- package/dist/utils/file-metadata.d.ts +19 -13
- package/dist/utils.d.ts +14 -5
- 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 {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
27
|
+
name: string
|
|
28
|
+
type: string
|
|
29
|
+
extension: string
|
|
30
|
+
metadata?: Record<string, unknown>
|
|
19
31
|
}
|
|
20
32
|
export interface DecryptionResult {
|
|
21
|
-
|
|
22
|
-
|
|
33
|
+
stream: ReadableStream
|
|
34
|
+
fileMetadata?: FileMetadata
|
|
23
35
|
}
|
|
24
36
|
export interface EncryptedClient {
|
|
25
|
-
|
|
26
|
-
|
|
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
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
48
|
+
storachaClient: StorachaClient
|
|
49
|
+
cryptoAdapter: CryptoAdapter
|
|
50
|
+
gatewayURL?: URL
|
|
51
|
+
}
|
|
33
52
|
export interface EncryptOutput {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
53
|
+
key: Uint8Array
|
|
54
|
+
iv: Uint8Array
|
|
55
|
+
encryptedStream: ReadableStream
|
|
37
56
|
}
|
|
38
57
|
export interface SymmetricCrypto {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
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
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
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
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
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
|
-
|
|
108
|
-
|
|
109
|
-
|
|
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
|
-
|
|
114
|
-
|
|
151
|
+
plaintextKeyHash: string
|
|
152
|
+
accessControlConditions: AccessControlConditions
|
|
115
153
|
}
|
|
116
154
|
export interface KMSKeyMetadata {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
155
|
+
space: SpaceDID
|
|
156
|
+
kms: {
|
|
157
|
+
provider: string
|
|
158
|
+
keyId: string
|
|
159
|
+
algorithm: string
|
|
160
|
+
}
|
|
123
161
|
}
|
|
124
162
|
export type EncryptionPayload = {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
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
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
170
|
+
encryptedDataCID: string
|
|
171
|
+
identityBoundCiphertext: string
|
|
172
|
+
plaintextKeyHash: string
|
|
173
|
+
accessControlConditions: AccessControlConditions
|
|
136
174
|
}
|
|
137
175
|
export interface LitMetadata {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
176
|
+
encryptedDataCID: UnknownLink
|
|
177
|
+
identityBoundCiphertext: Uint8Array
|
|
178
|
+
plaintextKeyHash: Uint8Array
|
|
179
|
+
accessControlConditions: AccessControlConditions
|
|
142
180
|
}
|
|
143
181
|
export interface LitMetadataView extends LitMetadata {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
182
|
+
/** Encode it to a CAR file. */
|
|
183
|
+
archiveBlock(): Promise<Block>
|
|
184
|
+
toJSON(): LitMetadataInput
|
|
147
185
|
}
|
|
148
186
|
export interface KMSMetadata {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
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
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
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
|
-
|
|
170
|
-
|
|
171
|
-
|
|
207
|
+
/** Encode it to a CAR file. */
|
|
208
|
+
archiveBlock(): Promise<Block>
|
|
209
|
+
toJSON(): KMSMetadataInput
|
|
172
210
|
}
|
|
173
211
|
export interface DecodeFailure extends Failure {
|
|
174
|
-
|
|
212
|
+
name: 'DecodeFailure'
|
|
175
213
|
}
|
|
176
214
|
export interface SessionSignatureOptions {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
215
|
+
wallet: Wallet
|
|
216
|
+
accessControlConditions: AccessControlConditions
|
|
217
|
+
dataToEncryptHash: string
|
|
218
|
+
expiration?: string
|
|
219
|
+
capabilityAuthSigs?: AuthSig[]
|
|
182
220
|
}
|
|
183
221
|
export interface PkpSessionSignatureOptions {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
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
|
-
|
|
193
|
-
|
|
230
|
+
pkpPublicKey: string
|
|
231
|
+
authMethod: AuthMethod
|
|
194
232
|
}
|
|
195
233
|
export interface LitWalletSigner {
|
|
196
|
-
|
|
234
|
+
wallet: Wallet
|
|
197
235
|
}
|
|
198
236
|
export interface CreateDecryptWrappedInvocationOptions {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
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
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
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
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
254
|
+
strategy: 'lit'
|
|
255
|
+
encryptedDataCID: string
|
|
256
|
+
identityBoundCiphertext: string
|
|
257
|
+
plaintextKeyHash: string
|
|
258
|
+
accessControlConditions: AccessControlConditions
|
|
221
259
|
}
|
|
222
260
|
export interface KMSExtractedMetadata {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
|
|
10
|
-
|
|
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({
|
|
14
|
-
|
|
15
|
-
|
|
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.
|
|
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/
|
|
84
|
-
"@storacha/client": "^1.
|
|
85
|
-
"@storacha/
|
|
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",
|