ox 1.8.1 → 1.8.3
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 +35 -0
- package/dist/core/Frame.d.ts +23 -20
- package/dist/core/Frame.d.ts.map +1 -1
- package/dist/core/Frame.js +28 -23
- package/dist/core/Frame.js.map +1 -1
- package/dist/core/FrameReceipt.d.ts +23 -14
- package/dist/core/FrameReceipt.d.ts.map +1 -1
- package/dist/core/FrameReceipt.js +15 -11
- package/dist/core/FrameReceipt.js.map +1 -1
- package/dist/core/FrameRequest.d.ts +50 -0
- package/dist/core/FrameRequest.d.ts.map +1 -0
- package/dist/core/FrameRequest.js +59 -0
- package/dist/core/FrameRequest.js.map +1 -0
- package/dist/core/FrameSignature.d.ts +17 -16
- package/dist/core/FrameSignature.d.ts.map +1 -1
- package/dist/core/FrameSignature.js +38 -21
- package/dist/core/FrameSignature.js.map +1 -1
- package/dist/core/Siwe.d.ts.map +1 -1
- package/dist/core/Siwe.js +3 -3
- package/dist/core/Siwe.js.map +1 -1
- package/dist/core/Transaction.d.ts +2 -2
- package/dist/core/Transaction.d.ts.map +1 -1
- package/dist/core/Transaction.js.map +1 -1
- package/dist/core/TransactionRequest.d.ts +5 -5
- package/dist/core/TransactionRequest.d.ts.map +1 -1
- package/dist/core/TransactionRequest.js +3 -3
- package/dist/core/TransactionRequest.js.map +1 -1
- package/dist/core/TxEnvelope.d.ts +3 -1
- package/dist/core/TxEnvelope.d.ts.map +1 -1
- package/dist/core/TxEnvelope.js +9 -1
- package/dist/core/TxEnvelope.js.map +1 -1
- package/dist/core/TxEnvelopeEip8141.d.ts +4 -4
- package/dist/core/TxEnvelopeEip8141.js +8 -8
- package/dist/core/TxEnvelopeEip8141.js.map +1 -1
- package/dist/core/internal/rpcSchemas/eth.d.ts +16 -4
- package/dist/core/internal/rpcSchemas/eth.d.ts.map +1 -1
- package/dist/index.d.ts +21 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -5
- package/dist/index.js.map +1 -1
- package/dist/zod/Block.d.ts +49 -37
- package/dist/zod/Block.d.ts.map +1 -1
- package/dist/zod/Frame.d.ts +14 -14
- package/dist/zod/Frame.js +5 -5
- package/dist/zod/Frame.js.map +1 -1
- package/dist/zod/FrameReceipt.d.ts +42 -2
- package/dist/zod/FrameReceipt.d.ts.map +1 -1
- package/dist/zod/FrameReceipt.js +11 -1
- package/dist/zod/FrameReceipt.js.map +1 -1
- package/dist/zod/FrameRequest.d.ts +40 -0
- package/dist/zod/FrameRequest.d.ts.map +1 -0
- package/dist/zod/FrameRequest.js +37 -0
- package/dist/zod/FrameRequest.js.map +1 -0
- package/dist/zod/FrameSignature.d.ts +21 -13
- package/dist/zod/FrameSignature.d.ts.map +1 -1
- package/dist/zod/FrameSignature.js +10 -7
- package/dist/zod/FrameSignature.js.map +1 -1
- package/dist/zod/RpcSchema.d.ts +447 -265
- package/dist/zod/RpcSchema.d.ts.map +1 -1
- package/dist/zod/Transaction.d.ts +98 -74
- package/dist/zod/Transaction.d.ts.map +1 -1
- package/dist/zod/Transaction.js +4 -4
- package/dist/zod/Transaction.js.map +1 -1
- package/dist/zod/TransactionEnvelope.d.ts +50 -34
- package/dist/zod/TransactionEnvelope.d.ts.map +1 -1
- package/dist/zod/TransactionReceipt.d.ts +42 -2
- package/dist/zod/TransactionReceipt.d.ts.map +1 -1
- package/dist/zod/TransactionRequest.d.ts +29 -21
- package/dist/zod/TransactionRequest.d.ts.map +1 -1
- package/dist/zod/TransactionRequest.js +3 -3
- package/dist/zod/TransactionRequest.js.map +1 -1
- package/dist/zod/TxEnvelopeEip8141.d.ts +37 -25
- package/dist/zod/TxEnvelopeEip8141.d.ts.map +1 -1
- package/dist/zod/internal/rpcSchemas/Eth.d.ts +449 -267
- package/dist/zod/internal/rpcSchemas/Eth.d.ts.map +1 -1
- package/dist/zod/internal/rpcSchemas/Eth.js +9 -0
- package/dist/zod/internal/rpcSchemas/Eth.js.map +1 -1
- package/dist/zod/internal/rpcSchemas/Wallet.d.ts +49 -21
- package/dist/zod/internal/rpcSchemas/Wallet.d.ts.map +1 -1
- package/dist/zod/tempo/RpcSchemaTempo.d.ts +64 -48
- package/dist/zod/tempo/RpcSchemaTempo.d.ts.map +1 -1
- package/dist/zod/tempo/Transaction.d.ts +49 -37
- package/dist/zod/tempo/Transaction.d.ts.map +1 -1
- package/dist/zod/z.d.ts +1 -0
- package/dist/zod/z.d.ts.map +1 -1
- package/dist/zod/z.js +1 -0
- package/dist/zod/z.js.map +1 -1
- package/package.json +11 -1
- package/src/core/Frame.ts +41 -33
- package/src/core/FrameReceipt.ts +30 -16
- package/src/core/FrameRequest.ts +78 -0
- package/src/core/FrameSignature.ts +64 -34
- package/src/core/Siwe.ts +21 -13
- package/src/core/Transaction.ts +35 -24
- package/src/core/TransactionRequest.ts +9 -7
- package/src/core/TxEnvelope.ts +9 -1
- package/src/core/TxEnvelopeEip8141.ts +8 -8
- package/src/core/_test/AbiConstructor.test.ts +2 -0
- package/src/core/_test/Frame.test-d.ts +16 -7
- package/src/core/_test/Frame.test.ts +52 -24
- package/src/core/_test/FrameReceipt.test.ts +15 -9
- package/src/core/_test/FrameRequest.test-d.ts +16 -0
- package/src/core/_test/FrameRequest.test.ts +41 -0
- package/src/core/_test/FrameRpc.test.ts +131 -0
- package/src/core/_test/FrameSignature.test-d.ts +20 -0
- package/src/core/_test/FrameSignature.test.ts +132 -11
- package/src/core/_test/RpcSchema.test-d.ts +45 -0
- package/src/core/_test/Siwe.test.ts +147 -0
- package/src/core/_test/TransactionEnvelope.test.ts +1 -1
- package/src/core/_test/TransactionReceipt.test.ts +32 -6
- package/src/core/_test/TransactionRequest.test-d.ts +10 -1
- package/src/core/_test/TransactionRequest.test.ts +3 -2
- package/src/core/_test/TxEnvelopeEip8141.test-d.ts +2 -2
- package/src/core/_test/TxEnvelopeEip8141.test.ts +92 -53
- package/src/core/_test/index.test.ts +1 -0
- package/src/core/internal/rpcSchemas/eth.ts +13 -4
- package/src/index.ts +22 -5
- package/src/version.ts +1 -1
- package/src/zod/Frame.ts +5 -5
- package/src/zod/FrameReceipt.ts +11 -1
- package/src/zod/FrameRequest.ts +46 -0
- package/src/zod/FrameSignature.ts +10 -7
- package/src/zod/Transaction.ts +4 -4
- package/src/zod/TransactionRequest.ts +3 -3
- package/src/zod/_test/Frame.test.ts +13 -11
- package/src/zod/_test/FrameReceipt.test.ts +11 -4
- package/src/zod/_test/FrameRequest.test-d.ts +15 -0
- package/src/zod/_test/FrameRequest.test.ts +44 -0
- package/src/zod/_test/FrameSignature.test.ts +73 -9
- package/src/zod/_test/RpcSchema.test.ts +106 -0
- package/src/zod/_test/TransactionRequest.test.ts +61 -0
- package/src/zod/_test/TxEnvelopeEip8141.test.ts +3 -3
- package/src/zod/internal/rpcSchemas/Eth.ts +20 -0
- package/src/zod/z.ts +1 -0
package/dist/zod/Block.d.ts
CHANGED
|
@@ -249,31 +249,35 @@ export declare const WithTransactions: z.ZodMiniObject<{
|
|
|
249
249
|
data: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
250
250
|
frames: z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniCodec<z.ZodMiniObject<{
|
|
251
251
|
data: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
252
|
-
|
|
253
|
-
flags: z.
|
|
254
|
-
mode: z.
|
|
255
|
-
|
|
252
|
+
executionGas: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
253
|
+
flags: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
254
|
+
mode: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
255
|
+
stateGas: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
256
256
|
target: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniTemplateLiteral<`0x${string}`>>>;
|
|
257
257
|
value: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
258
258
|
}, z.core.$strip>, z.ZodMiniType<import("../core/Frame.js").Frame<bigint>, import("../core/Frame.js").Frame<bigint>, z.core.$ZodTypeInternals<import("../core/Frame.js").Frame<bigint>, import("../core/Frame.js").Frame<bigint>>>>>>;
|
|
259
259
|
from: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
260
|
-
gas: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint
|
|
260
|
+
gas: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>>;
|
|
261
261
|
gasPrice: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>>;
|
|
262
262
|
hash: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
263
|
-
input: z.ZodMiniTemplateLiteral<`0x${string}
|
|
263
|
+
input: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
264
264
|
maxFeePerBlobGas: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
|
|
265
265
|
maxFeePerGas: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
|
|
266
266
|
maxPriorityFeePerGas: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
|
|
267
267
|
nonce: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
|
|
268
268
|
signatures: z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniCodec<z.ZodMiniObject<{
|
|
269
|
-
msg: z.ZodMiniTemplateLiteral<`0x${string}
|
|
270
|
-
scheme: z.
|
|
271
|
-
|
|
272
|
-
|
|
269
|
+
msg: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
270
|
+
scheme: z.ZodMiniEnum<{
|
|
271
|
+
"0x1": "0x1";
|
|
272
|
+
"0x0": "0x0";
|
|
273
|
+
"0x2": "0x2";
|
|
274
|
+
}>;
|
|
275
|
+
signature: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
276
|
+
signer: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"0x">, z.ZodMiniTemplateLiteral<`0x${string}`>]>>;
|
|
273
277
|
}, z.core.$strip>, z.ZodMiniType<import("../core/FrameSignature.js").FrameSignature, import("../core/FrameSignature.js").FrameSignature, z.core.$ZodTypeInternals<import("../core/FrameSignature.js").FrameSignature, import("../core/FrameSignature.js").FrameSignature>>>>>;
|
|
274
|
-
to: z.ZodMiniNullable<z.ZodMiniTemplateLiteral<`0x${string}
|
|
278
|
+
to: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniTemplateLiteral<`0x${string}`>>>;
|
|
275
279
|
type: z.ZodMiniCodec<z.ZodMiniLiteral<"0x6">, z.ZodMiniLiteral<"eip8141">>;
|
|
276
|
-
value: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint
|
|
280
|
+
value: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>>;
|
|
277
281
|
}, z.core.$strip>, z.ZodMiniObject<{
|
|
278
282
|
chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumberFormat>;
|
|
279
283
|
yParity: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumberFormat>;
|
|
@@ -468,14 +472,15 @@ export declare const WithTransactionsToRpc: z.ZodMiniObject<{
|
|
|
468
472
|
data: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
469
473
|
frames: z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniCodec<z.ZodMiniObject<{
|
|
470
474
|
data: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
471
|
-
|
|
472
|
-
flags: z.
|
|
473
|
-
mode: z.
|
|
474
|
-
|
|
475
|
+
executionGas: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
476
|
+
flags: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
477
|
+
mode: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
478
|
+
stateGas: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
475
479
|
target: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniTemplateLiteral<`0x${string}`>>>;
|
|
476
480
|
value: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
477
481
|
}, z.core.$strip>, z.ZodMiniObject<{
|
|
478
482
|
data: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
483
|
+
executionGas: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>, z.ZodMiniNumber<number>]>>;
|
|
479
484
|
flags: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniNumber<number>, z.ZodMiniEnum<{
|
|
480
485
|
approveExecution: "approveExecution";
|
|
481
486
|
approveExecutionAndPayment: "approveExecutionAndPayment";
|
|
@@ -483,7 +488,6 @@ export declare const WithTransactionsToRpc: z.ZodMiniObject<{
|
|
|
483
488
|
atomicBatch: "atomicBatch";
|
|
484
489
|
none: "none";
|
|
485
490
|
}>]>>;
|
|
486
|
-
gas: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>, z.ZodMiniNumber<number>]>>;
|
|
487
491
|
mode: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniNumber<number>, z.ZodMiniEnum<{
|
|
488
492
|
verify: "verify";
|
|
489
493
|
default: "default";
|
|
@@ -494,23 +498,27 @@ export declare const WithTransactionsToRpc: z.ZodMiniObject<{
|
|
|
494
498
|
value: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>, z.ZodMiniNumber<number>]>>;
|
|
495
499
|
}, z.core.$strip>>>>;
|
|
496
500
|
from: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
497
|
-
gas: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniUnion<readonly [z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>, z.ZodMiniNumberFormat]
|
|
501
|
+
gas: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniUnion<readonly [z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>, z.ZodMiniNumberFormat]>>>;
|
|
498
502
|
gasPrice: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniUnion<readonly [z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>, z.ZodMiniNumberFormat]>>>;
|
|
499
503
|
hash: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
500
|
-
input: z.ZodMiniTemplateLiteral<`0x${string}
|
|
504
|
+
input: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
501
505
|
maxFeePerBlobGas: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniUnion<readonly [z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>, z.ZodMiniNumberFormat]>>;
|
|
502
506
|
maxFeePerGas: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniUnion<readonly [z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>, z.ZodMiniNumberFormat]>>;
|
|
503
507
|
maxPriorityFeePerGas: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniUnion<readonly [z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>, z.ZodMiniNumberFormat]>>;
|
|
504
508
|
nonce: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniUnion<readonly [z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>, z.ZodMiniNumberFormat]>>;
|
|
505
509
|
signatures: z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniCodec<z.ZodMiniObject<{
|
|
506
|
-
msg: z.ZodMiniTemplateLiteral<`0x${string}
|
|
507
|
-
scheme: z.
|
|
508
|
-
|
|
509
|
-
|
|
510
|
+
msg: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
511
|
+
scheme: z.ZodMiniEnum<{
|
|
512
|
+
"0x1": "0x1";
|
|
513
|
+
"0x0": "0x0";
|
|
514
|
+
"0x2": "0x2";
|
|
515
|
+
}>;
|
|
516
|
+
signature: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
517
|
+
signer: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"0x">, z.ZodMiniTemplateLiteral<`0x${string}`>]>>;
|
|
510
518
|
}, z.core.$strip>, z.ZodMiniType<import("../core/FrameSignature.js").FrameSignature, import("../core/FrameSignature.js").FrameSignature, z.core.$ZodTypeInternals<import("../core/FrameSignature.js").FrameSignature, import("../core/FrameSignature.js").FrameSignature>>>>>;
|
|
511
|
-
to: z.ZodMiniNullable<z.ZodMiniTemplateLiteral<`0x${string}
|
|
519
|
+
to: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniTemplateLiteral<`0x${string}`>>>;
|
|
512
520
|
type: z.ZodMiniCodec<z.ZodMiniLiteral<"0x6">, z.ZodMiniLiteral<"eip8141">>;
|
|
513
|
-
value: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniUnion<readonly [z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>, z.ZodMiniNumberFormat]
|
|
521
|
+
value: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniUnion<readonly [z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>, z.ZodMiniNumberFormat]>>>;
|
|
514
522
|
}, z.core.$strip>, z.ZodMiniObject<{
|
|
515
523
|
chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniUnion<readonly [z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumberFormat]>>;
|
|
516
524
|
yParity: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniUnion<readonly [z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumberFormat]>>;
|
|
@@ -740,31 +748,35 @@ export declare const PendingWithTransactions: z.ZodMiniObject<{
|
|
|
740
748
|
data: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
741
749
|
frames: z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniCodec<z.ZodMiniObject<{
|
|
742
750
|
data: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
743
|
-
|
|
744
|
-
flags: z.
|
|
745
|
-
mode: z.
|
|
746
|
-
|
|
751
|
+
executionGas: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
752
|
+
flags: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
753
|
+
mode: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
754
|
+
stateGas: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
747
755
|
target: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniTemplateLiteral<`0x${string}`>>>;
|
|
748
756
|
value: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
749
757
|
}, z.core.$strip>, z.ZodMiniType<import("../core/Frame.js").Frame<bigint>, import("../core/Frame.js").Frame<bigint>, z.core.$ZodTypeInternals<import("../core/Frame.js").Frame<bigint>, import("../core/Frame.js").Frame<bigint>>>>>>;
|
|
750
758
|
from: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
751
|
-
gas: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint
|
|
759
|
+
gas: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>>;
|
|
752
760
|
gasPrice: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>>;
|
|
753
761
|
hash: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
754
|
-
input: z.ZodMiniTemplateLiteral<`0x${string}
|
|
762
|
+
input: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
755
763
|
maxFeePerBlobGas: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
|
|
756
764
|
maxFeePerGas: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
|
|
757
765
|
maxPriorityFeePerGas: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
|
|
758
766
|
nonce: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>;
|
|
759
767
|
signatures: z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniCodec<z.ZodMiniObject<{
|
|
760
|
-
msg: z.ZodMiniTemplateLiteral<`0x${string}
|
|
761
|
-
scheme: z.
|
|
762
|
-
|
|
763
|
-
|
|
768
|
+
msg: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
769
|
+
scheme: z.ZodMiniEnum<{
|
|
770
|
+
"0x1": "0x1";
|
|
771
|
+
"0x0": "0x0";
|
|
772
|
+
"0x2": "0x2";
|
|
773
|
+
}>;
|
|
774
|
+
signature: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
775
|
+
signer: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"0x">, z.ZodMiniTemplateLiteral<`0x${string}`>]>>;
|
|
764
776
|
}, z.core.$strip>, z.ZodMiniType<import("../core/FrameSignature.js").FrameSignature, import("../core/FrameSignature.js").FrameSignature, z.core.$ZodTypeInternals<import("../core/FrameSignature.js").FrameSignature, import("../core/FrameSignature.js").FrameSignature>>>>>;
|
|
765
|
-
to: z.ZodMiniNullable<z.ZodMiniTemplateLiteral<`0x${string}
|
|
777
|
+
to: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniTemplateLiteral<`0x${string}`>>>;
|
|
766
778
|
type: z.ZodMiniCodec<z.ZodMiniLiteral<"0x6">, z.ZodMiniLiteral<"eip8141">>;
|
|
767
|
-
value: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint
|
|
779
|
+
value: z.ZodMiniOptional<z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>>>;
|
|
768
780
|
}, z.core.$strip>, z.ZodMiniObject<{
|
|
769
781
|
chainId: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumberFormat>;
|
|
770
782
|
yParity: z.ZodMiniCodec<z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniNumberFormat>;
|
package/dist/zod/Block.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Block.d.ts","sourceRoot":"","sources":["../../src/zod/Block.ts"],"names":[],"mappings":"AAMA,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAM5B,CAAA;AAED,uFAAuF;AACvF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMjC,CAAA;AAED,oDAAoD;AACpD,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMnB,CAAA;AAED,mDAAmD;AACnD,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMnC,CAAA"}
|
package/dist/zod/Frame.d.ts
CHANGED
|
@@ -5,26 +5,27 @@ export declare const Decoded: z.ZodMiniType<core_Frame.Frame, core_Frame.Frame>;
|
|
|
5
5
|
/** RPC frame schema. */
|
|
6
6
|
export declare const Rpc: z.ZodMiniObject<{
|
|
7
7
|
data: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
8
|
-
|
|
9
|
-
flags: z.
|
|
10
|
-
mode: z.
|
|
11
|
-
|
|
8
|
+
executionGas: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
9
|
+
flags: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
10
|
+
mode: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
11
|
+
stateGas: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
12
12
|
target: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniTemplateLiteral<`0x${string}`>>>;
|
|
13
13
|
value: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
14
14
|
}, z.core.$strip>;
|
|
15
15
|
/** Codec between RPC and decoded frames. */
|
|
16
16
|
export declare const Frame: z.ZodMiniCodec<z.ZodMiniObject<{
|
|
17
17
|
data: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
18
|
-
|
|
19
|
-
flags: z.
|
|
20
|
-
mode: z.
|
|
21
|
-
|
|
18
|
+
executionGas: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
19
|
+
flags: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
20
|
+
mode: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
21
|
+
stateGas: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
22
22
|
target: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniTemplateLiteral<`0x${string}`>>>;
|
|
23
23
|
value: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
24
24
|
}, z.core.$strip>, z.ZodMiniType<core_Frame.Frame<bigint>, core_Frame.Frame<bigint>, z.core.$ZodTypeInternals<core_Frame.Frame<bigint>, core_Frame.Frame<bigint>>>>;
|
|
25
25
|
/** Decoded frame schema accepting numberish budgets. */
|
|
26
26
|
export declare const DecodedToRpc: z.ZodMiniObject<{
|
|
27
27
|
data: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
28
|
+
executionGas: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>, z.ZodMiniNumber<number>]>>;
|
|
28
29
|
flags: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniNumber<number>, z.ZodMiniEnum<{
|
|
29
30
|
approveExecution: "approveExecution";
|
|
30
31
|
approveExecutionAndPayment: "approveExecutionAndPayment";
|
|
@@ -32,7 +33,6 @@ export declare const DecodedToRpc: z.ZodMiniObject<{
|
|
|
32
33
|
atomicBatch: "atomicBatch";
|
|
33
34
|
none: "none";
|
|
34
35
|
}>]>>;
|
|
35
|
-
gas: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>, z.ZodMiniNumber<number>]>>;
|
|
36
36
|
mode: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniNumber<number>, z.ZodMiniEnum<{
|
|
37
37
|
verify: "verify";
|
|
38
38
|
default: "default";
|
|
@@ -45,14 +45,15 @@ export declare const DecodedToRpc: z.ZodMiniObject<{
|
|
|
45
45
|
/** Encode-only frame codec accepting numberish budgets. */
|
|
46
46
|
export declare const FrameToRpc: z.ZodMiniCodec<z.ZodMiniObject<{
|
|
47
47
|
data: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
48
|
-
|
|
49
|
-
flags: z.
|
|
50
|
-
mode: z.
|
|
51
|
-
|
|
48
|
+
executionGas: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
49
|
+
flags: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
50
|
+
mode: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
51
|
+
stateGas: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
52
52
|
target: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniTemplateLiteral<`0x${string}`>>>;
|
|
53
53
|
value: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
54
54
|
}, z.core.$strip>, z.ZodMiniObject<{
|
|
55
55
|
data: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
56
|
+
executionGas: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>, z.ZodMiniNumber<number>]>>;
|
|
56
57
|
flags: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniNumber<number>, z.ZodMiniEnum<{
|
|
57
58
|
approveExecution: "approveExecution";
|
|
58
59
|
approveExecutionAndPayment: "approveExecutionAndPayment";
|
|
@@ -60,7 +61,6 @@ export declare const FrameToRpc: z.ZodMiniCodec<z.ZodMiniObject<{
|
|
|
60
61
|
atomicBatch: "atomicBatch";
|
|
61
62
|
none: "none";
|
|
62
63
|
}>]>>;
|
|
63
|
-
gas: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>, z.ZodMiniNumber<number>]>>;
|
|
64
64
|
mode: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniNumber<number>, z.ZodMiniEnum<{
|
|
65
65
|
verify: "verify";
|
|
66
66
|
default: "default";
|
package/dist/zod/Frame.js
CHANGED
|
@@ -22,10 +22,10 @@ export const Decoded = z
|
|
|
22
22
|
export const Rpc = z
|
|
23
23
|
.object({
|
|
24
24
|
data: z_Hex.Hex,
|
|
25
|
-
|
|
26
|
-
flags:
|
|
27
|
-
mode:
|
|
28
|
-
|
|
25
|
+
executionGas: z_Hex.Hex,
|
|
26
|
+
flags: z_Hex.Hex,
|
|
27
|
+
mode: z_Hex.Hex,
|
|
28
|
+
stateGas: z_Hex.Hex,
|
|
29
29
|
target: z.optional(z.nullable(z_Address.Address)),
|
|
30
30
|
value: z_Hex.Hex,
|
|
31
31
|
})
|
|
@@ -63,8 +63,8 @@ export const FrameToRpc = z.codec(Rpc, DecodedToRpc, {
|
|
|
63
63
|
function fields(uint) {
|
|
64
64
|
return {
|
|
65
65
|
data: z.optional(z_Hex.Hex),
|
|
66
|
+
executionGas: z.optional(uint),
|
|
66
67
|
flags: z.optional(Flags),
|
|
67
|
-
gas: z.optional(uint),
|
|
68
68
|
mode: z.optional(Mode),
|
|
69
69
|
stateGas: z.optional(uint),
|
|
70
70
|
to: z.optional(z_Address.Address),
|
package/dist/zod/Frame.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Frame.js","sourceRoot":"","sources":["../../src/zod/Frame.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,OAAO,KAAK,UAAU,MAAM,kBAAkB,CAAA;AAC9C,OAAO,KAAK,SAAS,MAAM,cAAc,CAAA;AACzC,OAAO,KAAK,KAAK,MAAM,UAAU,CAAA;AACjC,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAE7B,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;AAC3E,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC;IACpB,CAAC,CAAC,MAAM,EAAE;IACV,CAAC,CAAC,IAAI,CAAC;QACL,kBAAkB;QAClB,4BAA4B;QAC5B,gBAAgB;QAChB,aAAa;QACb,MAAM;KACP,CAAC;CACH,CAAC,CAAA;AAEF,4BAA4B;AAC5B,MAAM,CAAC,MAAM,OAAO,GAAsD,CAAC;KACxE,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;KAC1B,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAA;AAExD,wBAAwB;AACxB,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC;KACjB,MAAM,CAAC;IACN,IAAI,EAAE,KAAK,CAAC,GAAG;IACf,
|
|
1
|
+
{"version":3,"file":"Frame.js","sourceRoot":"","sources":["../../src/zod/Frame.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,OAAO,KAAK,UAAU,MAAM,kBAAkB,CAAA;AA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,CAAC,QAAQ,CAAC,KAAK,CAAC;QACxB,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC;QACtB,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC;QAC1B,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,OAAO,CAAC;QACjC,KAAK,EAAE,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC;KACxB,CAAA;AACH,CAAC"}
|
|
@@ -2,19 +2,39 @@ import * as z from 'zod/mini';
|
|
|
2
2
|
/** Codec between RPC and decoded frame receipts. */
|
|
3
3
|
export declare const FrameReceipt: z.ZodMiniCodec<z.ZodMiniObject<{
|
|
4
4
|
executionGasUsed: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
5
|
+
gasUsed: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
5
6
|
logs: z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
|
|
6
7
|
address: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
8
|
+
blockHash: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
9
|
+
blockNumber: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
10
|
+
blockTimestamp: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
7
11
|
data: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
12
|
+
logIndex: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
13
|
+
removed: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
8
14
|
topics: z.ZodMiniArray<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
15
|
+
transactionHash: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
16
|
+
transactionIndex: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
9
17
|
}, z.core.$strip>>>;
|
|
10
18
|
stateGasUsed: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
11
|
-
status: z.
|
|
19
|
+
status: z.ZodMiniEnum<{
|
|
20
|
+
"0x1": "0x1";
|
|
21
|
+
"0x0": "0x0";
|
|
22
|
+
"0x2": "0x2";
|
|
23
|
+
}>;
|
|
12
24
|
}, z.core.$strip>, z.ZodMiniObject<{
|
|
25
|
+
executionGasUsed: z.ZodMiniBigInt<bigint>;
|
|
13
26
|
gasUsed: z.ZodMiniBigInt<bigint>;
|
|
14
27
|
logs: z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
|
|
15
28
|
address: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
29
|
+
blockHash: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
30
|
+
blockNumber: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
31
|
+
blockTimestamp: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
16
32
|
data: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
33
|
+
logIndex: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
34
|
+
removed: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
17
35
|
topics: z.ZodMiniArray<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
36
|
+
transactionHash: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
37
|
+
transactionIndex: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
18
38
|
}, z.core.$strip>>>;
|
|
19
39
|
stateGasUsed: z.ZodMiniBigInt<bigint>;
|
|
20
40
|
status: z.ZodMiniEnum<{
|
|
@@ -26,24 +46,44 @@ export declare const FrameReceipt: z.ZodMiniCodec<z.ZodMiniObject<{
|
|
|
26
46
|
/** Encode-only frame receipt codec accepting numberish gas. */
|
|
27
47
|
export declare const FrameReceiptToRpc: z.ZodMiniCodec<z.ZodMiniObject<{
|
|
28
48
|
executionGasUsed: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
49
|
+
gasUsed: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
29
50
|
logs: z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
|
|
30
51
|
address: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
52
|
+
blockHash: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
53
|
+
blockNumber: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
54
|
+
blockTimestamp: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
31
55
|
data: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
56
|
+
logIndex: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
57
|
+
removed: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
32
58
|
topics: z.ZodMiniArray<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
59
|
+
transactionHash: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
60
|
+
transactionIndex: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
33
61
|
}, z.core.$strip>>>;
|
|
34
62
|
stateGasUsed: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
35
|
-
status: z.
|
|
63
|
+
status: z.ZodMiniEnum<{
|
|
64
|
+
"0x1": "0x1";
|
|
65
|
+
"0x0": "0x0";
|
|
66
|
+
"0x2": "0x2";
|
|
67
|
+
}>;
|
|
36
68
|
}, z.core.$strip>, z.ZodMiniObject<{
|
|
37
69
|
logs: z.ZodMiniReadonly<z.ZodMiniArray<z.ZodMiniObject<{
|
|
38
70
|
address: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
71
|
+
blockHash: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
72
|
+
blockNumber: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
73
|
+
blockTimestamp: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
39
74
|
data: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
75
|
+
logIndex: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
76
|
+
removed: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
40
77
|
topics: z.ZodMiniArray<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
78
|
+
transactionHash: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
79
|
+
transactionIndex: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
41
80
|
}, z.core.$strip>>>;
|
|
42
81
|
status: z.ZodMiniEnum<{
|
|
43
82
|
reverted: "reverted";
|
|
44
83
|
skipped: "skipped";
|
|
45
84
|
success: "success";
|
|
46
85
|
}>;
|
|
86
|
+
executionGasUsed: z.ZodMiniUnion<readonly [z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>, z.ZodMiniNumberFormat]>;
|
|
47
87
|
gasUsed: z.ZodMiniUnion<readonly [z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>, z.ZodMiniNumberFormat]>;
|
|
48
88
|
stateGasUsed: z.ZodMiniUnion<readonly [z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>, z.ZodMiniNumberFormat]>;
|
|
49
89
|
}, z.core.$strip>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FrameReceipt.d.ts","sourceRoot":"","sources":["../../src/zod/FrameReceipt.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"FrameReceipt.d.ts","sourceRoot":"","sources":["../../src/zod/FrameReceipt.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AA8B7B,oDAAoD;AACpD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAGvB,CAAA;AAEF,+DAA+D;AAC/D,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAW7B,CAAA"}
|
package/dist/zod/FrameReceipt.js
CHANGED
|
@@ -6,16 +6,25 @@ import { quantityHex, uintBigint, uintBigintNumberish, } from './internal/Intege
|
|
|
6
6
|
import * as z from 'zod/mini';
|
|
7
7
|
const frameLog = z.object({
|
|
8
8
|
address: z_Address.Address,
|
|
9
|
+
blockHash: z.optional(z_Hex.Hex),
|
|
10
|
+
blockNumber: z.optional(quantityHex()),
|
|
11
|
+
blockTimestamp: z.optional(quantityHex()),
|
|
9
12
|
data: z_Hex.Hex,
|
|
13
|
+
logIndex: z.optional(quantityHex()),
|
|
14
|
+
removed: z.optional(z.boolean()),
|
|
10
15
|
topics: z.array(z_Hex.Hex),
|
|
16
|
+
transactionHash: z.optional(z_Hex.Hex),
|
|
17
|
+
transactionIndex: z.optional(quantityHex()),
|
|
11
18
|
});
|
|
12
19
|
const frameReceiptRpc = z.object({
|
|
13
20
|
executionGasUsed: quantityHex(),
|
|
21
|
+
gasUsed: quantityHex(),
|
|
14
22
|
logs: z.readonly(z.array(frameLog)),
|
|
15
23
|
stateGasUsed: quantityHex(),
|
|
16
|
-
status: z.
|
|
24
|
+
status: z.enum(['0x0', '0x1', '0x2']),
|
|
17
25
|
});
|
|
18
26
|
const frameReceiptDecoded = z.object({
|
|
27
|
+
executionGasUsed: uintBigint(),
|
|
19
28
|
gasUsed: uintBigint(),
|
|
20
29
|
logs: z.readonly(z.array(frameLog)),
|
|
21
30
|
stateGasUsed: uintBigint(),
|
|
@@ -28,6 +37,7 @@ export const FrameReceipt = z.codec(frameReceiptRpc, frameReceiptDecoded, {
|
|
|
28
37
|
});
|
|
29
38
|
/** Encode-only frame receipt codec accepting numberish gas. */
|
|
30
39
|
export const FrameReceiptToRpc = z.codec(frameReceiptRpc, z.extend(frameReceiptDecoded, {
|
|
40
|
+
executionGasUsed: uintBigintNumberish(),
|
|
31
41
|
gasUsed: uintBigintNumberish(),
|
|
32
42
|
stateGasUsed: uintBigintNumberish(),
|
|
33
43
|
}), {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FrameReceipt.js","sourceRoot":"","sources":["../../src/zod/FrameReceipt.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,OAAO,KAAK,iBAAiB,MAAM,yBAAyB,CAAA;AAC5D,OAAO,KAAK,SAAS,MAAM,cAAc,CAAA;AACzC,OAAO,KAAK,KAAK,MAAM,UAAU,CAAA;AACjC,OAAO,EACL,WAAW,EACX,UAAU,EACV,mBAAmB,GACpB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAE7B,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC;IACxB,OAAO,EAAE,SAAS,CAAC,OAAO;IAC1B,IAAI,EAAE,KAAK,CAAC,GAAG;IACf,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"FrameReceipt.js","sourceRoot":"","sources":["../../src/zod/FrameReceipt.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,OAAO,KAAK,iBAAiB,MAAM,yBAAyB,CAAA;AAC5D,OAAO,KAAK,SAAS,MAAM,cAAc,CAAA;AACzC,OAAO,KAAK,KAAK,MAAM,UAAU,CAAA;AACjC,OAAO,EACL,WAAW,EACX,UAAU,EACV,mBAAmB,GACpB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAE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IAC1B,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;CACnD,CAAC,CAAA;AAEF,oDAAoD;AACpD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,eAAe,EAAE,mBAAmB,EAAE;IACxE,MAAM,EAAE,iBAAiB,CAAC,OAAO;IACjC,MAAM,EAAE,iBAAiB,CAAC,KAAK;CAChC,CAAC,CAAA;AAEF,+DAA+D;AAC/D,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CACtC,eAAe,EACf,CAAC,CAAC,MAAM,CAAC,mBAAmB,EAAE;IAC5B,gBAAgB,EAAE,mBAAmB,EAAE;IACvC,OAAO,EAAE,mBAAmB,EAAE;IAC9B,YAAY,EAAE,mBAAmB,EAAE;CACpC,CAAC,EACF;IACE,MAAM,EAAE,iBAAiB,CAAC,OAAO;IACjC,MAAM,EAAE,iBAAiB,CAAC,KAAK;CAChC,CACF,CAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as z from 'zod/mini';
|
|
2
|
+
/** Codec between RPC and decoded frame requests, preserving omitted gas limits. */
|
|
3
|
+
export declare const FrameRequest: z.ZodMiniCodec<z.ZodMiniObject<{
|
|
4
|
+
data: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
5
|
+
executionGas: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
6
|
+
flags: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
7
|
+
mode: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
8
|
+
stateGas: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
9
|
+
target: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniTemplateLiteral<`0x${string}`>>>;
|
|
10
|
+
value: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
11
|
+
}, z.core.$strip>, z.ZodMiniType<import("../core/Frame.js").Frame<bigint>, import("../core/Frame.js").Frame<bigint>, z.core.$ZodTypeInternals<import("../core/Frame.js").Frame<bigint>, import("../core/Frame.js").Frame<bigint>>>>;
|
|
12
|
+
/** Encode-only frame request codec accepting numberish gas and value. */
|
|
13
|
+
export declare const FrameRequestToRpc: z.ZodMiniCodec<z.ZodMiniObject<{
|
|
14
|
+
data: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
15
|
+
executionGas: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
16
|
+
flags: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
17
|
+
mode: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
18
|
+
stateGas: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
19
|
+
target: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniTemplateLiteral<`0x${string}`>>>;
|
|
20
|
+
value: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
21
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
22
|
+
data: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
23
|
+
executionGas: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>, z.ZodMiniNumber<number>]>>;
|
|
24
|
+
flags: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniNumber<number>, z.ZodMiniEnum<{
|
|
25
|
+
approveExecution: "approveExecution";
|
|
26
|
+
approveExecutionAndPayment: "approveExecutionAndPayment";
|
|
27
|
+
approvePayment: "approvePayment";
|
|
28
|
+
atomicBatch: "atomicBatch";
|
|
29
|
+
none: "none";
|
|
30
|
+
}>]>>;
|
|
31
|
+
mode: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniNumber<number>, z.ZodMiniEnum<{
|
|
32
|
+
verify: "verify";
|
|
33
|
+
default: "default";
|
|
34
|
+
sender: "sender";
|
|
35
|
+
}>]>>;
|
|
36
|
+
stateGas: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>, z.ZodMiniNumber<number>]>>;
|
|
37
|
+
to: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
38
|
+
value: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniBigInt<bigint>, z.ZodMiniNumber<number>]>>;
|
|
39
|
+
}, z.core.$strip>>;
|
|
40
|
+
//# sourceMappingURL=FrameRequest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FrameRequest.d.ts","sourceRoot":"","sources":["../../src/zod/FrameRequest.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AA8B7B,mFAAmF;AACnF,eAAO,MAAM,YAAY;;;;;;;;mOAGvB,CAAA;AAEF,yEAAyE;AACzE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;kBAG5B,CAAA"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/* eslint-disable jsdoc-js/require-jsdoc, jsdoc-js/require-description, jsdoc-js/require-example */
|
|
2
|
+
import * as core_FrameRequest from '../core/FrameRequest.js';
|
|
3
|
+
import * as z_Address from './Address.js';
|
|
4
|
+
import * as z_Frame from './Frame.js';
|
|
5
|
+
import * as z_Hex from './Hex.js';
|
|
6
|
+
import * as z from 'zod/mini';
|
|
7
|
+
const quantity = z_Hex.Hex.check(z.refine((value) => /^0x(0|[1-9a-f][0-9a-f]*)$/.test(value), 'Invalid RPC quantity'));
|
|
8
|
+
const rpc = z
|
|
9
|
+
.object({
|
|
10
|
+
data: z.optional(z_Hex.Hex),
|
|
11
|
+
executionGas: z.optional(quantity),
|
|
12
|
+
flags: z.optional(z_Hex.Hex),
|
|
13
|
+
mode: z_Hex.Hex,
|
|
14
|
+
stateGas: z.optional(quantity),
|
|
15
|
+
target: z.optional(z.nullable(z_Address.Address)),
|
|
16
|
+
value: z.optional(quantity),
|
|
17
|
+
})
|
|
18
|
+
.check(z.refine((value) => {
|
|
19
|
+
try {
|
|
20
|
+
core_FrameRequest.fromRpc(value);
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
}, 'Invalid frame request'));
|
|
27
|
+
/** Codec between RPC and decoded frame requests, preserving omitted gas limits. */
|
|
28
|
+
export const FrameRequest = z.codec(rpc, z_Frame.Decoded, {
|
|
29
|
+
decode: core_FrameRequest.fromRpc,
|
|
30
|
+
encode: core_FrameRequest.toRpc,
|
|
31
|
+
});
|
|
32
|
+
/** Encode-only frame request codec accepting numberish gas and value. */
|
|
33
|
+
export const FrameRequestToRpc = z.codec(rpc, z_Frame.DecodedToRpc, {
|
|
34
|
+
decode: core_FrameRequest.fromRpc,
|
|
35
|
+
encode: core_FrameRequest.toRpc,
|
|
36
|
+
});
|
|
37
|
+
//# sourceMappingURL=FrameRequest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FrameRequest.js","sourceRoot":"","sources":["../../src/zod/FrameRequest.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,OAAO,KAAK,iBAAiB,MAAM,yBAAyB,CAAA;AAC5D,OAAO,KAAK,SAAS,MAAM,cAAc,CAAA;AACzC,OAAO,KAAK,OAAO,MAAM,YAAY,CAAA;AACrC,OAAO,KAAK,KAAK,MAAM,UAAU,CAAA;AACjC,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAE7B,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,KAA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,iBAAiB,CAAC,OAAO;IACjC,MAAM,EAAE,iBAAiB,CAAC,KAAK;CAChC,CAAC,CAAA"}
|
|
@@ -11,11 +11,11 @@ export declare const Arbitrary: z.ZodMiniObject<{
|
|
|
11
11
|
export declare const Secp256k1: z.ZodMiniObject<{
|
|
12
12
|
payload: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
13
13
|
scheme: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<1>, z.ZodMiniLiteral<"secp256k1">]>;
|
|
14
|
-
signature: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
14
|
+
signature: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniObject<{
|
|
15
15
|
r: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
16
16
|
s: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
17
17
|
yParity: z.ZodMiniNumber<number>;
|
|
18
|
-
}, z.core.$strip>>;
|
|
18
|
+
}, z.core.$strip>]>>;
|
|
19
19
|
signer: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
20
20
|
}, z.core.$strip>;
|
|
21
21
|
/** P-256 frame signature schema, including unsigned placeholders. */
|
|
@@ -25,11 +25,11 @@ export declare const P256: z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
|
25
25
|
x: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
26
26
|
y: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
27
27
|
}, z.core.$strip>;
|
|
28
|
-
signature: z.ZodMiniObject<{
|
|
28
|
+
signature: z.ZodMiniUnion<readonly [z.ZodMiniTemplateLiteral<`0x${string}`>, z.ZodMiniObject<{
|
|
29
29
|
r: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
30
30
|
s: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
31
31
|
yParity: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
32
|
-
}, z.core.$strip>;
|
|
32
|
+
}, z.core.$strip>]>;
|
|
33
33
|
payload: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
34
34
|
scheme: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<2>, z.ZodMiniLiteral<"p256">]>;
|
|
35
35
|
signer: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
@@ -39,7 +39,7 @@ export declare const P256: z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
|
39
39
|
x: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
40
40
|
y: z.ZodMiniTemplateLiteral<`0x${string}`>;
|
|
41
41
|
}, z.core.$strip>>;
|
|
42
|
-
signature: z.ZodMiniOptional<z.
|
|
42
|
+
signature: z.ZodMiniOptional<z.ZodMiniLiteral<"0x">>;
|
|
43
43
|
payload: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
44
44
|
scheme: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<2>, z.ZodMiniLiteral<"p256">]>;
|
|
45
45
|
signer: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
@@ -48,16 +48,24 @@ export declare const P256: z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
|
48
48
|
export declare const Decoded: z.ZodMiniType<core_FrameSignature.FrameSignature, core_FrameSignature.FrameSignature>;
|
|
49
49
|
/** RPC frame signature schema. */
|
|
50
50
|
export declare const Rpc: z.ZodMiniObject<{
|
|
51
|
-
msg: z.ZodMiniTemplateLiteral<`0x${string}
|
|
52
|
-
scheme: z.
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
msg: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
52
|
+
scheme: z.ZodMiniEnum<{
|
|
53
|
+
"0x1": "0x1";
|
|
54
|
+
"0x0": "0x0";
|
|
55
|
+
"0x2": "0x2";
|
|
56
|
+
}>;
|
|
57
|
+
signature: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
58
|
+
signer: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"0x">, z.ZodMiniTemplateLiteral<`0x${string}`>]>>;
|
|
55
59
|
}, z.core.$strip>;
|
|
56
60
|
/** Codec between RPC and structured frame signatures. */
|
|
57
61
|
export declare const FrameSignature: z.ZodMiniCodec<z.ZodMiniObject<{
|
|
58
|
-
msg: z.ZodMiniTemplateLiteral<`0x${string}
|
|
59
|
-
scheme: z.
|
|
60
|
-
|
|
61
|
-
|
|
62
|
+
msg: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
63
|
+
scheme: z.ZodMiniEnum<{
|
|
64
|
+
"0x1": "0x1";
|
|
65
|
+
"0x0": "0x0";
|
|
66
|
+
"0x2": "0x2";
|
|
67
|
+
}>;
|
|
68
|
+
signature: z.ZodMiniOptional<z.ZodMiniTemplateLiteral<`0x${string}`>>;
|
|
69
|
+
signer: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"0x">, z.ZodMiniTemplateLiteral<`0x${string}`>]>>;
|
|
62
70
|
}, z.core.$strip>, z.ZodMiniType<core_FrameSignature.FrameSignature, core_FrameSignature.FrameSignature, z.core.$ZodTypeInternals<core_FrameSignature.FrameSignature, core_FrameSignature.FrameSignature>>>;
|
|
63
71
|
//# sourceMappingURL=FrameSignature.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FrameSignature.d.ts","sourceRoot":"","sources":["../../src/zod/FrameSignature.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,mBAAmB,MAAM,2BAA2B,CAAA;AAGhE,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAS7B,+CAA+C;AAC/C,eAAO,MAAM,SAAS;;;;;iBAKpB,CAAA;AAEF,wCAAwC;AACxC,eAAO,MAAM,SAAS;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"FrameSignature.d.ts","sourceRoot":"","sources":["../../src/zod/FrameSignature.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,mBAAmB,MAAM,2BAA2B,CAAA;AAGhE,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAS7B,+CAA+C;AAC/C,eAAO,MAAM,SAAS;;;;;iBAKpB,CAAA;AAEF,wCAAwC;AACxC,eAAO,MAAM,SAAS;;;;;;;;;iBAUpB,CAAA;AAOF,qEAAqE;AACrE,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;mBAOf,CAAA;AAEF,sCAAsC;AACtC,eAAO,MAAM,OAAO,EAAE,CAAC,CAAC,WAAW,CACjC,mBAAmB,CAAC,cAAc,EAClC,mBAAmB,CAAC,cAAc,CAGuC,CAAA;AAE3E,kCAAkC;AAClC,eAAO,MAAM,GAAG;;;;;;;;;iBAgBb,CAAA;AAEH,yDAAyD;AACzD,eAAO,MAAM,cAAc;;;;;;;;;2MAGzB,CAAA"}
|