@inco/js 0.6.1 → 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.
Files changed (64) hide show
  1. package/dist/cjs/binary.d.ts +1 -0
  2. package/dist/cjs/binary.js +6 -2
  3. package/dist/cjs/encryption/encryption.d.ts +17 -20
  4. package/dist/cjs/encryption/encryption.js +30 -12
  5. package/dist/cjs/generated/abis/lightning-preview.d.ts +8 -106
  6. package/dist/cjs/generated/abis/lightning-preview.js +5 -55
  7. package/dist/cjs/generated/abis/lightning.d.ts +54 -115
  8. package/dist/cjs/generated/abis/lightning.js +32 -65
  9. package/dist/cjs/generated/abis/verifier.d.ts +86 -36
  10. package/dist/cjs/generated/abis/verifier.js +57 -21
  11. package/dist/cjs/generated/es/cosmos_proto/cosmos_pb.js +2 -2
  12. package/dist/cjs/generated/es/inco/covalidator/compute/v1/server_pb.d.ts +775 -0
  13. package/dist/cjs/generated/es/inco/covalidator/compute/v1/server_pb.js +261 -0
  14. package/dist/cjs/generated/es/inco/covalidator/compute/v1/types_pb.d.ts +186 -0
  15. package/dist/cjs/generated/es/inco/covalidator/compute/v1/types_pb.js +47 -0
  16. package/dist/cjs/generated/es/inco/fhe/v1/types_pb.js +2 -2
  17. package/dist/cjs/generated/es/inco/kms/lite/v1/kms_service_pb.js +2 -2
  18. package/dist/cjs/generated/es/inco/kms/lite/v1/types_pb.js +2 -2
  19. package/dist/cjs/handle.d.ts +16 -0
  20. package/dist/cjs/handle.js +28 -3
  21. package/dist/cjs/lite/ecies.d.ts +0 -2
  22. package/dist/cjs/lite/ecies.js +24 -13
  23. package/dist/cjs/lite/hadu.d.ts +3 -23
  24. package/dist/cjs/lite/hadu.js +26 -29
  25. package/dist/cjs/lite/lightning.js +1 -2
  26. package/dist/cjs/viem.d.ts +44 -47
  27. package/dist/esm/binary.d.ts +1 -0
  28. package/dist/esm/binary.js +5 -2
  29. package/dist/esm/encryption/encryption.d.ts +17 -20
  30. package/dist/esm/encryption/encryption.js +26 -12
  31. package/dist/esm/generated/abis/lightning-preview.d.ts +8 -106
  32. package/dist/esm/generated/abis/lightning-preview.js +5 -55
  33. package/dist/esm/generated/abis/lightning.d.ts +54 -115
  34. package/dist/esm/generated/abis/lightning.js +32 -65
  35. package/dist/esm/generated/abis/verifier.d.ts +86 -36
  36. package/dist/esm/generated/abis/verifier.js +57 -21
  37. package/dist/esm/generated/es/cosmos_proto/cosmos_pb.js +2 -2
  38. package/dist/esm/generated/es/inco/covalidator/compute/v1/server_pb.d.ts +775 -0
  39. package/dist/esm/generated/es/inco/covalidator/compute/v1/server_pb.js +258 -0
  40. package/dist/esm/generated/es/inco/covalidator/compute/v1/types_pb.d.ts +186 -0
  41. package/dist/esm/generated/es/inco/covalidator/compute/v1/types_pb.js +44 -0
  42. package/dist/esm/generated/es/inco/fhe/v1/types_pb.js +2 -2
  43. package/dist/esm/generated/es/inco/kms/lite/v1/kms_service_pb.js +2 -2
  44. package/dist/esm/generated/es/inco/kms/lite/v1/types_pb.js +2 -2
  45. package/dist/esm/handle.d.ts +16 -0
  46. package/dist/esm/handle.js +27 -3
  47. package/dist/esm/lite/ecies.d.ts +0 -2
  48. package/dist/esm/lite/ecies.js +26 -15
  49. package/dist/esm/lite/hadu.d.ts +3 -23
  50. package/dist/esm/lite/hadu.js +28 -30
  51. package/dist/esm/lite/lightning.js +1 -2
  52. package/dist/esm/viem.d.ts +44 -47
  53. package/dist/types/binary.d.ts +1 -0
  54. package/dist/types/encryption/encryption.d.ts +17 -20
  55. package/dist/types/generated/abis/lightning-preview.d.ts +8 -106
  56. package/dist/types/generated/abis/lightning.d.ts +54 -115
  57. package/dist/types/generated/abis/verifier.d.ts +86 -36
  58. package/dist/types/generated/es/inco/covalidator/compute/v1/server_pb.d.ts +775 -0
  59. package/dist/types/generated/es/inco/covalidator/compute/v1/types_pb.d.ts +186 -0
  60. package/dist/types/handle.d.ts +16 -0
  61. package/dist/types/lite/ecies.d.ts +0 -2
  62. package/dist/types/lite/hadu.d.ts +3 -23
  63. package/dist/types/viem.d.ts +44 -47
  64. package/package.json +3 -1
