@inco/js 0.8.0-devnet-29 → 0.8.0-devnet-31

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.
Files changed (116) hide show
  1. package/dist/cjs/advancedacl/session-key.d.ts +4 -4
  2. package/dist/cjs/advancedacl/session-key.js +4 -3
  3. package/dist/cjs/attestedcompute/attested-compute.d.ts +0 -1
  4. package/dist/cjs/attestedcompute/attested-compute.js +7 -8
  5. package/dist/cjs/attesteddecrypt/attested-decrypt.d.ts +3 -4
  6. package/dist/cjs/attesteddecrypt/attested-decrypt.js +8 -60
  7. package/dist/cjs/chain.d.ts +8 -0
  8. package/dist/cjs/chain.js +19 -2
  9. package/dist/cjs/eip712/eip712.d.ts +18 -0
  10. package/dist/cjs/eip712/eip712.js +51 -0
  11. package/dist/cjs/eip712/index.d.ts +1 -0
  12. package/dist/cjs/eip712/index.js +8 -0
  13. package/dist/cjs/elistattesteddecrypt/elist-attested-decrypt.d.ts +49 -0
  14. package/dist/cjs/elistattesteddecrypt/elist-attested-decrypt.js +94 -0
  15. package/dist/cjs/elistattesteddecrypt/index.d.ts +2 -0
  16. package/dist/cjs/elistattesteddecrypt/index.js +22 -0
  17. package/dist/cjs/elistattesteddecrypt/types.d.ts +31 -0
  18. package/dist/cjs/elistattesteddecrypt/types.js +16 -0
  19. package/dist/cjs/generated/abis/lightning.d.ts +0 -39
  20. package/dist/cjs/generated/abis/lightning.js +1 -39
  21. package/dist/cjs/generated/abis/test-elist.d.ts +6 -0
  22. package/dist/cjs/generated/abis/test-elist.js +8 -1
  23. package/dist/cjs/generated/es/inco/covalidator/compute/v1/server_pb.d.ts +0 -34
  24. package/dist/cjs/generated/es/inco/covalidator/compute/v1/server_pb.js +35 -40
  25. package/dist/cjs/generated/lightning.d.ts +29 -0
  26. package/dist/cjs/generated/lightning.js +30 -1
  27. package/dist/cjs/generated/local-node.d.ts +2 -2
  28. package/dist/cjs/generated/local-node.js +2 -2
  29. package/dist/cjs/handle.d.ts +8 -0
  30. package/dist/cjs/handle.js +20 -2
  31. package/dist/cjs/kms/quorumClient.d.ts +17 -4
  32. package/dist/cjs/kms/quorumClient.js +150 -1
  33. package/dist/cjs/kms/quorumConsistency.d.ts +25 -1
  34. package/dist/cjs/kms/quorumConsistency.js +70 -1
  35. package/dist/cjs/kms/signatureVerification.d.ts +2 -2
  36. package/dist/cjs/kms/signatureVerification.js +1 -1
  37. package/dist/cjs/lite/attested-compute.d.ts +2 -2
  38. package/dist/cjs/lite/attested-compute.js +2 -3
  39. package/dist/cjs/lite/attested-decrypt.d.ts +2 -2
  40. package/dist/cjs/lite/attested-decrypt.js +2 -3
  41. package/dist/cjs/lite/lightning.d.ts +21 -14
  42. package/dist/cjs/lite/lightning.js +64 -11
  43. package/dist/cjs/test/mocks.d.ts +5 -1
  44. package/dist/cjs/test/mocks.js +29 -5
  45. package/dist/cjs/viem.d.ts +350 -1
  46. package/dist/cjs/viem.js +3 -1
  47. package/dist/esm/advancedacl/session-key.d.ts +4 -4
  48. package/dist/esm/advancedacl/session-key.js +6 -5
  49. package/dist/esm/attestedcompute/attested-compute.d.ts +0 -1
  50. package/dist/esm/attestedcompute/attested-compute.js +5 -6
  51. package/dist/esm/attesteddecrypt/attested-decrypt.d.ts +3 -4
  52. package/dist/esm/attesteddecrypt/attested-decrypt.js +6 -58
  53. package/dist/esm/chain.d.ts +8 -0
  54. package/dist/esm/chain.js +18 -1
  55. package/dist/esm/eip712/eip712.d.ts +18 -0
  56. package/dist/esm/eip712/eip712.js +46 -0
  57. package/dist/esm/eip712/index.d.ts +1 -0
  58. package/dist/esm/eip712/index.js +2 -0
  59. package/dist/esm/elistattesteddecrypt/elist-attested-decrypt.d.ts +49 -0
  60. package/dist/esm/elistattesteddecrypt/elist-attested-decrypt.js +89 -0
  61. package/dist/esm/elistattesteddecrypt/index.d.ts +2 -0
  62. package/dist/esm/elistattesteddecrypt/index.js +3 -0
  63. package/dist/esm/elistattesteddecrypt/types.d.ts +31 -0
  64. package/dist/esm/elistattesteddecrypt/types.js +12 -0
  65. package/dist/esm/generated/abis/lightning.d.ts +0 -39
  66. package/dist/esm/generated/abis/lightning.js +1 -39
  67. package/dist/esm/generated/abis/test-elist.d.ts +6 -0
  68. package/dist/esm/generated/abis/test-elist.js +8 -1
  69. package/dist/esm/generated/es/inco/covalidator/compute/v1/server_pb.d.ts +0 -34
  70. package/dist/esm/generated/es/inco/covalidator/compute/v1/server_pb.js +34 -39
  71. package/dist/esm/generated/lightning.d.ts +29 -0
  72. package/dist/esm/generated/lightning.js +30 -1
  73. package/dist/esm/generated/local-node.d.ts +2 -2
  74. package/dist/esm/generated/local-node.js +2 -2
  75. package/dist/esm/handle.d.ts +8 -0
  76. package/dist/esm/handle.js +18 -1
  77. package/dist/esm/kms/quorumClient.d.ts +17 -4
  78. package/dist/esm/kms/quorumClient.js +152 -3
  79. package/dist/esm/kms/quorumConsistency.d.ts +25 -1
  80. package/dist/esm/kms/quorumConsistency.js +68 -1
  81. package/dist/esm/kms/signatureVerification.d.ts +2 -2
  82. package/dist/esm/kms/signatureVerification.js +1 -1
  83. package/dist/esm/lite/attested-compute.d.ts +2 -2
  84. package/dist/esm/lite/attested-compute.js +3 -3
  85. package/dist/esm/lite/attested-decrypt.d.ts +2 -2
  86. package/dist/esm/lite/attested-decrypt.js +3 -3
  87. package/dist/esm/lite/lightning.d.ts +21 -14
  88. package/dist/esm/lite/lightning.js +64 -11
  89. package/dist/esm/test/mocks.d.ts +5 -1
  90. package/dist/esm/test/mocks.js +28 -6
  91. package/dist/esm/viem.d.ts +350 -1
  92. package/dist/esm/viem.js +4 -2
  93. package/dist/types/advancedacl/session-key.d.ts +4 -4
  94. package/dist/types/attestedcompute/attested-compute.d.ts +0 -1
  95. package/dist/types/attesteddecrypt/attested-decrypt.d.ts +3 -4
  96. package/dist/types/chain.d.ts +8 -0
  97. package/dist/types/eip712/eip712.d.ts +18 -0
  98. package/dist/types/eip712/index.d.ts +1 -0
  99. package/dist/types/elistattesteddecrypt/elist-attested-decrypt.d.ts +49 -0
  100. package/dist/types/elistattesteddecrypt/index.d.ts +2 -0
  101. package/dist/types/elistattesteddecrypt/types.d.ts +31 -0
  102. package/dist/types/generated/abis/lightning.d.ts +0 -39
  103. package/dist/types/generated/abis/test-elist.d.ts +6 -0
  104. package/dist/types/generated/es/inco/covalidator/compute/v1/server_pb.d.ts +0 -34
  105. package/dist/types/generated/lightning.d.ts +29 -0
  106. package/dist/types/generated/local-node.d.ts +2 -2
  107. package/dist/types/handle.d.ts +8 -0
  108. package/dist/types/kms/quorumClient.d.ts +17 -4
  109. package/dist/types/kms/quorumConsistency.d.ts +25 -1
  110. package/dist/types/kms/signatureVerification.d.ts +2 -2
  111. package/dist/types/lite/attested-compute.d.ts +2 -2
  112. package/dist/types/lite/attested-decrypt.d.ts +2 -2
  113. package/dist/types/lite/lightning.d.ts +21 -14
  114. package/dist/types/test/mocks.d.ts +5 -1
  115. package/dist/types/viem.d.ts +350 -1
  116. package/package.json +1 -1
