@cofhe/sdk 0.1.1 → 0.2.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/CHANGELOG.md +14 -0
- package/adapters/ethers6.ts +28 -28
- package/adapters/hardhat.ts +0 -1
- package/adapters/index.test.ts +14 -19
- package/adapters/smartWallet.ts +81 -73
- package/adapters/test-utils.ts +45 -45
- package/adapters/types.ts +3 -3
- package/chains/chains/localcofhe.ts +14 -0
- package/chains/chains.test.ts +2 -1
- package/chains/index.ts +3 -1
- package/core/baseBuilder.ts +30 -49
- package/core/client.test.ts +94 -77
- package/core/client.ts +133 -149
- package/core/clientTypes.ts +108 -0
- package/core/config.test.ts +22 -11
- package/core/config.ts +16 -9
- package/core/decrypt/decryptHandleBuilder.ts +51 -45
- package/core/decrypt/{tnSealOutput.ts → tnSealOutputV1.ts} +1 -1
- package/core/decrypt/tnSealOutputV2.ts +298 -0
- package/core/encrypt/cofheMocksZkVerifySign.ts +16 -10
- package/core/encrypt/encryptInputsBuilder.test.ts +132 -116
- package/core/encrypt/encryptInputsBuilder.ts +159 -111
- package/core/encrypt/encryptUtils.ts +6 -3
- package/core/encrypt/zkPackProveVerify.ts +70 -8
- package/core/error.ts +0 -2
- package/core/fetchKeys.test.ts +1 -18
- package/core/fetchKeys.ts +0 -26
- package/core/index.ts +29 -17
- package/core/keyStore.ts +65 -38
- package/core/permits.test.ts +253 -1
- package/core/permits.ts +80 -16
- package/core/types.ts +198 -152
- package/core/utils.ts +43 -1
- package/dist/adapters.d.cts +38 -20
- package/dist/adapters.d.ts +38 -20
- package/dist/chains.cjs +14 -1
- package/dist/chains.d.cts +23 -1
- package/dist/chains.d.ts +23 -1
- package/dist/chains.js +1 -1
- package/dist/{chunk-LU7BMUUT.js → chunk-UGBVZNRT.js} +39 -25
- package/dist/{chunk-GZCQQYVI.js → chunk-WEAZ25JO.js} +14 -2
- package/dist/{chunk-KFGPTJ6X.js → chunk-WGCRJCBR.js} +1920 -1692
- package/dist/{types-bB7wLj0q.d.cts → clientTypes-5_1nwtUe.d.cts} +308 -347
- package/dist/{types-PhwGgQvs.d.ts → clientTypes-Es7fyi65.d.ts} +308 -347
- package/dist/core.cjs +2872 -2632
- package/dist/core.d.cts +101 -6
- package/dist/core.d.ts +101 -6
- package/dist/core.js +3 -3
- package/dist/node.cjs +2716 -2520
- package/dist/node.d.cts +3 -3
- package/dist/node.d.ts +3 -3
- package/dist/node.js +4 -3
- package/dist/{permit-S9CnI6MF.d.cts → permit-fUSe6KKq.d.cts} +31 -15
- package/dist/{permit-S9CnI6MF.d.ts → permit-fUSe6KKq.d.ts} +31 -15
- package/dist/permits.cjs +39 -24
- package/dist/permits.d.cts +137 -148
- package/dist/permits.d.ts +137 -148
- package/dist/permits.js +1 -1
- package/dist/web.cjs +2929 -2518
- package/dist/web.d.cts +21 -5
- package/dist/web.d.ts +21 -5
- package/dist/web.js +185 -9
- package/dist/zkProve.worker.cjs +93 -0
- package/dist/zkProve.worker.d.cts +2 -0
- package/dist/zkProve.worker.d.ts +2 -0
- package/dist/zkProve.worker.js +91 -0
- package/node/client.test.ts +20 -25
- package/node/encryptInputs.test.ts +18 -38
- package/node/index.ts +1 -0
- package/package.json +14 -14
- package/permits/index.ts +1 -0
- package/permits/localstorage.test.ts +0 -1
- package/permits/permit.test.ts +25 -22
- package/permits/permit.ts +30 -21
- package/permits/sealing.test.ts +3 -3
- package/permits/sealing.ts +2 -2
- package/permits/store.ts +5 -7
- package/permits/test-utils.ts +1 -1
- package/permits/types.ts +17 -0
- package/permits/utils.ts +0 -1
- package/permits/validation.ts +24 -4
- package/web/client.web.test.ts +20 -25
- package/web/config.web.test.ts +0 -2
- package/web/encryptInputs.web.test.ts +31 -54
- package/web/index.ts +65 -1
- package/web/storage.ts +19 -5
- package/web/worker.builder.web.test.ts +148 -0
- package/web/worker.config.web.test.ts +329 -0
- package/web/worker.output.web.test.ts +84 -0
- package/web/workerManager.test.ts +80 -0
- package/web/workerManager.ts +214 -0
- package/web/workerManager.web.test.ts +114 -0
- package/web/zkProve.worker.ts +133 -0
- package/core/result.test.ts +0 -180
- package/core/result.ts +0 -67
- package/core/test-utils.ts +0 -45
package/dist/permits.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as Permit, V as ValidationResult, a as PermitSignaturePrimaryType, b as Permission, E as EIP712Types, c as EIP712Message, S as SerializedPermit } from './permit-
|
|
2
|
-
export { C as CreateSelfPermitOptions, d as CreateSharingPermitOptions, f as EIP712Domain, j as EIP712Type, i as EthEncryptedData,
|
|
1
|
+
import { P as Permit, V as ValidationResult, a as PermitSignaturePrimaryType, b as Permission, E as EIP712Types, c as EIP712Message, S as SerializedPermit } from './permit-fUSe6KKq.js';
|
|
2
|
+
export { C as CreateSelfPermitOptions, d as CreateSharingPermitOptions, f as EIP712Domain, j as EIP712Type, i as EthEncryptedData, o as Expand, G as GenerateSealingKey, I as ImportPermitOptions, I as ImportSharedPermitOptions, e as PermitMetadata, l as PermitOf, k as PermitType, g as PermitUtils, R as RecipientPermit, h as SealingKey, m as SelfPermit, C as SelfPermitOptions, n as SharingPermit, d as SharingPermitOptions } from './permit-fUSe6KKq.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import * as zustand_middleware from 'zustand/middleware';
|
|
5
5
|
import * as zustand_vanilla from 'zustand/vanilla';
|
|
@@ -10,18 +10,18 @@ import 'viem';
|
|
|
10
10
|
*/
|
|
11
11
|
declare const SelfPermitOptionsValidator: z.ZodEffects<z.ZodObject<{
|
|
12
12
|
type: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"self">>>;
|
|
13
|
-
issuer: z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>;
|
|
13
|
+
issuer: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>, `0x${string}`, string>;
|
|
14
14
|
name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
15
15
|
expiration: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
16
|
-
recipient: z.ZodEffects<z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodString>>, `0x${string}`, string | undefined>, "0x0000000000000000000000000000000000000000", string | undefined>;
|
|
16
|
+
recipient: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodString>>, `0x${string}`, string | undefined>, `0x${string}`, string | undefined>, "0x0000000000000000000000000000000000000000", string | undefined>;
|
|
17
17
|
validatorId: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
18
18
|
validatorContract: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodString>>, `0x${string}`, string | undefined>;
|
|
19
19
|
issuerSignature: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodString>>, `0x${string}`, string | undefined>;
|
|
20
20
|
recipientSignature: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodString>>, `0x${string}`, string | undefined>;
|
|
21
21
|
}, "strip", z.ZodTypeAny, {
|
|
22
22
|
recipient: "0x0000000000000000000000000000000000000000";
|
|
23
|
-
name: string;
|
|
24
23
|
type: "self";
|
|
24
|
+
name: string;
|
|
25
25
|
issuer: `0x${string}`;
|
|
26
26
|
expiration: number;
|
|
27
27
|
validatorId: number;
|
|
@@ -31,8 +31,8 @@ declare const SelfPermitOptionsValidator: z.ZodEffects<z.ZodObject<{
|
|
|
31
31
|
}, {
|
|
32
32
|
issuer: string;
|
|
33
33
|
recipient?: string | undefined;
|
|
34
|
-
name?: string | undefined;
|
|
35
34
|
type?: "self" | undefined;
|
|
35
|
+
name?: string | undefined;
|
|
36
36
|
expiration?: number | undefined;
|
|
37
37
|
validatorId?: number | undefined;
|
|
38
38
|
validatorContract?: string | undefined;
|
|
@@ -40,8 +40,8 @@ declare const SelfPermitOptionsValidator: z.ZodEffects<z.ZodObject<{
|
|
|
40
40
|
recipientSignature?: string | undefined;
|
|
41
41
|
}>, {
|
|
42
42
|
recipient: "0x0000000000000000000000000000000000000000";
|
|
43
|
-
name: string;
|
|
44
43
|
type: "self";
|
|
44
|
+
name: string;
|
|
45
45
|
issuer: `0x${string}`;
|
|
46
46
|
expiration: number;
|
|
47
47
|
validatorId: number;
|
|
@@ -51,8 +51,8 @@ declare const SelfPermitOptionsValidator: z.ZodEffects<z.ZodObject<{
|
|
|
51
51
|
}, {
|
|
52
52
|
issuer: string;
|
|
53
53
|
recipient?: string | undefined;
|
|
54
|
-
name?: string | undefined;
|
|
55
54
|
type?: "self" | undefined;
|
|
55
|
+
name?: string | undefined;
|
|
56
56
|
expiration?: number | undefined;
|
|
57
57
|
validatorId?: number | undefined;
|
|
58
58
|
validatorContract?: string | undefined;
|
|
@@ -85,8 +85,8 @@ declare const SelfPermitValidator: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodE
|
|
|
85
85
|
}>>;
|
|
86
86
|
}, "strip", z.ZodTypeAny, {
|
|
87
87
|
recipient: `0x${string}`;
|
|
88
|
-
name: string;
|
|
89
88
|
type: "self" | "sharing" | "recipient";
|
|
89
|
+
name: string;
|
|
90
90
|
issuer: `0x${string}`;
|
|
91
91
|
expiration: number;
|
|
92
92
|
validatorId: number;
|
|
@@ -101,20 +101,20 @@ declare const SelfPermitValidator: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodE
|
|
|
101
101
|
type: "self" | "sharing" | "recipient";
|
|
102
102
|
issuer: string;
|
|
103
103
|
recipient?: string | undefined;
|
|
104
|
-
sealingPair?: {
|
|
105
|
-
privateKey: string;
|
|
106
|
-
publicKey: string;
|
|
107
|
-
} | undefined;
|
|
108
104
|
name?: string | undefined;
|
|
109
105
|
expiration?: number | undefined;
|
|
110
106
|
validatorId?: number | undefined;
|
|
111
107
|
validatorContract?: string | undefined;
|
|
108
|
+
sealingPair?: {
|
|
109
|
+
privateKey: string;
|
|
110
|
+
publicKey: string;
|
|
111
|
+
} | undefined;
|
|
112
112
|
issuerSignature?: string | undefined;
|
|
113
113
|
recipientSignature?: string | undefined;
|
|
114
114
|
}>, {
|
|
115
115
|
recipient: `0x${string}`;
|
|
116
|
-
name: string;
|
|
117
116
|
type: "self" | "sharing" | "recipient";
|
|
117
|
+
name: string;
|
|
118
118
|
issuer: `0x${string}`;
|
|
119
119
|
expiration: number;
|
|
120
120
|
validatorId: number;
|
|
@@ -129,20 +129,20 @@ declare const SelfPermitValidator: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodE
|
|
|
129
129
|
type: "self" | "sharing" | "recipient";
|
|
130
130
|
issuer: string;
|
|
131
131
|
recipient?: string | undefined;
|
|
132
|
-
sealingPair?: {
|
|
133
|
-
privateKey: string;
|
|
134
|
-
publicKey: string;
|
|
135
|
-
} | undefined;
|
|
136
132
|
name?: string | undefined;
|
|
137
133
|
expiration?: number | undefined;
|
|
138
134
|
validatorId?: number | undefined;
|
|
139
135
|
validatorContract?: string | undefined;
|
|
136
|
+
sealingPair?: {
|
|
137
|
+
privateKey: string;
|
|
138
|
+
publicKey: string;
|
|
139
|
+
} | undefined;
|
|
140
140
|
issuerSignature?: string | undefined;
|
|
141
141
|
recipientSignature?: string | undefined;
|
|
142
142
|
}>, {
|
|
143
143
|
recipient: `0x${string}`;
|
|
144
|
-
name: string;
|
|
145
144
|
type: "self" | "sharing" | "recipient";
|
|
145
|
+
name: string;
|
|
146
146
|
issuer: `0x${string}`;
|
|
147
147
|
expiration: number;
|
|
148
148
|
validatorId: number;
|
|
@@ -157,20 +157,20 @@ declare const SelfPermitValidator: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodE
|
|
|
157
157
|
type: "self" | "sharing" | "recipient";
|
|
158
158
|
issuer: string;
|
|
159
159
|
recipient?: string | undefined;
|
|
160
|
-
sealingPair?: {
|
|
161
|
-
privateKey: string;
|
|
162
|
-
publicKey: string;
|
|
163
|
-
} | undefined;
|
|
164
160
|
name?: string | undefined;
|
|
165
161
|
expiration?: number | undefined;
|
|
166
162
|
validatorId?: number | undefined;
|
|
167
163
|
validatorContract?: string | undefined;
|
|
164
|
+
sealingPair?: {
|
|
165
|
+
privateKey: string;
|
|
166
|
+
publicKey: string;
|
|
167
|
+
} | undefined;
|
|
168
168
|
issuerSignature?: string | undefined;
|
|
169
169
|
recipientSignature?: string | undefined;
|
|
170
170
|
}>, {
|
|
171
171
|
recipient: `0x${string}`;
|
|
172
|
-
name: string;
|
|
173
172
|
type: "self" | "sharing" | "recipient";
|
|
173
|
+
name: string;
|
|
174
174
|
issuer: `0x${string}`;
|
|
175
175
|
expiration: number;
|
|
176
176
|
validatorId: number;
|
|
@@ -185,20 +185,20 @@ declare const SelfPermitValidator: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodE
|
|
|
185
185
|
type: "self" | "sharing" | "recipient";
|
|
186
186
|
issuer: string;
|
|
187
187
|
recipient?: string | undefined;
|
|
188
|
-
sealingPair?: {
|
|
189
|
-
privateKey: string;
|
|
190
|
-
publicKey: string;
|
|
191
|
-
} | undefined;
|
|
192
188
|
name?: string | undefined;
|
|
193
189
|
expiration?: number | undefined;
|
|
194
190
|
validatorId?: number | undefined;
|
|
195
191
|
validatorContract?: string | undefined;
|
|
192
|
+
sealingPair?: {
|
|
193
|
+
privateKey: string;
|
|
194
|
+
publicKey: string;
|
|
195
|
+
} | undefined;
|
|
196
196
|
issuerSignature?: string | undefined;
|
|
197
197
|
recipientSignature?: string | undefined;
|
|
198
198
|
}>, {
|
|
199
199
|
recipient: `0x${string}`;
|
|
200
|
-
name: string;
|
|
201
200
|
type: "self" | "sharing" | "recipient";
|
|
201
|
+
name: string;
|
|
202
202
|
issuer: `0x${string}`;
|
|
203
203
|
expiration: number;
|
|
204
204
|
validatorId: number;
|
|
@@ -213,20 +213,20 @@ declare const SelfPermitValidator: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodE
|
|
|
213
213
|
type: "self" | "sharing" | "recipient";
|
|
214
214
|
issuer: string;
|
|
215
215
|
recipient?: string | undefined;
|
|
216
|
-
sealingPair?: {
|
|
217
|
-
privateKey: string;
|
|
218
|
-
publicKey: string;
|
|
219
|
-
} | undefined;
|
|
220
216
|
name?: string | undefined;
|
|
221
217
|
expiration?: number | undefined;
|
|
222
218
|
validatorId?: number | undefined;
|
|
223
219
|
validatorContract?: string | undefined;
|
|
220
|
+
sealingPair?: {
|
|
221
|
+
privateKey: string;
|
|
222
|
+
publicKey: string;
|
|
223
|
+
} | undefined;
|
|
224
224
|
issuerSignature?: string | undefined;
|
|
225
225
|
recipientSignature?: string | undefined;
|
|
226
226
|
}>, {
|
|
227
227
|
recipient: `0x${string}`;
|
|
228
|
-
name: string;
|
|
229
228
|
type: "self" | "sharing" | "recipient";
|
|
229
|
+
name: string;
|
|
230
230
|
issuer: `0x${string}`;
|
|
231
231
|
expiration: number;
|
|
232
232
|
validatorId: number;
|
|
@@ -241,14 +241,14 @@ declare const SelfPermitValidator: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodE
|
|
|
241
241
|
type: "self" | "sharing" | "recipient";
|
|
242
242
|
issuer: string;
|
|
243
243
|
recipient?: string | undefined;
|
|
244
|
-
sealingPair?: {
|
|
245
|
-
privateKey: string;
|
|
246
|
-
publicKey: string;
|
|
247
|
-
} | undefined;
|
|
248
244
|
name?: string | undefined;
|
|
249
245
|
expiration?: number | undefined;
|
|
250
246
|
validatorId?: number | undefined;
|
|
251
247
|
validatorContract?: string | undefined;
|
|
248
|
+
sealingPair?: {
|
|
249
|
+
privateKey: string;
|
|
250
|
+
publicKey: string;
|
|
251
|
+
} | undefined;
|
|
252
252
|
issuerSignature?: string | undefined;
|
|
253
253
|
recipientSignature?: string | undefined;
|
|
254
254
|
}>;
|
|
@@ -257,8 +257,8 @@ declare const SelfPermitValidator: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodE
|
|
|
257
257
|
*/
|
|
258
258
|
declare const SharingPermitOptionsValidator: z.ZodEffects<z.ZodObject<{
|
|
259
259
|
type: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"sharing">>>;
|
|
260
|
-
issuer: z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>;
|
|
261
|
-
recipient: z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>;
|
|
260
|
+
issuer: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>, `0x${string}`, string>;
|
|
261
|
+
recipient: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>, `0x${string}`, string>;
|
|
262
262
|
name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
263
263
|
expiration: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
264
264
|
validatorId: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
@@ -267,8 +267,8 @@ declare const SharingPermitOptionsValidator: z.ZodEffects<z.ZodObject<{
|
|
|
267
267
|
recipientSignature: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodString>>, `0x${string}`, string | undefined>;
|
|
268
268
|
}, "strip", z.ZodTypeAny, {
|
|
269
269
|
recipient: `0x${string}`;
|
|
270
|
-
name: string;
|
|
271
270
|
type: "sharing";
|
|
271
|
+
name: string;
|
|
272
272
|
issuer: `0x${string}`;
|
|
273
273
|
expiration: number;
|
|
274
274
|
validatorId: number;
|
|
@@ -278,8 +278,8 @@ declare const SharingPermitOptionsValidator: z.ZodEffects<z.ZodObject<{
|
|
|
278
278
|
}, {
|
|
279
279
|
recipient: string;
|
|
280
280
|
issuer: string;
|
|
281
|
-
name?: string | undefined;
|
|
282
281
|
type?: "sharing" | undefined;
|
|
282
|
+
name?: string | undefined;
|
|
283
283
|
expiration?: number | undefined;
|
|
284
284
|
validatorId?: number | undefined;
|
|
285
285
|
validatorContract?: string | undefined;
|
|
@@ -287,8 +287,8 @@ declare const SharingPermitOptionsValidator: z.ZodEffects<z.ZodObject<{
|
|
|
287
287
|
recipientSignature?: string | undefined;
|
|
288
288
|
}>, {
|
|
289
289
|
recipient: `0x${string}`;
|
|
290
|
-
name: string;
|
|
291
290
|
type: "sharing";
|
|
291
|
+
name: string;
|
|
292
292
|
issuer: `0x${string}`;
|
|
293
293
|
expiration: number;
|
|
294
294
|
validatorId: number;
|
|
@@ -298,8 +298,8 @@ declare const SharingPermitOptionsValidator: z.ZodEffects<z.ZodObject<{
|
|
|
298
298
|
}, {
|
|
299
299
|
recipient: string;
|
|
300
300
|
issuer: string;
|
|
301
|
-
name?: string | undefined;
|
|
302
301
|
type?: "sharing" | undefined;
|
|
302
|
+
name?: string | undefined;
|
|
303
303
|
expiration?: number | undefined;
|
|
304
304
|
validatorId?: number | undefined;
|
|
305
305
|
validatorContract?: string | undefined;
|
|
@@ -332,8 +332,8 @@ declare const SharingPermitValidator: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.Z
|
|
|
332
332
|
}>>;
|
|
333
333
|
}, "strip", z.ZodTypeAny, {
|
|
334
334
|
recipient: `0x${string}`;
|
|
335
|
-
name: string;
|
|
336
335
|
type: "self" | "sharing" | "recipient";
|
|
336
|
+
name: string;
|
|
337
337
|
issuer: `0x${string}`;
|
|
338
338
|
expiration: number;
|
|
339
339
|
validatorId: number;
|
|
@@ -348,20 +348,20 @@ declare const SharingPermitValidator: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.Z
|
|
|
348
348
|
type: "self" | "sharing" | "recipient";
|
|
349
349
|
issuer: string;
|
|
350
350
|
recipient?: string | undefined;
|
|
351
|
-
sealingPair?: {
|
|
352
|
-
privateKey: string;
|
|
353
|
-
publicKey: string;
|
|
354
|
-
} | undefined;
|
|
355
351
|
name?: string | undefined;
|
|
356
352
|
expiration?: number | undefined;
|
|
357
353
|
validatorId?: number | undefined;
|
|
358
354
|
validatorContract?: string | undefined;
|
|
355
|
+
sealingPair?: {
|
|
356
|
+
privateKey: string;
|
|
357
|
+
publicKey: string;
|
|
358
|
+
} | undefined;
|
|
359
359
|
issuerSignature?: string | undefined;
|
|
360
360
|
recipientSignature?: string | undefined;
|
|
361
361
|
}>, {
|
|
362
362
|
recipient: `0x${string}`;
|
|
363
|
-
name: string;
|
|
364
363
|
type: "self" | "sharing" | "recipient";
|
|
364
|
+
name: string;
|
|
365
365
|
issuer: `0x${string}`;
|
|
366
366
|
expiration: number;
|
|
367
367
|
validatorId: number;
|
|
@@ -376,20 +376,20 @@ declare const SharingPermitValidator: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.Z
|
|
|
376
376
|
type: "self" | "sharing" | "recipient";
|
|
377
377
|
issuer: string;
|
|
378
378
|
recipient?: string | undefined;
|
|
379
|
-
sealingPair?: {
|
|
380
|
-
privateKey: string;
|
|
381
|
-
publicKey: string;
|
|
382
|
-
} | undefined;
|
|
383
379
|
name?: string | undefined;
|
|
384
380
|
expiration?: number | undefined;
|
|
385
381
|
validatorId?: number | undefined;
|
|
386
382
|
validatorContract?: string | undefined;
|
|
383
|
+
sealingPair?: {
|
|
384
|
+
privateKey: string;
|
|
385
|
+
publicKey: string;
|
|
386
|
+
} | undefined;
|
|
387
387
|
issuerSignature?: string | undefined;
|
|
388
388
|
recipientSignature?: string | undefined;
|
|
389
389
|
}>, {
|
|
390
390
|
recipient: `0x${string}`;
|
|
391
|
-
name: string;
|
|
392
391
|
type: "self" | "sharing" | "recipient";
|
|
392
|
+
name: string;
|
|
393
393
|
issuer: `0x${string}`;
|
|
394
394
|
expiration: number;
|
|
395
395
|
validatorId: number;
|
|
@@ -404,20 +404,20 @@ declare const SharingPermitValidator: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.Z
|
|
|
404
404
|
type: "self" | "sharing" | "recipient";
|
|
405
405
|
issuer: string;
|
|
406
406
|
recipient?: string | undefined;
|
|
407
|
-
sealingPair?: {
|
|
408
|
-
privateKey: string;
|
|
409
|
-
publicKey: string;
|
|
410
|
-
} | undefined;
|
|
411
407
|
name?: string | undefined;
|
|
412
408
|
expiration?: number | undefined;
|
|
413
409
|
validatorId?: number | undefined;
|
|
414
410
|
validatorContract?: string | undefined;
|
|
411
|
+
sealingPair?: {
|
|
412
|
+
privateKey: string;
|
|
413
|
+
publicKey: string;
|
|
414
|
+
} | undefined;
|
|
415
415
|
issuerSignature?: string | undefined;
|
|
416
416
|
recipientSignature?: string | undefined;
|
|
417
417
|
}>, {
|
|
418
418
|
recipient: `0x${string}`;
|
|
419
|
-
name: string;
|
|
420
419
|
type: "self" | "sharing" | "recipient";
|
|
420
|
+
name: string;
|
|
421
421
|
issuer: `0x${string}`;
|
|
422
422
|
expiration: number;
|
|
423
423
|
validatorId: number;
|
|
@@ -432,20 +432,20 @@ declare const SharingPermitValidator: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.Z
|
|
|
432
432
|
type: "self" | "sharing" | "recipient";
|
|
433
433
|
issuer: string;
|
|
434
434
|
recipient?: string | undefined;
|
|
435
|
-
sealingPair?: {
|
|
436
|
-
privateKey: string;
|
|
437
|
-
publicKey: string;
|
|
438
|
-
} | undefined;
|
|
439
435
|
name?: string | undefined;
|
|
440
436
|
expiration?: number | undefined;
|
|
441
437
|
validatorId?: number | undefined;
|
|
442
438
|
validatorContract?: string | undefined;
|
|
439
|
+
sealingPair?: {
|
|
440
|
+
privateKey: string;
|
|
441
|
+
publicKey: string;
|
|
442
|
+
} | undefined;
|
|
443
443
|
issuerSignature?: string | undefined;
|
|
444
444
|
recipientSignature?: string | undefined;
|
|
445
445
|
}>, {
|
|
446
446
|
recipient: `0x${string}`;
|
|
447
|
-
name: string;
|
|
448
447
|
type: "self" | "sharing" | "recipient";
|
|
448
|
+
name: string;
|
|
449
449
|
issuer: `0x${string}`;
|
|
450
450
|
expiration: number;
|
|
451
451
|
validatorId: number;
|
|
@@ -460,20 +460,20 @@ declare const SharingPermitValidator: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.Z
|
|
|
460
460
|
type: "self" | "sharing" | "recipient";
|
|
461
461
|
issuer: string;
|
|
462
462
|
recipient?: string | undefined;
|
|
463
|
-
sealingPair?: {
|
|
464
|
-
privateKey: string;
|
|
465
|
-
publicKey: string;
|
|
466
|
-
} | undefined;
|
|
467
463
|
name?: string | undefined;
|
|
468
464
|
expiration?: number | undefined;
|
|
469
465
|
validatorId?: number | undefined;
|
|
470
466
|
validatorContract?: string | undefined;
|
|
467
|
+
sealingPair?: {
|
|
468
|
+
privateKey: string;
|
|
469
|
+
publicKey: string;
|
|
470
|
+
} | undefined;
|
|
471
471
|
issuerSignature?: string | undefined;
|
|
472
472
|
recipientSignature?: string | undefined;
|
|
473
473
|
}>, {
|
|
474
474
|
recipient: `0x${string}`;
|
|
475
|
-
name: string;
|
|
476
475
|
type: "self" | "sharing" | "recipient";
|
|
476
|
+
name: string;
|
|
477
477
|
issuer: `0x${string}`;
|
|
478
478
|
expiration: number;
|
|
479
479
|
validatorId: number;
|
|
@@ -488,14 +488,14 @@ declare const SharingPermitValidator: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.Z
|
|
|
488
488
|
type: "self" | "sharing" | "recipient";
|
|
489
489
|
issuer: string;
|
|
490
490
|
recipient?: string | undefined;
|
|
491
|
-
sealingPair?: {
|
|
492
|
-
privateKey: string;
|
|
493
|
-
publicKey: string;
|
|
494
|
-
} | undefined;
|
|
495
491
|
name?: string | undefined;
|
|
496
492
|
expiration?: number | undefined;
|
|
497
493
|
validatorId?: number | undefined;
|
|
498
494
|
validatorContract?: string | undefined;
|
|
495
|
+
sealingPair?: {
|
|
496
|
+
privateKey: string;
|
|
497
|
+
publicKey: string;
|
|
498
|
+
} | undefined;
|
|
499
499
|
issuerSignature?: string | undefined;
|
|
500
500
|
recipientSignature?: string | undefined;
|
|
501
501
|
}>;
|
|
@@ -504,8 +504,8 @@ declare const SharingPermitValidator: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.Z
|
|
|
504
504
|
*/
|
|
505
505
|
declare const ImportPermitOptionsValidator: z.ZodEffects<z.ZodObject<{
|
|
506
506
|
type: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"recipient">>>;
|
|
507
|
-
issuer: z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>;
|
|
508
|
-
recipient: z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>;
|
|
507
|
+
issuer: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>, `0x${string}`, string>;
|
|
508
|
+
recipient: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>, `0x${string}`, string>;
|
|
509
509
|
issuerSignature: z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>;
|
|
510
510
|
name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
511
511
|
expiration: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
@@ -514,8 +514,8 @@ declare const ImportPermitOptionsValidator: z.ZodEffects<z.ZodObject<{
|
|
|
514
514
|
recipientSignature: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodString>>, `0x${string}`, string | undefined>;
|
|
515
515
|
}, "strip", z.ZodTypeAny, {
|
|
516
516
|
recipient: `0x${string}`;
|
|
517
|
-
name: string;
|
|
518
517
|
type: "recipient";
|
|
518
|
+
name: string;
|
|
519
519
|
issuer: `0x${string}`;
|
|
520
520
|
expiration: number;
|
|
521
521
|
validatorId: number;
|
|
@@ -526,16 +526,16 @@ declare const ImportPermitOptionsValidator: z.ZodEffects<z.ZodObject<{
|
|
|
526
526
|
recipient: string;
|
|
527
527
|
issuer: string;
|
|
528
528
|
issuerSignature: string;
|
|
529
|
-
name?: string | undefined;
|
|
530
529
|
type?: "recipient" | undefined;
|
|
530
|
+
name?: string | undefined;
|
|
531
531
|
expiration?: number | undefined;
|
|
532
532
|
validatorId?: number | undefined;
|
|
533
533
|
validatorContract?: string | undefined;
|
|
534
534
|
recipientSignature?: string | undefined;
|
|
535
535
|
}>, {
|
|
536
536
|
recipient: `0x${string}`;
|
|
537
|
-
name: string;
|
|
538
537
|
type: "recipient";
|
|
538
|
+
name: string;
|
|
539
539
|
issuer: `0x${string}`;
|
|
540
540
|
expiration: number;
|
|
541
541
|
validatorId: number;
|
|
@@ -546,8 +546,8 @@ declare const ImportPermitOptionsValidator: z.ZodEffects<z.ZodObject<{
|
|
|
546
546
|
recipient: string;
|
|
547
547
|
issuer: string;
|
|
548
548
|
issuerSignature: string;
|
|
549
|
-
name?: string | undefined;
|
|
550
549
|
type?: "recipient" | undefined;
|
|
550
|
+
name?: string | undefined;
|
|
551
551
|
expiration?: number | undefined;
|
|
552
552
|
validatorId?: number | undefined;
|
|
553
553
|
validatorContract?: string | undefined;
|
|
@@ -579,8 +579,8 @@ declare const ImportPermitValidator: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.Zo
|
|
|
579
579
|
}>>;
|
|
580
580
|
}, "strip", z.ZodTypeAny, {
|
|
581
581
|
recipient: `0x${string}`;
|
|
582
|
-
name: string;
|
|
583
582
|
type: "self" | "sharing" | "recipient";
|
|
583
|
+
name: string;
|
|
584
584
|
issuer: `0x${string}`;
|
|
585
585
|
expiration: number;
|
|
586
586
|
validatorId: number;
|
|
@@ -595,20 +595,20 @@ declare const ImportPermitValidator: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.Zo
|
|
|
595
595
|
type: "self" | "sharing" | "recipient";
|
|
596
596
|
issuer: string;
|
|
597
597
|
recipient?: string | undefined;
|
|
598
|
-
sealingPair?: {
|
|
599
|
-
privateKey: string;
|
|
600
|
-
publicKey: string;
|
|
601
|
-
} | undefined;
|
|
602
598
|
name?: string | undefined;
|
|
603
599
|
expiration?: number | undefined;
|
|
604
600
|
validatorId?: number | undefined;
|
|
605
601
|
validatorContract?: string | undefined;
|
|
602
|
+
sealingPair?: {
|
|
603
|
+
privateKey: string;
|
|
604
|
+
publicKey: string;
|
|
605
|
+
} | undefined;
|
|
606
606
|
issuerSignature?: string | undefined;
|
|
607
607
|
recipientSignature?: string | undefined;
|
|
608
608
|
}>, {
|
|
609
609
|
recipient: `0x${string}`;
|
|
610
|
-
name: string;
|
|
611
610
|
type: "self" | "sharing" | "recipient";
|
|
611
|
+
name: string;
|
|
612
612
|
issuer: `0x${string}`;
|
|
613
613
|
expiration: number;
|
|
614
614
|
validatorId: number;
|
|
@@ -623,20 +623,20 @@ declare const ImportPermitValidator: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.Zo
|
|
|
623
623
|
type: "self" | "sharing" | "recipient";
|
|
624
624
|
issuer: string;
|
|
625
625
|
recipient?: string | undefined;
|
|
626
|
-
sealingPair?: {
|
|
627
|
-
privateKey: string;
|
|
628
|
-
publicKey: string;
|
|
629
|
-
} | undefined;
|
|
630
626
|
name?: string | undefined;
|
|
631
627
|
expiration?: number | undefined;
|
|
632
628
|
validatorId?: number | undefined;
|
|
633
629
|
validatorContract?: string | undefined;
|
|
630
|
+
sealingPair?: {
|
|
631
|
+
privateKey: string;
|
|
632
|
+
publicKey: string;
|
|
633
|
+
} | undefined;
|
|
634
634
|
issuerSignature?: string | undefined;
|
|
635
635
|
recipientSignature?: string | undefined;
|
|
636
636
|
}>, {
|
|
637
637
|
recipient: `0x${string}`;
|
|
638
|
-
name: string;
|
|
639
638
|
type: "self" | "sharing" | "recipient";
|
|
639
|
+
name: string;
|
|
640
640
|
issuer: `0x${string}`;
|
|
641
641
|
expiration: number;
|
|
642
642
|
validatorId: number;
|
|
@@ -651,20 +651,20 @@ declare const ImportPermitValidator: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.Zo
|
|
|
651
651
|
type: "self" | "sharing" | "recipient";
|
|
652
652
|
issuer: string;
|
|
653
653
|
recipient?: string | undefined;
|
|
654
|
-
sealingPair?: {
|
|
655
|
-
privateKey: string;
|
|
656
|
-
publicKey: string;
|
|
657
|
-
} | undefined;
|
|
658
654
|
name?: string | undefined;
|
|
659
655
|
expiration?: number | undefined;
|
|
660
656
|
validatorId?: number | undefined;
|
|
661
657
|
validatorContract?: string | undefined;
|
|
658
|
+
sealingPair?: {
|
|
659
|
+
privateKey: string;
|
|
660
|
+
publicKey: string;
|
|
661
|
+
} | undefined;
|
|
662
662
|
issuerSignature?: string | undefined;
|
|
663
663
|
recipientSignature?: string | undefined;
|
|
664
664
|
}>, {
|
|
665
665
|
recipient: `0x${string}`;
|
|
666
|
-
name: string;
|
|
667
666
|
type: "self" | "sharing" | "recipient";
|
|
667
|
+
name: string;
|
|
668
668
|
issuer: `0x${string}`;
|
|
669
669
|
expiration: number;
|
|
670
670
|
validatorId: number;
|
|
@@ -679,20 +679,20 @@ declare const ImportPermitValidator: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.Zo
|
|
|
679
679
|
type: "self" | "sharing" | "recipient";
|
|
680
680
|
issuer: string;
|
|
681
681
|
recipient?: string | undefined;
|
|
682
|
-
sealingPair?: {
|
|
683
|
-
privateKey: string;
|
|
684
|
-
publicKey: string;
|
|
685
|
-
} | undefined;
|
|
686
682
|
name?: string | undefined;
|
|
687
683
|
expiration?: number | undefined;
|
|
688
684
|
validatorId?: number | undefined;
|
|
689
685
|
validatorContract?: string | undefined;
|
|
686
|
+
sealingPair?: {
|
|
687
|
+
privateKey: string;
|
|
688
|
+
publicKey: string;
|
|
689
|
+
} | undefined;
|
|
690
690
|
issuerSignature?: string | undefined;
|
|
691
691
|
recipientSignature?: string | undefined;
|
|
692
692
|
}>, {
|
|
693
693
|
recipient: `0x${string}`;
|
|
694
|
-
name: string;
|
|
695
694
|
type: "self" | "sharing" | "recipient";
|
|
695
|
+
name: string;
|
|
696
696
|
issuer: `0x${string}`;
|
|
697
697
|
expiration: number;
|
|
698
698
|
validatorId: number;
|
|
@@ -707,20 +707,20 @@ declare const ImportPermitValidator: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.Zo
|
|
|
707
707
|
type: "self" | "sharing" | "recipient";
|
|
708
708
|
issuer: string;
|
|
709
709
|
recipient?: string | undefined;
|
|
710
|
-
sealingPair?: {
|
|
711
|
-
privateKey: string;
|
|
712
|
-
publicKey: string;
|
|
713
|
-
} | undefined;
|
|
714
710
|
name?: string | undefined;
|
|
715
711
|
expiration?: number | undefined;
|
|
716
712
|
validatorId?: number | undefined;
|
|
717
713
|
validatorContract?: string | undefined;
|
|
714
|
+
sealingPair?: {
|
|
715
|
+
privateKey: string;
|
|
716
|
+
publicKey: string;
|
|
717
|
+
} | undefined;
|
|
718
718
|
issuerSignature?: string | undefined;
|
|
719
719
|
recipientSignature?: string | undefined;
|
|
720
720
|
}>, {
|
|
721
721
|
recipient: `0x${string}`;
|
|
722
|
-
name: string;
|
|
723
722
|
type: "self" | "sharing" | "recipient";
|
|
723
|
+
name: string;
|
|
724
724
|
issuer: `0x${string}`;
|
|
725
725
|
expiration: number;
|
|
726
726
|
validatorId: number;
|
|
@@ -735,14 +735,14 @@ declare const ImportPermitValidator: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.Zo
|
|
|
735
735
|
type: "self" | "sharing" | "recipient";
|
|
736
736
|
issuer: string;
|
|
737
737
|
recipient?: string | undefined;
|
|
738
|
-
sealingPair?: {
|
|
739
|
-
privateKey: string;
|
|
740
|
-
publicKey: string;
|
|
741
|
-
} | undefined;
|
|
742
738
|
name?: string | undefined;
|
|
743
739
|
expiration?: number | undefined;
|
|
744
740
|
validatorId?: number | undefined;
|
|
745
741
|
validatorContract?: string | undefined;
|
|
742
|
+
sealingPair?: {
|
|
743
|
+
privateKey: string;
|
|
744
|
+
publicKey: string;
|
|
745
|
+
} | undefined;
|
|
746
746
|
issuerSignature?: string | undefined;
|
|
747
747
|
recipientSignature?: string | undefined;
|
|
748
748
|
}>;
|
|
@@ -752,8 +752,8 @@ declare const ImportPermitValidator: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.Zo
|
|
|
752
752
|
declare const validateSelfPermitOptions: (options: any) => z.SafeParseReturnType<{
|
|
753
753
|
issuer: string;
|
|
754
754
|
recipient?: string | undefined;
|
|
755
|
-
name?: string | undefined;
|
|
756
755
|
type?: "self" | undefined;
|
|
756
|
+
name?: string | undefined;
|
|
757
757
|
expiration?: number | undefined;
|
|
758
758
|
validatorId?: number | undefined;
|
|
759
759
|
validatorContract?: string | undefined;
|
|
@@ -761,8 +761,8 @@ declare const validateSelfPermitOptions: (options: any) => z.SafeParseReturnType
|
|
|
761
761
|
recipientSignature?: string | undefined;
|
|
762
762
|
}, {
|
|
763
763
|
recipient: "0x0000000000000000000000000000000000000000";
|
|
764
|
-
name: string;
|
|
765
764
|
type: "self";
|
|
765
|
+
name: string;
|
|
766
766
|
issuer: `0x${string}`;
|
|
767
767
|
expiration: number;
|
|
768
768
|
validatorId: number;
|
|
@@ -776,8 +776,8 @@ declare const validateSelfPermitOptions: (options: any) => z.SafeParseReturnType
|
|
|
776
776
|
declare const validateSharingPermitOptions: (options: any) => z.SafeParseReturnType<{
|
|
777
777
|
recipient: string;
|
|
778
778
|
issuer: string;
|
|
779
|
-
name?: string | undefined;
|
|
780
779
|
type?: "sharing" | undefined;
|
|
780
|
+
name?: string | undefined;
|
|
781
781
|
expiration?: number | undefined;
|
|
782
782
|
validatorId?: number | undefined;
|
|
783
783
|
validatorContract?: string | undefined;
|
|
@@ -785,8 +785,8 @@ declare const validateSharingPermitOptions: (options: any) => z.SafeParseReturnT
|
|
|
785
785
|
recipientSignature?: string | undefined;
|
|
786
786
|
}, {
|
|
787
787
|
recipient: `0x${string}`;
|
|
788
|
-
name: string;
|
|
789
788
|
type: "sharing";
|
|
789
|
+
name: string;
|
|
790
790
|
issuer: `0x${string}`;
|
|
791
791
|
expiration: number;
|
|
792
792
|
validatorId: number;
|
|
@@ -801,16 +801,16 @@ declare const validateImportPermitOptions: (options: any) => z.SafeParseReturnTy
|
|
|
801
801
|
recipient: string;
|
|
802
802
|
issuer: string;
|
|
803
803
|
issuerSignature: string;
|
|
804
|
-
name?: string | undefined;
|
|
805
804
|
type?: "recipient" | undefined;
|
|
805
|
+
name?: string | undefined;
|
|
806
806
|
expiration?: number | undefined;
|
|
807
807
|
validatorId?: number | undefined;
|
|
808
808
|
validatorContract?: string | undefined;
|
|
809
809
|
recipientSignature?: string | undefined;
|
|
810
810
|
}, {
|
|
811
811
|
recipient: `0x${string}`;
|
|
812
|
-
name: string;
|
|
813
812
|
type: "recipient";
|
|
813
|
+
name: string;
|
|
814
814
|
issuer: `0x${string}`;
|
|
815
815
|
expiration: number;
|
|
816
816
|
validatorId: number;
|
|
@@ -825,20 +825,20 @@ declare const validateSelfPermit: (permit: any) => z.SafeParseReturnType<{
|
|
|
825
825
|
type: "self" | "sharing" | "recipient";
|
|
826
826
|
issuer: string;
|
|
827
827
|
recipient?: string | undefined;
|
|
828
|
-
sealingPair?: {
|
|
829
|
-
privateKey: string;
|
|
830
|
-
publicKey: string;
|
|
831
|
-
} | undefined;
|
|
832
828
|
name?: string | undefined;
|
|
833
829
|
expiration?: number | undefined;
|
|
834
830
|
validatorId?: number | undefined;
|
|
835
831
|
validatorContract?: string | undefined;
|
|
832
|
+
sealingPair?: {
|
|
833
|
+
privateKey: string;
|
|
834
|
+
publicKey: string;
|
|
835
|
+
} | undefined;
|
|
836
836
|
issuerSignature?: string | undefined;
|
|
837
837
|
recipientSignature?: string | undefined;
|
|
838
838
|
}, {
|
|
839
839
|
recipient: `0x${string}`;
|
|
840
|
-
name: string;
|
|
841
840
|
type: "self" | "sharing" | "recipient";
|
|
841
|
+
name: string;
|
|
842
842
|
issuer: `0x${string}`;
|
|
843
843
|
expiration: number;
|
|
844
844
|
validatorId: number;
|
|
@@ -857,20 +857,20 @@ declare const validateSharingPermit: (permit: any) => z.SafeParseReturnType<{
|
|
|
857
857
|
type: "self" | "sharing" | "recipient";
|
|
858
858
|
issuer: string;
|
|
859
859
|
recipient?: string | undefined;
|
|
860
|
-
sealingPair?: {
|
|
861
|
-
privateKey: string;
|
|
862
|
-
publicKey: string;
|
|
863
|
-
} | undefined;
|
|
864
860
|
name?: string | undefined;
|
|
865
861
|
expiration?: number | undefined;
|
|
866
862
|
validatorId?: number | undefined;
|
|
867
863
|
validatorContract?: string | undefined;
|
|
864
|
+
sealingPair?: {
|
|
865
|
+
privateKey: string;
|
|
866
|
+
publicKey: string;
|
|
867
|
+
} | undefined;
|
|
868
868
|
issuerSignature?: string | undefined;
|
|
869
869
|
recipientSignature?: string | undefined;
|
|
870
870
|
}, {
|
|
871
871
|
recipient: `0x${string}`;
|
|
872
|
-
name: string;
|
|
873
872
|
type: "self" | "sharing" | "recipient";
|
|
873
|
+
name: string;
|
|
874
874
|
issuer: `0x${string}`;
|
|
875
875
|
expiration: number;
|
|
876
876
|
validatorId: number;
|
|
@@ -889,20 +889,20 @@ declare const validateImportPermit: (permit: any) => z.SafeParseReturnType<{
|
|
|
889
889
|
type: "self" | "sharing" | "recipient";
|
|
890
890
|
issuer: string;
|
|
891
891
|
recipient?: string | undefined;
|
|
892
|
-
sealingPair?: {
|
|
893
|
-
privateKey: string;
|
|
894
|
-
publicKey: string;
|
|
895
|
-
} | undefined;
|
|
896
892
|
name?: string | undefined;
|
|
897
893
|
expiration?: number | undefined;
|
|
898
894
|
validatorId?: number | undefined;
|
|
899
895
|
validatorContract?: string | undefined;
|
|
896
|
+
sealingPair?: {
|
|
897
|
+
privateKey: string;
|
|
898
|
+
publicKey: string;
|
|
899
|
+
} | undefined;
|
|
900
900
|
issuerSignature?: string | undefined;
|
|
901
901
|
recipientSignature?: string | undefined;
|
|
902
902
|
}, {
|
|
903
903
|
recipient: `0x${string}`;
|
|
904
|
-
name: string;
|
|
905
904
|
type: "self" | "sharing" | "recipient";
|
|
905
|
+
name: string;
|
|
906
906
|
issuer: `0x${string}`;
|
|
907
907
|
expiration: number;
|
|
908
908
|
validatorId: number;
|
|
@@ -993,23 +993,18 @@ type PermitsStore = {
|
|
|
993
993
|
permits: ChainRecord<AccountRecord<HashRecord<SerializedPermit | undefined>>>;
|
|
994
994
|
activePermitHash: ChainRecord<AccountRecord<string | undefined>>;
|
|
995
995
|
};
|
|
996
|
+
declare const PERMIT_STORE_DEFAULTS: PermitsStore;
|
|
996
997
|
declare const _permitStore: Omit<zustand_vanilla.StoreApi<PermitsStore>, "setState" | "persist"> & {
|
|
997
998
|
setState(partial: PermitsStore | Partial<PermitsStore> | ((state: PermitsStore) => PermitsStore | Partial<PermitsStore>), replace?: false | undefined): unknown;
|
|
998
999
|
setState(state: PermitsStore | ((state: PermitsStore) => PermitsStore), replace: true): unknown;
|
|
999
1000
|
persist: {
|
|
1000
|
-
setOptions: (options: Partial<zustand_middleware.PersistOptions<PermitsStore,
|
|
1001
|
-
permits: {};
|
|
1002
|
-
activePermitHash: {};
|
|
1003
|
-
}, unknown>>) => void;
|
|
1001
|
+
setOptions: (options: Partial<zustand_middleware.PersistOptions<PermitsStore, PermitsStore, unknown>>) => void;
|
|
1004
1002
|
clearStorage: () => void;
|
|
1005
1003
|
rehydrate: () => Promise<void> | void;
|
|
1006
1004
|
hasHydrated: () => boolean;
|
|
1007
1005
|
onHydrate: (fn: (state: PermitsStore) => void) => () => void;
|
|
1008
1006
|
onFinishHydration: (fn: (state: PermitsStore) => void) => () => void;
|
|
1009
|
-
getOptions: () => Partial<zustand_middleware.PersistOptions<PermitsStore,
|
|
1010
|
-
permits: {};
|
|
1011
|
-
activePermitHash: {};
|
|
1012
|
-
}, unknown>>;
|
|
1007
|
+
getOptions: () => Partial<zustand_middleware.PersistOptions<PermitsStore, PermitsStore, unknown>>;
|
|
1013
1008
|
};
|
|
1014
1009
|
};
|
|
1015
1010
|
declare const clearStaleStore: () => void;
|
|
@@ -1027,19 +1022,13 @@ declare const permitStore: {
|
|
|
1027
1022
|
setState(partial: PermitsStore | Partial<PermitsStore> | ((state: PermitsStore) => PermitsStore | Partial<PermitsStore>), replace?: false | undefined): unknown;
|
|
1028
1023
|
setState(state: PermitsStore | ((state: PermitsStore) => PermitsStore), replace: true): unknown;
|
|
1029
1024
|
persist: {
|
|
1030
|
-
setOptions: (options: Partial<zustand_middleware.PersistOptions<PermitsStore,
|
|
1031
|
-
permits: {};
|
|
1032
|
-
activePermitHash: {};
|
|
1033
|
-
}, unknown>>) => void;
|
|
1025
|
+
setOptions: (options: Partial<zustand_middleware.PersistOptions<PermitsStore, PermitsStore, unknown>>) => void;
|
|
1034
1026
|
clearStorage: () => void;
|
|
1035
1027
|
rehydrate: () => Promise<void> | void;
|
|
1036
1028
|
hasHydrated: () => boolean;
|
|
1037
1029
|
onHydrate: (fn: (state: PermitsStore) => void) => () => void;
|
|
1038
1030
|
onFinishHydration: (fn: (state: PermitsStore) => void) => () => void;
|
|
1039
|
-
getOptions: () => Partial<zustand_middleware.PersistOptions<PermitsStore,
|
|
1040
|
-
permits: {};
|
|
1041
|
-
activePermitHash: {};
|
|
1042
|
-
}, unknown>>;
|
|
1031
|
+
getOptions: () => Partial<zustand_middleware.PersistOptions<PermitsStore, PermitsStore, unknown>>;
|
|
1043
1032
|
};
|
|
1044
1033
|
};
|
|
1045
1034
|
getPermit: (chainId: number | undefined, account: string | undefined, hash: string | undefined) => Permit | undefined;
|
|
@@ -1053,4 +1042,4 @@ declare const permitStore: {
|
|
|
1053
1042
|
resetStore: () => void;
|
|
1054
1043
|
};
|
|
1055
1044
|
|
|
1056
|
-
export { EIP712Message, EIP712Types, ImportPermitOptionsValidator, ImportPermitValidator, Permission, Permit, PermitSignaturePrimaryType, SelfPermitOptionsValidator, SelfPermitValidator, SerializedPermit, SharingPermitOptionsValidator, SharingPermitValidator, SignatureTypes, SignatureUtils, ValidationResult, ValidationUtils, _permitStore, clearStaleStore, getActivePermit, getActivePermitHash, getPermit, getPermits, getSignatureTypesAndMessage, permitStore, removeActivePermitHash, removePermit, resetStore, setActivePermitHash, setPermit, validateImportPermit, validateImportPermitOptions, validateSelfPermit, validateSelfPermitOptions, validateSharingPermit, validateSharingPermitOptions };
|
|
1045
|
+
export { EIP712Message, EIP712Types, ImportPermitOptionsValidator, ImportPermitValidator, PERMIT_STORE_DEFAULTS, Permission, Permit, PermitSignaturePrimaryType, SelfPermitOptionsValidator, SelfPermitValidator, SerializedPermit, SharingPermitOptionsValidator, SharingPermitValidator, SignatureTypes, SignatureUtils, ValidationResult, ValidationUtils, _permitStore, clearStaleStore, getActivePermit, getActivePermitHash, getPermit, getPermits, getSignatureTypesAndMessage, permitStore, removeActivePermitHash, removePermit, resetStore, setActivePermitHash, setPermit, validateImportPermit, validateImportPermitOptions, validateSelfPermit, validateSelfPermitOptions, validateSharingPermit, validateSharingPermitOptions };
|