@@ -0,0 +1,186 @@
1
+ import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
2
+ import type { Message } from "@bufbuild/protobuf";
3
+ /**
4
+ * Describes the file inco/covalidator/compute/v1/types.proto.
5
+ */
6
+ export declare const file_inco_covalidator_compute_v1_types: GenFile;
7
+ /**
8
+ * @generated from message inco.covalidator.compute.v1.InputContext
9
+ */
10
+ export type InputContext = Message<"inco.covalidator.compute.v1.InputContext"> & {
11
+ /**
12
+ * @generated from field: string host_chain_id = 1;
13
+ */
14
+ hostChainId: string;
15
+ /**
16
+ * @generated from field: string acl_address = 2;
17
+ */
18
+ aclAddress: string;
19
+ /**
20
+ * @generated from field: string user_address = 3;
21
+ */
22
+ userAddress: string;
23
+ /**
24
+ * @generated from field: string contract_address = 4;
25
+ */
26
+ contractAddress: string;
27
+ };
28
+ /**
29
+ * Describes the message inco.covalidator.compute.v1.InputContext.
30
+ * Use `create(InputContextSchema)` to create a new message.
31
+ */
32
+ export declare const InputContextSchema: GenMessage<InputContext>;
33
+ /**
34
+ * InputCryptogram is the outer encrypted content of the CiphertextInput
35
+ *
36
+ * @generated from message inco.covalidator.compute.v1.InputCryptogram
37
+ */
38
+ export type InputCryptogram = Message<"inco.covalidator.compute.v1.InputCryptogram"> & {
39
+ /**
40
+ * The input context that should be collected from the ambient context (e.g. event fields and metadata). This will
41
+ * be compared with CiphertextInputPayload.context_hash to ensure that the ciphertext is being used in the correct context.
42
+ *
43
+ * @generated from field: inco.covalidator.compute.v1.InputContext context = 1;
44
+ */
45
+ context?: InputContext;
46
+ /**
47
+ * The CiphertextInput: an encrypted serialisation of InputPayload
48
+ *
49
+ * @generated from field: bytes payload = 2;
50
+ */
51
+ payload: Uint8Array;
52
+ };
53
+ /**
54
+ * Describes the message inco.covalidator.compute.v1.InputCryptogram.
55
+ * Use `create(InputCryptogramSchema)` to create a new message.
56
+ */
57
+ export declare const InputCryptogramSchema: GenMessage<InputCryptogram>;
58
+ /**
59
+ * InputPayload is the inner encrypted content of the CiphertextInput
60
+ *
61
+ * @generated from message inco.covalidator.compute.v1.InputPayload
62
+ */
63
+ export type InputPayload = Message<"inco.covalidator.compute.v1.InputPayload"> & {
64
+ /**
65
+ * A canonical hash of the InputContext defined as:
66
+ * keccak256(abi.encodePacked("evm/", hostChainId, aclAddress, userAddress, contractAddress))
67
+ *
68
+ * @generated from field: bytes context_hash = 1;
69
+ */
70
+ contextHash: Uint8Array;
71
+ /**
72
+ * Plaintexts all sharing a common context
73
+ *
74
+ * @generated from field: repeated inco.covalidator.compute.v1.AnyValue values = 2;
75
+ */
76
+ values: AnyValue[];
77
+ };
78
+ /**
79
+ * Describes the message inco.covalidator.compute.v1.InputPayload.
80
+ * Use `create(InputPayloadSchema)` to create a new message.
81
+ */
82
+ export declare const InputPayloadSchema: GenMessage<InputPayload>;
83
+ /**
84
+ * @generated from message inco.covalidator.compute.v1.AnyValue
85
+ */
86
+ export type AnyValue = Message<"inco.covalidator.compute.v1.AnyValue"> & {
87
+ /**
88
+ * The plaintext bytes deserialisable according to the type
89
+ *
90
+ * @generated from oneof inco.covalidator.compute.v1.AnyValue.value
91
+ */
92
+ value: {
93
+ /**
94
+ * @generated from field: inco.covalidator.compute.v1.Scalar scalar = 2;
95
+ */
96
+ value: Scalar;
97
+ case: "scalar";
98
+ } | {
99
+ /**
100
+ * @generated from field: inco.covalidator.compute.v1.List list = 3;
101
+ */
102
+ value: List;
103
+ case: "list";
104
+ } | {
105
+ case: undefined;
106
+ value?: undefined;
107
+ };
108
+ };
109
+ /**
110
+ * Describes the message inco.covalidator.compute.v1.AnyValue.
111
+ * Use `create(AnyValueSchema)` to create a new message.
112
+ */
113
+ export declare const AnyValueSchema: GenMessage<AnyValue>;
114
+ /**
115
+ * Scalar represents a single scalar value of a given type and only applies to inputs not store cryptograms
116
+ *
117
+ * @generated from message inco.covalidator.compute.v1.Scalar
118
+ */
119
+ export type Scalar = Message<"inco.covalidator.compute.v1.Scalar"> & {
120
+ /**
121
+ * The type of the scalar
122
+ *
123
+ * @generated from field: int32 type = 1;
124
+ */
125
+ type: number;
126
+ /**
127
+ * The value of the scalar
128
+ *
129
+ * @generated from field: bytes value = 2;
130
+ */
131
+ value: Uint8Array;
132
+ };
133
+ /**
134
+ * Describes the message inco.covalidator.compute.v1.Scalar.
135
+ * Use `create(ScalarSchema)` to create a new message.
136
+ */
137
+ export declare const ScalarSchema: GenMessage<Scalar>;
138
+ /**
139
+ * List represents a list of values of a given type and only applies to inputs not store cryptograms
140
+ *
141
+ * @generated from message inco.covalidator.compute.v1.List
142
+ */
143
+ export type List = Message<"inco.covalidator.compute.v1.List"> & {
144
+ /**
145
+ * The type of the elements of the list
146
+ *
147
+ * @generated from field: int32 elementType = 1;
148
+ */
149
+ elementType: number;
150
+ /**
151
+ * The values of the list
152
+ *
153
+ * @generated from field: repeated bytes values = 2;
154
+ */
155
+ values: Uint8Array[];
156
+ };
157
+ /**
158
+ * Describes the message inco.covalidator.compute.v1.List.
159
+ * Use `create(ListSchema)` to create a new message.
160
+ */
161
+ export declare const ListSchema: GenMessage<List>;
162
+ /**
163
+ * @generated from message inco.covalidator.compute.v1.StoredCryptogram
164
+ */
165
+ export type StoredCryptogram = Message<"inco.covalidator.compute.v1.StoredCryptogram"> & {
166
+ /**
167
+ * The external handle for the ciphertext, this handle is indicative but not authoritative
168
+ * it should be compared with the internal handle in storage payload or verified against the HADU
169
+ * derived handle for InputCiphertextPayload before being trusted. A handle mismatch should trigger an error indicating
170
+ * some kind of bug or tampering.
171
+ *
172
+ * @generated from field: bytes handle = 1;
173
+ */
174
+ handle: Uint8Array;
175
+ /**
176
+ * An encrypted serialisation of the compute payload consisting of a deterministic serialisation of the value and internal handle defined in the computable sub-package
177
+ *
178
+ * @generated from field: bytes payload = 2;
179
+ */
180
+ payload: Uint8Array;
181
+ };
182
+ /**
183
+ * Describes the message inco.covalidator.compute.v1.StoredCryptogram.
184
+ * Use `create(StoredCryptogramSchema)` to create a new message.
185
+ */
186
+ export declare const StoredCryptogramSchema: GenMessage<StoredCryptogram>;
@@ -29,13 +29,29 @@ export declare const InputContext: Schema.Struct<{
29
29
  export type InputContext = typeof InputContext.Type;
30
30
  export type Handle = HexString;
31
31
  export declare function getHandleType(handle: HexString): FheType;
32
+ /**
33
+ * Computes the prehandle hash for an input based on the ciphertext
34
+ *
35
+ * @param ciphertextPayload Note this is the different from the input which has the external handle prepended
36
+ * @param indexHandle
37
+ * @param handleType
38
+ * @param handleVersion
39
+ */
32
40
  export declare function computePrehandle({ ciphertext, indexHandle, handleType, handleVersion, }: {
33
41
  ciphertext: Uint8Array;
34
42
  indexHandle: number;
35
43
  handleType: FheType;
36
44
  handleVersion: number;
37
45
  }): Buffer;
46
+ /**
47
+ * Computes the final handle for an input based on the prehandle and the input context, matches the handle generation
48
+ * in Go and Solidity
49
+ *
50
+ * @param prehandle
51
+ * @param context
52
+ */
38
53
  export declare function computeHandle({ prehandle, context, }: {
39
54
  prehandle: Uint8Array;
40
55
  context: InputContext;
41
56
  }): Buffer;
57
+ export declare function hashInputContext(context: InputContext): Buffer;
@@ -13,14 +13,12 @@ export declare function decodeSecp256k1PublicKey(pubKeyCompressed: Uint8Array):
13
13
  export declare function decodeSecp256k1PrivateKey(privKey: Uint8Array): Secp256k1Keypair;
14
14
  export declare function encrypt(pubKeyA: Secp256k1PubKey, plaintext: Uint8Array, privKeyB: Secp256k1Keypair): Promise<Uint8Array>;
15
15
  export type EciesEncryptorArgs = {
16
- scheme: EciesScheme;
17
16
  pubKeyA: Secp256k1PubKey;
18
17
  privKeyB: Secp256k1Keypair;
19
18
  };
20
19
  export declare function getEciesEncryptor({ pubKeyA, privKeyB, }: EciesEncryptorArgs): Encryptor<EciesScheme>;
21
20
  export declare function decrypt(privKeyA: Secp256k1Keypair, ciphertext: Uint8Array): Promise<Uint8Array>;
22
21
  export type EciesDecryptorArgs = {
23
- scheme: EciesScheme;
24
22
  privKeyA: Secp256k1Keypair;
25
23
  };
26
24
  export declare function getEciesDecryptor({ privKeyA, }: EciesDecryptorArgs): Decryptor<EciesScheme>;
@@ -1,24 +1,4 @@
1
- import { Schema } from 'effect';
2
1
  import { PlaintextWithContext } from '../encryption/index.js';
3
- export declare const encryptionEnvelopes: {
4
- readonly none: 0;
5
- readonly hadu: 1;
6
- };
7
- export type NoneEnvelope = (typeof encryptionEnvelopes)['none'];
8
- export type HaduEnvelope = (typeof encryptionEnvelopes)['hadu'];
9
- export declare const EncryptionEnvelope: Schema.SchemaClass<0 | 1, 0 | 1, never>;
10
- export declare const HaduInput: Schema.transform<Schema.SchemaClass<unknown, string, never>, Schema.Struct<{
11
- envelope: Schema.Literal<[1]>;
12
- scheme: Schema.Literal<[0, 1, 2]>;
13
- context: Schema.Struct<{
14
- hostChainId: typeof Schema.BigInt;
15
- aclAddress: Schema.TemplateLiteral<`0x${string}`>;
16
- userAddress: Schema.TemplateLiteral<`0x${string}`>;
17
- contractAddress: Schema.TemplateLiteral<`0x${string}`>;
18
- }>;
19
- plaintext: Schema.brand<Schema.filter<Schema.transformOrFail<Schema.Union<[typeof Schema.String, Schema.refine<object & Uint8Array<ArrayBufferLike>, Schema.Schema<object, object, never>>]>, Schema.TemplateLiteral<`0x${string}`>, never>>, "Bytes32">;
20
- type: Schema.SchemaClass<0 | 5 | 7 | 8, 0 | 5 | 7 | 8, never>;
21
- }>>;
22
- export type HaduInput = typeof HaduInput.Type;
23
- export declare function encodeInput({ plaintext, context, }: PlaintextWithContext): string;
24
- export declare function decodeInput(json: string): PlaintextWithContext;
2
+ import { InputPayload } from '../generated/es/inco/covalidator/compute/v1/types_pb.js';
3
+ export declare function encodeInput({ plaintext, context, }: PlaintextWithContext): Uint8Array;
4
+ export declare function decodeInput(input: Uint8Array): InputPayload;
@@ -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("abitype").Address;
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("abitype").Address;
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("abitype").Address | null;
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("abitype").Address | null;
183
- from: import("abitype").Address;
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("abitype").Address;
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("abitype").Address | null;
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("abitype").Address;
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("abitype").Address | null;
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("abitype").Address;
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("abitype").Address | null;
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("abitype").Address;
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("abitype").Address | null;
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("abitype").Address | null | undefined;
326
+ contractAddress: import("viem").Address | null | undefined;
327
327
  cumulativeGasUsed: bigint;
328
328
  effectiveGasPrice: bigint;
329
- from: import("abitype").Address;
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("abitype").Address | null;
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
- [x: string]: import("viem").ChainContract | {
397
- [sourceId: number]: import("viem").ChainContract | undefined;
398
- } | undefined;
399
- ensRegistry?: import("viem").ChainContract | undefined;
400
- ensUniversalResolver?: import("viem").ChainContract | undefined;
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("abitype").Address;
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("abitype").Address;
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("abitype").Address | null;
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("abitype").Address | null;
613
- from: import("abitype").Address;
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("abitype").Address;
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("abitype").Address | null;
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("abitype").Address;
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("abitype").Address | null;
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("abitype").Address;
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("abitype").Address | null;
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("abitype").Address;
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("abitype").Address | null;
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("abitype").Address | null | undefined;
753
+ contractAddress: import("viem").Address | null | undefined;
757
754
  cumulativeGasUsed: bigint;
758
755
  effectiveGasPrice: bigint;
759
- from: import("abitype").Address;
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("abitype").Address | null;
762
+ to: import("viem").Address | null;
766
763
  transactionHash: import("viem").Hash;
767
764
  transactionIndex: number;
768
765
  type: import("viem").TransactionType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inco/js",
3
- "version": "0.6.1",
3
+ "version": "0.6.8",
4
4
  "repository": "https://github.com/Inco-fhevm/inco-monorepo",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": false,
@@ -94,10 +94,12 @@
94
94
  "@types/elliptic": "^6.4.18",
95
95
  "ecies-geth": "^1.7.5",
96
96
  "effect": "^3.17.13",
97
+ "elliptic": "^6.6.1",
97
98
  "sha3": "^2.1.4",
98
99
  "viem": "^2.23.6"
99
100
  },
100
101
  "devDependencies": {
102
+ "@inco/pega": "0.1.0",
101
103
  "@bufbuild/protoc-gen-es": "^2.2.2",
102
104
  "@typescript-eslint/parser": "^8.35.1",
103
105
  "@vitest/coverage-istanbul": "3.1.1",