@@ -1,7 +1,356 @@
1
- import { Chain } from 'viem';
1
+ import { Account, Chain, PublicClient, Transport, WalletClient } from 'viem';
2
2
  import { Chainish } from './chain.js';
3
+ export type ViemClient = WalletClient<Transport, Chain, Account> | PublicClient<Transport, Chain>;
3
4
  /** Map of supported chain short names to their viem chain objects. */
4
5
  export declare const chains: {
6
+ mainnet: {
7
+ blockExplorers: {
8
+ readonly default: {
9
+ readonly name: "Etherscan";
10
+ readonly url: "https://etherscan.io";
11
+ readonly apiUrl: "https://api.etherscan.io/api";
12
+ };
13
+ };
14
+ blockTime: 12000;
15
+ contracts: {
16
+ readonly ensUniversalResolver: {
17
+ readonly address: "0xeeeeeeee14d718c2b47d9923deab1335e144eeee";
18
+ readonly blockCreated: 23085558;
19
+ };
20
+ readonly multicall3: {
21
+ readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
22
+ readonly blockCreated: 14353601;
23
+ };
24
+ };
25
+ ensTlds?: readonly string[] | undefined;
26
+ id: 1;
27
+ name: "Ethereum";
28
+ nativeCurrency: {
29
+ readonly name: "Ether";
30
+ readonly symbol: "ETH";
31
+ readonly decimals: 18;
32
+ };
33
+ experimental_preconfirmationTime?: number | undefined | undefined;
34
+ rpcUrls: {
35
+ readonly default: {
36
+ readonly http: readonly ["https://eth.merkle.io"];
37
+ };
38
+ };
39
+ sourceId?: number | undefined | undefined;
40
+ testnet?: boolean | undefined | undefined;
41
+ custom?: Record<string, unknown> | undefined;
42
+ fees?: import("viem").ChainFees<undefined> | undefined;
43
+ formatters?: undefined;
44
+ serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
45
+ };
46
+ base: {
47
+ blockExplorers: {
48
+ readonly default: {
49
+ readonly name: "Basescan";
50
+ readonly url: "https://basescan.org";
51
+ readonly apiUrl: "https://api.basescan.org/api";
52
+ };
53
+ };
54
+ blockTime: 2000;
55
+ contracts: {
56
+ readonly disputeGameFactory: {
57
+ readonly 1: {
58
+ readonly address: "0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e";
59
+ };
60
+ };
61
+ readonly l2OutputOracle: {
62
+ readonly 1: {
63
+ readonly address: "0x56315b90c40730925ec5485cf004d835058518A0";
64
+ };
65
+ };
66
+ readonly multicall3: {
67
+ readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
68
+ readonly blockCreated: 5022;
69
+ };
70
+ readonly portal: {
71
+ readonly 1: {
72
+ readonly address: "0x49048044D57e1C92A77f79988d21Fa8fAF74E97e";
73
+ readonly blockCreated: 17482143;
74
+ };
75
+ };
76
+ readonly l1StandardBridge: {
77
+ readonly 1: {
78
+ readonly address: "0x3154Cf16ccdb4C6d922629664174b904d80F2C35";
79
+ readonly blockCreated: 17482143;
80
+ };
81
+ };
82
+ readonly gasPriceOracle: {
83
+ readonly address: "0x420000000000000000000000000000000000000F";
84
+ };
85
+ readonly l1Block: {
86
+ readonly address: "0x4200000000000000000000000000000000000015";
87
+ };
88
+ readonly l2CrossDomainMessenger: {
89
+ readonly address: "0x4200000000000000000000000000000000000007";
90
+ };
91
+ readonly l2Erc721Bridge: {
92
+ readonly address: "0x4200000000000000000000000000000000000014";
93
+ };
94
+ readonly l2StandardBridge: {
95
+ readonly address: "0x4200000000000000000000000000000000000010";
96
+ };
97
+ readonly l2ToL1MessagePasser: {
98
+ readonly address: "0x4200000000000000000000000000000000000016";
99
+ };
100
+ };
101
+ ensTlds?: readonly string[] | undefined;
102
+ id: 8453;
103
+ name: "Base";
104
+ nativeCurrency: {
105
+ readonly name: "Ether";
106
+ readonly symbol: "ETH";
107
+ readonly decimals: 18;
108
+ };
109
+ experimental_preconfirmationTime?: number | undefined | undefined;
110
+ rpcUrls: {
111
+ readonly default: {
112
+ readonly http: readonly ["https://mainnet.base.org"];
113
+ };
114
+ };
115
+ sourceId: 1;
116
+ testnet?: boolean | undefined | undefined;
117
+ custom?: Record<string, unknown> | undefined;
118
+ fees?: import("viem").ChainFees<undefined> | undefined;
119
+ formatters: {
120
+ readonly block: {
121
+ exclude: [] | undefined;
122
+ format: (args: import("viem/chains").OpStackRpcBlock, action?: string | undefined) => {
123
+ baseFeePerGas: bigint | null;
124
+ blobGasUsed: bigint;
125
+ difficulty: bigint;
126
+ excessBlobGas: bigint;
127
+ extraData: import("viem").Hex;
128
+ gasLimit: bigint;
129
+ gasUsed: bigint;
130
+ hash: `0x${string}` | null;
131
+ logsBloom: `0x${string}` | null;
132
+ miner: import("viem").Address;
133
+ mixHash: import("viem").Hash;
134
+ nonce: `0x${string}` | null;
135
+ number: bigint | null;
136
+ parentBeaconBlockRoot?: `0x${string}` | undefined;
137
+ parentHash: import("viem").Hash;
138
+ receiptsRoot: import("viem").Hex;
139
+ sealFields: import("viem").Hex[];
140
+ sha3Uncles: import("viem").Hash;
141
+ size: bigint;
142
+ stateRoot: import("viem").Hash;
143
+ timestamp: bigint;
144
+ totalDifficulty: bigint | null;
145
+ transactions: `0x${string}`[] | import("viem/chains").OpStackTransaction<boolean>[];
146
+ transactionsRoot: import("viem").Hash;
147
+ uncles: import("viem").Hash[];
148
+ withdrawals?: import("viem").Withdrawal[] | undefined | undefined;
149
+ withdrawalsRoot?: `0x${string}` | undefined;
150
+ } & {};
151
+ type: "block";
152
+ };
153
+ readonly transaction: {
154
+ exclude: [] | undefined;
155
+ format: (args: import("viem/chains").OpStackRpcTransaction, action?: string | undefined) => ({
156
+ blockHash: `0x${string}` | null;
157
+ blockNumber: bigint | null;
158
+ from: import("viem").Address;
159
+ gas: bigint;
160
+ hash: import("viem").Hash;
161
+ input: import("viem").Hex;
162
+ nonce: number;
163
+ r: import("viem").Hex;
164
+ s: import("viem").Hex;
165
+ to: import("viem").Address | null;
166
+ transactionIndex: number | null;
167
+ typeHex: import("viem").Hex | null;
168
+ v: bigint;
169
+ value: bigint;
170
+ yParity: number;
171
+ gasPrice?: undefined | undefined;
172
+ maxFeePerBlobGas?: undefined | undefined;
173
+ maxFeePerGas: bigint;
174
+ maxPriorityFeePerGas: bigint;
175
+ isSystemTx?: boolean;
176
+ mint?: bigint | undefined | undefined;
177
+ sourceHash: import("viem").Hex;
178
+ type: "deposit";
179
+ } | {
180
+ r: import("viem").Hex;
181
+ s: import("viem").Hex;
182
+ v: bigint;
183
+ value: bigint;
184
+ gas: bigint;
185
+ to: import("viem").Address | null;
186
+ from: import("viem").Address;
187
+ nonce: number;
188
+ blockHash: `0x${string}` | null;
189
+ blockNumber: bigint | null;
190
+ transactionIndex: number | null;
191
+ hash: import("viem").Hash;
192
+ input: import("viem").Hex;
193
+ typeHex: import("viem").Hex | null;
194
+ accessList?: undefined | undefined;
195
+ authorizationList?: undefined | undefined;
196
+ blobVersionedHashes?: undefined | undefined;
197
+ chainId?: number | undefined;
198
+ yParity?: undefined | undefined;
199
+ type: "legacy";
200
+ gasPrice: bigint;
201
+ maxFeePerBlobGas?: undefined | undefined;
202
+ maxFeePerGas?: undefined | undefined;
203
+ maxPriorityFeePerGas?: undefined | undefined;
204
+ isSystemTx?: undefined | undefined;
205
+ mint?: undefined | undefined;
206
+ sourceHash?: undefined | undefined;
207
+ } | {
208
+ blockHash: `0x${string}` | null;
209
+ blockNumber: bigint | null;
210
+ from: import("viem").Address;
211
+ gas: bigint;
212
+ hash: import("viem").Hash;
213
+ input: import("viem").Hex;
214
+ nonce: number;
215
+ r: import("viem").Hex;
216
+ s: import("viem").Hex;
217
+ to: import("viem").Address | null;
218
+ transactionIndex: number | null;
219
+ typeHex: import("viem").Hex | null;
220
+ v: bigint;
221
+ value: bigint;
222
+ yParity: number;
223
+ accessList: import("viem").AccessList;
224
+ authorizationList?: undefined | undefined;
225
+ blobVersionedHashes?: undefined | undefined;
226
+ chainId: number;
227
+ type: "eip2930";
228
+ gasPrice: bigint;
229
+ maxFeePerBlobGas?: undefined | undefined;
230
+ maxFeePerGas?: undefined | undefined;
231
+ maxPriorityFeePerGas?: undefined | undefined;
232
+ isSystemTx?: undefined | undefined;
233
+ mint?: undefined | undefined;
234
+ sourceHash?: undefined | undefined;
235
+ } | {
236
+ blockHash: `0x${string}` | null;
237
+ blockNumber: bigint | null;
238
+ from: import("viem").Address;
239
+ gas: bigint;
240
+ hash: import("viem").Hash;
241
+ input: import("viem").Hex;
242
+ nonce: number;
243
+ r: import("viem").Hex;
244
+ s: import("viem").Hex;
245
+ to: import("viem").Address | null;
246
+ transactionIndex: number | null;
247
+ typeHex: import("viem").Hex | null;
248
+ v: bigint;
249
+ value: bigint;
250
+ yParity: number;
251
+ accessList: import("viem").AccessList;
252
+ authorizationList?: undefined | undefined;
253
+ blobVersionedHashes?: undefined | undefined;
254
+ chainId: number;
255
+ type: "eip1559";
256
+ gasPrice?: undefined | undefined;
257
+ maxFeePerBlobGas?: undefined | undefined;
258
+ maxFeePerGas: bigint;
259
+ maxPriorityFeePerGas: bigint;
260
+ isSystemTx?: undefined | undefined;
261
+ mint?: undefined | undefined;
262
+ sourceHash?: undefined | undefined;
263
+ } | {
264
+ blockHash: `0x${string}` | null;
265
+ blockNumber: bigint | null;
266
+ from: import("viem").Address;
267
+ gas: bigint;
268
+ hash: import("viem").Hash;
269
+ input: import("viem").Hex;
270
+ nonce: number;
271
+ r: import("viem").Hex;
272
+ s: import("viem").Hex;
273
+ to: import("viem").Address | null;
274
+ transactionIndex: number | null;
275
+ typeHex: import("viem").Hex | null;
276
+ v: bigint;
277
+ value: bigint;
278
+ yParity: number;
279
+ accessList: import("viem").AccessList;
280
+ authorizationList?: undefined | undefined;
281
+ blobVersionedHashes: readonly import("viem").Hex[];
282
+ chainId: number;
283
+ type: "eip4844";
284
+ gasPrice?: undefined | undefined;
285
+ maxFeePerBlobGas: bigint;
286
+ maxFeePerGas: bigint;
287
+ maxPriorityFeePerGas: bigint;
288
+ isSystemTx?: undefined | undefined;
289
+ mint?: undefined | undefined;
290
+ sourceHash?: undefined | undefined;
291
+ } | {
292
+ blockHash: `0x${string}` | null;
293
+ blockNumber: bigint | null;
294
+ from: import("viem").Address;
295
+ gas: bigint;
296
+ hash: import("viem").Hash;
297
+ input: import("viem").Hex;
298
+ nonce: number;
299
+ r: import("viem").Hex;
300
+ s: import("viem").Hex;
301
+ to: import("viem").Address | null;
302
+ transactionIndex: number | null;
303
+ typeHex: import("viem").Hex | null;
304
+ v: bigint;
305
+ value: bigint;
306
+ yParity: number;
307
+ accessList: import("viem").AccessList;
308
+ authorizationList: import("viem").SignedAuthorizationList;
309
+ blobVersionedHashes?: undefined | undefined;
310
+ chainId: number;
311
+ type: "eip7702";
312
+ gasPrice?: undefined | undefined;
313
+ maxFeePerBlobGas?: undefined | undefined;
314
+ maxFeePerGas: bigint;
315
+ maxPriorityFeePerGas: bigint;
316
+ isSystemTx?: undefined | undefined;
317
+ mint?: undefined | undefined;
318
+ sourceHash?: undefined | undefined;
319
+ }) & {};
320
+ type: "transaction";
321
+ };
322
+ readonly transactionReceipt: {
323
+ exclude: [] | undefined;
324
+ format: (args: import("viem/chains").OpStackRpcTransactionReceipt, action?: string | undefined) => {
325
+ blobGasPrice?: bigint | undefined;
326
+ blobGasUsed?: bigint | undefined;
327
+ blockHash: import("viem").Hash;
328
+ blockNumber: bigint;
329
+ contractAddress: import("viem").Address | null | undefined;
330
+ cumulativeGasUsed: bigint;
331
+ effectiveGasPrice: bigint;
332
+ from: import("viem").Address;
333
+ gasUsed: bigint;
334
+ logs: import("viem").Log<bigint, number, false>[];
335
+ logsBloom: import("viem").Hex;
336
+ root?: `0x${string}` | undefined;
337
+ status: "success" | "reverted";
338
+ to: import("viem").Address | null;
339
+ transactionHash: import("viem").Hash;
340
+ transactionIndex: number;
341
+ type: import("viem").TransactionType;
342
+ l1GasPrice: bigint | null;
343
+ l1GasUsed: bigint | null;
344
+ l1Fee: bigint | null;
345
+ l1FeeScalar: number | null;
346
+ } & {};
347
+ type: "transactionReceipt";
348
+ };
349
+ };
350
+ serializers: {
351
+ readonly transaction: typeof import("viem/chains").serializeTransactionOpStack;
352
+ };
353
+ };
5
354
  sepolia: {
6
355
  blockExplorers: {
7
356
  readonly default: {
package/dist/esm/viem.js CHANGED
@@ -1,7 +1,9 @@
1
- import { anvil, baseSepolia, monadTestnet, plasmaTestnet, sepolia, worldchainSepolia, } from 'viem/chains';
1
+ import { anvil, base, baseSepolia, mainnet, monadTestnet, plasmaTestnet, sepolia, worldchainSepolia, } from 'viem/chains';
2
2
  import { getSupportedChain } from './chain.js';
3
3
  /** Map of supported chain short names to their viem chain objects. */
4
4
  export const chains = {
5
+ mainnet,
6
+ base,
5
7
  sepolia,
6
8
  baseSepolia,
7
9
  monadTestnet,
@@ -27,4 +29,4 @@ export function getViemChain(chainish) {
27
29
  }
28
30
  return chain;
29
31
  }
30
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmllbS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy92aWVtLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFDTCxLQUFLLEVBQ0wsV0FBVyxFQUNYLFlBQVksRUFDWixhQUFhLEVBQ2IsT0FBTyxFQUNQLGlCQUFpQixHQUNsQixNQUFNLGFBQWEsQ0FBQztBQUNyQixPQUFPLEVBQVksaUJBQWlCLEVBQUUsTUFBTSxZQUFZLENBQUM7QUFFekQsc0VBQXNFO0FBQ3RFLE1BQU0sQ0FBQyxNQUFNLE1BQU0sR0FBRztJQUNwQixPQUFPO0lBQ1AsV0FBVztJQUNYLFlBQVk7SUFDWixhQUFhO0lBQ2IsS0FBSztJQUNMLGlCQUFpQjtDQUNsQixDQUFDO0FBRUY7Ozs7Ozs7OztHQVNHO0FBQ0gsTUFBTSxVQUFVLFlBQVksQ0FBQyxRQUFrQjtJQUM3QyxNQUFNLEVBQUUsSUFBSSxFQUFFLEdBQUcsaUJBQWlCLENBQUMsUUFBUSxDQUFDLENBQUM7SUFDN0MsTUFBTSxLQUFLLEdBQUcsTUFBTSxDQUFDLElBQUksQ0FBQyxDQUFDO0lBQzNCLElBQUksQ0FBQyxLQUFLLEVBQUUsQ0FBQztRQUNYLE1BQU0sSUFBSSxLQUFLLENBQUMsNkJBQTZCLElBQUksRUFBRSxDQUFDLENBQUM7SUFDdkQsQ0FBQztJQUNELE9BQU8sS0FBSyxDQUFDO0FBQ2YsQ0FBQyJ9
32
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmllbS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy92aWVtLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFDTCxLQUFLLEVBQ0wsSUFBSSxFQUNKLFdBQVcsRUFDWCxPQUFPLEVBQ1AsWUFBWSxFQUNaLGFBQWEsRUFDYixPQUFPLEVBQ1AsaUJBQWlCLEdBQ2xCLE1BQU0sYUFBYSxDQUFDO0FBQ3JCLE9BQU8sRUFBWSxpQkFBaUIsRUFBRSxNQUFNLFlBQVksQ0FBQztBQU16RCxzRUFBc0U7QUFDdEUsTUFBTSxDQUFDLE1BQU0sTUFBTSxHQUFHO0lBQ3BCLE9BQU87SUFDUCxJQUFJO0lBQ0osT0FBTztJQUNQLFdBQVc7SUFDWCxZQUFZO0lBQ1osYUFBYTtJQUNiLEtBQUs7SUFDTCxpQkFBaUI7Q0FDbEIsQ0FBQztBQUVGOzs7Ozs7Ozs7R0FTRztBQUNILE1BQU0sVUFBVSxZQUFZLENBQUMsUUFBa0I7SUFDN0MsTUFBTSxFQUFFLElBQUksRUFBRSxHQUFHLGlCQUFpQixDQUFDLFFBQVEsQ0FBQyxDQUFDO0lBQzdDLE1BQU0sS0FBSyxHQUFHLE1BQU0sQ0FBQyxJQUFJLENBQUMsQ0FBQztJQUMzQixJQUFJLENBQUMsS0FBSyxFQUFFLENBQUM7UUFDWCxNQUFNLElBQUksS0FBSyxDQUFDLDZCQUE2QixJQUFJLEVBQUUsQ0FBQyxDQUFDO0lBQ3ZELENBQUM7SUFDRCxPQUFPLEtBQUssQ0FBQztBQUNmLENBQUMifQ==
@@ -42,8 +42,8 @@ export interface SessionKeyAttestedComputeArgs {
42
42
  rhsPlaintext: bigint | boolean;
43
43
  requesterArgData?: Hex | undefined;
44
44
  backoffConfig?: Partial<BackoffConfig> | undefined;
45
- ethClient?: PublicClient<Transport, Chain> | WalletClient<Transport, Chain, Account> | undefined;
46
- executorAddress?: HexString | undefined;
45
+ ethClient: PublicClient<Transport, Chain>;
46
+ executorAddress: HexString;
47
47
  reencryptPubKey?: Uint8Array | undefined;
48
48
  reencryptKeypair?: XwingKeypair | undefined;
49
49
  }
@@ -58,8 +58,8 @@ export interface SessionKeyAttestedDecryptArgs {
58
58
  backoffConfig?: Partial<BackoffConfig> | undefined;
59
59
  reencryptPubKey?: Uint8Array | undefined;
60
60
  reencryptKeypair?: XwingKeypair | undefined;
61
- ethClient?: PublicClient<Transport, Chain> | WalletClient<Transport, Chain, Account> | undefined;
62
- executorAddress?: HexString | undefined;
61
+ ethClient: PublicClient<Transport, Chain>;
62
+ executorAddress: HexString;
63
63
  }
64
64
  /**
65
65
  * Performs attested decrypts using a voucher-backed session key.
@@ -8,7 +8,6 @@ import { type XwingKeypair } from '../lite/xwing.js';
8
8
  import type { BackoffConfig } from '../retry.js';
9
9
  import { AttestedComputeOP } from './types.js';
10
10
  export declare const ATTESTED_COMPUTE_DOMAIN_NAME = "IncoAttestedCompute";
11
- export declare const DEFAULT_ATTESTED_COMPUTE_DOMAIN_VERSION = "2";
12
11
  /**
13
12
  * Arguments for creating an attested compute.
14
13
  */
@@ -1,7 +1,8 @@
1
- import type { Account, Chain, PublicClient, Transport, WalletClient } from 'viem';
1
+ import type { Account, Chain, Transport, WalletClient } from 'viem';
2
2
  import { type HexString } from '../binary.js';
3
3
  import { type SupportedChainId } from '../chain.js';
4
4
  import { EncryptionScheme, type SupportedFheType } from '../encryption/encryption.js';
5
+ import { type HandleWithProof } from '../generated/es/inco/kms/lite/v1/types_pb.js';
5
6
  import { validateHandle } from '../handle.js';
6
7
  import { KmsQuorumClient } from '../kms/quorumClient.js';
7
8
  import type { XwingKeypair } from '../lite/xwing.js';
@@ -9,8 +10,6 @@ import type { BackoffConfig } from '../retry.js';
9
10
  import { type DecryptionAttestation, type EncryptedDecryptionAttestation } from './types.js';
10
11
  export { validateHandle };
11
12
  export declare const ATTESTED_DECRYPT_DOMAIN_NAME = "IncoAttestedDecrypt";
12
- export declare const DEFAULT_ATTESTED_DECRYPT_DOMAIN_VERSION = "2";
13
- export declare const TEST_RPC_URL = "UNUSED IN TEST";
14
13
  /**
15
14
  * Arguments for creating an attested decrypt request.
16
15
  */
@@ -58,5 +57,5 @@ export declare function attestedDecrypt({ handles, backoffConfig, walletClient,
58
57
  kmsQuorumClient: KmsQuorumClient;
59
58
  executorAddress: HexString;
60
59
  }): Promise<Array<EncryptedDecryptionAttestation<EncryptionScheme, SupportedFheType>>>;
61
- export declare function fetchEip712DomainVersion(executorAddress: HexString | undefined, defaultVersion: string, walletClient?: WalletClient<Transport, Chain, Account> | PublicClient<Transport, Chain>): Promise<string>;
60
+ export declare function buildHandlesWithProofs(handles: HexString[]): Array<HandleWithProof>;
62
61
  export declare function decryptEncryptedAttestations(attestations: Array<DecryptionAttestation<EncryptionScheme, SupportedFheType> | EncryptedDecryptionAttestation<EncryptionScheme, SupportedFheType>>, reencryptKeypair: XwingKeypair): Promise<Array<DecryptionAttestation<EncryptionScheme, SupportedFheType>>>;
@@ -5,6 +5,8 @@
5
5
  * to work around Pulumi closure serialisation issues.
6
6
  */
7
7
  export declare const supportedChains: {
8
+ readonly mainnet: 1;
9
+ readonly base: 8453;
8
10
  readonly baseSepolia: 84532;
9
11
  readonly sepolia: 11155111;
10
12
  readonly monadTestnet: 10143;
@@ -28,6 +30,12 @@ export type Numberish = number | bigint;
28
30
  export type Chainish = {
29
31
  id: Numberish;
30
32
  } | Numberish | string;
33
+ /**
34
+ * Map of supported chain IDs to their short names.
35
+ * Public networks use the `shortName` from https://github.com/ethereum-lists/chains.
36
+ * Local Anvil uses `31337` (same ID as GoChain Testnet in the registry) but the SDK labels it `anvil`.
37
+ */
38
+ export declare const chainShortNames: Record<SupportedChainId, string>;
31
39
  /**
32
40
  * Resolves a {@link Chainish} value to a {@link SupportedChain}.
33
41
  *
@@ -0,0 +1,18 @@
1
+ import type { Account, Chain, Transport, WalletClient } from 'viem';
2
+ import type { HexString } from '../binary.js';
3
+ import type { SupportedChainId } from '../chain.js';
4
+ import { ViemClient } from '../viem.js';
5
+ export declare function fetchEip712DomainVersion(executorAddress: HexString, ethClient: ViemClient): Promise<string>;
6
+ export declare function buildEip712Payload(params: {
7
+ executorAddress: HexString;
8
+ ethClient: ViemClient;
9
+ chainId: SupportedChainId;
10
+ handles: HexString[];
11
+ reencryptPubKey: Uint8Array;
12
+ }): Promise<import("../reencryption/eip712.js").EIP712<{
13
+ handles: `0x${string}`[];
14
+ publicKey: `0x${string}`;
15
+ }>>;
16
+ type WalletSignTypedDataParams = Parameters<WalletClient<Transport, Chain, Account>['signTypedData']>[0];
17
+ export declare function signEip712(walletClient: WalletClient<Transport, Chain, Account>, eip712Payload: WalletSignTypedDataParams): Promise<`0x${string}`>;
18
+ export {};
@@ -0,0 +1 @@
1
+ export { buildEip712Payload, fetchEip712DomainVersion, signEip712, } from './eip712.js';
@@ -0,0 +1,49 @@
1
+ import type { Account, Chain, Transport, WalletClient } from 'viem';
2
+ import { validateHandle } from '../attesteddecrypt/attested-decrypt.js';
3
+ import { type HexString } from '../binary.js';
4
+ import { type SupportedChainId } from '../chain.js';
5
+ import { type EncryptionScheme, type SupportedFheType } from '../encryption/encryption.js';
6
+ import { KmsQuorumClient } from '../kms/quorumClient.js';
7
+ import type { XwingKeypair } from '../lite/xwing.js';
8
+ import type { BackoffConfig } from '../retry.js';
9
+ import { type EListDecryptionAttestation, type EncryptedEListDecryptionAttestation } from './types.js';
10
+ export { validateHandle };
11
+ export declare function eListAttestedDecrypt({ handle, backoffConfig, walletClient, chainId, reencryptPubKey, reencryptKeypair, kmsQuorumClient, executorAddress, }: {
12
+ handle: HexString;
13
+ backoffConfig?: Partial<BackoffConfig> | undefined;
14
+ walletClient: WalletClient<Transport, Chain, Account>;
15
+ chainId: SupportedChainId;
16
+ reencryptPubKey: Uint8Array;
17
+ reencryptKeypair: XwingKeypair;
18
+ kmsQuorumClient: KmsQuorumClient;
19
+ executorAddress: HexString;
20
+ }): Promise<EListDecryptionAttestation<EncryptionScheme, SupportedFheType>>;
21
+ export declare function eListAttestedDecrypt({ handle, backoffConfig, walletClient, chainId, reencryptPubKey, kmsQuorumClient, executorAddress, }: {
22
+ handle: HexString;
23
+ backoffConfig?: Partial<BackoffConfig> | undefined;
24
+ walletClient: WalletClient<Transport, Chain, Account>;
25
+ chainId: SupportedChainId;
26
+ reencryptPubKey: Uint8Array;
27
+ reencryptKeypair?: never;
28
+ kmsQuorumClient: KmsQuorumClient;
29
+ executorAddress: HexString;
30
+ }): Promise<EncryptedEListDecryptionAttestation<EncryptionScheme, SupportedFheType>>;
31
+ export declare function eListAttestedDecrypt({ handle, backoffConfig, walletClient, chainId, kmsQuorumClient, executorAddress, }: {
32
+ handle: HexString;
33
+ backoffConfig?: Partial<BackoffConfig> | undefined;
34
+ walletClient: WalletClient<Transport, Chain, Account>;
35
+ chainId: SupportedChainId;
36
+ reencryptPubKey?: never;
37
+ reencryptKeypair?: never;
38
+ kmsQuorumClient: KmsQuorumClient;
39
+ executorAddress: HexString;
40
+ }): Promise<EListDecryptionAttestation<EncryptionScheme, SupportedFheType>>;
41
+ /**
42
+ * Reveal a single elist handle without wallet authentication.
43
+ * Returns plaintext values along with an attestation of the checksum.
44
+ */
45
+ export declare function eListAttestedReveal({ handle, backoffConfig, kmsQuorumClient, }: {
46
+ handle: HexString;
47
+ backoffConfig?: Partial<BackoffConfig> | undefined;
48
+ kmsQuorumClient: KmsQuorumClient;
49
+ }): Promise<EListDecryptionAttestation<EncryptionScheme, SupportedFheType>>;
@@ -0,0 +1,2 @@
1
+ export { eListAttestedDecrypt, eListAttestedReveal, } from './elist-attested-decrypt.js';
2
+ export * from './types.js';
@@ -0,0 +1,31 @@
1
+ import type { HexString } from '../binary.js';
2
+ import type { EncryptionScheme, EncryptResultOf, PlaintextOf, SupportedFheType } from '../encryption/encryption.js';
3
+ import { handleTypes } from '../index.js';
4
+ import type { BackoffConfig } from '../retry.js';
5
+ /**
6
+ * Custom error class for elist attested decrypt operations.
7
+ */
8
+ export declare class EListAttestedDecryptError extends Error {
9
+ readonly cause?: unknown | undefined;
10
+ constructor(message: string, cause?: unknown | undefined);
11
+ }
12
+ export type EListDecryptionAttestation<S extends EncryptionScheme, T extends SupportedFheType> = {
13
+ handle: HexString;
14
+ commitmentProof: PlaintextOf<S, typeof handleTypes.euint256>;
15
+ values: PlaintextOf<S, T>[];
16
+ covalidatorSignatures: Uint8Array[];
17
+ commitments: Uint8Array[];
18
+ };
19
+ export type EncryptedEListDecryptionAttestation<S extends EncryptionScheme, T extends SupportedFheType> = {
20
+ handle: HexString;
21
+ commitmentProof: PlaintextOf<S, typeof handleTypes.euint256>;
22
+ values: EncryptResultOf<S, T>[];
23
+ covalidatorSignatures: Uint8Array[];
24
+ commitments: Uint8Array[];
25
+ };
26
+ export type EListAttestedDecryptor<S extends EncryptionScheme> = <T extends SupportedFheType>(args: EListAttestedDecryptFnArgs<S, T>) => Promise<EListDecryptionAttestation<S, T>>;
27
+ export type EListAttestedDecryptFnArgs<S extends EncryptionScheme, T extends SupportedFheType> = {
28
+ /** The handle to decrypt */
29
+ handle: HexString;
30
+ backoffConfig?: Partial<BackoffConfig>;
31
+ };
@@ -711,20 +711,6 @@ export declare const incoLightningAbi: readonly [{
711
711
  readonly type: "bytes32";
712
712
  }];
713
713
  readonly stateMutability: "nonpayable";
714
- }, {
715
- readonly type: "function";
716
- readonly inputs: readonly [{
717
- readonly name: "randType";
718
- readonly internalType: "enum ETypes";
719
- readonly type: "uint8";
720
- }];
721
- readonly name: "eRand";
722
- readonly outputs: readonly [{
723
- readonly name: "result";
724
- readonly internalType: "bytes32";
725
- readonly type: "bytes32";
726
- }];
727
- readonly stateMutability: "payable";
728
714
  }, {
729
715
  readonly type: "function";
730
716
  readonly inputs: readonly [{
@@ -2213,31 +2199,6 @@ export declare const incoLightningAbi: readonly [{
2213
2199
  readonly indexed: false;
2214
2200
  }];
2215
2201
  readonly name: "ENot";
2216
- }, {
2217
- readonly type: "event";
2218
- readonly anonymous: false;
2219
- readonly inputs: readonly [{
2220
- readonly name: "counter";
2221
- readonly internalType: "uint256";
2222
- readonly type: "uint256";
2223
- readonly indexed: true;
2224
- }, {
2225
- readonly name: "randType";
2226
- readonly internalType: "enum ETypes";
2227
- readonly type: "uint8";
2228
- readonly indexed: false;
2229
- }, {
2230
- readonly name: "result";
2231
- readonly internalType: "bytes32";
2232
- readonly type: "bytes32";
2233
- readonly indexed: true;
2234
- }, {
2235
- readonly name: "eventId";
2236
- readonly internalType: "uint256";
2237
- readonly type: "uint256";
2238
- readonly indexed: false;
2239
- }];
2240
- readonly name: "ERand";
2241
2202
  }, {
2242
2203
  readonly type: "event";
2243
2204
  readonly anonymous: false;
@@ -141,6 +141,12 @@ export declare const elistTesterAbi: readonly [{
141
141
  readonly type: "bytes32";
142
142
  }];
143
143
  readonly stateMutability: "payable";
144
+ }, {
145
+ readonly type: "function";
146
+ readonly inputs: readonly [];
147
+ readonly name: "listReveal";
148
+ readonly outputs: readonly [];
149
+ readonly stateMutability: "nonpayable";
144
150
  }, {
145
151
  readonly type: "function";
146
152
  readonly inputs: readonly [];