@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
|
@@ -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>;
|
|
@@ -1,4 +1,25 @@
|
|
|
1
1
|
export declare const lightningDeployments: readonly [{
|
|
2
|
+
readonly name: "incoLightningPreview_1_0_2__725458969";
|
|
3
|
+
readonly majorVersion: 1;
|
|
4
|
+
readonly deployer: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC";
|
|
5
|
+
readonly pepper: "alphanet";
|
|
6
|
+
readonly executorAddress: "0x28676Cd3b10b03b2FDF105Ba280425b45a674F2A";
|
|
7
|
+
readonly salt: "0x8202d2d747784cb7d48868e44c42c4bf162a70bc004dfbe338c6966a22bcca19";
|
|
8
|
+
readonly chainId: 84532;
|
|
9
|
+
readonly chainName: "Base Sepolia";
|
|
10
|
+
readonly version: {
|
|
11
|
+
readonly major: 1;
|
|
12
|
+
readonly minor: 0;
|
|
13
|
+
readonly patch: 2;
|
|
14
|
+
readonly shortSalt: "725458969";
|
|
15
|
+
};
|
|
16
|
+
readonly decryptSigner: "0x4736F8CE685760017eEc130AC3FFc6187f5A1F95";
|
|
17
|
+
readonly eciesPublicKey: "0x038a582d29083c2f3fefe024bf4dd9ab913ab8973716977da5f01106e0b84095b1";
|
|
18
|
+
readonly blockNumber: 32124925;
|
|
19
|
+
readonly deployDate: "2025-10-09T13:55:42.997Z";
|
|
20
|
+
readonly commit: "v0.5.3-10-ga4f2312d";
|
|
21
|
+
readonly active: true;
|
|
22
|
+
}, {
|
|
2
23
|
readonly name: "incoLightningPreview_1_0_2__904635675";
|
|
3
24
|
readonly majorVersion: 1;
|
|
4
25
|
readonly deployer: "0x8202D2D747784Cb7D48868E44C42C4bf162a70BC";
|
|
@@ -16,12 +16,12 @@ export declare const localNodeLightningConfig: {
|
|
|
16
16
|
readonly senderPrivateKey: "0x6f2539401f377d76bafd39b580e0f95b9bf7d39dec8fd3ada4abe41ad2ae1e18";
|
|
17
17
|
};
|
|
18
18
|
readonly alphanet: {
|
|
19
|
-
readonly executorAddress: "
|
|
20
|
-
readonly eciesPublicKey: "
|
|
19
|
+
readonly executorAddress: "0x28676Cd3b10b03b2FDF105Ba280425b45a674F2A";
|
|
20
|
+
readonly eciesPublicKey: "0x034bc20c48ff1b8e86563dff8dd2ec3936bdea0ab570986780971cdc4c3871fe09";
|
|
21
21
|
readonly chainId: 31337;
|
|
22
22
|
readonly covalidatorUrl: "http://localhost:50055";
|
|
23
23
|
readonly hostChainRpcUrl: "http://localhost:8545";
|
|
24
|
-
readonly senderPrivateKey: "
|
|
24
|
+
readonly senderPrivateKey: "0xa0b9f1fb7c6803e5692b73bd08ccc5c468b15eebe7df4398d048e9a58f785706";
|
|
25
25
|
};
|
|
26
26
|
readonly scratch: {
|
|
27
27
|
readonly executorAddress: "0x195ec7fDf68fD835b9F78d6eb13E280cC2e25fdD";
|
package/dist/types/handle.d.ts
CHANGED
|
@@ -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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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;
|
package/dist/types/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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inco/js",
|
|
3
|
-
"version": "0.6.
|
|
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",
|