@cofhe/sdk 0.2.0 → 0.3.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 +36 -0
- package/chains/defineChain.ts +2 -2
- package/chains/types.ts +3 -3
- package/core/baseBuilder.ts +18 -18
- package/core/client.test.ts +155 -41
- package/core/client.ts +72 -32
- package/core/clientTypes.ts +28 -18
- package/core/config.test.ts +40 -33
- package/core/config.ts +56 -51
- package/core/consts.ts +22 -0
- package/core/decrypt/{MockQueryDecrypterAbi.ts → MockThresholdNetworkAbi.ts} +71 -21
- package/core/decrypt/cofheMocksDecryptForTx.ts +142 -0
- package/core/decrypt/{cofheMocksSealOutput.ts → cofheMocksDecryptForView.ts} +12 -14
- package/core/decrypt/decryptForTxBuilder.ts +340 -0
- package/core/decrypt/{decryptHandleBuilder.ts → decryptForViewBuilder.ts} +75 -42
- package/core/decrypt/tnDecrypt.ts +232 -0
- package/core/decrypt/tnSealOutputV1.ts +5 -5
- package/core/decrypt/tnSealOutputV2.ts +27 -27
- package/core/encrypt/cofheMocksZkVerifySign.ts +19 -26
- package/core/encrypt/encryptInputsBuilder.test.ts +57 -61
- package/core/encrypt/encryptInputsBuilder.ts +65 -42
- package/core/encrypt/zkPackProveVerify.ts +11 -11
- package/core/error.ts +18 -18
- package/core/fetchKeys.test.ts +3 -3
- package/core/fetchKeys.ts +3 -3
- package/core/index.ts +22 -11
- package/core/permits.test.ts +5 -6
- package/core/permits.ts +5 -4
- package/core/utils.ts +10 -10
- package/dist/chains.cjs +4 -7
- package/dist/chains.d.cts +12 -12
- package/dist/chains.d.ts +12 -12
- package/dist/chains.js +1 -1
- package/dist/{chunk-WGCRJCBR.js → chunk-2TPSCOW3.js} +820 -224
- package/dist/{chunk-UGBVZNRT.js → chunk-NWDKXBIP.js} +309 -189
- package/dist/{chunk-WEAZ25JO.js → chunk-TBLR7NNE.js} +4 -7
- package/dist/{clientTypes-5_1nwtUe.d.cts → clientTypes-6aTZPQ_4.d.ts} +233 -173
- package/dist/{clientTypes-Es7fyi65.d.ts → clientTypes-Bhq7pCSA.d.cts} +233 -173
- package/dist/core.cjs +1138 -418
- package/dist/core.d.cts +37 -24
- package/dist/core.d.ts +37 -24
- package/dist/core.js +3 -3
- package/dist/node.cjs +1082 -370
- package/dist/node.d.cts +12 -12
- package/dist/node.d.ts +12 -12
- package/dist/node.js +8 -8
- package/dist/{permit-fUSe6KKq.d.cts → permit-MZ502UBl.d.cts} +30 -33
- package/dist/{permit-fUSe6KKq.d.ts → permit-MZ502UBl.d.ts} +30 -33
- package/dist/permits.cjs +305 -187
- package/dist/permits.d.cts +111 -812
- package/dist/permits.d.ts +111 -812
- package/dist/permits.js +1 -1
- package/dist/types-YiAC4gig.d.cts +33 -0
- package/dist/types-YiAC4gig.d.ts +33 -0
- package/dist/web.cjs +1085 -373
- package/dist/web.d.cts +13 -13
- package/dist/web.d.ts +13 -13
- package/dist/web.js +10 -10
- package/node/client.test.ts +34 -34
- package/node/config.test.ts +11 -11
- package/node/encryptInputs.test.ts +29 -29
- package/node/index.ts +15 -15
- package/package.json +3 -3
- package/permits/localstorage.test.ts +9 -13
- package/permits/onchain-utils.ts +221 -0
- package/permits/permit.test.ts +51 -5
- package/permits/permit.ts +28 -74
- package/permits/store.test.ts +10 -50
- package/permits/store.ts +4 -14
- package/permits/test-utils.ts +10 -2
- package/permits/types.ts +22 -9
- package/permits/utils.ts +0 -4
- package/permits/validation.test.ts +29 -32
- package/permits/validation.ts +112 -194
- package/web/client.web.test.ts +34 -34
- package/web/config.web.test.ts +11 -11
- package/web/encryptInputs.web.test.ts +29 -29
- package/web/index.ts +19 -19
- package/web/worker.builder.web.test.ts +28 -28
- package/web/worker.config.web.test.ts +47 -47
- package/web/worker.output.web.test.ts +10 -10
- package/dist/types-KImPrEIe.d.cts +0 -48
- package/dist/types-KImPrEIe.d.ts +0 -48
package/dist/permits.d.cts
CHANGED
|
@@ -1,919 +1,218 @@
|
|
|
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-MZ502UBl.cjs';
|
|
2
|
+
export { C as CreateSelfPermitOptions, d as CreateSharingPermitOptions, f as EIP712Domain, j as EIP712Type, i as EthEncryptedData, p as Expand, G as GenerateSealingKey, I as ImportPermitOptions, I as ImportSharedPermitOptions, o as PermitHashFields, 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-MZ502UBl.cjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import * as zustand_middleware from 'zustand/middleware';
|
|
5
5
|
import * as zustand_vanilla from 'zustand/vanilla';
|
|
6
6
|
import 'viem';
|
|
7
7
|
|
|
8
|
+
declare const addressSchema: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
9
|
+
declare const addressNotZeroSchema: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
10
|
+
declare const bytesSchema: z.ZodCustom<`0x${string}`, `0x${string}`>;
|
|
11
|
+
declare const bytesNotEmptySchema: z.ZodCustom<`0x${string}`, `0x${string}`>;
|
|
8
12
|
/**
|
|
9
13
|
* Validator for self permit creation options
|
|
10
14
|
*/
|
|
11
|
-
declare const SelfPermitOptionsValidator: z.
|
|
15
|
+
declare const SelfPermitOptionsValidator: z.ZodObject<{
|
|
12
16
|
type: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"self">>>;
|
|
13
|
-
issuer: z.
|
|
17
|
+
issuer: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
14
18
|
name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
15
|
-
expiration: z.ZodDefault<z.ZodOptional<z.
|
|
16
|
-
recipient: z.
|
|
17
|
-
validatorId: z.ZodDefault<z.ZodOptional<z.
|
|
18
|
-
validatorContract: z.
|
|
19
|
-
issuerSignature: z.
|
|
20
|
-
recipientSignature: z.
|
|
21
|
-
},
|
|
22
|
-
recipient: "0x0000000000000000000000000000000000000000";
|
|
23
|
-
type: "self";
|
|
24
|
-
name: string;
|
|
25
|
-
issuer: `0x${string}`;
|
|
26
|
-
expiration: number;
|
|
27
|
-
validatorId: number;
|
|
28
|
-
validatorContract: `0x${string}`;
|
|
29
|
-
issuerSignature: `0x${string}`;
|
|
30
|
-
recipientSignature: `0x${string}`;
|
|
31
|
-
}, {
|
|
32
|
-
issuer: string;
|
|
33
|
-
recipient?: string | undefined;
|
|
34
|
-
type?: "self" | undefined;
|
|
35
|
-
name?: string | undefined;
|
|
36
|
-
expiration?: number | undefined;
|
|
37
|
-
validatorId?: number | undefined;
|
|
38
|
-
validatorContract?: string | undefined;
|
|
39
|
-
issuerSignature?: string | undefined;
|
|
40
|
-
recipientSignature?: string | undefined;
|
|
41
|
-
}>, {
|
|
42
|
-
recipient: "0x0000000000000000000000000000000000000000";
|
|
43
|
-
type: "self";
|
|
44
|
-
name: string;
|
|
45
|
-
issuer: `0x${string}`;
|
|
46
|
-
expiration: number;
|
|
47
|
-
validatorId: number;
|
|
48
|
-
validatorContract: `0x${string}`;
|
|
49
|
-
issuerSignature: `0x${string}`;
|
|
50
|
-
recipientSignature: `0x${string}`;
|
|
51
|
-
}, {
|
|
52
|
-
issuer: string;
|
|
53
|
-
recipient?: string | undefined;
|
|
54
|
-
type?: "self" | undefined;
|
|
55
|
-
name?: string | undefined;
|
|
56
|
-
expiration?: number | undefined;
|
|
57
|
-
validatorId?: number | undefined;
|
|
58
|
-
validatorContract?: string | undefined;
|
|
59
|
-
issuerSignature?: string | undefined;
|
|
60
|
-
recipientSignature?: string | undefined;
|
|
61
|
-
}>;
|
|
19
|
+
expiration: z.ZodDefault<z.ZodOptional<z.ZodInt>>;
|
|
20
|
+
recipient: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>>;
|
|
21
|
+
validatorId: z.ZodDefault<z.ZodOptional<z.ZodInt>>;
|
|
22
|
+
validatorContract: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>>;
|
|
23
|
+
issuerSignature: z.ZodDefault<z.ZodOptional<z.ZodCustom<`0x${string}`, `0x${string}`>>>;
|
|
24
|
+
recipientSignature: z.ZodDefault<z.ZodOptional<z.ZodCustom<`0x${string}`, `0x${string}`>>>;
|
|
25
|
+
}, z.core.$strip>;
|
|
62
26
|
/**
|
|
63
27
|
* Validator for fully formed self permits
|
|
64
28
|
*/
|
|
65
|
-
declare const SelfPermitValidator: z.
|
|
29
|
+
declare const SelfPermitValidator: z.ZodObject<{
|
|
66
30
|
name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
67
|
-
type: z.ZodEnum<
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
31
|
+
type: z.ZodEnum<{
|
|
32
|
+
self: "self";
|
|
33
|
+
sharing: "sharing";
|
|
34
|
+
recipient: "recipient";
|
|
35
|
+
}>;
|
|
36
|
+
issuer: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
37
|
+
expiration: z.ZodDefault<z.ZodOptional<z.ZodInt>>;
|
|
38
|
+
recipient: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>>;
|
|
39
|
+
validatorId: z.ZodDefault<z.ZodOptional<z.ZodInt>>;
|
|
40
|
+
validatorContract: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>>;
|
|
41
|
+
issuerSignature: z.ZodDefault<z.ZodOptional<z.ZodCustom<`0x${string}`, `0x${string}`>>>;
|
|
42
|
+
recipientSignature: z.ZodDefault<z.ZodOptional<z.ZodCustom<`0x${string}`, `0x${string}`>>>;
|
|
76
43
|
sealingPair: z.ZodOptional<z.ZodObject<{
|
|
77
44
|
privateKey: z.ZodString;
|
|
78
45
|
publicKey: z.ZodString;
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
publicKey: string;
|
|
82
|
-
}, {
|
|
83
|
-
privateKey: string;
|
|
84
|
-
publicKey: string;
|
|
85
|
-
}>>;
|
|
86
|
-
}, "strip", z.ZodTypeAny, {
|
|
87
|
-
recipient: `0x${string}`;
|
|
88
|
-
type: "self" | "sharing" | "recipient";
|
|
89
|
-
name: string;
|
|
90
|
-
issuer: `0x${string}`;
|
|
91
|
-
expiration: number;
|
|
92
|
-
validatorId: number;
|
|
93
|
-
validatorContract: `0x${string}`;
|
|
94
|
-
issuerSignature: string;
|
|
95
|
-
recipientSignature: string;
|
|
96
|
-
sealingPair?: {
|
|
97
|
-
privateKey: string;
|
|
98
|
-
publicKey: string;
|
|
99
|
-
} | undefined;
|
|
100
|
-
}, {
|
|
101
|
-
type: "self" | "sharing" | "recipient";
|
|
102
|
-
issuer: string;
|
|
103
|
-
recipient?: string | undefined;
|
|
104
|
-
name?: string | undefined;
|
|
105
|
-
expiration?: number | undefined;
|
|
106
|
-
validatorId?: number | undefined;
|
|
107
|
-
validatorContract?: string | undefined;
|
|
108
|
-
sealingPair?: {
|
|
109
|
-
privateKey: string;
|
|
110
|
-
publicKey: string;
|
|
111
|
-
} | undefined;
|
|
112
|
-
issuerSignature?: string | undefined;
|
|
113
|
-
recipientSignature?: string | undefined;
|
|
114
|
-
}>, {
|
|
115
|
-
recipient: `0x${string}`;
|
|
116
|
-
type: "self" | "sharing" | "recipient";
|
|
117
|
-
name: string;
|
|
118
|
-
issuer: `0x${string}`;
|
|
119
|
-
expiration: number;
|
|
120
|
-
validatorId: number;
|
|
121
|
-
validatorContract: `0x${string}`;
|
|
122
|
-
issuerSignature: string;
|
|
123
|
-
recipientSignature: string;
|
|
124
|
-
sealingPair?: {
|
|
125
|
-
privateKey: string;
|
|
126
|
-
publicKey: string;
|
|
127
|
-
} | undefined;
|
|
128
|
-
}, {
|
|
129
|
-
type: "self" | "sharing" | "recipient";
|
|
130
|
-
issuer: string;
|
|
131
|
-
recipient?: string | undefined;
|
|
132
|
-
name?: string | undefined;
|
|
133
|
-
expiration?: number | undefined;
|
|
134
|
-
validatorId?: number | undefined;
|
|
135
|
-
validatorContract?: string | undefined;
|
|
136
|
-
sealingPair?: {
|
|
137
|
-
privateKey: string;
|
|
138
|
-
publicKey: string;
|
|
139
|
-
} | undefined;
|
|
140
|
-
issuerSignature?: string | undefined;
|
|
141
|
-
recipientSignature?: string | undefined;
|
|
142
|
-
}>, {
|
|
143
|
-
recipient: `0x${string}`;
|
|
144
|
-
type: "self" | "sharing" | "recipient";
|
|
145
|
-
name: string;
|
|
146
|
-
issuer: `0x${string}`;
|
|
147
|
-
expiration: number;
|
|
148
|
-
validatorId: number;
|
|
149
|
-
validatorContract: `0x${string}`;
|
|
150
|
-
issuerSignature: string;
|
|
151
|
-
recipientSignature: string;
|
|
152
|
-
sealingPair?: {
|
|
153
|
-
privateKey: string;
|
|
154
|
-
publicKey: string;
|
|
155
|
-
} | undefined;
|
|
156
|
-
}, {
|
|
157
|
-
type: "self" | "sharing" | "recipient";
|
|
158
|
-
issuer: string;
|
|
159
|
-
recipient?: string | undefined;
|
|
160
|
-
name?: string | undefined;
|
|
161
|
-
expiration?: number | undefined;
|
|
162
|
-
validatorId?: number | undefined;
|
|
163
|
-
validatorContract?: string | undefined;
|
|
164
|
-
sealingPair?: {
|
|
165
|
-
privateKey: string;
|
|
166
|
-
publicKey: string;
|
|
167
|
-
} | undefined;
|
|
168
|
-
issuerSignature?: string | undefined;
|
|
169
|
-
recipientSignature?: string | undefined;
|
|
170
|
-
}>, {
|
|
171
|
-
recipient: `0x${string}`;
|
|
172
|
-
type: "self" | "sharing" | "recipient";
|
|
173
|
-
name: string;
|
|
174
|
-
issuer: `0x${string}`;
|
|
175
|
-
expiration: number;
|
|
176
|
-
validatorId: number;
|
|
177
|
-
validatorContract: `0x${string}`;
|
|
178
|
-
issuerSignature: string;
|
|
179
|
-
recipientSignature: string;
|
|
180
|
-
sealingPair?: {
|
|
181
|
-
privateKey: string;
|
|
182
|
-
publicKey: string;
|
|
183
|
-
} | undefined;
|
|
184
|
-
}, {
|
|
185
|
-
type: "self" | "sharing" | "recipient";
|
|
186
|
-
issuer: string;
|
|
187
|
-
recipient?: string | undefined;
|
|
188
|
-
name?: string | undefined;
|
|
189
|
-
expiration?: number | undefined;
|
|
190
|
-
validatorId?: number | undefined;
|
|
191
|
-
validatorContract?: string | undefined;
|
|
192
|
-
sealingPair?: {
|
|
193
|
-
privateKey: string;
|
|
194
|
-
publicKey: string;
|
|
195
|
-
} | undefined;
|
|
196
|
-
issuerSignature?: string | undefined;
|
|
197
|
-
recipientSignature?: string | undefined;
|
|
198
|
-
}>, {
|
|
199
|
-
recipient: `0x${string}`;
|
|
200
|
-
type: "self" | "sharing" | "recipient";
|
|
201
|
-
name: string;
|
|
202
|
-
issuer: `0x${string}`;
|
|
203
|
-
expiration: number;
|
|
204
|
-
validatorId: number;
|
|
205
|
-
validatorContract: `0x${string}`;
|
|
206
|
-
issuerSignature: string;
|
|
207
|
-
recipientSignature: string;
|
|
208
|
-
sealingPair?: {
|
|
209
|
-
privateKey: string;
|
|
210
|
-
publicKey: string;
|
|
211
|
-
} | undefined;
|
|
212
|
-
}, {
|
|
213
|
-
type: "self" | "sharing" | "recipient";
|
|
214
|
-
issuer: string;
|
|
215
|
-
recipient?: string | undefined;
|
|
216
|
-
name?: string | undefined;
|
|
217
|
-
expiration?: number | undefined;
|
|
218
|
-
validatorId?: number | undefined;
|
|
219
|
-
validatorContract?: string | undefined;
|
|
220
|
-
sealingPair?: {
|
|
221
|
-
privateKey: string;
|
|
222
|
-
publicKey: string;
|
|
223
|
-
} | undefined;
|
|
224
|
-
issuerSignature?: string | undefined;
|
|
225
|
-
recipientSignature?: string | undefined;
|
|
226
|
-
}>, {
|
|
227
|
-
recipient: `0x${string}`;
|
|
228
|
-
type: "self" | "sharing" | "recipient";
|
|
229
|
-
name: string;
|
|
230
|
-
issuer: `0x${string}`;
|
|
231
|
-
expiration: number;
|
|
232
|
-
validatorId: number;
|
|
233
|
-
validatorContract: `0x${string}`;
|
|
234
|
-
issuerSignature: string;
|
|
235
|
-
recipientSignature: string;
|
|
236
|
-
sealingPair?: {
|
|
237
|
-
privateKey: string;
|
|
238
|
-
publicKey: string;
|
|
239
|
-
} | undefined;
|
|
240
|
-
}, {
|
|
241
|
-
type: "self" | "sharing" | "recipient";
|
|
242
|
-
issuer: string;
|
|
243
|
-
recipient?: string | undefined;
|
|
244
|
-
name?: string | undefined;
|
|
245
|
-
expiration?: number | undefined;
|
|
246
|
-
validatorId?: number | undefined;
|
|
247
|
-
validatorContract?: string | undefined;
|
|
248
|
-
sealingPair?: {
|
|
249
|
-
privateKey: string;
|
|
250
|
-
publicKey: string;
|
|
251
|
-
} | undefined;
|
|
252
|
-
issuerSignature?: string | undefined;
|
|
253
|
-
recipientSignature?: string | undefined;
|
|
254
|
-
}>;
|
|
46
|
+
}, z.core.$strip>>;
|
|
47
|
+
}, z.core.$strip>;
|
|
255
48
|
/**
|
|
256
49
|
* Validator for sharing permit creation options
|
|
257
50
|
*/
|
|
258
|
-
declare const SharingPermitOptionsValidator: z.
|
|
51
|
+
declare const SharingPermitOptionsValidator: z.ZodObject<{
|
|
259
52
|
type: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"sharing">>>;
|
|
260
|
-
issuer: z.
|
|
261
|
-
recipient: z.
|
|
53
|
+
issuer: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
54
|
+
recipient: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
262
55
|
name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
263
|
-
expiration: z.ZodDefault<z.ZodOptional<z.
|
|
264
|
-
validatorId: z.ZodDefault<z.ZodOptional<z.
|
|
265
|
-
validatorContract: z.
|
|
266
|
-
issuerSignature: z.
|
|
267
|
-
recipientSignature: z.
|
|
268
|
-
},
|
|
269
|
-
recipient: `0x${string}`;
|
|
270
|
-
type: "sharing";
|
|
271
|
-
name: string;
|
|
272
|
-
issuer: `0x${string}`;
|
|
273
|
-
expiration: number;
|
|
274
|
-
validatorId: number;
|
|
275
|
-
validatorContract: `0x${string}`;
|
|
276
|
-
issuerSignature: `0x${string}`;
|
|
277
|
-
recipientSignature: `0x${string}`;
|
|
278
|
-
}, {
|
|
279
|
-
recipient: string;
|
|
280
|
-
issuer: string;
|
|
281
|
-
type?: "sharing" | undefined;
|
|
282
|
-
name?: string | undefined;
|
|
283
|
-
expiration?: number | undefined;
|
|
284
|
-
validatorId?: number | undefined;
|
|
285
|
-
validatorContract?: string | undefined;
|
|
286
|
-
issuerSignature?: string | undefined;
|
|
287
|
-
recipientSignature?: string | undefined;
|
|
288
|
-
}>, {
|
|
289
|
-
recipient: `0x${string}`;
|
|
290
|
-
type: "sharing";
|
|
291
|
-
name: string;
|
|
292
|
-
issuer: `0x${string}`;
|
|
293
|
-
expiration: number;
|
|
294
|
-
validatorId: number;
|
|
295
|
-
validatorContract: `0x${string}`;
|
|
296
|
-
issuerSignature: `0x${string}`;
|
|
297
|
-
recipientSignature: `0x${string}`;
|
|
298
|
-
}, {
|
|
299
|
-
recipient: string;
|
|
300
|
-
issuer: string;
|
|
301
|
-
type?: "sharing" | undefined;
|
|
302
|
-
name?: string | undefined;
|
|
303
|
-
expiration?: number | undefined;
|
|
304
|
-
validatorId?: number | undefined;
|
|
305
|
-
validatorContract?: string | undefined;
|
|
306
|
-
issuerSignature?: string | undefined;
|
|
307
|
-
recipientSignature?: string | undefined;
|
|
308
|
-
}>;
|
|
56
|
+
expiration: z.ZodDefault<z.ZodOptional<z.ZodInt>>;
|
|
57
|
+
validatorId: z.ZodDefault<z.ZodOptional<z.ZodInt>>;
|
|
58
|
+
validatorContract: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>>;
|
|
59
|
+
issuerSignature: z.ZodDefault<z.ZodOptional<z.ZodCustom<`0x${string}`, `0x${string}`>>>;
|
|
60
|
+
recipientSignature: z.ZodDefault<z.ZodOptional<z.ZodCustom<`0x${string}`, `0x${string}`>>>;
|
|
61
|
+
}, z.core.$strip>;
|
|
309
62
|
/**
|
|
310
63
|
* Validator for fully formed sharing permits
|
|
311
64
|
*/
|
|
312
|
-
declare const SharingPermitValidator: z.
|
|
65
|
+
declare const SharingPermitValidator: z.ZodObject<{
|
|
313
66
|
name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
314
|
-
type: z.ZodEnum<
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
67
|
+
type: z.ZodEnum<{
|
|
68
|
+
self: "self";
|
|
69
|
+
sharing: "sharing";
|
|
70
|
+
recipient: "recipient";
|
|
71
|
+
}>;
|
|
72
|
+
issuer: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
73
|
+
expiration: z.ZodDefault<z.ZodOptional<z.ZodInt>>;
|
|
74
|
+
recipient: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>>;
|
|
75
|
+
validatorId: z.ZodDefault<z.ZodOptional<z.ZodInt>>;
|
|
76
|
+
validatorContract: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>>;
|
|
77
|
+
issuerSignature: z.ZodDefault<z.ZodOptional<z.ZodCustom<`0x${string}`, `0x${string}`>>>;
|
|
78
|
+
recipientSignature: z.ZodDefault<z.ZodOptional<z.ZodCustom<`0x${string}`, `0x${string}`>>>;
|
|
323
79
|
sealingPair: z.ZodOptional<z.ZodObject<{
|
|
324
80
|
privateKey: z.ZodString;
|
|
325
81
|
publicKey: z.ZodString;
|
|
326
|
-
},
|
|
327
|
-
|
|
328
|
-
publicKey: string;
|
|
329
|
-
}, {
|
|
330
|
-
privateKey: string;
|
|
331
|
-
publicKey: string;
|
|
332
|
-
}>>;
|
|
333
|
-
}, "strip", z.ZodTypeAny, {
|
|
334
|
-
recipient: `0x${string}`;
|
|
335
|
-
type: "self" | "sharing" | "recipient";
|
|
336
|
-
name: string;
|
|
337
|
-
issuer: `0x${string}`;
|
|
338
|
-
expiration: number;
|
|
339
|
-
validatorId: number;
|
|
340
|
-
validatorContract: `0x${string}`;
|
|
341
|
-
issuerSignature: string;
|
|
342
|
-
recipientSignature: string;
|
|
343
|
-
sealingPair?: {
|
|
344
|
-
privateKey: string;
|
|
345
|
-
publicKey: string;
|
|
346
|
-
} | undefined;
|
|
347
|
-
}, {
|
|
348
|
-
type: "self" | "sharing" | "recipient";
|
|
349
|
-
issuer: string;
|
|
350
|
-
recipient?: string | undefined;
|
|
351
|
-
name?: string | undefined;
|
|
352
|
-
expiration?: number | undefined;
|
|
353
|
-
validatorId?: number | undefined;
|
|
354
|
-
validatorContract?: string | undefined;
|
|
355
|
-
sealingPair?: {
|
|
356
|
-
privateKey: string;
|
|
357
|
-
publicKey: string;
|
|
358
|
-
} | undefined;
|
|
359
|
-
issuerSignature?: string | undefined;
|
|
360
|
-
recipientSignature?: string | undefined;
|
|
361
|
-
}>, {
|
|
362
|
-
recipient: `0x${string}`;
|
|
363
|
-
type: "self" | "sharing" | "recipient";
|
|
364
|
-
name: string;
|
|
365
|
-
issuer: `0x${string}`;
|
|
366
|
-
expiration: number;
|
|
367
|
-
validatorId: number;
|
|
368
|
-
validatorContract: `0x${string}`;
|
|
369
|
-
issuerSignature: string;
|
|
370
|
-
recipientSignature: string;
|
|
371
|
-
sealingPair?: {
|
|
372
|
-
privateKey: string;
|
|
373
|
-
publicKey: string;
|
|
374
|
-
} | undefined;
|
|
375
|
-
}, {
|
|
376
|
-
type: "self" | "sharing" | "recipient";
|
|
377
|
-
issuer: string;
|
|
378
|
-
recipient?: string | undefined;
|
|
379
|
-
name?: string | undefined;
|
|
380
|
-
expiration?: number | undefined;
|
|
381
|
-
validatorId?: number | undefined;
|
|
382
|
-
validatorContract?: string | undefined;
|
|
383
|
-
sealingPair?: {
|
|
384
|
-
privateKey: string;
|
|
385
|
-
publicKey: string;
|
|
386
|
-
} | undefined;
|
|
387
|
-
issuerSignature?: string | undefined;
|
|
388
|
-
recipientSignature?: string | undefined;
|
|
389
|
-
}>, {
|
|
390
|
-
recipient: `0x${string}`;
|
|
391
|
-
type: "self" | "sharing" | "recipient";
|
|
392
|
-
name: string;
|
|
393
|
-
issuer: `0x${string}`;
|
|
394
|
-
expiration: number;
|
|
395
|
-
validatorId: number;
|
|
396
|
-
validatorContract: `0x${string}`;
|
|
397
|
-
issuerSignature: string;
|
|
398
|
-
recipientSignature: string;
|
|
399
|
-
sealingPair?: {
|
|
400
|
-
privateKey: string;
|
|
401
|
-
publicKey: string;
|
|
402
|
-
} | undefined;
|
|
403
|
-
}, {
|
|
404
|
-
type: "self" | "sharing" | "recipient";
|
|
405
|
-
issuer: string;
|
|
406
|
-
recipient?: string | undefined;
|
|
407
|
-
name?: string | undefined;
|
|
408
|
-
expiration?: number | undefined;
|
|
409
|
-
validatorId?: number | undefined;
|
|
410
|
-
validatorContract?: string | undefined;
|
|
411
|
-
sealingPair?: {
|
|
412
|
-
privateKey: string;
|
|
413
|
-
publicKey: string;
|
|
414
|
-
} | undefined;
|
|
415
|
-
issuerSignature?: string | undefined;
|
|
416
|
-
recipientSignature?: string | undefined;
|
|
417
|
-
}>, {
|
|
418
|
-
recipient: `0x${string}`;
|
|
419
|
-
type: "self" | "sharing" | "recipient";
|
|
420
|
-
name: string;
|
|
421
|
-
issuer: `0x${string}`;
|
|
422
|
-
expiration: number;
|
|
423
|
-
validatorId: number;
|
|
424
|
-
validatorContract: `0x${string}`;
|
|
425
|
-
issuerSignature: string;
|
|
426
|
-
recipientSignature: string;
|
|
427
|
-
sealingPair?: {
|
|
428
|
-
privateKey: string;
|
|
429
|
-
publicKey: string;
|
|
430
|
-
} | undefined;
|
|
431
|
-
}, {
|
|
432
|
-
type: "self" | "sharing" | "recipient";
|
|
433
|
-
issuer: string;
|
|
434
|
-
recipient?: string | undefined;
|
|
435
|
-
name?: string | undefined;
|
|
436
|
-
expiration?: number | undefined;
|
|
437
|
-
validatorId?: number | undefined;
|
|
438
|
-
validatorContract?: string | undefined;
|
|
439
|
-
sealingPair?: {
|
|
440
|
-
privateKey: string;
|
|
441
|
-
publicKey: string;
|
|
442
|
-
} | undefined;
|
|
443
|
-
issuerSignature?: string | undefined;
|
|
444
|
-
recipientSignature?: string | undefined;
|
|
445
|
-
}>, {
|
|
446
|
-
recipient: `0x${string}`;
|
|
447
|
-
type: "self" | "sharing" | "recipient";
|
|
448
|
-
name: string;
|
|
449
|
-
issuer: `0x${string}`;
|
|
450
|
-
expiration: number;
|
|
451
|
-
validatorId: number;
|
|
452
|
-
validatorContract: `0x${string}`;
|
|
453
|
-
issuerSignature: string;
|
|
454
|
-
recipientSignature: string;
|
|
455
|
-
sealingPair?: {
|
|
456
|
-
privateKey: string;
|
|
457
|
-
publicKey: string;
|
|
458
|
-
} | undefined;
|
|
459
|
-
}, {
|
|
460
|
-
type: "self" | "sharing" | "recipient";
|
|
461
|
-
issuer: string;
|
|
462
|
-
recipient?: string | undefined;
|
|
463
|
-
name?: string | undefined;
|
|
464
|
-
expiration?: number | undefined;
|
|
465
|
-
validatorId?: number | undefined;
|
|
466
|
-
validatorContract?: string | undefined;
|
|
467
|
-
sealingPair?: {
|
|
468
|
-
privateKey: string;
|
|
469
|
-
publicKey: string;
|
|
470
|
-
} | undefined;
|
|
471
|
-
issuerSignature?: string | undefined;
|
|
472
|
-
recipientSignature?: string | undefined;
|
|
473
|
-
}>, {
|
|
474
|
-
recipient: `0x${string}`;
|
|
475
|
-
type: "self" | "sharing" | "recipient";
|
|
476
|
-
name: string;
|
|
477
|
-
issuer: `0x${string}`;
|
|
478
|
-
expiration: number;
|
|
479
|
-
validatorId: number;
|
|
480
|
-
validatorContract: `0x${string}`;
|
|
481
|
-
issuerSignature: string;
|
|
482
|
-
recipientSignature: string;
|
|
483
|
-
sealingPair?: {
|
|
484
|
-
privateKey: string;
|
|
485
|
-
publicKey: string;
|
|
486
|
-
} | undefined;
|
|
487
|
-
}, {
|
|
488
|
-
type: "self" | "sharing" | "recipient";
|
|
489
|
-
issuer: string;
|
|
490
|
-
recipient?: string | undefined;
|
|
491
|
-
name?: string | undefined;
|
|
492
|
-
expiration?: number | undefined;
|
|
493
|
-
validatorId?: number | undefined;
|
|
494
|
-
validatorContract?: string | undefined;
|
|
495
|
-
sealingPair?: {
|
|
496
|
-
privateKey: string;
|
|
497
|
-
publicKey: string;
|
|
498
|
-
} | undefined;
|
|
499
|
-
issuerSignature?: string | undefined;
|
|
500
|
-
recipientSignature?: string | undefined;
|
|
501
|
-
}>;
|
|
82
|
+
}, z.core.$strip>>;
|
|
83
|
+
}, z.core.$strip>;
|
|
502
84
|
/**
|
|
503
85
|
* Validator for import permit creation options (recipient receiving shared permit)
|
|
504
86
|
*/
|
|
505
|
-
declare const ImportPermitOptionsValidator: z.
|
|
87
|
+
declare const ImportPermitOptionsValidator: z.ZodObject<{
|
|
506
88
|
type: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"recipient">>>;
|
|
507
|
-
issuer: z.
|
|
508
|
-
recipient: z.
|
|
509
|
-
issuerSignature: z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>;
|
|
89
|
+
issuer: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
90
|
+
recipient: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
510
91
|
name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
511
|
-
expiration: z.
|
|
512
|
-
validatorId: z.ZodDefault<z.ZodOptional<z.
|
|
513
|
-
validatorContract: z.
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
type: "recipient";
|
|
518
|
-
name: string;
|
|
519
|
-
issuer: `0x${string}`;
|
|
520
|
-
expiration: number;
|
|
521
|
-
validatorId: number;
|
|
522
|
-
validatorContract: `0x${string}`;
|
|
523
|
-
issuerSignature: `0x${string}`;
|
|
524
|
-
recipientSignature: `0x${string}`;
|
|
525
|
-
}, {
|
|
526
|
-
recipient: string;
|
|
527
|
-
issuer: string;
|
|
528
|
-
issuerSignature: string;
|
|
529
|
-
type?: "recipient" | undefined;
|
|
530
|
-
name?: string | undefined;
|
|
531
|
-
expiration?: number | undefined;
|
|
532
|
-
validatorId?: number | undefined;
|
|
533
|
-
validatorContract?: string | undefined;
|
|
534
|
-
recipientSignature?: string | undefined;
|
|
535
|
-
}>, {
|
|
536
|
-
recipient: `0x${string}`;
|
|
537
|
-
type: "recipient";
|
|
538
|
-
name: string;
|
|
539
|
-
issuer: `0x${string}`;
|
|
540
|
-
expiration: number;
|
|
541
|
-
validatorId: number;
|
|
542
|
-
validatorContract: `0x${string}`;
|
|
543
|
-
issuerSignature: `0x${string}`;
|
|
544
|
-
recipientSignature: `0x${string}`;
|
|
545
|
-
}, {
|
|
546
|
-
recipient: string;
|
|
547
|
-
issuer: string;
|
|
548
|
-
issuerSignature: string;
|
|
549
|
-
type?: "recipient" | undefined;
|
|
550
|
-
name?: string | undefined;
|
|
551
|
-
expiration?: number | undefined;
|
|
552
|
-
validatorId?: number | undefined;
|
|
553
|
-
validatorContract?: string | undefined;
|
|
554
|
-
recipientSignature?: string | undefined;
|
|
555
|
-
}>;
|
|
92
|
+
expiration: z.ZodInt;
|
|
93
|
+
validatorId: z.ZodDefault<z.ZodOptional<z.ZodInt>>;
|
|
94
|
+
validatorContract: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>>;
|
|
95
|
+
issuerSignature: z.ZodCustom<`0x${string}`, `0x${string}`>;
|
|
96
|
+
recipientSignature: z.ZodDefault<z.ZodOptional<z.ZodCustom<`0x${string}`, `0x${string}`>>>;
|
|
97
|
+
}, z.core.$strip>;
|
|
556
98
|
/**
|
|
557
99
|
* Validator for fully formed import/recipient permits
|
|
558
100
|
*/
|
|
559
|
-
declare const ImportPermitValidator: z.
|
|
101
|
+
declare const ImportPermitValidator: z.ZodObject<{
|
|
560
102
|
name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
561
|
-
type: z.ZodEnum<
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
103
|
+
type: z.ZodEnum<{
|
|
104
|
+
self: "self";
|
|
105
|
+
sharing: "sharing";
|
|
106
|
+
recipient: "recipient";
|
|
107
|
+
}>;
|
|
108
|
+
issuer: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
|
|
109
|
+
expiration: z.ZodDefault<z.ZodOptional<z.ZodInt>>;
|
|
110
|
+
recipient: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>>;
|
|
111
|
+
validatorId: z.ZodDefault<z.ZodOptional<z.ZodInt>>;
|
|
112
|
+
validatorContract: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>>;
|
|
113
|
+
issuerSignature: z.ZodDefault<z.ZodOptional<z.ZodCustom<`0x${string}`, `0x${string}`>>>;
|
|
114
|
+
recipientSignature: z.ZodDefault<z.ZodOptional<z.ZodCustom<`0x${string}`, `0x${string}`>>>;
|
|
570
115
|
sealingPair: z.ZodOptional<z.ZodObject<{
|
|
571
116
|
privateKey: z.ZodString;
|
|
572
117
|
publicKey: z.ZodString;
|
|
573
|
-
},
|
|
574
|
-
|
|
575
|
-
publicKey: string;
|
|
576
|
-
}, {
|
|
577
|
-
privateKey: string;
|
|
578
|
-
publicKey: string;
|
|
579
|
-
}>>;
|
|
580
|
-
}, "strip", z.ZodTypeAny, {
|
|
581
|
-
recipient: `0x${string}`;
|
|
582
|
-
type: "self" | "sharing" | "recipient";
|
|
583
|
-
name: string;
|
|
584
|
-
issuer: `0x${string}`;
|
|
585
|
-
expiration: number;
|
|
586
|
-
validatorId: number;
|
|
587
|
-
validatorContract: `0x${string}`;
|
|
588
|
-
issuerSignature: string;
|
|
589
|
-
recipientSignature: string;
|
|
590
|
-
sealingPair?: {
|
|
591
|
-
privateKey: string;
|
|
592
|
-
publicKey: string;
|
|
593
|
-
} | undefined;
|
|
594
|
-
}, {
|
|
595
|
-
type: "self" | "sharing" | "recipient";
|
|
596
|
-
issuer: string;
|
|
597
|
-
recipient?: string | undefined;
|
|
598
|
-
name?: string | undefined;
|
|
599
|
-
expiration?: number | undefined;
|
|
600
|
-
validatorId?: number | undefined;
|
|
601
|
-
validatorContract?: string | undefined;
|
|
602
|
-
sealingPair?: {
|
|
603
|
-
privateKey: string;
|
|
604
|
-
publicKey: string;
|
|
605
|
-
} | undefined;
|
|
606
|
-
issuerSignature?: string | undefined;
|
|
607
|
-
recipientSignature?: string | undefined;
|
|
608
|
-
}>, {
|
|
609
|
-
recipient: `0x${string}`;
|
|
610
|
-
type: "self" | "sharing" | "recipient";
|
|
611
|
-
name: string;
|
|
612
|
-
issuer: `0x${string}`;
|
|
613
|
-
expiration: number;
|
|
614
|
-
validatorId: number;
|
|
615
|
-
validatorContract: `0x${string}`;
|
|
616
|
-
issuerSignature: string;
|
|
617
|
-
recipientSignature: string;
|
|
618
|
-
sealingPair?: {
|
|
619
|
-
privateKey: string;
|
|
620
|
-
publicKey: string;
|
|
621
|
-
} | undefined;
|
|
622
|
-
}, {
|
|
623
|
-
type: "self" | "sharing" | "recipient";
|
|
624
|
-
issuer: string;
|
|
625
|
-
recipient?: string | undefined;
|
|
626
|
-
name?: string | undefined;
|
|
627
|
-
expiration?: number | undefined;
|
|
628
|
-
validatorId?: number | undefined;
|
|
629
|
-
validatorContract?: string | undefined;
|
|
630
|
-
sealingPair?: {
|
|
631
|
-
privateKey: string;
|
|
632
|
-
publicKey: string;
|
|
633
|
-
} | undefined;
|
|
634
|
-
issuerSignature?: string | undefined;
|
|
635
|
-
recipientSignature?: string | undefined;
|
|
636
|
-
}>, {
|
|
637
|
-
recipient: `0x${string}`;
|
|
638
|
-
type: "self" | "sharing" | "recipient";
|
|
639
|
-
name: string;
|
|
640
|
-
issuer: `0x${string}`;
|
|
641
|
-
expiration: number;
|
|
642
|
-
validatorId: number;
|
|
643
|
-
validatorContract: `0x${string}`;
|
|
644
|
-
issuerSignature: string;
|
|
645
|
-
recipientSignature: string;
|
|
646
|
-
sealingPair?: {
|
|
647
|
-
privateKey: string;
|
|
648
|
-
publicKey: string;
|
|
649
|
-
} | undefined;
|
|
650
|
-
}, {
|
|
651
|
-
type: "self" | "sharing" | "recipient";
|
|
652
|
-
issuer: string;
|
|
653
|
-
recipient?: string | undefined;
|
|
654
|
-
name?: string | undefined;
|
|
655
|
-
expiration?: number | undefined;
|
|
656
|
-
validatorId?: number | undefined;
|
|
657
|
-
validatorContract?: string | undefined;
|
|
658
|
-
sealingPair?: {
|
|
659
|
-
privateKey: string;
|
|
660
|
-
publicKey: string;
|
|
661
|
-
} | undefined;
|
|
662
|
-
issuerSignature?: string | undefined;
|
|
663
|
-
recipientSignature?: string | undefined;
|
|
664
|
-
}>, {
|
|
665
|
-
recipient: `0x${string}`;
|
|
666
|
-
type: "self" | "sharing" | "recipient";
|
|
667
|
-
name: string;
|
|
668
|
-
issuer: `0x${string}`;
|
|
669
|
-
expiration: number;
|
|
670
|
-
validatorId: number;
|
|
671
|
-
validatorContract: `0x${string}`;
|
|
672
|
-
issuerSignature: string;
|
|
673
|
-
recipientSignature: string;
|
|
674
|
-
sealingPair?: {
|
|
675
|
-
privateKey: string;
|
|
676
|
-
publicKey: string;
|
|
677
|
-
} | undefined;
|
|
678
|
-
}, {
|
|
679
|
-
type: "self" | "sharing" | "recipient";
|
|
680
|
-
issuer: string;
|
|
681
|
-
recipient?: string | undefined;
|
|
682
|
-
name?: string | undefined;
|
|
683
|
-
expiration?: number | undefined;
|
|
684
|
-
validatorId?: number | undefined;
|
|
685
|
-
validatorContract?: string | undefined;
|
|
686
|
-
sealingPair?: {
|
|
687
|
-
privateKey: string;
|
|
688
|
-
publicKey: string;
|
|
689
|
-
} | undefined;
|
|
690
|
-
issuerSignature?: string | undefined;
|
|
691
|
-
recipientSignature?: string | undefined;
|
|
692
|
-
}>, {
|
|
693
|
-
recipient: `0x${string}`;
|
|
694
|
-
type: "self" | "sharing" | "recipient";
|
|
695
|
-
name: string;
|
|
696
|
-
issuer: `0x${string}`;
|
|
697
|
-
expiration: number;
|
|
698
|
-
validatorId: number;
|
|
699
|
-
validatorContract: `0x${string}`;
|
|
700
|
-
issuerSignature: string;
|
|
701
|
-
recipientSignature: string;
|
|
702
|
-
sealingPair?: {
|
|
703
|
-
privateKey: string;
|
|
704
|
-
publicKey: string;
|
|
705
|
-
} | undefined;
|
|
706
|
-
}, {
|
|
707
|
-
type: "self" | "sharing" | "recipient";
|
|
708
|
-
issuer: string;
|
|
709
|
-
recipient?: string | undefined;
|
|
710
|
-
name?: string | undefined;
|
|
711
|
-
expiration?: number | undefined;
|
|
712
|
-
validatorId?: number | undefined;
|
|
713
|
-
validatorContract?: string | undefined;
|
|
714
|
-
sealingPair?: {
|
|
715
|
-
privateKey: string;
|
|
716
|
-
publicKey: string;
|
|
717
|
-
} | undefined;
|
|
718
|
-
issuerSignature?: string | undefined;
|
|
719
|
-
recipientSignature?: string | undefined;
|
|
720
|
-
}>, {
|
|
721
|
-
recipient: `0x${string}`;
|
|
722
|
-
type: "self" | "sharing" | "recipient";
|
|
723
|
-
name: string;
|
|
724
|
-
issuer: `0x${string}`;
|
|
725
|
-
expiration: number;
|
|
726
|
-
validatorId: number;
|
|
727
|
-
validatorContract: `0x${string}`;
|
|
728
|
-
issuerSignature: string;
|
|
729
|
-
recipientSignature: string;
|
|
730
|
-
sealingPair?: {
|
|
731
|
-
privateKey: string;
|
|
732
|
-
publicKey: string;
|
|
733
|
-
} | undefined;
|
|
734
|
-
}, {
|
|
735
|
-
type: "self" | "sharing" | "recipient";
|
|
736
|
-
issuer: string;
|
|
737
|
-
recipient?: string | undefined;
|
|
738
|
-
name?: string | undefined;
|
|
739
|
-
expiration?: number | undefined;
|
|
740
|
-
validatorId?: number | undefined;
|
|
741
|
-
validatorContract?: string | undefined;
|
|
742
|
-
sealingPair?: {
|
|
743
|
-
privateKey: string;
|
|
744
|
-
publicKey: string;
|
|
745
|
-
} | undefined;
|
|
746
|
-
issuerSignature?: string | undefined;
|
|
747
|
-
recipientSignature?: string | undefined;
|
|
748
|
-
}>;
|
|
118
|
+
}, z.core.$strip>>;
|
|
119
|
+
}, z.core.$strip>;
|
|
749
120
|
/**
|
|
750
121
|
* Validates self permit creation options
|
|
751
122
|
*/
|
|
752
|
-
declare const validateSelfPermitOptions: (options: any) =>
|
|
753
|
-
issuer: string;
|
|
754
|
-
recipient?: string | undefined;
|
|
755
|
-
type?: "self" | undefined;
|
|
756
|
-
name?: string | undefined;
|
|
757
|
-
expiration?: number | undefined;
|
|
758
|
-
validatorId?: number | undefined;
|
|
759
|
-
validatorContract?: string | undefined;
|
|
760
|
-
issuerSignature?: string | undefined;
|
|
761
|
-
recipientSignature?: string | undefined;
|
|
762
|
-
}, {
|
|
763
|
-
recipient: "0x0000000000000000000000000000000000000000";
|
|
123
|
+
declare const validateSelfPermitOptions: (options: any) => {
|
|
764
124
|
type: "self";
|
|
765
|
-
name: string;
|
|
766
125
|
issuer: `0x${string}`;
|
|
126
|
+
name: string;
|
|
767
127
|
expiration: number;
|
|
128
|
+
recipient: `0x${string}`;
|
|
768
129
|
validatorId: number;
|
|
769
130
|
validatorContract: `0x${string}`;
|
|
770
131
|
issuerSignature: `0x${string}`;
|
|
771
132
|
recipientSignature: `0x${string}`;
|
|
772
|
-
}
|
|
133
|
+
};
|
|
773
134
|
/**
|
|
774
135
|
* Validates sharing permit creation options
|
|
775
136
|
*/
|
|
776
|
-
declare const validateSharingPermitOptions: (options: any) =>
|
|
777
|
-
recipient: string;
|
|
778
|
-
issuer: string;
|
|
779
|
-
type?: "sharing" | undefined;
|
|
780
|
-
name?: string | undefined;
|
|
781
|
-
expiration?: number | undefined;
|
|
782
|
-
validatorId?: number | undefined;
|
|
783
|
-
validatorContract?: string | undefined;
|
|
784
|
-
issuerSignature?: string | undefined;
|
|
785
|
-
recipientSignature?: string | undefined;
|
|
786
|
-
}, {
|
|
787
|
-
recipient: `0x${string}`;
|
|
137
|
+
declare const validateSharingPermitOptions: (options: any) => {
|
|
788
138
|
type: "sharing";
|
|
789
|
-
name: string;
|
|
790
139
|
issuer: `0x${string}`;
|
|
140
|
+
recipient: `0x${string}`;
|
|
141
|
+
name: string;
|
|
791
142
|
expiration: number;
|
|
792
143
|
validatorId: number;
|
|
793
144
|
validatorContract: `0x${string}`;
|
|
794
145
|
issuerSignature: `0x${string}`;
|
|
795
146
|
recipientSignature: `0x${string}`;
|
|
796
|
-
}
|
|
147
|
+
};
|
|
797
148
|
/**
|
|
798
149
|
* Validates import permit creation options
|
|
799
150
|
*/
|
|
800
|
-
declare const validateImportPermitOptions: (options: any) =>
|
|
801
|
-
recipient: string;
|
|
802
|
-
issuer: string;
|
|
803
|
-
issuerSignature: string;
|
|
804
|
-
type?: "recipient" | undefined;
|
|
805
|
-
name?: string | undefined;
|
|
806
|
-
expiration?: number | undefined;
|
|
807
|
-
validatorId?: number | undefined;
|
|
808
|
-
validatorContract?: string | undefined;
|
|
809
|
-
recipientSignature?: string | undefined;
|
|
810
|
-
}, {
|
|
811
|
-
recipient: `0x${string}`;
|
|
151
|
+
declare const validateImportPermitOptions: (options: any) => {
|
|
812
152
|
type: "recipient";
|
|
813
|
-
name: string;
|
|
814
153
|
issuer: `0x${string}`;
|
|
154
|
+
recipient: `0x${string}`;
|
|
155
|
+
name: string;
|
|
815
156
|
expiration: number;
|
|
816
157
|
validatorId: number;
|
|
817
158
|
validatorContract: `0x${string}`;
|
|
818
159
|
issuerSignature: `0x${string}`;
|
|
819
160
|
recipientSignature: `0x${string}`;
|
|
820
|
-
}
|
|
161
|
+
};
|
|
821
162
|
/**
|
|
822
163
|
* Validates a fully formed self permit
|
|
823
164
|
*/
|
|
824
|
-
declare const validateSelfPermit: (permit: any) =>
|
|
825
|
-
type: "self" | "sharing" | "recipient";
|
|
826
|
-
issuer: string;
|
|
827
|
-
recipient?: string | undefined;
|
|
828
|
-
name?: string | undefined;
|
|
829
|
-
expiration?: number | undefined;
|
|
830
|
-
validatorId?: number | undefined;
|
|
831
|
-
validatorContract?: string | undefined;
|
|
832
|
-
sealingPair?: {
|
|
833
|
-
privateKey: string;
|
|
834
|
-
publicKey: string;
|
|
835
|
-
} | undefined;
|
|
836
|
-
issuerSignature?: string | undefined;
|
|
837
|
-
recipientSignature?: string | undefined;
|
|
838
|
-
}, {
|
|
839
|
-
recipient: `0x${string}`;
|
|
840
|
-
type: "self" | "sharing" | "recipient";
|
|
165
|
+
declare const validateSelfPermit: (permit: any) => {
|
|
841
166
|
name: string;
|
|
167
|
+
type: "self" | "sharing" | "recipient";
|
|
842
168
|
issuer: `0x${string}`;
|
|
843
169
|
expiration: number;
|
|
170
|
+
recipient: `0x${string}`;
|
|
844
171
|
validatorId: number;
|
|
845
172
|
validatorContract: `0x${string}`;
|
|
846
|
-
issuerSignature: string
|
|
847
|
-
recipientSignature: string
|
|
173
|
+
issuerSignature: `0x${string}`;
|
|
174
|
+
recipientSignature: `0x${string}`;
|
|
848
175
|
sealingPair?: {
|
|
849
176
|
privateKey: string;
|
|
850
177
|
publicKey: string;
|
|
851
178
|
} | undefined;
|
|
852
|
-
}
|
|
179
|
+
};
|
|
853
180
|
/**
|
|
854
181
|
* Validates a fully formed sharing permit
|
|
855
182
|
*/
|
|
856
|
-
declare const validateSharingPermit: (permit: any) =>
|
|
857
|
-
type: "self" | "sharing" | "recipient";
|
|
858
|
-
issuer: string;
|
|
859
|
-
recipient?: string | undefined;
|
|
860
|
-
name?: string | undefined;
|
|
861
|
-
expiration?: number | undefined;
|
|
862
|
-
validatorId?: number | undefined;
|
|
863
|
-
validatorContract?: string | undefined;
|
|
864
|
-
sealingPair?: {
|
|
865
|
-
privateKey: string;
|
|
866
|
-
publicKey: string;
|
|
867
|
-
} | undefined;
|
|
868
|
-
issuerSignature?: string | undefined;
|
|
869
|
-
recipientSignature?: string | undefined;
|
|
870
|
-
}, {
|
|
871
|
-
recipient: `0x${string}`;
|
|
872
|
-
type: "self" | "sharing" | "recipient";
|
|
183
|
+
declare const validateSharingPermit: (permit: any) => {
|
|
873
184
|
name: string;
|
|
185
|
+
type: "self" | "sharing" | "recipient";
|
|
874
186
|
issuer: `0x${string}`;
|
|
875
187
|
expiration: number;
|
|
188
|
+
recipient: `0x${string}`;
|
|
876
189
|
validatorId: number;
|
|
877
190
|
validatorContract: `0x${string}`;
|
|
878
|
-
issuerSignature: string
|
|
879
|
-
recipientSignature: string
|
|
191
|
+
issuerSignature: `0x${string}`;
|
|
192
|
+
recipientSignature: `0x${string}`;
|
|
880
193
|
sealingPair?: {
|
|
881
194
|
privateKey: string;
|
|
882
195
|
publicKey: string;
|
|
883
196
|
} | undefined;
|
|
884
|
-
}
|
|
197
|
+
};
|
|
885
198
|
/**
|
|
886
199
|
* Validates a fully formed import/recipient permit
|
|
887
200
|
*/
|
|
888
|
-
declare const validateImportPermit: (permit: any) =>
|
|
889
|
-
type: "self" | "sharing" | "recipient";
|
|
890
|
-
issuer: string;
|
|
891
|
-
recipient?: string | undefined;
|
|
892
|
-
name?: string | undefined;
|
|
893
|
-
expiration?: number | undefined;
|
|
894
|
-
validatorId?: number | undefined;
|
|
895
|
-
validatorContract?: string | undefined;
|
|
896
|
-
sealingPair?: {
|
|
897
|
-
privateKey: string;
|
|
898
|
-
publicKey: string;
|
|
899
|
-
} | undefined;
|
|
900
|
-
issuerSignature?: string | undefined;
|
|
901
|
-
recipientSignature?: string | undefined;
|
|
902
|
-
}, {
|
|
903
|
-
recipient: `0x${string}`;
|
|
904
|
-
type: "self" | "sharing" | "recipient";
|
|
201
|
+
declare const validateImportPermit: (permit: any) => {
|
|
905
202
|
name: string;
|
|
203
|
+
type: "self" | "sharing" | "recipient";
|
|
906
204
|
issuer: `0x${string}`;
|
|
907
205
|
expiration: number;
|
|
206
|
+
recipient: `0x${string}`;
|
|
908
207
|
validatorId: number;
|
|
909
208
|
validatorContract: `0x${string}`;
|
|
910
|
-
issuerSignature: string
|
|
911
|
-
recipientSignature: string
|
|
209
|
+
issuerSignature: `0x${string}`;
|
|
210
|
+
recipientSignature: `0x${string}`;
|
|
912
211
|
sealingPair?: {
|
|
913
212
|
privateKey: string;
|
|
914
213
|
publicKey: string;
|
|
915
214
|
} | undefined;
|
|
916
|
-
}
|
|
215
|
+
};
|
|
917
216
|
/**
|
|
918
217
|
* Simple validation functions for common checks
|
|
919
218
|
*/
|
|
@@ -1012,7 +311,7 @@ declare const getPermit: (chainId: number | undefined, account: string | undefin
|
|
|
1012
311
|
declare const getActivePermit: (chainId: number | undefined, account: string | undefined) => Permit | undefined;
|
|
1013
312
|
declare const getPermits: (chainId: number | undefined, account: string | undefined) => Record<string, Permit>;
|
|
1014
313
|
declare const setPermit: (chainId: number, account: string, permit: Permit) => void;
|
|
1015
|
-
declare const removePermit: (chainId: number, account: string, hash: string
|
|
314
|
+
declare const removePermit: (chainId: number, account: string, hash: string) => void;
|
|
1016
315
|
declare const getActivePermitHash: (chainId: number | undefined, account: string | undefined) => string | undefined;
|
|
1017
316
|
declare const setActivePermitHash: (chainId: number, account: string, hash: string) => void;
|
|
1018
317
|
declare const removeActivePermitHash: (chainId: number, account: string) => void;
|
|
@@ -1035,11 +334,11 @@ declare const permitStore: {
|
|
|
1035
334
|
getActivePermit: (chainId: number | undefined, account: string | undefined) => Permit | undefined;
|
|
1036
335
|
getPermits: (chainId: number | undefined, account: string | undefined) => Record<string, Permit>;
|
|
1037
336
|
setPermit: (chainId: number, account: string, permit: Permit) => void;
|
|
1038
|
-
removePermit: (chainId: number, account: string, hash: string
|
|
337
|
+
removePermit: (chainId: number, account: string, hash: string) => void;
|
|
1039
338
|
getActivePermitHash: (chainId: number | undefined, account: string | undefined) => string | undefined;
|
|
1040
339
|
setActivePermitHash: (chainId: number, account: string, hash: string) => void;
|
|
1041
340
|
removeActivePermitHash: (chainId: number, account: string) => void;
|
|
1042
341
|
resetStore: () => void;
|
|
1043
342
|
};
|
|
1044
343
|
|
|
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 };
|
|
344
|
+
export { EIP712Message, EIP712Types, ImportPermitOptionsValidator, ImportPermitValidator, PERMIT_STORE_DEFAULTS, Permission, Permit, PermitSignaturePrimaryType, SelfPermitOptionsValidator, SelfPermitValidator, SerializedPermit, SharingPermitOptionsValidator, SharingPermitValidator, SignatureTypes, SignatureUtils, ValidationResult, ValidationUtils, _permitStore, addressNotZeroSchema, addressSchema, bytesNotEmptySchema, bytesSchema, clearStaleStore, getActivePermit, getActivePermitHash, getPermit, getPermits, getSignatureTypesAndMessage, permitStore, removeActivePermitHash, removePermit, resetStore, setActivePermitHash, setPermit, validateImportPermit, validateImportPermitOptions, validateSelfPermit, validateSelfPermitOptions, validateSharingPermit, validateSharingPermitOptions };
|