@inco/js 0.6.0 → 0.6.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/binary.d.ts +1 -0
- package/dist/cjs/binary.js +6 -2
- package/dist/cjs/encryption/encryption.d.ts +17 -20
- package/dist/cjs/encryption/encryption.js +30 -12
- package/dist/cjs/generated/abis/lightning-preview.d.ts +8 -106
- package/dist/cjs/generated/abis/lightning-preview.js +5 -55
- package/dist/cjs/generated/abis/lightning.d.ts +54 -115
- package/dist/cjs/generated/abis/lightning.js +32 -65
- package/dist/cjs/generated/abis/verifier.d.ts +86 -36
- package/dist/cjs/generated/abis/verifier.js +57 -21
- package/dist/cjs/generated/es/cosmos_proto/cosmos_pb.js +2 -2
- package/dist/cjs/generated/es/inco/covalidator/compute/v1/server_pb.d.ts +775 -0
- package/dist/cjs/generated/es/inco/covalidator/compute/v1/server_pb.js +261 -0
- package/dist/cjs/generated/es/inco/covalidator/compute/v1/types_pb.d.ts +186 -0
- package/dist/cjs/generated/es/inco/covalidator/compute/v1/types_pb.js +47 -0
- package/dist/cjs/generated/es/inco/fhe/v1/types_pb.js +2 -2
- package/dist/cjs/generated/es/inco/kms/lite/v1/kms_service_pb.js +2 -2
- package/dist/cjs/generated/es/inco/kms/lite/v1/types_pb.js +2 -2
- package/dist/cjs/generated/lightning.d.ts +21 -0
- package/dist/cjs/generated/lightning.js +23 -1
- package/dist/cjs/generated/local-node.d.ts +3 -3
- package/dist/cjs/generated/local-node.js +3 -3
- package/dist/cjs/handle.d.ts +16 -0
- package/dist/cjs/handle.js +28 -3
- package/dist/cjs/lite/ecies.d.ts +0 -2
- package/dist/cjs/lite/ecies.js +24 -13
- package/dist/cjs/lite/hadu.d.ts +3 -23
- package/dist/cjs/lite/hadu.js +26 -29
- package/dist/cjs/lite/lightning.js +1 -2
- package/dist/cjs/viem.d.ts +44 -47
- package/dist/esm/binary.d.ts +1 -0
- package/dist/esm/binary.js +5 -2
- package/dist/esm/encryption/encryption.d.ts +17 -20
- package/dist/esm/encryption/encryption.js +26 -12
- package/dist/esm/generated/abis/lightning-preview.d.ts +8 -106
- package/dist/esm/generated/abis/lightning-preview.js +5 -55
- package/dist/esm/generated/abis/lightning.d.ts +54 -115
- package/dist/esm/generated/abis/lightning.js +32 -65
- package/dist/esm/generated/abis/verifier.d.ts +86 -36
- package/dist/esm/generated/abis/verifier.js +57 -21
- package/dist/esm/generated/es/cosmos_proto/cosmos_pb.js +2 -2
- package/dist/esm/generated/es/inco/covalidator/compute/v1/server_pb.d.ts +775 -0
- package/dist/esm/generated/es/inco/covalidator/compute/v1/server_pb.js +258 -0
- package/dist/esm/generated/es/inco/covalidator/compute/v1/types_pb.d.ts +186 -0
- package/dist/esm/generated/es/inco/covalidator/compute/v1/types_pb.js +44 -0
- package/dist/esm/generated/es/inco/fhe/v1/types_pb.js +2 -2
- package/dist/esm/generated/es/inco/kms/lite/v1/kms_service_pb.js +2 -2
- package/dist/esm/generated/es/inco/kms/lite/v1/types_pb.js +2 -2
- package/dist/esm/generated/lightning.d.ts +21 -0
- package/dist/esm/generated/lightning.js +23 -1
- package/dist/esm/generated/local-node.d.ts +3 -3
- package/dist/esm/generated/local-node.js +3 -3
- package/dist/esm/handle.d.ts +16 -0
- package/dist/esm/handle.js +27 -3
- package/dist/esm/lite/ecies.d.ts +0 -2
- package/dist/esm/lite/ecies.js +26 -15
- package/dist/esm/lite/hadu.d.ts +3 -23
- package/dist/esm/lite/hadu.js +28 -30
- package/dist/esm/lite/lightning.js +1 -2
- package/dist/esm/viem.d.ts +44 -47
- package/dist/types/binary.d.ts +1 -0
- package/dist/types/encryption/encryption.d.ts +17 -20
- package/dist/types/generated/abis/lightning-preview.d.ts +8 -106
- package/dist/types/generated/abis/lightning.d.ts +54 -115
- package/dist/types/generated/abis/verifier.d.ts +86 -36
- package/dist/types/generated/es/inco/covalidator/compute/v1/server_pb.d.ts +775 -0
- package/dist/types/generated/es/inco/covalidator/compute/v1/types_pb.d.ts +186 -0
- package/dist/types/generated/lightning.d.ts +21 -0
- package/dist/types/generated/local-node.d.ts +3 -3
- package/dist/types/handle.d.ts +16 -0
- package/dist/types/lite/ecies.d.ts +0 -2
- package/dist/types/lite/hadu.d.ts +3 -23
- package/dist/types/viem.d.ts +44 -47
- package/package.json +3 -1
package/dist/esm/viem.d.ts
CHANGED
|
@@ -116,7 +116,7 @@ export declare const chains: {
|
|
|
116
116
|
formatters: {
|
|
117
117
|
readonly block: {
|
|
118
118
|
exclude: [] | undefined;
|
|
119
|
-
format: (args: import("viem/chains").OpStackRpcBlock) => {
|
|
119
|
+
format: (args: import("viem/chains").OpStackRpcBlock, action?: string | undefined) => {
|
|
120
120
|
baseFeePerGas: bigint | null;
|
|
121
121
|
blobGasUsed: bigint;
|
|
122
122
|
difficulty: bigint;
|
|
@@ -126,7 +126,7 @@ export declare const chains: {
|
|
|
126
126
|
gasUsed: bigint;
|
|
127
127
|
hash: `0x${string}` | null;
|
|
128
128
|
logsBloom: `0x${string}` | null;
|
|
129
|
-
miner: import("
|
|
129
|
+
miner: import("viem").Address;
|
|
130
130
|
mixHash: import("viem").Hash;
|
|
131
131
|
nonce: `0x${string}` | null;
|
|
132
132
|
number: bigint | null;
|
|
@@ -149,17 +149,17 @@ export declare const chains: {
|
|
|
149
149
|
};
|
|
150
150
|
readonly transaction: {
|
|
151
151
|
exclude: [] | undefined;
|
|
152
|
-
format: (args: import("viem/chains").OpStackRpcTransaction) => ({
|
|
152
|
+
format: (args: import("viem/chains").OpStackRpcTransaction, action?: string | undefined) => ({
|
|
153
153
|
blockHash: `0x${string}` | null;
|
|
154
154
|
blockNumber: bigint | null;
|
|
155
|
-
from: import("
|
|
155
|
+
from: import("viem").Address;
|
|
156
156
|
gas: bigint;
|
|
157
157
|
hash: import("viem").Hash;
|
|
158
158
|
input: import("viem").Hex;
|
|
159
159
|
nonce: number;
|
|
160
160
|
r: import("viem").Hex;
|
|
161
161
|
s: import("viem").Hex;
|
|
162
|
-
to: import("
|
|
162
|
+
to: import("viem").Address | null;
|
|
163
163
|
transactionIndex: number | null;
|
|
164
164
|
typeHex: import("viem").Hex | null;
|
|
165
165
|
v: bigint;
|
|
@@ -179,8 +179,8 @@ export declare const chains: {
|
|
|
179
179
|
v: bigint;
|
|
180
180
|
value: bigint;
|
|
181
181
|
gas: bigint;
|
|
182
|
-
to: import("
|
|
183
|
-
from: import("
|
|
182
|
+
to: import("viem").Address | null;
|
|
183
|
+
from: import("viem").Address;
|
|
184
184
|
nonce: number;
|
|
185
185
|
blockHash: `0x${string}` | null;
|
|
186
186
|
blockNumber: bigint | null;
|
|
@@ -204,14 +204,14 @@ export declare const chains: {
|
|
|
204
204
|
} | {
|
|
205
205
|
blockHash: `0x${string}` | null;
|
|
206
206
|
blockNumber: bigint | null;
|
|
207
|
-
from: import("
|
|
207
|
+
from: import("viem").Address;
|
|
208
208
|
gas: bigint;
|
|
209
209
|
hash: import("viem").Hash;
|
|
210
210
|
input: import("viem").Hex;
|
|
211
211
|
nonce: number;
|
|
212
212
|
r: import("viem").Hex;
|
|
213
213
|
s: import("viem").Hex;
|
|
214
|
-
to: import("
|
|
214
|
+
to: import("viem").Address | null;
|
|
215
215
|
transactionIndex: number | null;
|
|
216
216
|
typeHex: import("viem").Hex | null;
|
|
217
217
|
v: bigint;
|
|
@@ -232,14 +232,14 @@ export declare const chains: {
|
|
|
232
232
|
} | {
|
|
233
233
|
blockHash: `0x${string}` | null;
|
|
234
234
|
blockNumber: bigint | null;
|
|
235
|
-
from: import("
|
|
235
|
+
from: import("viem").Address;
|
|
236
236
|
gas: bigint;
|
|
237
237
|
hash: import("viem").Hash;
|
|
238
238
|
input: import("viem").Hex;
|
|
239
239
|
nonce: number;
|
|
240
240
|
r: import("viem").Hex;
|
|
241
241
|
s: import("viem").Hex;
|
|
242
|
-
to: import("
|
|
242
|
+
to: import("viem").Address | null;
|
|
243
243
|
transactionIndex: number | null;
|
|
244
244
|
typeHex: import("viem").Hex | null;
|
|
245
245
|
v: bigint;
|
|
@@ -260,14 +260,14 @@ export declare const chains: {
|
|
|
260
260
|
} | {
|
|
261
261
|
blockHash: `0x${string}` | null;
|
|
262
262
|
blockNumber: bigint | null;
|
|
263
|
-
from: import("
|
|
263
|
+
from: import("viem").Address;
|
|
264
264
|
gas: bigint;
|
|
265
265
|
hash: import("viem").Hash;
|
|
266
266
|
input: import("viem").Hex;
|
|
267
267
|
nonce: number;
|
|
268
268
|
r: import("viem").Hex;
|
|
269
269
|
s: import("viem").Hex;
|
|
270
|
-
to: import("
|
|
270
|
+
to: import("viem").Address | null;
|
|
271
271
|
transactionIndex: number | null;
|
|
272
272
|
typeHex: import("viem").Hex | null;
|
|
273
273
|
v: bigint;
|
|
@@ -288,14 +288,14 @@ export declare const chains: {
|
|
|
288
288
|
} | {
|
|
289
289
|
blockHash: `0x${string}` | null;
|
|
290
290
|
blockNumber: bigint | null;
|
|
291
|
-
from: import("
|
|
291
|
+
from: import("viem").Address;
|
|
292
292
|
gas: bigint;
|
|
293
293
|
hash: import("viem").Hash;
|
|
294
294
|
input: import("viem").Hex;
|
|
295
295
|
nonce: number;
|
|
296
296
|
r: import("viem").Hex;
|
|
297
297
|
s: import("viem").Hex;
|
|
298
|
-
to: import("
|
|
298
|
+
to: import("viem").Address | null;
|
|
299
299
|
transactionIndex: number | null;
|
|
300
300
|
typeHex: import("viem").Hex | null;
|
|
301
301
|
v: bigint;
|
|
@@ -318,21 +318,21 @@ export declare const chains: {
|
|
|
318
318
|
};
|
|
319
319
|
readonly transactionReceipt: {
|
|
320
320
|
exclude: [] | undefined;
|
|
321
|
-
format: (args: import("viem/chains").OpStackRpcTransactionReceipt) => {
|
|
321
|
+
format: (args: import("viem/chains").OpStackRpcTransactionReceipt, action?: string | undefined) => {
|
|
322
322
|
blobGasPrice?: bigint | undefined;
|
|
323
323
|
blobGasUsed?: bigint | undefined;
|
|
324
324
|
blockHash: import("viem").Hash;
|
|
325
325
|
blockNumber: bigint;
|
|
326
|
-
contractAddress: import("
|
|
326
|
+
contractAddress: import("viem").Address | null | undefined;
|
|
327
327
|
cumulativeGasUsed: bigint;
|
|
328
328
|
effectiveGasPrice: bigint;
|
|
329
|
-
from: import("
|
|
329
|
+
from: import("viem").Address;
|
|
330
330
|
gasUsed: bigint;
|
|
331
331
|
logs: import("viem").Log<bigint, number, false>[];
|
|
332
332
|
logsBloom: import("viem").Hex;
|
|
333
333
|
root?: `0x${string}` | undefined;
|
|
334
334
|
status: "success" | "reverted";
|
|
335
|
-
to: import("
|
|
335
|
+
to: import("viem").Address | null;
|
|
336
336
|
transactionHash: import("viem").Hash;
|
|
337
337
|
transactionIndex: number;
|
|
338
338
|
type: import("viem").TransactionType;
|
|
@@ -392,15 +392,12 @@ export declare const chains: {
|
|
|
392
392
|
};
|
|
393
393
|
};
|
|
394
394
|
blockTime?: number | undefined | undefined;
|
|
395
|
-
contracts
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
multicall3?: import("viem").ChainContract | undefined;
|
|
402
|
-
erc6492Verifier?: import("viem").ChainContract | undefined;
|
|
403
|
-
} | undefined;
|
|
395
|
+
contracts: {
|
|
396
|
+
readonly multicall3: {
|
|
397
|
+
readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
398
|
+
readonly blockCreated: 0;
|
|
399
|
+
};
|
|
400
|
+
};
|
|
404
401
|
ensTlds?: readonly string[] | undefined;
|
|
405
402
|
id: 9746;
|
|
406
403
|
name: "Plasma Testnet";
|
|
@@ -546,7 +543,7 @@ export declare const chains: {
|
|
|
546
543
|
formatters: {
|
|
547
544
|
readonly block: {
|
|
548
545
|
exclude: [] | undefined;
|
|
549
|
-
format: (args: import("viem/chains").OpStackRpcBlock) => {
|
|
546
|
+
format: (args: import("viem/chains").OpStackRpcBlock, action?: string | undefined) => {
|
|
550
547
|
baseFeePerGas: bigint | null;
|
|
551
548
|
blobGasUsed: bigint;
|
|
552
549
|
difficulty: bigint;
|
|
@@ -556,7 +553,7 @@ export declare const chains: {
|
|
|
556
553
|
gasUsed: bigint;
|
|
557
554
|
hash: `0x${string}` | null;
|
|
558
555
|
logsBloom: `0x${string}` | null;
|
|
559
|
-
miner: import("
|
|
556
|
+
miner: import("viem").Address;
|
|
560
557
|
mixHash: import("viem").Hash;
|
|
561
558
|
nonce: `0x${string}` | null;
|
|
562
559
|
number: bigint | null;
|
|
@@ -579,17 +576,17 @@ export declare const chains: {
|
|
|
579
576
|
};
|
|
580
577
|
readonly transaction: {
|
|
581
578
|
exclude: [] | undefined;
|
|
582
|
-
format: (args: import("viem/chains").OpStackRpcTransaction) => ({
|
|
579
|
+
format: (args: import("viem/chains").OpStackRpcTransaction, action?: string | undefined) => ({
|
|
583
580
|
blockHash: `0x${string}` | null;
|
|
584
581
|
blockNumber: bigint | null;
|
|
585
|
-
from: import("
|
|
582
|
+
from: import("viem").Address;
|
|
586
583
|
gas: bigint;
|
|
587
584
|
hash: import("viem").Hash;
|
|
588
585
|
input: import("viem").Hex;
|
|
589
586
|
nonce: number;
|
|
590
587
|
r: import("viem").Hex;
|
|
591
588
|
s: import("viem").Hex;
|
|
592
|
-
to: import("
|
|
589
|
+
to: import("viem").Address | null;
|
|
593
590
|
transactionIndex: number | null;
|
|
594
591
|
typeHex: import("viem").Hex | null;
|
|
595
592
|
v: bigint;
|
|
@@ -609,8 +606,8 @@ export declare const chains: {
|
|
|
609
606
|
v: bigint;
|
|
610
607
|
value: bigint;
|
|
611
608
|
gas: bigint;
|
|
612
|
-
to: import("
|
|
613
|
-
from: import("
|
|
609
|
+
to: import("viem").Address | null;
|
|
610
|
+
from: import("viem").Address;
|
|
614
611
|
nonce: number;
|
|
615
612
|
blockHash: `0x${string}` | null;
|
|
616
613
|
blockNumber: bigint | null;
|
|
@@ -634,14 +631,14 @@ export declare const chains: {
|
|
|
634
631
|
} | {
|
|
635
632
|
blockHash: `0x${string}` | null;
|
|
636
633
|
blockNumber: bigint | null;
|
|
637
|
-
from: import("
|
|
634
|
+
from: import("viem").Address;
|
|
638
635
|
gas: bigint;
|
|
639
636
|
hash: import("viem").Hash;
|
|
640
637
|
input: import("viem").Hex;
|
|
641
638
|
nonce: number;
|
|
642
639
|
r: import("viem").Hex;
|
|
643
640
|
s: import("viem").Hex;
|
|
644
|
-
to: import("
|
|
641
|
+
to: import("viem").Address | null;
|
|
645
642
|
transactionIndex: number | null;
|
|
646
643
|
typeHex: import("viem").Hex | null;
|
|
647
644
|
v: bigint;
|
|
@@ -662,14 +659,14 @@ export declare const chains: {
|
|
|
662
659
|
} | {
|
|
663
660
|
blockHash: `0x${string}` | null;
|
|
664
661
|
blockNumber: bigint | null;
|
|
665
|
-
from: import("
|
|
662
|
+
from: import("viem").Address;
|
|
666
663
|
gas: bigint;
|
|
667
664
|
hash: import("viem").Hash;
|
|
668
665
|
input: import("viem").Hex;
|
|
669
666
|
nonce: number;
|
|
670
667
|
r: import("viem").Hex;
|
|
671
668
|
s: import("viem").Hex;
|
|
672
|
-
to: import("
|
|
669
|
+
to: import("viem").Address | null;
|
|
673
670
|
transactionIndex: number | null;
|
|
674
671
|
typeHex: import("viem").Hex | null;
|
|
675
672
|
v: bigint;
|
|
@@ -690,14 +687,14 @@ export declare const chains: {
|
|
|
690
687
|
} | {
|
|
691
688
|
blockHash: `0x${string}` | null;
|
|
692
689
|
blockNumber: bigint | null;
|
|
693
|
-
from: import("
|
|
690
|
+
from: import("viem").Address;
|
|
694
691
|
gas: bigint;
|
|
695
692
|
hash: import("viem").Hash;
|
|
696
693
|
input: import("viem").Hex;
|
|
697
694
|
nonce: number;
|
|
698
695
|
r: import("viem").Hex;
|
|
699
696
|
s: import("viem").Hex;
|
|
700
|
-
to: import("
|
|
697
|
+
to: import("viem").Address | null;
|
|
701
698
|
transactionIndex: number | null;
|
|
702
699
|
typeHex: import("viem").Hex | null;
|
|
703
700
|
v: bigint;
|
|
@@ -718,14 +715,14 @@ export declare const chains: {
|
|
|
718
715
|
} | {
|
|
719
716
|
blockHash: `0x${string}` | null;
|
|
720
717
|
blockNumber: bigint | null;
|
|
721
|
-
from: import("
|
|
718
|
+
from: import("viem").Address;
|
|
722
719
|
gas: bigint;
|
|
723
720
|
hash: import("viem").Hash;
|
|
724
721
|
input: import("viem").Hex;
|
|
725
722
|
nonce: number;
|
|
726
723
|
r: import("viem").Hex;
|
|
727
724
|
s: import("viem").Hex;
|
|
728
|
-
to: import("
|
|
725
|
+
to: import("viem").Address | null;
|
|
729
726
|
transactionIndex: number | null;
|
|
730
727
|
typeHex: import("viem").Hex | null;
|
|
731
728
|
v: bigint;
|
|
@@ -748,21 +745,21 @@ export declare const chains: {
|
|
|
748
745
|
};
|
|
749
746
|
readonly transactionReceipt: {
|
|
750
747
|
exclude: [] | undefined;
|
|
751
|
-
format: (args: import("viem/chains").OpStackRpcTransactionReceipt) => {
|
|
748
|
+
format: (args: import("viem/chains").OpStackRpcTransactionReceipt, action?: string | undefined) => {
|
|
752
749
|
blobGasPrice?: bigint | undefined;
|
|
753
750
|
blobGasUsed?: bigint | undefined;
|
|
754
751
|
blockHash: import("viem").Hash;
|
|
755
752
|
blockNumber: bigint;
|
|
756
|
-
contractAddress: import("
|
|
753
|
+
contractAddress: import("viem").Address | null | undefined;
|
|
757
754
|
cumulativeGasUsed: bigint;
|
|
758
755
|
effectiveGasPrice: bigint;
|
|
759
|
-
from: import("
|
|
756
|
+
from: import("viem").Address;
|
|
760
757
|
gasUsed: bigint;
|
|
761
758
|
logs: import("viem").Log<bigint, number, false>[];
|
|
762
759
|
logsBloom: import("viem").Hex;
|
|
763
760
|
root?: `0x${string}` | undefined;
|
|
764
761
|
status: "success" | "reverted";
|
|
765
|
-
to: import("
|
|
762
|
+
to: import("viem").Address | null;
|
|
766
763
|
transactionHash: import("viem").Hash;
|
|
767
764
|
transactionIndex: number;
|
|
768
765
|
type: import("viem").TransactionType;
|
package/dist/types/binary.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export type HexString = typeof HexString.Type;
|
|
|
5
5
|
export type BytesIsh = string | Uint8Array;
|
|
6
6
|
export declare function bytesToBigInt(byteArray: Uint8Array): bigint;
|
|
7
7
|
export declare function bufferToBigInt(buffer: Buffer): bigint;
|
|
8
|
+
export declare function bigintToBytes(value: bigint): Buffer;
|
|
8
9
|
export declare function bigintToBytes32(value: bigint): Bytes32;
|
|
9
10
|
export declare function padLeft(bs: Uint8Array, n: number): Buffer;
|
|
10
11
|
export declare function bytes32ToBigint(bs: BytesIsh): bigint;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Schema } from 'effect';
|
|
2
|
+
import { ByteArray, Hex } from 'viem';
|
|
2
3
|
import { Bytes32 } from '../binary.js';
|
|
3
|
-
import { InputContext } from '../handle.js';
|
|
4
4
|
export type Encryptor<S extends EncryptionScheme = EncryptionScheme> = <T extends SupportedFheType>(plaintext: PlaintextWithContextOf<S, T>) => Promise<EncryptResultOf<S, T>>;
|
|
5
|
-
export type Decryptor<S extends EncryptionScheme = EncryptionScheme> = <T extends SupportedFheType>(ciphertext: CiphertextOf<S, T
|
|
5
|
+
export type Decryptor<S extends EncryptionScheme = EncryptionScheme> = <T extends SupportedFheType>(ciphertext: CiphertextOf<S, T>) => Promise<PlaintextOf<S, T>>;
|
|
6
6
|
export declare const supportedFheTypes: {
|
|
7
7
|
readonly euint64: 5;
|
|
8
8
|
readonly euint160: 7;
|
|
@@ -16,38 +16,29 @@ export type SupportedFheType = typeof SupportedFheType.Type;
|
|
|
16
16
|
export declare const encryptionSchemes: {
|
|
17
17
|
readonly tfhe: 0;
|
|
18
18
|
readonly ecies: 1;
|
|
19
|
-
readonly cryptobox: 2;
|
|
20
19
|
};
|
|
21
20
|
export declare function getEncryptionSchemeName(scheme: number): string;
|
|
22
21
|
export type EncryptionSchemes = typeof encryptionSchemes;
|
|
23
22
|
export type EciesScheme = EncryptionSchemes['ecies'];
|
|
24
23
|
export type TfheScheme = EncryptionSchemes['tfhe'];
|
|
25
|
-
export
|
|
26
|
-
export declare const EncryptionScheme: Schema.Literal<[0, 1, 2]>;
|
|
24
|
+
export declare const EncryptionScheme: Schema.Literal<[0, 1]>;
|
|
27
25
|
export type EncryptionScheme = typeof EncryptionScheme.Type;
|
|
28
26
|
type DistType<P, S extends EncryptionScheme, T extends SupportedFheType> = P extends any ? P & {
|
|
29
27
|
scheme: S;
|
|
30
28
|
type: T;
|
|
31
29
|
} : never;
|
|
32
|
-
export declare const ciphertextEnvelopes: {
|
|
33
|
-
readonly none: 0;
|
|
34
|
-
readonly hadu: 1;
|
|
35
|
-
};
|
|
36
|
-
export declare const CiphertextEnvelope: Schema.SchemaClass<0 | 1, 0 | 1, never>;
|
|
37
30
|
export declare const Ciphertext: Schema.Struct<{
|
|
38
|
-
scheme: Schema.Literal<[0, 1
|
|
31
|
+
scheme: Schema.Literal<[0, 1]>;
|
|
39
32
|
type: Schema.SchemaClass<0 | 5 | 7 | 8, 0 | 5 | 7 | 8, never>;
|
|
40
33
|
value: Schema.TemplateLiteral<`0x${string}`>;
|
|
41
|
-
envelope: Schema.optional<Schema.SchemaClass<0 | 1, 0 | 1, never>>;
|
|
42
34
|
}>;
|
|
43
35
|
export type Ciphertext = typeof Ciphertext.Type;
|
|
44
36
|
export type CiphertextOf<S extends EncryptionScheme, T extends SupportedFheType> = DistType<Ciphertext, S, T>;
|
|
45
37
|
export declare const CiphertextWithContext: Schema.Struct<{
|
|
46
38
|
ciphertext: Schema.Struct<{
|
|
47
|
-
scheme: Schema.Literal<[0, 1
|
|
39
|
+
scheme: Schema.Literal<[0, 1]>;
|
|
48
40
|
type: Schema.SchemaClass<0 | 5 | 7 | 8, 0 | 5 | 7 | 8, never>;
|
|
49
41
|
value: Schema.TemplateLiteral<`0x${string}`>;
|
|
50
|
-
envelope: Schema.optional<Schema.SchemaClass<0 | 1, 0 | 1, never>>;
|
|
51
42
|
}>;
|
|
52
43
|
context: Schema.Struct<{
|
|
53
44
|
hostChainId: typeof Schema.BigInt;
|
|
@@ -62,10 +53,9 @@ export type CiphertextWithContextOf<S extends EncryptionScheme, T extends Suppor
|
|
|
62
53
|
};
|
|
63
54
|
export declare const EncryptResult: Schema.Struct<{
|
|
64
55
|
ciphertext: Schema.Struct<{
|
|
65
|
-
scheme: Schema.Literal<[0, 1
|
|
56
|
+
scheme: Schema.Literal<[0, 1]>;
|
|
66
57
|
type: Schema.SchemaClass<0 | 5 | 7 | 8, 0 | 5 | 7 | 8, never>;
|
|
67
58
|
value: Schema.TemplateLiteral<`0x${string}`>;
|
|
68
|
-
envelope: Schema.optional<Schema.SchemaClass<0 | 1, 0 | 1, never>>;
|
|
69
59
|
}>;
|
|
70
60
|
context: Schema.Struct<{
|
|
71
61
|
hostChainId: typeof Schema.BigInt;
|
|
@@ -81,11 +71,11 @@ export type EncryptResultOf<S extends EncryptionScheme, T extends SupportedFheTy
|
|
|
81
71
|
ciphertext: CiphertextOf<S, T>;
|
|
82
72
|
};
|
|
83
73
|
export declare const Plaintext: Schema.Union<[Schema.Struct<{
|
|
84
|
-
scheme: Schema.Literal<[0, 1
|
|
74
|
+
scheme: Schema.Literal<[0, 1]>;
|
|
85
75
|
type: Schema.Literal<[5, 7, 8]>;
|
|
86
76
|
value: typeof Schema.BigInt;
|
|
87
77
|
}>, Schema.Struct<{
|
|
88
|
-
scheme: Schema.Literal<[0, 1
|
|
78
|
+
scheme: Schema.Literal<[0, 1]>;
|
|
89
79
|
type: Schema.Literal<[0]>;
|
|
90
80
|
value: typeof Schema.Boolean;
|
|
91
81
|
}>]>;
|
|
@@ -93,11 +83,11 @@ export type Plaintext = typeof Plaintext.Type;
|
|
|
93
83
|
export type PlaintextOf<S extends EncryptionScheme, T extends SupportedFheType> = DistType<Plaintext, S, T>;
|
|
94
84
|
export declare const PlaintextWithContext: Schema.Struct<{
|
|
95
85
|
plaintext: Schema.Union<[Schema.Struct<{
|
|
96
|
-
scheme: Schema.Literal<[0, 1
|
|
86
|
+
scheme: Schema.Literal<[0, 1]>;
|
|
97
87
|
type: Schema.Literal<[5, 7, 8]>;
|
|
98
88
|
value: typeof Schema.BigInt;
|
|
99
89
|
}>, Schema.Struct<{
|
|
100
|
-
scheme: Schema.Literal<[0, 1
|
|
90
|
+
scheme: Schema.Literal<[0, 1]>;
|
|
101
91
|
type: Schema.Literal<[0]>;
|
|
102
92
|
value: typeof Schema.Boolean;
|
|
103
93
|
}>]>;
|
|
@@ -113,7 +103,14 @@ export type PlaintextWithContextOf<S extends EncryptionScheme, T extends Support
|
|
|
113
103
|
plaintext: PlaintextOf<S, T>;
|
|
114
104
|
};
|
|
115
105
|
export declare function bigintToPlaintext<S extends EncryptionScheme, T extends SupportedFheType>(scheme: S, type: T, bigPt: bigint): PlaintextOf<S, T>;
|
|
106
|
+
export declare function decodeCiphertextInput(input: ByteArray | Hex): {
|
|
107
|
+
handle: Hex;
|
|
108
|
+
ciphertext: Hex;
|
|
109
|
+
};
|
|
110
|
+
export declare function encodeCiphertextInput(handle: Hex, ciphertext: Hex): Hex;
|
|
116
111
|
export declare function plaintextToBigint(plaintext: Plaintext): bigint;
|
|
117
112
|
export declare function plaintextToBytes32(plaintext: Plaintext): Bytes32;
|
|
113
|
+
export declare function plaintextToBytes(plaintext: Plaintext): Buffer;
|
|
118
114
|
export declare function bytes32ToPlaintext(plaintext: Bytes32, scheme: EncryptionScheme, type: SupportedFheType): Plaintext;
|
|
115
|
+
export declare function bytesToPlaintext(plaintext: Uint8Array, scheme: EncryptionScheme, type: SupportedFheType): Plaintext;
|
|
119
116
|
export {};
|
|
@@ -813,28 +813,12 @@ export declare const iIncoLightningPreviewAbi: readonly [{
|
|
|
813
813
|
readonly stateMutability: "nonpayable";
|
|
814
814
|
}, {
|
|
815
815
|
readonly type: "function";
|
|
816
|
-
readonly inputs: readonly [
|
|
817
|
-
|
|
818
|
-
readonly internalType: "bytes";
|
|
819
|
-
readonly type: "bytes";
|
|
820
|
-
}, {
|
|
821
|
-
readonly name: "user";
|
|
822
|
-
readonly internalType: "address";
|
|
823
|
-
readonly type: "address";
|
|
824
|
-
}, {
|
|
825
|
-
readonly name: "contractAddress";
|
|
826
|
-
readonly internalType: "address";
|
|
827
|
-
readonly type: "address";
|
|
828
|
-
}, {
|
|
829
|
-
readonly name: "inputType";
|
|
830
|
-
readonly internalType: "enum ETypes";
|
|
831
|
-
readonly type: "uint8";
|
|
832
|
-
}];
|
|
833
|
-
readonly name: "getInputHandle";
|
|
816
|
+
readonly inputs: readonly [];
|
|
817
|
+
readonly name: "getMajorVersion";
|
|
834
818
|
readonly outputs: readonly [{
|
|
835
|
-
readonly name: "
|
|
836
|
-
readonly internalType: "
|
|
837
|
-
readonly type: "
|
|
819
|
+
readonly name: "";
|
|
820
|
+
readonly internalType: "string";
|
|
821
|
+
readonly type: "string";
|
|
838
822
|
}];
|
|
839
823
|
readonly stateMutability: "view";
|
|
840
824
|
}, {
|
|
@@ -858,91 +842,9 @@ export declare const iIncoLightningPreviewAbi: readonly [{
|
|
|
858
842
|
readonly internalType: "enum ETypes";
|
|
859
843
|
readonly type: "uint8";
|
|
860
844
|
}, {
|
|
861
|
-
readonly name: "
|
|
862
|
-
readonly internalType: "
|
|
863
|
-
readonly type: "
|
|
864
|
-
}];
|
|
865
|
-
readonly name: "getOpResultHandle";
|
|
866
|
-
readonly outputs: readonly [{
|
|
867
|
-
readonly name: "generatedHandle";
|
|
868
|
-
readonly internalType: "bytes32";
|
|
869
|
-
readonly type: "bytes32";
|
|
870
|
-
}];
|
|
871
|
-
readonly stateMutability: "pure";
|
|
872
|
-
}, {
|
|
873
|
-
readonly type: "function";
|
|
874
|
-
readonly inputs: readonly [{
|
|
875
|
-
readonly name: "op";
|
|
876
|
-
readonly internalType: "enum EOps";
|
|
877
|
-
readonly type: "uint8";
|
|
878
|
-
}, {
|
|
879
|
-
readonly name: "returnType";
|
|
880
|
-
readonly internalType: "enum ETypes";
|
|
881
|
-
readonly type: "uint8";
|
|
882
|
-
}, {
|
|
883
|
-
readonly name: "inputA";
|
|
884
|
-
readonly internalType: "bytes32";
|
|
885
|
-
readonly type: "bytes32";
|
|
886
|
-
}, {
|
|
887
|
-
readonly name: "inputB";
|
|
888
|
-
readonly internalType: "bytes32";
|
|
889
|
-
readonly type: "bytes32";
|
|
890
|
-
}, {
|
|
891
|
-
readonly name: "inputC";
|
|
892
|
-
readonly internalType: "bytes32";
|
|
893
|
-
readonly type: "bytes32";
|
|
894
|
-
}];
|
|
895
|
-
readonly name: "getOpResultHandle";
|
|
896
|
-
readonly outputs: readonly [{
|
|
897
|
-
readonly name: "generatedHandle";
|
|
898
|
-
readonly internalType: "bytes32";
|
|
899
|
-
readonly type: "bytes32";
|
|
900
|
-
}];
|
|
901
|
-
readonly stateMutability: "pure";
|
|
902
|
-
}, {
|
|
903
|
-
readonly type: "function";
|
|
904
|
-
readonly inputs: readonly [{
|
|
905
|
-
readonly name: "op";
|
|
906
|
-
readonly internalType: "enum EOps";
|
|
907
|
-
readonly type: "uint8";
|
|
908
|
-
}, {
|
|
909
|
-
readonly name: "returnType";
|
|
910
|
-
readonly internalType: "enum ETypes";
|
|
911
|
-
readonly type: "uint8";
|
|
912
|
-
}, {
|
|
913
|
-
readonly name: "counter";
|
|
914
|
-
readonly internalType: "uint256";
|
|
915
|
-
readonly type: "uint256";
|
|
916
|
-
}, {
|
|
917
|
-
readonly name: "upperBound";
|
|
918
|
-
readonly internalType: "bytes32";
|
|
919
|
-
readonly type: "bytes32";
|
|
920
|
-
}];
|
|
921
|
-
readonly name: "getOpResultHandle";
|
|
922
|
-
readonly outputs: readonly [{
|
|
923
|
-
readonly name: "generatedHandle";
|
|
924
|
-
readonly internalType: "bytes32";
|
|
925
|
-
readonly type: "bytes32";
|
|
926
|
-
}];
|
|
927
|
-
readonly stateMutability: "pure";
|
|
928
|
-
}, {
|
|
929
|
-
readonly type: "function";
|
|
930
|
-
readonly inputs: readonly [{
|
|
931
|
-
readonly name: "op";
|
|
932
|
-
readonly internalType: "enum EOps";
|
|
933
|
-
readonly type: "uint8";
|
|
934
|
-
}, {
|
|
935
|
-
readonly name: "returnType";
|
|
936
|
-
readonly internalType: "enum ETypes";
|
|
937
|
-
readonly type: "uint8";
|
|
938
|
-
}, {
|
|
939
|
-
readonly name: "lhs";
|
|
940
|
-
readonly internalType: "bytes32";
|
|
941
|
-
readonly type: "bytes32";
|
|
942
|
-
}, {
|
|
943
|
-
readonly name: "rhs";
|
|
944
|
-
readonly internalType: "bytes32";
|
|
945
|
-
readonly type: "bytes32";
|
|
845
|
+
readonly name: "packedInputs";
|
|
846
|
+
readonly internalType: "bytes";
|
|
847
|
+
readonly type: "bytes";
|
|
946
848
|
}];
|
|
947
849
|
readonly name: "getOpResultHandle";
|
|
948
850
|
readonly outputs: readonly [{
|