@verified-network/verified-sdk 2.7.7 → 2.7.9
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/contract/index.d.ts +7 -13
- package/dist/contract/index.js +84 -513
- package/dist/contractAddress/index.js +2 -2
- package/dist/lib/biconomyRNFix.d.ts +18 -18
- package/dist/lib/biconomyRNFix.js +104 -80
- package/dist/utils/constants.js +1 -6
- package/package.json +2 -5
- package/tsconfig.json +3 -3
|
@@ -322,8 +322,8 @@ const contractAddress = {
|
|
|
322
322
|
Token: "0x5a9Ea86ec84575010403B757A54cfDC223fbF0E4",
|
|
323
323
|
Oracle: "0xEC9CeED31c3f77b0607f03767d677374E8b73359",
|
|
324
324
|
Rates: "0xC54F5625cB1eb75a5055d213F9bbff2464ebcd47",
|
|
325
|
-
Security: "
|
|
326
|
-
SecuritiesFactory: "
|
|
325
|
+
Security: "0x0Ca5eDFA460873B7983392099634165be2Ce4d48",
|
|
326
|
+
SecuritiesFactory: "0x729Debf1D50330a8AB71671F2cAeB4e6b248621D",
|
|
327
327
|
Vitta: "0x39b4B94eE7FC9571723DaCbA14531EAC5Fd6E024",
|
|
328
328
|
Liquidity: "0xdAac4948E4a9C441229E09d07e4b7D0c2e9ff95d",
|
|
329
329
|
Distribution: "0xC52bFCe4D5021914dAB43f3fA2dB45471aD27696",
|
|
@@ -88,8 +88,8 @@ export declare const createNexusAccount: ({ chain, transport, _signer, index, cu
|
|
|
88
88
|
[x: string]: any;
|
|
89
89
|
[x: number]: any;
|
|
90
90
|
[x: symbol]: any;
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
blockHash: (blockTag extends "pending" ? true : false) extends infer T ? T extends (blockTag extends "pending" ? true : false) ? T extends true ? null : `0x${string}` : never : never;
|
|
92
|
+
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_1 ? T_1 extends (blockTag extends "pending" ? true : false) ? T_1 extends true ? null : bigint : never : never;
|
|
93
93
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_2 ? T_2 extends (blockTag extends "pending" ? true : false) ? T_2 extends true ? null : number : never : never;
|
|
94
94
|
}[] : `0x${string}`[];
|
|
95
95
|
}>;
|
|
@@ -120,8 +120,8 @@ export declare const createNexusAccount: ({ chain, transport, _signer, index, cu
|
|
|
120
120
|
[x: string]: any;
|
|
121
121
|
[x: number]: any;
|
|
122
122
|
[x: symbol]: any;
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
blockHash: (blockTag extends "pending" ? true : false) extends infer T ? T extends (blockTag extends "pending" ? true : false) ? T extends true ? null : `0x${string}` : never : never;
|
|
124
|
+
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_1 ? T_1 extends (blockTag extends "pending" ? true : false) ? T_1 extends true ? null : bigint : never : never;
|
|
125
125
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_2 ? T_2 extends (blockTag extends "pending" ? true : false) ? T_2 extends true ? null : number : never : never;
|
|
126
126
|
}>;
|
|
127
127
|
getTransactionConfirmations: (args: import("viem").GetTransactionConfirmationsParameters<any>) => Promise<import("viem").GetTransactionConfirmationsReturnType>;
|
|
@@ -3380,7 +3380,7 @@ export declare const createNexusAccount: ({ chain, transport, _signer, index, cu
|
|
|
3380
3380
|
authorizationList: import("viem").TransactionSerializableEIP7702["authorizationList"];
|
|
3381
3381
|
} ? "eip7702" : never) | (request["type"] extends string | undefined ? Extract<request["type"], string> : never)>) ? T_25 extends "eip7702" ? import("viem").TransactionRequestEIP7702 : never : never : never)>> & {
|
|
3382
3382
|
chainId?: number | undefined;
|
|
3383
|
-
}, (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "nonce" | "chainId" | "type" | "gas" | "blobVersionedHashes" | "fees") extends infer T_26 ? T_26 extends (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "nonce" | "chainId" | "type" | "gas" | "blobVersionedHashes" | "fees") ? T_26 extends "fees" ? "
|
|
3383
|
+
}, (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "nonce" | "chainId" | "type" | "gas" | "blobVersionedHashes" | "fees") extends infer T_26 ? T_26 extends (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "nonce" | "chainId" | "type" | "gas" | "blobVersionedHashes" | "fees") ? T_26 extends "fees" ? "gasPrice" | "maxPriorityFeePerGas" | "maxFeePerGas" : T_26 : never : never> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">) extends infer T ? { [K in keyof T]: (import("viem").UnionRequiredBy<Extract<import("viem").UnionOmit<import("viem").ExtractChainFormatterParameters<import("viem").DeriveChain<any, chainOverride>, "transactionRequest", import("viem").TransactionRequest>, "from"> & (import("viem").DeriveChain<any, chainOverride> extends infer T_1 ? T_1 extends import("viem").DeriveChain<any, chainOverride> ? T_1 extends import("viem").Chain ? {
|
|
3384
3384
|
chain: T_1;
|
|
3385
3385
|
} : {
|
|
3386
3386
|
chain?: undefined;
|
|
@@ -6632,7 +6632,7 @@ export declare const createNexusAccount: ({ chain, transport, _signer, index, cu
|
|
|
6632
6632
|
authorizationList: import("viem").TransactionSerializableEIP7702["authorizationList"];
|
|
6633
6633
|
} ? "eip7702" : never) | (request["type"] extends string | undefined ? Extract<request["type"], string> : never)>) ? T_12 extends "eip7702" ? import("viem").TransactionRequestEIP7702 : never : never : never)>> & {
|
|
6634
6634
|
chainId?: number | undefined;
|
|
6635
|
-
}, (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "nonce" | "chainId" | "type" | "gas" | "blobVersionedHashes" | "fees") extends infer T_13 ? T_13 extends (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "nonce" | "chainId" | "type" | "gas" | "blobVersionedHashes" | "fees") ? T_13 extends "fees" ? "
|
|
6635
|
+
}, (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "nonce" | "chainId" | "type" | "gas" | "blobVersionedHashes" | "fees") extends infer T_13 ? T_13 extends (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "nonce" | "chainId" | "type" | "gas" | "blobVersionedHashes" | "fees") ? T_13 extends "fees" ? "gasPrice" | "maxPriorityFeePerGas" | "maxFeePerGas" : T_13 : never : never> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K]; } : never>;
|
|
6636
6636
|
readContract: <const abi extends import("viem").Abi | readonly unknown[], functionName extends import("viem").ContractFunctionName<abi, "pure" | "view">, const args extends import("viem").ContractFunctionArgs<abi, "pure" | "view", functionName>>(args: import("viem").ReadContractParameters<abi, functionName, args>) => Promise<import("viem").ReadContractReturnType<abi, functionName, args>>;
|
|
6637
6637
|
sendRawTransaction: (args: import("viem").SendRawTransactionParameters) => Promise<import("viem").SendRawTransactionReturnType>;
|
|
6638
6638
|
simulate: <const calls extends readonly unknown[]>(args: import("viem").SimulateBlocksParameters<calls>) => Promise<import("viem").SimulateBlocksReturnType<calls>>;
|
|
@@ -6705,8 +6705,8 @@ export declare const createNexusAccount: ({ chain, transport, _signer, index, cu
|
|
|
6705
6705
|
[x: string]: any;
|
|
6706
6706
|
[x: number]: any;
|
|
6707
6707
|
[x: symbol]: any;
|
|
6708
|
-
|
|
6709
|
-
|
|
6708
|
+
blockHash: (blockTag extends "pending" ? true : false) extends infer T ? T extends (blockTag extends "pending" ? true : false) ? T extends true ? null : `0x${string}` : never : never;
|
|
6709
|
+
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_1 ? T_1 extends (blockTag extends "pending" ? true : false) ? T_1 extends true ? null : bigint : never : never;
|
|
6710
6710
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_2 ? T_2 extends (blockTag extends "pending" ? true : false) ? T_2 extends true ? null : number : never : never;
|
|
6711
6711
|
}[] : `0x${string}`[];
|
|
6712
6712
|
}>;
|
|
@@ -6737,8 +6737,8 @@ export declare const createNexusAccount: ({ chain, transport, _signer, index, cu
|
|
|
6737
6737
|
[x: string]: any;
|
|
6738
6738
|
[x: number]: any;
|
|
6739
6739
|
[x: symbol]: any;
|
|
6740
|
-
|
|
6741
|
-
|
|
6740
|
+
blockHash: (blockTag extends "pending" ? true : false) extends infer T ? T extends (blockTag extends "pending" ? true : false) ? T extends true ? null : `0x${string}` : never : never;
|
|
6741
|
+
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_1 ? T_1 extends (blockTag extends "pending" ? true : false) ? T_1 extends true ? null : bigint : never : never;
|
|
6742
6742
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_2 ? T_2 extends (blockTag extends "pending" ? true : false) ? T_2 extends true ? null : number : never : never;
|
|
6743
6743
|
}>;
|
|
6744
6744
|
getTransactionConfirmations: (args: import("viem").GetTransactionConfirmationsParameters<any>) => Promise<import("viem").GetTransactionConfirmationsReturnType>;
|
|
@@ -9997,7 +9997,7 @@ export declare const createNexusAccount: ({ chain, transport, _signer, index, cu
|
|
|
9997
9997
|
authorizationList: import("viem").TransactionSerializableEIP7702["authorizationList"];
|
|
9998
9998
|
} ? "eip7702" : never) | (request["type"] extends string | undefined ? Extract<request["type"], string> : never)>) ? T_25 extends "eip7702" ? import("viem").TransactionRequestEIP7702 : never : never : never)>> & {
|
|
9999
9999
|
chainId?: number | undefined;
|
|
10000
|
-
}, (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "nonce" | "chainId" | "type" | "gas" | "blobVersionedHashes" | "fees") extends infer T_26 ? T_26 extends (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "nonce" | "chainId" | "type" | "gas" | "blobVersionedHashes" | "fees") ? T_26 extends "fees" ? "
|
|
10000
|
+
}, (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "nonce" | "chainId" | "type" | "gas" | "blobVersionedHashes" | "fees") extends infer T_26 ? T_26 extends (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "nonce" | "chainId" | "type" | "gas" | "blobVersionedHashes" | "fees") ? T_26 extends "fees" ? "gasPrice" | "maxPriorityFeePerGas" | "maxFeePerGas" : T_26 : never : never> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">) extends infer T ? { [K in keyof T]: (import("viem").UnionRequiredBy<Extract<import("viem").UnionOmit<import("viem").ExtractChainFormatterParameters<import("viem").DeriveChain<any, chainOverride>, "transactionRequest", import("viem").TransactionRequest>, "from"> & (import("viem").DeriveChain<any, chainOverride> extends infer T_1 ? T_1 extends import("viem").DeriveChain<any, chainOverride> ? T_1 extends import("viem").Chain ? {
|
|
10001
10001
|
chain: T_1;
|
|
10002
10002
|
} : {
|
|
10003
10003
|
chain?: undefined;
|
|
@@ -13249,7 +13249,7 @@ export declare const createNexusAccount: ({ chain, transport, _signer, index, cu
|
|
|
13249
13249
|
authorizationList: import("viem").TransactionSerializableEIP7702["authorizationList"];
|
|
13250
13250
|
} ? "eip7702" : never) | (request["type"] extends string | undefined ? Extract<request["type"], string> : never)>) ? T_12 extends "eip7702" ? import("viem").TransactionRequestEIP7702 : never : never : never)>> & {
|
|
13251
13251
|
chainId?: number | undefined;
|
|
13252
|
-
}, (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "nonce" | "chainId" | "type" | "gas" | "blobVersionedHashes" | "fees") extends infer T_13 ? T_13 extends (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "nonce" | "chainId" | "type" | "gas" | "blobVersionedHashes" | "fees") ? T_13 extends "fees" ? "
|
|
13252
|
+
}, (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "nonce" | "chainId" | "type" | "gas" | "blobVersionedHashes" | "fees") extends infer T_13 ? T_13 extends (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "nonce" | "chainId" | "type" | "gas" | "blobVersionedHashes" | "fees") ? T_13 extends "fees" ? "gasPrice" | "maxPriorityFeePerGas" | "maxFeePerGas" : T_13 : never : never> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K]; } : never>;
|
|
13253
13253
|
readContract: <const abi extends import("viem").Abi | readonly unknown[], functionName extends import("viem").ContractFunctionName<abi, "pure" | "view">, const args extends import("viem").ContractFunctionArgs<abi, "pure" | "view", functionName>>(args: import("viem").ReadContractParameters<abi, functionName, args>) => Promise<import("viem").ReadContractReturnType<abi, functionName, args>>;
|
|
13254
13254
|
sendRawTransaction: (args: import("viem").SendRawTransactionParameters) => Promise<import("viem").SendRawTransactionReturnType>;
|
|
13255
13255
|
simulate: <const calls extends readonly unknown[]>(args: import("viem").SimulateBlocksParameters<calls>) => Promise<import("viem").SimulateBlocksReturnType<calls>>;
|
|
@@ -14141,8 +14141,8 @@ export declare const createNexusAccount: ({ chain, transport, _signer, index, cu
|
|
|
14141
14141
|
[x: string]: any;
|
|
14142
14142
|
[x: number]: any;
|
|
14143
14143
|
[x: symbol]: any;
|
|
14144
|
-
|
|
14145
|
-
|
|
14144
|
+
blockHash: (blockTag extends "pending" ? true : false) extends infer T ? T extends (blockTag extends "pending" ? true : false) ? T extends true ? null : `0x${string}` : never : never;
|
|
14145
|
+
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_1 ? T_1 extends (blockTag extends "pending" ? true : false) ? T_1 extends true ? null : bigint : never : never;
|
|
14146
14146
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_2 ? T_2 extends (blockTag extends "pending" ? true : false) ? T_2 extends true ? null : number : never : never;
|
|
14147
14147
|
}[] : `0x${string}`[];
|
|
14148
14148
|
}>;
|
|
@@ -14173,8 +14173,8 @@ export declare const createNexusAccount: ({ chain, transport, _signer, index, cu
|
|
|
14173
14173
|
[x: string]: any;
|
|
14174
14174
|
[x: number]: any;
|
|
14175
14175
|
[x: symbol]: any;
|
|
14176
|
-
|
|
14177
|
-
|
|
14176
|
+
blockHash: (blockTag extends "pending" ? true : false) extends infer T ? T extends (blockTag extends "pending" ? true : false) ? T extends true ? null : `0x${string}` : never : never;
|
|
14177
|
+
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_1 ? T_1 extends (blockTag extends "pending" ? true : false) ? T_1 extends true ? null : bigint : never : never;
|
|
14178
14178
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_2 ? T_2 extends (blockTag extends "pending" ? true : false) ? T_2 extends true ? null : number : never : never;
|
|
14179
14179
|
}>;
|
|
14180
14180
|
getTransactionConfirmations: (args: import("viem").GetTransactionConfirmationsParameters<any>) => Promise<import("viem").GetTransactionConfirmationsReturnType>;
|
|
@@ -17433,7 +17433,7 @@ export declare const createNexusAccount: ({ chain, transport, _signer, index, cu
|
|
|
17433
17433
|
authorizationList: import("viem").TransactionSerializableEIP7702["authorizationList"];
|
|
17434
17434
|
} ? "eip7702" : never) | (request["type"] extends string | undefined ? Extract<request["type"], string> : never)>) ? T_25 extends "eip7702" ? import("viem").TransactionRequestEIP7702 : never : never : never)>> & {
|
|
17435
17435
|
chainId?: number | undefined;
|
|
17436
|
-
}, (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "nonce" | "chainId" | "type" | "gas" | "blobVersionedHashes" | "fees") extends infer T_26 ? T_26 extends (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "nonce" | "chainId" | "type" | "gas" | "blobVersionedHashes" | "fees") ? T_26 extends "fees" ? "
|
|
17436
|
+
}, (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "nonce" | "chainId" | "type" | "gas" | "blobVersionedHashes" | "fees") extends infer T_26 ? T_26 extends (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "nonce" | "chainId" | "type" | "gas" | "blobVersionedHashes" | "fees") ? T_26 extends "fees" ? "gasPrice" | "maxPriorityFeePerGas" | "maxFeePerGas" : T_26 : never : never> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">) extends infer T ? { [K in keyof T]: (import("viem").UnionRequiredBy<Extract<import("viem").UnionOmit<import("viem").ExtractChainFormatterParameters<import("viem").DeriveChain<any, chainOverride>, "transactionRequest", import("viem").TransactionRequest>, "from"> & (import("viem").DeriveChain<any, chainOverride> extends infer T_1 ? T_1 extends import("viem").DeriveChain<any, chainOverride> ? T_1 extends import("viem").Chain ? {
|
|
17437
17437
|
chain: T_1;
|
|
17438
17438
|
} : {
|
|
17439
17439
|
chain?: undefined;
|
|
@@ -20685,7 +20685,7 @@ export declare const createNexusAccount: ({ chain, transport, _signer, index, cu
|
|
|
20685
20685
|
authorizationList: import("viem").TransactionSerializableEIP7702["authorizationList"];
|
|
20686
20686
|
} ? "eip7702" : never) | (request["type"] extends string | undefined ? Extract<request["type"], string> : never)>) ? T_12 extends "eip7702" ? import("viem").TransactionRequestEIP7702 : never : never : never)>> & {
|
|
20687
20687
|
chainId?: number | undefined;
|
|
20688
|
-
}, (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "nonce" | "chainId" | "type" | "gas" | "blobVersionedHashes" | "fees") extends infer T_13 ? T_13 extends (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "nonce" | "chainId" | "type" | "gas" | "blobVersionedHashes" | "fees") ? T_13 extends "fees" ? "
|
|
20688
|
+
}, (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "nonce" | "chainId" | "type" | "gas" | "blobVersionedHashes" | "fees") extends infer T_13 ? T_13 extends (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "nonce" | "chainId" | "type" | "gas" | "blobVersionedHashes" | "fees") ? T_13 extends "fees" ? "gasPrice" | "maxPriorityFeePerGas" | "maxFeePerGas" : T_13 : never : never> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">))[K]; } : never>;
|
|
20689
20689
|
readContract: <const abi extends import("viem").Abi | readonly unknown[], functionName extends import("viem").ContractFunctionName<abi, "pure" | "view">, const args extends import("viem").ContractFunctionArgs<abi, "pure" | "view", functionName>>(args: import("viem").ReadContractParameters<abi, functionName, args>) => Promise<import("viem").ReadContractReturnType<abi, functionName, args>>;
|
|
20690
20690
|
sendRawTransaction: (args: import("viem").SendRawTransactionParameters) => Promise<import("viem").SendRawTransactionReturnType>;
|
|
20691
20691
|
simulate: <const calls extends readonly unknown[]>(args: import("viem").SimulateBlocksParameters<calls>) => Promise<import("viem").SimulateBlocksReturnType<calls>>;
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
-
var t = {};
|
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
4
|
};
|
|
@@ -79,13 +68,30 @@ const getInitData = (params) => (0, viem_1.encodeAbiParameters)([
|
|
|
79
68
|
}),
|
|
80
69
|
]);
|
|
81
70
|
const toValidator = (parameters) => {
|
|
82
|
-
const { deInitData = "0x", type = "validator", signer, data = "0x", module
|
|
83
|
-
return
|
|
71
|
+
const { deInitData = "0x", type = "validator", signer, data = "0x", module, ...rest } = parameters;
|
|
72
|
+
return {
|
|
73
|
+
deInitData,
|
|
84
74
|
data,
|
|
85
|
-
module,
|
|
86
|
-
|
|
75
|
+
module,
|
|
76
|
+
address: module,
|
|
77
|
+
signer,
|
|
78
|
+
type,
|
|
79
|
+
getStubSignature: async () => DUMMY_SIGNATURE,
|
|
80
|
+
signUserOpHash: async (userOpHash) => await signer.signMessage({ message: { raw: userOpHash } }),
|
|
81
|
+
signMessage: async (message) => await signer.signMessage({ message }),
|
|
82
|
+
...rest,
|
|
83
|
+
};
|
|
87
84
|
};
|
|
88
|
-
const toDefaultModule = (parameters) => toValidator(
|
|
85
|
+
const toDefaultModule = (parameters) => toValidator({
|
|
86
|
+
initData: parameters.signer.address,
|
|
87
|
+
data: parameters.signer.address,
|
|
88
|
+
deInitData: "0x",
|
|
89
|
+
...parameters,
|
|
90
|
+
address: viem_1.zeroAddress,
|
|
91
|
+
module: viem_1.zeroAddress,
|
|
92
|
+
type: "validator",
|
|
93
|
+
getStubSignature: async () => DUMMY_SIGNATURE,
|
|
94
|
+
});
|
|
89
95
|
const toEmptyHook = () => ({
|
|
90
96
|
module: viem_1.zeroAddress,
|
|
91
97
|
data: viem_1.zeroHash,
|
|
@@ -118,7 +124,7 @@ const computeNexusAccount = async (chain, transport, signer) => {
|
|
|
118
124
|
functionName: "computeAccountAddress",
|
|
119
125
|
args: [initData, salt],
|
|
120
126
|
});
|
|
121
|
-
if (
|
|
127
|
+
if (nexusAccount?.toLowerCase() !== viem_1.zeroAddress?.toLowerCase()) {
|
|
122
128
|
return nexusAccount;
|
|
123
129
|
}
|
|
124
130
|
return;
|
|
@@ -169,7 +175,6 @@ class NonceManager {
|
|
|
169
175
|
return key;
|
|
170
176
|
}
|
|
171
177
|
async getNonceWithKey(client, accountAddress, parameters) {
|
|
172
|
-
var _a;
|
|
173
178
|
const TIMESTAMP_ADJUSTMENT = BigInt(16777215);
|
|
174
179
|
const { key: key_, validationMode, moduleAddress } = parameters;
|
|
175
180
|
try {
|
|
@@ -191,7 +196,7 @@ class NonceManager {
|
|
|
191
196
|
return { nonceKey: BigInt(key), nonce };
|
|
192
197
|
}
|
|
193
198
|
catch (error) {
|
|
194
|
-
const errorMessage =
|
|
199
|
+
const errorMessage = error.message ?? "RPC issue";
|
|
195
200
|
throw new Error(`Failed to fetch nonce due to the error: ${sanitizeUrl(errorMessage)}`);
|
|
196
201
|
}
|
|
197
202
|
}
|
|
@@ -230,10 +235,9 @@ const buildNexusRuntime = ({ chain, transport, signer, index, factoryAddress = N
|
|
|
230
235
|
const getModule = () => module;
|
|
231
236
|
// Nonce with key
|
|
232
237
|
const getNonceWithKey = async (accountAddress, params) => {
|
|
233
|
-
|
|
234
|
-
const
|
|
235
|
-
const
|
|
236
|
-
const validationMode = (_c = params === null || params === void 0 ? void 0 : params.validationMode) !== null && _c !== void 0 ? _c : "0x00";
|
|
238
|
+
const key = params?.key ?? (await getDefaultNonceKey(accountAddress, chain.id));
|
|
239
|
+
const moduleAddress = params?.moduleAddress ?? module.module;
|
|
240
|
+
const validationMode = params?.validationMode ?? "0x00";
|
|
237
241
|
return getNonceWithKeyUtil(publicClient, accountAddress, {
|
|
238
242
|
key,
|
|
239
243
|
validationMode,
|
|
@@ -270,7 +274,9 @@ const buildNexusRuntime = ({ chain, transport, signer, index, factoryAddress = N
|
|
|
270
274
|
const isDelegated = async () => {
|
|
271
275
|
const code = await publicClient.getCode({ address: signer.address });
|
|
272
276
|
return (!!code &&
|
|
273
|
-
|
|
277
|
+
code
|
|
278
|
+
?.toLowerCase()
|
|
279
|
+
.includes(meeConfig.implementationAddress.substring(2).toLowerCase()));
|
|
274
280
|
};
|
|
275
281
|
const unDelegate = async (params) => {
|
|
276
282
|
const { authorization } = params || {};
|
|
@@ -310,14 +316,11 @@ const encodeExecuteBatch = async (calls, mode = exports.EXECUTE_BATCH) => {
|
|
|
310
316
|
{ name: "callData", type: "bytes" },
|
|
311
317
|
],
|
|
312
318
|
};
|
|
313
|
-
const executions = calls.map((tx) => {
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
value: BigInt((_b = tx.value) !== null && _b !== void 0 ? _b : BigInt(0)),
|
|
319
|
-
});
|
|
320
|
-
});
|
|
319
|
+
const executions = calls.map((tx) => ({
|
|
320
|
+
target: tx.to,
|
|
321
|
+
callData: tx.data ?? "0x",
|
|
322
|
+
value: BigInt(tx.value ?? BigInt(0)),
|
|
323
|
+
}));
|
|
321
324
|
const executionCalldataPrep = (0, viem_1.encodeAbiParameters)([executionAbiParams], [executions]);
|
|
322
325
|
return (0, viem_1.encodeFunctionData)({
|
|
323
326
|
abi: (0, viem_1.parseAbi)([
|
|
@@ -328,11 +331,10 @@ const encodeExecuteBatch = async (calls, mode = exports.EXECUTE_BATCH) => {
|
|
|
328
331
|
});
|
|
329
332
|
};
|
|
330
333
|
const encodeExecute = async (call, mode = EXECUTE_SINGLE) => {
|
|
331
|
-
var _a, _b;
|
|
332
334
|
const executionCalldata = (0, viem_1.encodePacked)(["address", "uint256", "bytes"], [
|
|
333
335
|
call.to,
|
|
334
|
-
BigInt(
|
|
335
|
-
(
|
|
336
|
+
BigInt(call.value ?? BigInt(0)),
|
|
337
|
+
(call.data ?? "0x"),
|
|
336
338
|
]);
|
|
337
339
|
return (0, viem_1.encodeFunctionData)({
|
|
338
340
|
abi: (0, viem_1.parseAbi)([
|
|
@@ -344,10 +346,9 @@ const encodeExecute = async (call, mode = EXECUTE_SINGLE) => {
|
|
|
344
346
|
};
|
|
345
347
|
const encodeExecuteComposable = async (calls) => {
|
|
346
348
|
const composableCalls = calls.map((call) => {
|
|
347
|
-
var _a;
|
|
348
349
|
return {
|
|
349
350
|
to: call.to,
|
|
350
|
-
value:
|
|
351
|
+
value: call.value ?? BigInt(0),
|
|
351
352
|
functionSig: call.functionSig,
|
|
352
353
|
inputParams: call.inputParams,
|
|
353
354
|
outputParams: call.outputParams,
|
|
@@ -367,7 +368,6 @@ const signUserOperation = async (userOpHash, module) => {
|
|
|
367
368
|
return module.signUserOpHash(userOpHash);
|
|
368
369
|
};
|
|
369
370
|
const toSigner = async ({ signer, address, }) => {
|
|
370
|
-
var _a, _b, _c;
|
|
371
371
|
if (!signer) {
|
|
372
372
|
throw new Error("Signer is required");
|
|
373
373
|
}
|
|
@@ -380,7 +380,7 @@ const toSigner = async ({ signer, address, }) => {
|
|
|
380
380
|
if (typeof message === "string") {
|
|
381
381
|
return await wallet.signMessage(message);
|
|
382
382
|
}
|
|
383
|
-
if (typeof
|
|
383
|
+
if (typeof message?.raw === "string") {
|
|
384
384
|
return await wallet.signMessage((0, viem_1.hexToBytes)(message.raw));
|
|
385
385
|
}
|
|
386
386
|
return await wallet.signMessage(message.raw);
|
|
@@ -404,7 +404,7 @@ const toSigner = async ({ signer, address, }) => {
|
|
|
404
404
|
method: "eth_requestAccounts",
|
|
405
405
|
});
|
|
406
406
|
}
|
|
407
|
-
catch
|
|
407
|
+
catch {
|
|
408
408
|
[address] = await signer.request({
|
|
409
409
|
method: "eth_accounts",
|
|
410
410
|
});
|
|
@@ -422,7 +422,7 @@ const toSigner = async ({ signer, address, }) => {
|
|
|
422
422
|
if (!walletClient) {
|
|
423
423
|
walletClient = signer;
|
|
424
424
|
}
|
|
425
|
-
const addressFromWalletClient =
|
|
425
|
+
const addressFromWalletClient = walletClient?.account?.address ?? (await walletClient?.getAddresses())?.[0];
|
|
426
426
|
if (!addressFromWalletClient) {
|
|
427
427
|
throw new Error("address not found in wallet client");
|
|
428
428
|
}
|
|
@@ -440,14 +440,13 @@ const toSigner = async ({ signer, address, }) => {
|
|
|
440
440
|
});
|
|
441
441
|
};
|
|
442
442
|
const toWalletClient = ({ unresolvedSigner, resolvedSigner, chain, transport, }) => {
|
|
443
|
-
|
|
444
|
-
const browserSigner = ((_a = unresolvedSigner === null || unresolvedSigner === void 0 ? void 0 : unresolvedSigner.transport) === null || _a === void 0 ? void 0 : _a.key) === "custom";
|
|
443
|
+
const browserSigner = unresolvedSigner?.transport?.key === "custom";
|
|
445
444
|
return (0, viem_1.createWalletClient)(browserSigner
|
|
446
445
|
? {
|
|
447
446
|
account: resolvedSigner.address,
|
|
448
447
|
chain,
|
|
449
448
|
// @ts-ignore
|
|
450
|
-
transport: (0, viem_1.custom)(window
|
|
449
|
+
transport: (0, viem_1.custom)(window?.ethereum),
|
|
451
450
|
}
|
|
452
451
|
: {
|
|
453
452
|
account: resolvedSigner,
|
|
@@ -476,7 +475,7 @@ const getInitDataNoRegistry = (params) => {
|
|
|
476
475
|
], [
|
|
477
476
|
params.bootStrapAddress,
|
|
478
477
|
(0, viem_1.encodeFunctionData)({
|
|
479
|
-
abi: boostrap_json_1.default
|
|
478
|
+
abi: boostrap_json_1.default?.abi,
|
|
480
479
|
functionName: "initNexusWithDefaultValidatorAndOtherModulesNoRegistry",
|
|
481
480
|
args: [
|
|
482
481
|
params.defaultValidator.data,
|
|
@@ -559,7 +558,6 @@ const typeToString = (typeDef) => {
|
|
|
559
558
|
});
|
|
560
559
|
};
|
|
561
560
|
const createNexusAccount = async ({ chain, transport, _signer, index = BigInt(0), customValidators, customExecutors, customHook, customFallbacks, customPrevalidationHooks, customInitData, meeConfig, }) => {
|
|
562
|
-
var _a;
|
|
563
561
|
const publicClient = (0, viem_1.createPublicClient)({ chain, transport });
|
|
564
562
|
const addressesToDeploymentSet = new Set([
|
|
565
563
|
meeConfig.bootStrapAddress,
|
|
@@ -619,7 +617,7 @@ const createNexusAccount = async ({ chain, transport, _signer, index = BigInt(0)
|
|
|
619
617
|
customInitData,
|
|
620
618
|
});
|
|
621
619
|
let accountId;
|
|
622
|
-
if (meeConfig
|
|
620
|
+
if (meeConfig?.implementationAddress) {
|
|
623
621
|
accountId = (await publicClient.readContract({
|
|
624
622
|
address: meeConfig.implementationAddress,
|
|
625
623
|
abi: (0, viem_1.parseAbi)(["function accountId() public view returns (string)"]),
|
|
@@ -650,7 +648,10 @@ const createNexusAccount = async ({ chain, transport, _signer, index = BigInt(0)
|
|
|
650
648
|
throw new Error("Missing domain");
|
|
651
649
|
if (!message)
|
|
652
650
|
throw new Error("Missing message");
|
|
653
|
-
const types =
|
|
651
|
+
const types = {
|
|
652
|
+
EIP712Domain: (0, viem_1.getTypesForEIP712Domain)({ domain }),
|
|
653
|
+
..._types,
|
|
654
|
+
};
|
|
654
655
|
// @ts-ignore: Comes from nexus parent typehash
|
|
655
656
|
const messageStuff = message.stuff;
|
|
656
657
|
// @ts-ignore
|
|
@@ -714,9 +715,12 @@ const createNexusAccount = async ({ chain, transport, _signer, index = BigInt(0)
|
|
|
714
715
|
},
|
|
715
716
|
signTypedData,
|
|
716
717
|
signUserOperation: async (parameters) => {
|
|
717
|
-
const { chainId = publicClient.chain.id
|
|
718
|
+
const { chainId = publicClient.chain.id, ...userOpWithoutSender } = parameters;
|
|
718
719
|
const address = await runtime.getAddress();
|
|
719
|
-
const userOperation =
|
|
720
|
+
const userOperation = {
|
|
721
|
+
...userOpWithoutSender,
|
|
722
|
+
sender: address,
|
|
723
|
+
};
|
|
720
724
|
const hash = (0, account_abstraction_1.getUserOperationHash)({
|
|
721
725
|
chainId,
|
|
722
726
|
entryPointAddress: account_abstraction_1.entryPoint07Address,
|
|
@@ -733,7 +737,7 @@ const createNexusAccount = async ({ chain, transport, _signer, index = BigInt(0)
|
|
|
733
737
|
encodeExecuteBatch,
|
|
734
738
|
encodeExecuteComposable,
|
|
735
739
|
factoryData,
|
|
736
|
-
registryAddress:
|
|
740
|
+
registryAddress: meeConfig.moduleRegistry?.registryAddress || viem_1.zeroAddress,
|
|
737
741
|
walletClient,
|
|
738
742
|
version: meeConfig,
|
|
739
743
|
isDelegated: runtime.isDelegated,
|
|
@@ -805,7 +809,7 @@ const buildDecorator = async (baseParams, parameters) => {
|
|
|
805
809
|
};
|
|
806
810
|
const getUnifiedERC20BalanceDecorator = async (parameters) => {
|
|
807
811
|
const { mcToken, account: account_ } = parameters;
|
|
808
|
-
const relevantTokensByChain = Array.from(mcToken.deployments).filter(([chainId]) => account_.deployments.some((account) =>
|
|
812
|
+
const relevantTokensByChain = Array.from(mcToken.deployments).filter(([chainId]) => account_.deployments.some((account) => account.client.chain?.id === chainId));
|
|
809
813
|
const balances = await Promise.all(relevantTokensByChain.map(async ([chainId, address]) => {
|
|
810
814
|
const { publicClient, address: accountAddress } = account_.deploymentOn(chainId, true);
|
|
811
815
|
const tokenContract = (0, viem_1.getContract)({
|
|
@@ -823,27 +827,31 @@ const getUnifiedERC20BalanceDecorator = async (parameters) => {
|
|
|
823
827
|
chainId,
|
|
824
828
|
};
|
|
825
829
|
}));
|
|
826
|
-
return
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
830
|
+
return {
|
|
831
|
+
...balances
|
|
832
|
+
.map((balance) => {
|
|
833
|
+
return {
|
|
834
|
+
balance: balance.balance,
|
|
835
|
+
decimals: balance.decimals,
|
|
836
|
+
};
|
|
837
|
+
})
|
|
838
|
+
.reduce((curr, acc) => {
|
|
839
|
+
if (curr.decimals !== acc.decimals) {
|
|
840
|
+
throw Error(`
|
|
836
841
|
Error while trying to fetch a unified ERC20 balance. The addresses provided
|
|
837
842
|
in the mapping don't have the same number of decimals across all chains.
|
|
838
843
|
The function can't fetch a unified balance for token mappings with differing
|
|
839
844
|
decimals.
|
|
840
845
|
`);
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
846
|
+
}
|
|
847
|
+
return {
|
|
848
|
+
balance: curr.balance + acc.balance,
|
|
849
|
+
decimals: curr.decimals,
|
|
850
|
+
};
|
|
851
|
+
}),
|
|
852
|
+
breakdown: balances,
|
|
853
|
+
mcToken,
|
|
854
|
+
};
|
|
847
855
|
};
|
|
848
856
|
const waitForTransactionReceipts = async (parameters) => {
|
|
849
857
|
const receipts = await Promise.all(parameters.account.deployments.map(({ publicClient }, i) => publicClient.waitForTransactionReceipt({
|
|
@@ -872,8 +880,8 @@ const waitForTransactionReceiptsDecorator = async (parameters) => {
|
|
|
872
880
|
};
|
|
873
881
|
exports.waitForTransactionReceiptsDecorator = waitForTransactionReceiptsDecorator;
|
|
874
882
|
const createMultiChainNexusAccount = async (params) => {
|
|
875
|
-
const { signer: unresolvedSigner, chains, transports
|
|
876
|
-
if (!
|
|
883
|
+
const { signer: unresolvedSigner, chains, transports, ...accountParameters } = params;
|
|
884
|
+
if (!chains?.length) {
|
|
877
885
|
throw new Error("No chains provided");
|
|
878
886
|
}
|
|
879
887
|
const chainConfigurations = buildChainConfigurations(chains, transports);
|
|
@@ -891,21 +899,25 @@ const createMultiChainNexusAccount = async (params) => {
|
|
|
891
899
|
ethForwarderAddress: "0x000000Afe527A978Ecb761008Af475cfF04132a1",
|
|
892
900
|
};
|
|
893
901
|
// 🔁 Create one Nexus account per chain
|
|
894
|
-
const deployments = await Promise.all(chainConfigurations.map(async ({ chain, transport }) => (0, exports.createNexusAccount)(
|
|
895
|
-
|
|
902
|
+
const deployments = await Promise.all(chainConfigurations.map(async ({ chain, transport }) => (0, exports.createNexusAccount)({
|
|
903
|
+
chain,
|
|
904
|
+
transport,
|
|
905
|
+
_signer: unresolvedSigner,
|
|
906
|
+
meeConfig,
|
|
907
|
+
...accountParameters,
|
|
908
|
+
})));
|
|
896
909
|
/* -------------------------------------------------- */
|
|
897
910
|
/* Deployment helpers */
|
|
898
911
|
/* -------------------------------------------------- */
|
|
899
912
|
function deploymentOn(chainId, strictMode) {
|
|
900
|
-
const deployment = deployments.find((dep) =>
|
|
913
|
+
const deployment = deployments.find((dep) => dep.publicClient.chain?.id === chainId);
|
|
901
914
|
if (!deployment && strictMode) {
|
|
902
915
|
throw new Error(`Deployment not found for chainId: ${chainId}`);
|
|
903
916
|
}
|
|
904
917
|
return deployment;
|
|
905
918
|
}
|
|
906
919
|
function addressOn(chainId, strictMode) {
|
|
907
|
-
|
|
908
|
-
return (_a = deploymentOn(chainId, strictMode)) === null || _a === void 0 ? void 0 : _a.address;
|
|
920
|
+
return deploymentOn(chainId, strictMode)?.address;
|
|
909
921
|
}
|
|
910
922
|
/* -------------------------------------------------- */
|
|
911
923
|
/* Base multichain account */
|
|
@@ -946,9 +958,18 @@ const createMultiChainNexusAccount = async (params) => {
|
|
|
946
958
|
// })
|
|
947
959
|
// const queryBridge = (params: any) =>
|
|
948
960
|
// queryBridgeDecorator({ ...params })
|
|
949
|
-
const isDelegated = (parameters) => isDelegatedDecorator(
|
|
950
|
-
|
|
951
|
-
|
|
961
|
+
const isDelegated = (parameters) => isDelegatedDecorator({
|
|
962
|
+
...parameters,
|
|
963
|
+
account: baseAccount,
|
|
964
|
+
});
|
|
965
|
+
const unDelegate = (parameters) => (0, exports.unDelegateDecorator)({
|
|
966
|
+
...parameters,
|
|
967
|
+
account: baseAccount,
|
|
968
|
+
});
|
|
969
|
+
const waitForTransactionReceipts = (parameters) => (0, exports.waitForTransactionReceiptsDecorator)({
|
|
970
|
+
...parameters,
|
|
971
|
+
account: baseAccount,
|
|
972
|
+
});
|
|
952
973
|
// const read = <T>(params: any) =>
|
|
953
974
|
// multichainRead(baseAccount, params) as Promise<
|
|
954
975
|
// any
|
|
@@ -960,7 +981,9 @@ const createMultiChainNexusAccount = async (params) => {
|
|
|
960
981
|
/* -------------------------------------------------- */
|
|
961
982
|
/* Final multichain account */
|
|
962
983
|
/* -------------------------------------------------- */
|
|
963
|
-
return
|
|
984
|
+
return {
|
|
985
|
+
...baseAccount,
|
|
986
|
+
getUnifiedERC20Balance,
|
|
964
987
|
build,
|
|
965
988
|
// buildComposable,
|
|
966
989
|
// buildBridgeInstructions,
|
|
@@ -969,6 +992,7 @@ const createMultiChainNexusAccount = async (params) => {
|
|
|
969
992
|
unDelegate,
|
|
970
993
|
waitForTransactionReceipts,
|
|
971
994
|
// read,
|
|
972
|
-
toDelegation
|
|
995
|
+
toDelegation,
|
|
996
|
+
};
|
|
973
997
|
};
|
|
974
998
|
exports.createMultiChainNexusAccount = createMultiChainNexusAccount;
|
package/dist/utils/constants.js
CHANGED
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PaymasterConstants = void 0;
|
|
4
|
-
//Todo: add more network
|
|
4
|
+
//Todo: add more network
|
|
5
5
|
exports.PaymasterConstants = {
|
|
6
|
-
MEE_API_KEY: "mee_G5SSkmZYg9kiGksxJwFT9x", //Non sponsored key from dashboard
|
|
7
|
-
MEE_API_KEY_STAGING: "mee_3Zmc7H6Pbd5wUfUGu27aGzdf", //Biconomy sponsorship enabled staging api key???
|
|
8
|
-
MEE_URL_STAGING: "https://staging-network.biconomy.io/v1",
|
|
9
6
|
TEST_CHAINS: [11155111, 84532, 421614],
|
|
10
7
|
HOSTED_SPONSOR_URL: "https://gateway.verified.network/api/sponsor",
|
|
11
|
-
ADMIN_WALLET_ADDRESS: "0x5DBDA7BE05F68131e260f5A2bC573b24692a5B34", //current admin???
|
|
12
|
-
COMPENSATION_AMOUNT: "0.02", //2 Cents
|
|
13
8
|
//ethereum sepolia
|
|
14
9
|
11155111: {
|
|
15
10
|
RPC_URL: "https://eth-sepolia.public.blastapi.io",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verified-network/verified-sdk",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.9",
|
|
4
4
|
"description": "An SDK to develop applications on the Verified Network",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -31,12 +31,9 @@
|
|
|
31
31
|
"greet": "./bin/index.bin.js"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@biconomy/abstractjs": "^1.1.21",
|
|
35
|
-
"@biconomy/account": "^4.1.1",
|
|
36
|
-
"@rhinestone/module-sdk": "^0.2.8",
|
|
37
34
|
"ethers": "^5.7.2",
|
|
38
35
|
"tslib": "^2.6.2",
|
|
39
|
-
"viem": "
|
|
36
|
+
"viem": "2.26.2"
|
|
40
37
|
},
|
|
41
38
|
"devDependencies": {
|
|
42
39
|
"@types/mocha": "^10.0.10",
|
package/tsconfig.json
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
/* Basic Options */
|
|
6
6
|
// "incremental": true, /* Enable incremental compilation */
|
|
7
|
-
"target": "
|
|
7
|
+
"target": "ES2021", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
|
|
8
8
|
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
|
|
9
|
-
"lib": ["
|
|
9
|
+
"lib": ["es2021","DOM"], /* Specify library files to be included in the compilation. */
|
|
10
10
|
//"allowJs": true, /* Allow javascript files to be compiled. */
|
|
11
11
|
// "checkJs": true, /* Report errors in .js files. */
|
|
12
12
|
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'. */
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"./node_modules/@types",
|
|
52
52
|
"./node_modules/@0x/typescript-typings/types"
|
|
53
53
|
], /* List of folders to include type definitions from. */
|
|
54
|
-
|
|
54
|
+
"types": ["mocha"], /* Type declaration files to be included in compilation. */
|
|
55
55
|
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
|
|
56
56
|
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
|
|
57
57
|
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
|