@lidofinance/lido-csm-sdk 2.0.0-alpha.65 → 2.0.0-alpha.67
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/common/utils/decode-revert-data.cjs +3 -2
- package/dist/common/utils/decode-revert-data.cjs.map +1 -1
- package/dist/common/utils/decode-revert-data.d.cts.map +1 -1
- package/dist/common/utils/decode-revert-data.d.mts.map +1 -1
- package/dist/common/utils/decode-revert-data.mjs +3 -2
- package/dist/common/utils/decode-revert-data.mjs.map +1 -1
- package/dist/core-sdk/core-sdk.d.cts +120 -120
- package/dist/core-sdk/core-sdk.d.mts +120 -120
- package/dist/deposit-data-sdk/deposit-data-sdk.cjs +1 -1
- package/dist/deposit-data-sdk/deposit-data-sdk.cjs.map +1 -1
- package/dist/deposit-data-sdk/deposit-data-sdk.mjs +1 -1
- package/dist/deposit-data-sdk/deposit-data-sdk.mjs.map +1 -1
- package/dist/deposit-data-sdk/parser.cjs +30 -27
- package/dist/deposit-data-sdk/parser.cjs.map +1 -1
- package/dist/deposit-data-sdk/parser.mjs +30 -27
- package/dist/deposit-data-sdk/parser.mjs.map +1 -1
- package/dist/deposit-data-sdk/types.cjs.map +1 -1
- package/dist/deposit-data-sdk/types.d.cts +3 -9
- package/dist/deposit-data-sdk/types.d.cts.map +1 -1
- package/dist/deposit-data-sdk/types.d.mts +3 -9
- package/dist/deposit-data-sdk/types.d.mts.map +1 -1
- package/dist/deposit-data-sdk/types.mjs.map +1 -1
- package/dist/deposit-data-sdk/validator.cjs +9 -9
- package/dist/deposit-data-sdk/validator.cjs.map +1 -1
- package/dist/deposit-data-sdk/validator.mjs +9 -9
- package/dist/deposit-data-sdk/validator.mjs.map +1 -1
- package/dist/deposit-data-sdk.d.cts +2 -2
- package/dist/deposit-data-sdk.d.mts +2 -2
- package/dist/frame-sdk/frame-sdk.d.cts +1 -1
- package/dist/frame-sdk/frame-sdk.d.mts +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/package.json +7 -2
|
@@ -3,7 +3,7 @@ const require_contract_abi = require("../constants/contract-abi.cjs");
|
|
|
3
3
|
let viem = require("viem");
|
|
4
4
|
let viem_utils = require("viem/utils");
|
|
5
5
|
//#region src/common/utils/decode-revert-data.ts
|
|
6
|
-
const HEX_DATA_RE = /(?:custom error |reason: )(0x[0-9a-fA-F]
|
|
6
|
+
const HEX_DATA_RE = /(?:custom error |reason: )(0x[0-9a-fA-F]+)(?::\s*([0-9a-fA-F]+))?/;
|
|
7
7
|
const buildCombinedErrorAbi = (abis) => {
|
|
8
8
|
const bySelector = /* @__PURE__ */ new Map();
|
|
9
9
|
const byName = /* @__PURE__ */ new Map();
|
|
@@ -27,7 +27,8 @@ const tryHex = (value) => typeof value === "string" && value.startsWith("0x") ?
|
|
|
27
27
|
const tryHexFromString = (value) => {
|
|
28
28
|
if (typeof value !== "string") return void 0;
|
|
29
29
|
const match = HEX_DATA_RE.exec(value);
|
|
30
|
-
|
|
30
|
+
if (!match) return void 0;
|
|
31
|
+
return `${match[1]}${match[2] ?? ""}`;
|
|
31
32
|
};
|
|
32
33
|
const extractFromNode = (node) => {
|
|
33
34
|
const fromRaw = tryHex(node.raw);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decode-revert-data.cjs","names":[],"sources":["../../../src/common/utils/decode-revert-data.ts"],"sourcesContent":["import type {\n AbiParametersToPrimitiveTypes,\n ExtractAbiError,\n ExtractAbiErrorNames,\n} from 'abitype';\nimport { type Abi, type Hex, decodeErrorResult } from 'viem';\nimport { formatAbiItem, toFunctionSelector } from 'viem/utils';\nimport { CONTRACT_BASE_ABI } from '../constants/contract-abi';\n\ntype ContractAbis = (typeof CONTRACT_BASE_ABI)[keyof typeof CONTRACT_BASE_ABI];\n\nexport type ContractErrorName = ExtractAbiErrorNames<ContractAbis>;\n\ntype ArgsOf<Name extends ContractErrorName> = AbiParametersToPrimitiveTypes<\n ExtractAbiError<ContractAbis, Name>['inputs']\n>;\n\n// Discriminated union: narrowing on `name` types the `args` tuple too.\n// `if (e.decodedRevert?.name === 'AccessControlUnauthorizedAccount') {\n// const [account, role] = e.decodedRevert.args; // typed }`\nexport type DecodedRevert = {\n [K in ContractErrorName]: { name: K; args: ArgsOf<K> };\n}[ContractErrorName];\n\nconst HEX_DATA_RE
|
|
1
|
+
{"version":3,"file":"decode-revert-data.cjs","names":[],"sources":["../../../src/common/utils/decode-revert-data.ts"],"sourcesContent":["import type {\n AbiParametersToPrimitiveTypes,\n ExtractAbiError,\n ExtractAbiErrorNames,\n} from 'abitype';\nimport { type Abi, type Hex, decodeErrorResult } from 'viem';\nimport { formatAbiItem, toFunctionSelector } from 'viem/utils';\nimport { CONTRACT_BASE_ABI } from '../constants/contract-abi';\n\ntype ContractAbis = (typeof CONTRACT_BASE_ABI)[keyof typeof CONTRACT_BASE_ABI];\n\nexport type ContractErrorName = ExtractAbiErrorNames<ContractAbis>;\n\ntype ArgsOf<Name extends ContractErrorName> = AbiParametersToPrimitiveTypes<\n ExtractAbiError<ContractAbis, Name>['inputs']\n>;\n\n// Discriminated union: narrowing on `name` types the `args` tuple too.\n// `if (e.decodedRevert?.name === 'AccessControlUnauthorizedAccount') {\n// const [account, role] = e.decodedRevert.args; // typed }`\nexport type DecodedRevert = {\n [K in ContractErrorName]: { name: K; args: ArgsOf<K> };\n}[ContractErrorName];\n\n// viem surfaces estimateGas custom-error reverts as a formatted message:\n// \"custom error 0x<selector>: <abi-encoded-args-hex>\"\n// The args trail the selector after \": \" WITHOUT a 0x prefix. Capture both and\n// rejoin so errors WITH args decode — a selector alone fails decodeErrorResult\n// for any error that has inputs (e.g. AccessControlUnauthorizedAccount(address,bytes32)).\n// Arg-less errors and full-data \"reason: 0x...\" strings keep their old value\n// (group 2 simply doesn't match).\nconst HEX_DATA_RE =\n /(?:custom error |reason: )(0x[0-9a-fA-F]+)(?::\\s*([0-9a-fA-F]+))?/;\n\n// Dedup by 4-byte selector, not by name: two ABIs may declare distinct errors\n// that happen to share a name but encode different argument tuples. Dropping\n// by name would silently misdecode one of them. Same-selector duplicates\n// (identical signature in multiple contracts) are still collapsed silently.\n// Name collisions across different selectors emit a single console.warn each\n// so future ABI drift surfaces without breaking decoding.\nexport const buildCombinedErrorAbi = (abis: readonly Abi[]): Abi => {\n const bySelector = new Map<Hex, Abi[number]>();\n const byName = new Map<string, string>();\n const warned = new Set<string>();\n for (const abi of abis) {\n for (const item of abi) {\n if (item.type !== 'error') continue;\n const signature = formatAbiItem(item);\n const selector = toFunctionSelector(signature);\n if (bySelector.has(selector)) continue;\n bySelector.set(selector, item);\n const prevSignature = byName.get(item.name);\n if (\n prevSignature &&\n prevSignature !== signature &&\n !warned.has(item.name)\n ) {\n warned.add(item.name);\n\n console.warn(\n `[csm-sdk] ABI error name collision for \"${item.name}\": ${prevSignature} vs ${signature}`,\n );\n } else if (!prevSignature) {\n byName.set(item.name, signature);\n }\n }\n }\n return [...bySelector.values()] as Abi;\n};\n\nconst combinedErrorAbi: Abi = buildCombinedErrorAbi(\n Object.values(CONTRACT_BASE_ABI),\n);\n\nconst tryHex = (value: unknown): Hex | undefined =>\n typeof value === 'string' && value.startsWith('0x')\n ? (value as Hex)\n : undefined;\n\nconst tryHexFromString = (value: unknown): Hex | undefined => {\n if (typeof value !== 'string') return undefined;\n const match = HEX_DATA_RE.exec(value);\n if (!match) return undefined;\n return `${match[1]}${match[2] ?? ''}` as Hex;\n};\n\nconst extractFromNode = (node: Record<string, unknown>): Hex | undefined => {\n const fromRaw = tryHex(node.raw);\n if (fromRaw) return fromRaw;\n\n const direct = tryHex(node.data);\n if (direct) return direct;\n\n if (typeof node.data === 'object' && node.data !== null) {\n const nested = tryHex((node.data as { data?: unknown }).data);\n if (nested) return nested;\n }\n\n return tryHexFromString(node.details) ?? tryHexFromString(node.shortMessage);\n};\n\nconst extractErrorData = (error: unknown): Hex | undefined => {\n let current: unknown = error;\n while (typeof current === 'object' && current !== null) {\n const hex = extractFromNode(current as Record<string, unknown>);\n if (hex) return hex;\n current = (current as Record<string, unknown>).cause;\n }\n return undefined;\n};\n\nexport const decodeRevertData = (error: unknown): DecodedRevert | undefined => {\n const data = extractErrorData(error);\n if (!data || data === '0x') return undefined;\n\n try {\n const decoded = decodeErrorResult({ abi: combinedErrorAbi, data });\n return {\n name: decoded.errorName,\n args: decoded.args ?? [],\n } as DecodedRevert;\n } catch {\n return undefined;\n }\n};\n"],"mappings":";;;;;AA+BA,MAAM,cACJ;AAQK,MAAM,yBAAyB,SAA8B;CAClE,MAAM,6BAAa,IAAI,KAAsB;CAC7C,MAAM,yBAAS,IAAI,KAAoB;CACvC,MAAM,yBAAS,IAAI,KAAY;AAC/B,MAAA,MAAW,OAAO,KAChB,MAAA,MAAW,QAAQ,KAAK;AACtB,MAAI,KAAK,SAAS,QAAS;EAC3B,MAAM,aAAA,GAAA,WAAA,eAA0B,KAAI;EACpC,MAAM,YAAA,GAAA,WAAA,oBAA8B,UAAS;AAC7C,MAAI,WAAW,IAAI,SAAQ,CAAG;AAC9B,aAAW,IAAI,UAAU,KAAI;EAC7B,MAAM,gBAAgB,OAAO,IAAI,KAAK,KAAI;AAC1C,MACE,iBACA,kBAAkB,aAClB,CAAC,OAAO,IAAI,KAAK,KAAI,EACrB;AACA,UAAO,IAAI,KAAK,KAAI;AAEpB,WAAQ,KACN,2CAA2C,KAAK,KAAI,KAAM,cAAa,MAAO,YAChF;aACS,CAAC,cACV,QAAO,IAAI,KAAK,MAAM,UAAS;;AAIrC,QAAO,CAAC,GAAG,WAAW,QAAQ,CAAA;;AAGhC,MAAM,mBAAwB,sBAC5B,OAAO,OAAO,qBAAA,kBAAiB,CACjC;AAEA,MAAM,UAAU,UACd,OAAO,UAAU,YAAY,MAAM,WAAW,KAAI,GAC7C,QACD,KAAA;AAEN,MAAM,oBAAoB,UAAoC;AAC5D,KAAI,OAAO,UAAU,SAAU,QAAO,KAAA;CACtC,MAAM,QAAQ,YAAY,KAAK,MAAK;AACpC,KAAI,CAAC,MAAO,QAAO,KAAA;AACnB,QAAO,GAAG,MAAM,KAAK,MAAM,MAAM;;AAGnC,MAAM,mBAAmB,SAAmD;CAC1E,MAAM,UAAU,OAAO,KAAK,IAAG;AAC/B,KAAI,QAAS,QAAO;CAEpB,MAAM,SAAS,OAAO,KAAK,KAAI;AAC/B,KAAI,OAAQ,QAAO;AAEnB,KAAI,OAAO,KAAK,SAAS,YAAY,KAAK,SAAS,MAAM;EACvD,MAAM,SAAS,OAAQ,KAAK,KAA4B,KAAI;AAC5D,MAAI,OAAQ,QAAO;;AAGrB,QAAO,iBAAiB,KAAK,QAAO,IAAK,iBAAiB,KAAK,aAAY;;AAG7E,MAAM,oBAAoB,UAAoC;CAC5D,IAAI,UAAmB;AACvB,QAAO,OAAO,YAAY,YAAY,YAAY,MAAM;EACtD,MAAM,MAAM,gBAAgB,QAAkC;AAC9D,MAAI,IAAK,QAAO;AAChB,YAAW,QAAoC;;;AAK5C,MAAM,oBAAoB,UAA8C;CAC7E,MAAM,OAAO,iBAAiB,MAAK;AACnC,KAAI,CAAC,QAAQ,SAAS,KAAM,QAAO,KAAA;AAEnC,KAAI;EACF,MAAM,WAAA,GAAA,KAAA,mBAA4B;GAAE,KAAK;GAAkB;GAAM,CAAA;AACjE,SAAO;GACL,MAAM,QAAQ;GACd,MAAM,QAAQ,QAAQ,EAAC;GACzB;SACM;AACN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decode-revert-data.d.cts","names":[],"sources":["../../../src/common/utils/decode-revert-data.ts"],"mappings":";;;;;KASK,YAAA,WAAuB,iBAAA,eAAgC,iBAAA;AAAA,KAEhD,iBAAA,GAAoB,oBAAA,CAAqB,YAAA;AAAA,KAEhD,MAAA,cAAoB,iBAAA,IAAqB,6BAAA,CAC5C,eAAA,CAAgB,YAAA,EAAc,IAAA;AAAA,KAMpB,aAAA,WACJ,iBAAA;EAAsB,IAAA,EAAM,CAAA;EAAG,IAAA,EAAM,MAAA,CAAO,CAAA;AAAA,IAClD,iBAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"decode-revert-data.d.cts","names":[],"sources":["../../../src/common/utils/decode-revert-data.ts"],"mappings":";;;;;KASK,YAAA,WAAuB,iBAAA,eAAgC,iBAAA;AAAA,KAEhD,iBAAA,GAAoB,oBAAA,CAAqB,YAAA;AAAA,KAEhD,MAAA,cAAoB,iBAAA,IAAqB,6BAAA,CAC5C,eAAA,CAAgB,YAAA,EAAc,IAAA;AAAA,KAMpB,aAAA,WACJ,iBAAA;EAAsB,IAAA,EAAM,CAAA;EAAG,IAAA,EAAM,MAAA,CAAO,CAAA;AAAA,IAClD,iBAAA;AAAA,cAkBW,qBAAA,GAAyB,IAAA,WAAe,GAAA,OAAQ,GAAA;AAAA,cAuEhD,gBAAA,GAAoB,KAAA,cAAiB,aAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decode-revert-data.d.mts","names":[],"sources":["../../../src/common/utils/decode-revert-data.ts"],"mappings":";;;;;KASK,YAAA,WAAuB,iBAAA,eAAgC,iBAAA;AAAA,KAEhD,iBAAA,GAAoB,oBAAA,CAAqB,YAAA;AAAA,KAEhD,MAAA,cAAoB,iBAAA,IAAqB,6BAAA,CAC5C,eAAA,CAAgB,YAAA,EAAc,IAAA;AAAA,KAMpB,aAAA,WACJ,iBAAA;EAAsB,IAAA,EAAM,CAAA;EAAG,IAAA,EAAM,MAAA,CAAO,CAAA;AAAA,IAClD,iBAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"decode-revert-data.d.mts","names":[],"sources":["../../../src/common/utils/decode-revert-data.ts"],"mappings":";;;;;KASK,YAAA,WAAuB,iBAAA,eAAgC,iBAAA;AAAA,KAEhD,iBAAA,GAAoB,oBAAA,CAAqB,YAAA;AAAA,KAEhD,MAAA,cAAoB,iBAAA,IAAqB,6BAAA,CAC5C,eAAA,CAAgB,YAAA,EAAc,IAAA;AAAA,KAMpB,aAAA,WACJ,iBAAA;EAAsB,IAAA,EAAM,CAAA;EAAG,IAAA,EAAM,MAAA,CAAO,CAAA;AAAA,IAClD,iBAAA;AAAA,cAkBW,qBAAA,GAAyB,IAAA,WAAe,GAAA,OAAQ,GAAA;AAAA,cAuEhD,gBAAA,GAAoB,KAAA,cAAiB,aAAA"}
|
|
@@ -2,7 +2,7 @@ import { CONTRACT_BASE_ABI } from "../constants/contract-abi.mjs";
|
|
|
2
2
|
import { decodeErrorResult } from "viem";
|
|
3
3
|
import { formatAbiItem, toFunctionSelector } from "viem/utils";
|
|
4
4
|
//#region src/common/utils/decode-revert-data.ts
|
|
5
|
-
const HEX_DATA_RE = /(?:custom error |reason: )(0x[0-9a-fA-F]
|
|
5
|
+
const HEX_DATA_RE = /(?:custom error |reason: )(0x[0-9a-fA-F]+)(?::\s*([0-9a-fA-F]+))?/;
|
|
6
6
|
const buildCombinedErrorAbi = (abis) => {
|
|
7
7
|
const bySelector = /* @__PURE__ */ new Map();
|
|
8
8
|
const byName = /* @__PURE__ */ new Map();
|
|
@@ -26,7 +26,8 @@ const tryHex = (value) => typeof value === "string" && value.startsWith("0x") ?
|
|
|
26
26
|
const tryHexFromString = (value) => {
|
|
27
27
|
if (typeof value !== "string") return void 0;
|
|
28
28
|
const match = HEX_DATA_RE.exec(value);
|
|
29
|
-
|
|
29
|
+
if (!match) return void 0;
|
|
30
|
+
return `${match[1]}${match[2] ?? ""}`;
|
|
30
31
|
};
|
|
31
32
|
const extractFromNode = (node) => {
|
|
32
33
|
const fromRaw = tryHex(node.raw);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decode-revert-data.mjs","names":[],"sources":["../../../src/common/utils/decode-revert-data.ts"],"sourcesContent":["import type {\n AbiParametersToPrimitiveTypes,\n ExtractAbiError,\n ExtractAbiErrorNames,\n} from 'abitype';\nimport { type Abi, type Hex, decodeErrorResult } from 'viem';\nimport { formatAbiItem, toFunctionSelector } from 'viem/utils';\nimport { CONTRACT_BASE_ABI } from '../constants/contract-abi';\n\ntype ContractAbis = (typeof CONTRACT_BASE_ABI)[keyof typeof CONTRACT_BASE_ABI];\n\nexport type ContractErrorName = ExtractAbiErrorNames<ContractAbis>;\n\ntype ArgsOf<Name extends ContractErrorName> = AbiParametersToPrimitiveTypes<\n ExtractAbiError<ContractAbis, Name>['inputs']\n>;\n\n// Discriminated union: narrowing on `name` types the `args` tuple too.\n// `if (e.decodedRevert?.name === 'AccessControlUnauthorizedAccount') {\n// const [account, role] = e.decodedRevert.args; // typed }`\nexport type DecodedRevert = {\n [K in ContractErrorName]: { name: K; args: ArgsOf<K> };\n}[ContractErrorName];\n\nconst HEX_DATA_RE
|
|
1
|
+
{"version":3,"file":"decode-revert-data.mjs","names":[],"sources":["../../../src/common/utils/decode-revert-data.ts"],"sourcesContent":["import type {\n AbiParametersToPrimitiveTypes,\n ExtractAbiError,\n ExtractAbiErrorNames,\n} from 'abitype';\nimport { type Abi, type Hex, decodeErrorResult } from 'viem';\nimport { formatAbiItem, toFunctionSelector } from 'viem/utils';\nimport { CONTRACT_BASE_ABI } from '../constants/contract-abi';\n\ntype ContractAbis = (typeof CONTRACT_BASE_ABI)[keyof typeof CONTRACT_BASE_ABI];\n\nexport type ContractErrorName = ExtractAbiErrorNames<ContractAbis>;\n\ntype ArgsOf<Name extends ContractErrorName> = AbiParametersToPrimitiveTypes<\n ExtractAbiError<ContractAbis, Name>['inputs']\n>;\n\n// Discriminated union: narrowing on `name` types the `args` tuple too.\n// `if (e.decodedRevert?.name === 'AccessControlUnauthorizedAccount') {\n// const [account, role] = e.decodedRevert.args; // typed }`\nexport type DecodedRevert = {\n [K in ContractErrorName]: { name: K; args: ArgsOf<K> };\n}[ContractErrorName];\n\n// viem surfaces estimateGas custom-error reverts as a formatted message:\n// \"custom error 0x<selector>: <abi-encoded-args-hex>\"\n// The args trail the selector after \": \" WITHOUT a 0x prefix. Capture both and\n// rejoin so errors WITH args decode — a selector alone fails decodeErrorResult\n// for any error that has inputs (e.g. AccessControlUnauthorizedAccount(address,bytes32)).\n// Arg-less errors and full-data \"reason: 0x...\" strings keep their old value\n// (group 2 simply doesn't match).\nconst HEX_DATA_RE =\n /(?:custom error |reason: )(0x[0-9a-fA-F]+)(?::\\s*([0-9a-fA-F]+))?/;\n\n// Dedup by 4-byte selector, not by name: two ABIs may declare distinct errors\n// that happen to share a name but encode different argument tuples. Dropping\n// by name would silently misdecode one of them. Same-selector duplicates\n// (identical signature in multiple contracts) are still collapsed silently.\n// Name collisions across different selectors emit a single console.warn each\n// so future ABI drift surfaces without breaking decoding.\nexport const buildCombinedErrorAbi = (abis: readonly Abi[]): Abi => {\n const bySelector = new Map<Hex, Abi[number]>();\n const byName = new Map<string, string>();\n const warned = new Set<string>();\n for (const abi of abis) {\n for (const item of abi) {\n if (item.type !== 'error') continue;\n const signature = formatAbiItem(item);\n const selector = toFunctionSelector(signature);\n if (bySelector.has(selector)) continue;\n bySelector.set(selector, item);\n const prevSignature = byName.get(item.name);\n if (\n prevSignature &&\n prevSignature !== signature &&\n !warned.has(item.name)\n ) {\n warned.add(item.name);\n\n console.warn(\n `[csm-sdk] ABI error name collision for \"${item.name}\": ${prevSignature} vs ${signature}`,\n );\n } else if (!prevSignature) {\n byName.set(item.name, signature);\n }\n }\n }\n return [...bySelector.values()] as Abi;\n};\n\nconst combinedErrorAbi: Abi = buildCombinedErrorAbi(\n Object.values(CONTRACT_BASE_ABI),\n);\n\nconst tryHex = (value: unknown): Hex | undefined =>\n typeof value === 'string' && value.startsWith('0x')\n ? (value as Hex)\n : undefined;\n\nconst tryHexFromString = (value: unknown): Hex | undefined => {\n if (typeof value !== 'string') return undefined;\n const match = HEX_DATA_RE.exec(value);\n if (!match) return undefined;\n return `${match[1]}${match[2] ?? ''}` as Hex;\n};\n\nconst extractFromNode = (node: Record<string, unknown>): Hex | undefined => {\n const fromRaw = tryHex(node.raw);\n if (fromRaw) return fromRaw;\n\n const direct = tryHex(node.data);\n if (direct) return direct;\n\n if (typeof node.data === 'object' && node.data !== null) {\n const nested = tryHex((node.data as { data?: unknown }).data);\n if (nested) return nested;\n }\n\n return tryHexFromString(node.details) ?? tryHexFromString(node.shortMessage);\n};\n\nconst extractErrorData = (error: unknown): Hex | undefined => {\n let current: unknown = error;\n while (typeof current === 'object' && current !== null) {\n const hex = extractFromNode(current as Record<string, unknown>);\n if (hex) return hex;\n current = (current as Record<string, unknown>).cause;\n }\n return undefined;\n};\n\nexport const decodeRevertData = (error: unknown): DecodedRevert | undefined => {\n const data = extractErrorData(error);\n if (!data || data === '0x') return undefined;\n\n try {\n const decoded = decodeErrorResult({ abi: combinedErrorAbi, data });\n return {\n name: decoded.errorName,\n args: decoded.args ?? [],\n } as DecodedRevert;\n } catch {\n return undefined;\n }\n};\n"],"mappings":";;;;AA+BA,MAAM,cACJ;AAQK,MAAM,yBAAyB,SAA8B;CAClE,MAAM,6BAAa,IAAI,KAAsB;CAC7C,MAAM,yBAAS,IAAI,KAAoB;CACvC,MAAM,yBAAS,IAAI,KAAY;AAC/B,MAAA,MAAW,OAAO,KAChB,MAAA,MAAW,QAAQ,KAAK;AACtB,MAAI,KAAK,SAAS,QAAS;EAC3B,MAAM,YAAY,cAAc,KAAI;EACpC,MAAM,WAAW,mBAAmB,UAAS;AAC7C,MAAI,WAAW,IAAI,SAAQ,CAAG;AAC9B,aAAW,IAAI,UAAU,KAAI;EAC7B,MAAM,gBAAgB,OAAO,IAAI,KAAK,KAAI;AAC1C,MACE,iBACA,kBAAkB,aAClB,CAAC,OAAO,IAAI,KAAK,KAAI,EACrB;AACA,UAAO,IAAI,KAAK,KAAI;AAEpB,WAAQ,KACN,2CAA2C,KAAK,KAAI,KAAM,cAAa,MAAO,YAChF;aACS,CAAC,cACV,QAAO,IAAI,KAAK,MAAM,UAAS;;AAIrC,QAAO,CAAC,GAAG,WAAW,QAAQ,CAAA;;AAGhC,MAAM,mBAAwB,sBAC5B,OAAO,OAAO,kBAAiB,CACjC;AAEA,MAAM,UAAU,UACd,OAAO,UAAU,YAAY,MAAM,WAAW,KAAI,GAC7C,QACD,KAAA;AAEN,MAAM,oBAAoB,UAAoC;AAC5D,KAAI,OAAO,UAAU,SAAU,QAAO,KAAA;CACtC,MAAM,QAAQ,YAAY,KAAK,MAAK;AACpC,KAAI,CAAC,MAAO,QAAO,KAAA;AACnB,QAAO,GAAG,MAAM,KAAK,MAAM,MAAM;;AAGnC,MAAM,mBAAmB,SAAmD;CAC1E,MAAM,UAAU,OAAO,KAAK,IAAG;AAC/B,KAAI,QAAS,QAAO;CAEpB,MAAM,SAAS,OAAO,KAAK,KAAI;AAC/B,KAAI,OAAQ,QAAO;AAEnB,KAAI,OAAO,KAAK,SAAS,YAAY,KAAK,SAAS,MAAM;EACvD,MAAM,SAAS,OAAQ,KAAK,KAA4B,KAAI;AAC5D,MAAI,OAAQ,QAAO;;AAGrB,QAAO,iBAAiB,KAAK,QAAO,IAAK,iBAAiB,KAAK,aAAY;;AAG7E,MAAM,oBAAoB,UAAoC;CAC5D,IAAI,UAAmB;AACvB,QAAO,OAAO,YAAY,YAAY,YAAY,MAAM;EACtD,MAAM,MAAM,gBAAgB,QAAkC;AAC9D,MAAI,IAAK,QAAO;AAChB,YAAW,QAAoC;;;AAK5C,MAAM,oBAAoB,UAA8C;CAC7E,MAAM,OAAO,iBAAiB,MAAK;AACnC,KAAI,CAAC,QAAQ,SAAS,KAAM,QAAO,KAAA;AAEnC,KAAI;EACF,MAAM,UAAU,kBAAkB;GAAE,KAAK;GAAkB;GAAM,CAAA;AACjE,SAAO;GACL,MAAM,QAAQ;GACd,MAAM,QAAQ,QAAQ,EAAC;GACzB;SACM;AACN"}
|
|
@@ -66,8 +66,8 @@ declare class CoreSDK extends CsmSDKCacheable {
|
|
|
66
66
|
getBlobBaseFee: () => Promise<_$viem.GetBlobBaseFeeReturnType>;
|
|
67
67
|
getBlock: <includeTransactions extends boolean = false, blockTag extends _$viem.BlockTag = "latest">(args?: _$viem.GetBlockParameters<includeTransactions, blockTag> | undefined) => Promise<{
|
|
68
68
|
number: blockTag extends "pending" ? null : bigint;
|
|
69
|
-
nonce: blockTag extends "pending" ? null : `0x${string}`;
|
|
70
69
|
hash: blockTag extends "pending" ? null : `0x${string}`;
|
|
70
|
+
nonce: blockTag extends "pending" ? null : `0x${string}`;
|
|
71
71
|
logsBloom: blockTag extends "pending" ? null : `0x${string}`;
|
|
72
72
|
baseFeePerGas: bigint | null;
|
|
73
73
|
blobGasUsed: bigint;
|
|
@@ -93,128 +93,128 @@ declare class CoreSDK extends CsmSDKCacheable {
|
|
|
93
93
|
withdrawalsRoot?: `0x${string}` | undefined;
|
|
94
94
|
transactions: includeTransactions extends true ? ({
|
|
95
95
|
type: "legacy";
|
|
96
|
-
|
|
96
|
+
v: bigint;
|
|
97
97
|
r: _$viem.Hex;
|
|
98
98
|
s: _$viem.Hex;
|
|
99
|
-
v: bigint;
|
|
100
|
-
yParity?: undefined | undefined;
|
|
101
99
|
value: bigint;
|
|
102
|
-
|
|
100
|
+
yParity?: undefined | undefined;
|
|
103
101
|
from: Address;
|
|
104
102
|
gas: bigint;
|
|
103
|
+
hash: _$viem.Hash;
|
|
104
|
+
input: _$viem.Hex;
|
|
105
105
|
nonce: number;
|
|
106
|
+
to: Address | null;
|
|
107
|
+
typeHex: _$viem.Hex | null;
|
|
108
|
+
accessList?: undefined | undefined;
|
|
109
|
+
authorizationList?: undefined | undefined;
|
|
106
110
|
blobVersionedHashes?: undefined | undefined;
|
|
111
|
+
chainId?: number | undefined;
|
|
107
112
|
gasPrice: bigint;
|
|
108
113
|
maxFeePerBlobGas?: undefined | undefined;
|
|
109
114
|
maxFeePerGas?: undefined | undefined;
|
|
110
115
|
maxPriorityFeePerGas?: undefined | undefined;
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
hash: _$viem.Hash;
|
|
114
|
-
input: _$viem.Hex;
|
|
115
|
-
typeHex: _$viem.Hex | null;
|
|
116
|
-
blockNumber: (blockTag extends "pending" ? true : false) extends infer T ? T extends (blockTag extends "pending" ? true : false) ? T extends true ? null : bigint : never : never;
|
|
117
|
-
blockHash: (blockTag extends "pending" ? true : false) extends infer T_1 ? T_1 extends (blockTag extends "pending" ? true : false) ? T_1 extends true ? null : `0x${string}` : never : never;
|
|
116
|
+
blockHash: (blockTag extends "pending" ? true : false) extends infer T ? T extends (blockTag extends "pending" ? true : false) ? T extends true ? null : `0x${string}` : never : never;
|
|
117
|
+
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;
|
|
118
118
|
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;
|
|
119
119
|
} | {
|
|
120
120
|
type: "eip2930";
|
|
121
|
-
|
|
121
|
+
v: bigint;
|
|
122
122
|
r: _$viem.Hex;
|
|
123
123
|
s: _$viem.Hex;
|
|
124
|
-
v: bigint;
|
|
125
|
-
yParity: number;
|
|
126
124
|
value: bigint;
|
|
127
|
-
|
|
125
|
+
yParity: number;
|
|
128
126
|
from: Address;
|
|
129
127
|
gas: bigint;
|
|
128
|
+
hash: _$viem.Hash;
|
|
129
|
+
input: _$viem.Hex;
|
|
130
130
|
nonce: number;
|
|
131
|
+
to: Address | null;
|
|
132
|
+
typeHex: _$viem.Hex | null;
|
|
133
|
+
accessList: _$viem.AccessList;
|
|
134
|
+
authorizationList?: undefined | undefined;
|
|
131
135
|
blobVersionedHashes?: undefined | undefined;
|
|
136
|
+
chainId: number;
|
|
132
137
|
gasPrice: bigint;
|
|
133
138
|
maxFeePerBlobGas?: undefined | undefined;
|
|
134
139
|
maxFeePerGas?: undefined | undefined;
|
|
135
140
|
maxPriorityFeePerGas?: undefined | undefined;
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
hash: _$viem.Hash;
|
|
139
|
-
input: _$viem.Hex;
|
|
140
|
-
typeHex: _$viem.Hex | null;
|
|
141
|
-
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_3 ? T_3 extends (blockTag extends "pending" ? true : false) ? T_3 extends true ? null : bigint : never : never;
|
|
142
|
-
blockHash: (blockTag extends "pending" ? true : false) extends infer T_4 ? T_4 extends (blockTag extends "pending" ? true : false) ? T_4 extends true ? null : `0x${string}` : never : never;
|
|
141
|
+
blockHash: (blockTag extends "pending" ? true : false) extends infer T_3 ? T_3 extends (blockTag extends "pending" ? true : false) ? T_3 extends true ? null : `0x${string}` : never : never;
|
|
142
|
+
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_4 ? T_4 extends (blockTag extends "pending" ? true : false) ? T_4 extends true ? null : bigint : never : never;
|
|
143
143
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_5 ? T_5 extends (blockTag extends "pending" ? true : false) ? T_5 extends true ? null : number : never : never;
|
|
144
144
|
} | {
|
|
145
145
|
type: "eip1559";
|
|
146
|
-
|
|
146
|
+
v: bigint;
|
|
147
147
|
r: _$viem.Hex;
|
|
148
148
|
s: _$viem.Hex;
|
|
149
|
-
v: bigint;
|
|
150
|
-
yParity: number;
|
|
151
149
|
value: bigint;
|
|
152
|
-
|
|
150
|
+
yParity: number;
|
|
153
151
|
from: Address;
|
|
154
152
|
gas: bigint;
|
|
153
|
+
hash: _$viem.Hash;
|
|
154
|
+
input: _$viem.Hex;
|
|
155
155
|
nonce: number;
|
|
156
|
+
to: Address | null;
|
|
157
|
+
typeHex: _$viem.Hex | null;
|
|
158
|
+
accessList: _$viem.AccessList;
|
|
159
|
+
authorizationList?: undefined | undefined;
|
|
156
160
|
blobVersionedHashes?: undefined | undefined;
|
|
161
|
+
chainId: number;
|
|
157
162
|
gasPrice?: undefined | undefined;
|
|
158
163
|
maxFeePerBlobGas?: undefined | undefined;
|
|
159
164
|
maxFeePerGas: bigint;
|
|
160
165
|
maxPriorityFeePerGas: bigint;
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
hash: _$viem.Hash;
|
|
164
|
-
input: _$viem.Hex;
|
|
165
|
-
typeHex: _$viem.Hex | null;
|
|
166
|
-
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_6 ? T_6 extends (blockTag extends "pending" ? true : false) ? T_6 extends true ? null : bigint : never : never;
|
|
167
|
-
blockHash: (blockTag extends "pending" ? true : false) extends infer T_7 ? T_7 extends (blockTag extends "pending" ? true : false) ? T_7 extends true ? null : `0x${string}` : never : never;
|
|
166
|
+
blockHash: (blockTag extends "pending" ? true : false) extends infer T_6 ? T_6 extends (blockTag extends "pending" ? true : false) ? T_6 extends true ? null : `0x${string}` : never : never;
|
|
167
|
+
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_7 ? T_7 extends (blockTag extends "pending" ? true : false) ? T_7 extends true ? null : bigint : never : never;
|
|
168
168
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_8 ? T_8 extends (blockTag extends "pending" ? true : false) ? T_8 extends true ? null : number : never : never;
|
|
169
169
|
} | {
|
|
170
170
|
type: "eip4844";
|
|
171
|
-
|
|
171
|
+
v: bigint;
|
|
172
172
|
r: _$viem.Hex;
|
|
173
173
|
s: _$viem.Hex;
|
|
174
|
-
v: bigint;
|
|
175
|
-
yParity: number;
|
|
176
174
|
value: bigint;
|
|
177
|
-
|
|
175
|
+
yParity: number;
|
|
178
176
|
from: Address;
|
|
179
177
|
gas: bigint;
|
|
178
|
+
hash: _$viem.Hash;
|
|
179
|
+
input: _$viem.Hex;
|
|
180
180
|
nonce: number;
|
|
181
|
+
to: Address | null;
|
|
182
|
+
typeHex: _$viem.Hex | null;
|
|
183
|
+
accessList: _$viem.AccessList;
|
|
184
|
+
authorizationList?: undefined | undefined;
|
|
181
185
|
blobVersionedHashes: readonly _$viem.Hex[];
|
|
186
|
+
chainId: number;
|
|
182
187
|
gasPrice?: undefined | undefined;
|
|
183
188
|
maxFeePerBlobGas: bigint;
|
|
184
189
|
maxFeePerGas: bigint;
|
|
185
190
|
maxPriorityFeePerGas: bigint;
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
hash: _$viem.Hash;
|
|
189
|
-
input: _$viem.Hex;
|
|
190
|
-
typeHex: _$viem.Hex | null;
|
|
191
|
-
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_9 ? T_9 extends (blockTag extends "pending" ? true : false) ? T_9 extends true ? null : bigint : never : never;
|
|
192
|
-
blockHash: (blockTag extends "pending" ? true : false) extends infer T_10 ? T_10 extends (blockTag extends "pending" ? true : false) ? T_10 extends true ? null : `0x${string}` : never : never;
|
|
191
|
+
blockHash: (blockTag extends "pending" ? true : false) extends infer T_9 ? T_9 extends (blockTag extends "pending" ? true : false) ? T_9 extends true ? null : `0x${string}` : never : never;
|
|
192
|
+
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_10 ? T_10 extends (blockTag extends "pending" ? true : false) ? T_10 extends true ? null : bigint : never : never;
|
|
193
193
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_11 ? T_11 extends (blockTag extends "pending" ? true : false) ? T_11 extends true ? null : number : never : never;
|
|
194
194
|
} | {
|
|
195
195
|
type: "eip7702";
|
|
196
|
-
|
|
196
|
+
v: bigint;
|
|
197
197
|
r: _$viem.Hex;
|
|
198
198
|
s: _$viem.Hex;
|
|
199
|
-
v: bigint;
|
|
200
|
-
yParity: number;
|
|
201
199
|
value: bigint;
|
|
202
|
-
|
|
200
|
+
yParity: number;
|
|
203
201
|
from: Address;
|
|
204
202
|
gas: bigint;
|
|
203
|
+
hash: _$viem.Hash;
|
|
204
|
+
input: _$viem.Hex;
|
|
205
205
|
nonce: number;
|
|
206
|
+
to: Address | null;
|
|
207
|
+
typeHex: _$viem.Hex | null;
|
|
208
|
+
accessList: _$viem.AccessList;
|
|
209
|
+
authorizationList: _$viem.SignedAuthorizationList;
|
|
206
210
|
blobVersionedHashes?: undefined | undefined;
|
|
211
|
+
chainId: number;
|
|
207
212
|
gasPrice?: undefined | undefined;
|
|
208
213
|
maxFeePerBlobGas?: undefined | undefined;
|
|
209
214
|
maxFeePerGas: bigint;
|
|
210
215
|
maxPriorityFeePerGas: bigint;
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
hash: _$viem.Hash;
|
|
214
|
-
input: _$viem.Hex;
|
|
215
|
-
typeHex: _$viem.Hex | null;
|
|
216
|
-
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_12 ? T_12 extends (blockTag extends "pending" ? true : false) ? T_12 extends true ? null : bigint : never : never;
|
|
217
|
-
blockHash: (blockTag extends "pending" ? true : false) extends infer T_13 ? T_13 extends (blockTag extends "pending" ? true : false) ? T_13 extends true ? null : `0x${string}` : never : never;
|
|
216
|
+
blockHash: (blockTag extends "pending" ? true : false) extends infer T_12 ? T_12 extends (blockTag extends "pending" ? true : false) ? T_12 extends true ? null : `0x${string}` : never : never;
|
|
217
|
+
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_13 ? T_13 extends (blockTag extends "pending" ? true : false) ? T_13 extends true ? null : bigint : never : never;
|
|
218
218
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_14 ? T_14 extends (blockTag extends "pending" ? true : false) ? T_14 extends true ? null : number : never : never;
|
|
219
219
|
})[] : `0x${string}`[];
|
|
220
220
|
}>;
|
|
@@ -244,128 +244,128 @@ declare class CoreSDK extends CsmSDKCacheable {
|
|
|
244
244
|
getStorageAt: (args: _$viem.GetStorageAtParameters) => Promise<_$viem.GetStorageAtReturnType>;
|
|
245
245
|
getTransaction: <blockTag extends _$viem.BlockTag = "latest">(args: _$viem.GetTransactionParameters<blockTag>) => Promise<{
|
|
246
246
|
type: "legacy";
|
|
247
|
-
|
|
247
|
+
v: bigint;
|
|
248
248
|
r: _$viem.Hex;
|
|
249
249
|
s: _$viem.Hex;
|
|
250
|
-
v: bigint;
|
|
251
|
-
yParity?: undefined | undefined;
|
|
252
250
|
value: bigint;
|
|
253
|
-
|
|
251
|
+
yParity?: undefined | undefined;
|
|
254
252
|
from: Address;
|
|
255
253
|
gas: bigint;
|
|
254
|
+
hash: _$viem.Hash;
|
|
255
|
+
input: _$viem.Hex;
|
|
256
256
|
nonce: number;
|
|
257
|
+
to: Address | null;
|
|
258
|
+
typeHex: _$viem.Hex | null;
|
|
259
|
+
accessList?: undefined | undefined;
|
|
260
|
+
authorizationList?: undefined | undefined;
|
|
257
261
|
blobVersionedHashes?: undefined | undefined;
|
|
262
|
+
chainId?: number | undefined;
|
|
258
263
|
gasPrice: bigint;
|
|
259
264
|
maxFeePerBlobGas?: undefined | undefined;
|
|
260
265
|
maxFeePerGas?: undefined | undefined;
|
|
261
266
|
maxPriorityFeePerGas?: undefined | undefined;
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
hash: _$viem.Hash;
|
|
265
|
-
input: _$viem.Hex;
|
|
266
|
-
typeHex: _$viem.Hex | null;
|
|
267
|
-
blockNumber: (blockTag extends "pending" ? true : false) extends infer T ? T extends (blockTag extends "pending" ? true : false) ? T extends true ? null : bigint : never : never;
|
|
268
|
-
blockHash: (blockTag extends "pending" ? true : false) extends infer T_1 ? T_1 extends (blockTag extends "pending" ? true : false) ? T_1 extends true ? null : `0x${string}` : never : never;
|
|
267
|
+
blockHash: (blockTag extends "pending" ? true : false) extends infer T ? T extends (blockTag extends "pending" ? true : false) ? T extends true ? null : `0x${string}` : never : never;
|
|
268
|
+
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;
|
|
269
269
|
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;
|
|
270
270
|
} | {
|
|
271
271
|
type: "eip2930";
|
|
272
|
-
|
|
272
|
+
v: bigint;
|
|
273
273
|
r: _$viem.Hex;
|
|
274
274
|
s: _$viem.Hex;
|
|
275
|
-
v: bigint;
|
|
276
|
-
yParity: number;
|
|
277
275
|
value: bigint;
|
|
278
|
-
|
|
276
|
+
yParity: number;
|
|
279
277
|
from: Address;
|
|
280
278
|
gas: bigint;
|
|
279
|
+
hash: _$viem.Hash;
|
|
280
|
+
input: _$viem.Hex;
|
|
281
281
|
nonce: number;
|
|
282
|
+
to: Address | null;
|
|
283
|
+
typeHex: _$viem.Hex | null;
|
|
284
|
+
accessList: _$viem.AccessList;
|
|
285
|
+
authorizationList?: undefined | undefined;
|
|
282
286
|
blobVersionedHashes?: undefined | undefined;
|
|
287
|
+
chainId: number;
|
|
283
288
|
gasPrice: bigint;
|
|
284
289
|
maxFeePerBlobGas?: undefined | undefined;
|
|
285
290
|
maxFeePerGas?: undefined | undefined;
|
|
286
291
|
maxPriorityFeePerGas?: undefined | undefined;
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
hash: _$viem.Hash;
|
|
290
|
-
input: _$viem.Hex;
|
|
291
|
-
typeHex: _$viem.Hex | null;
|
|
292
|
-
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_3 ? T_3 extends (blockTag extends "pending" ? true : false) ? T_3 extends true ? null : bigint : never : never;
|
|
293
|
-
blockHash: (blockTag extends "pending" ? true : false) extends infer T_4 ? T_4 extends (blockTag extends "pending" ? true : false) ? T_4 extends true ? null : `0x${string}` : never : never;
|
|
292
|
+
blockHash: (blockTag extends "pending" ? true : false) extends infer T_3 ? T_3 extends (blockTag extends "pending" ? true : false) ? T_3 extends true ? null : `0x${string}` : never : never;
|
|
293
|
+
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_4 ? T_4 extends (blockTag extends "pending" ? true : false) ? T_4 extends true ? null : bigint : never : never;
|
|
294
294
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_5 ? T_5 extends (blockTag extends "pending" ? true : false) ? T_5 extends true ? null : number : never : never;
|
|
295
295
|
} | {
|
|
296
296
|
type: "eip1559";
|
|
297
|
-
|
|
297
|
+
v: bigint;
|
|
298
298
|
r: _$viem.Hex;
|
|
299
299
|
s: _$viem.Hex;
|
|
300
|
-
v: bigint;
|
|
301
|
-
yParity: number;
|
|
302
300
|
value: bigint;
|
|
303
|
-
|
|
301
|
+
yParity: number;
|
|
304
302
|
from: Address;
|
|
305
303
|
gas: bigint;
|
|
304
|
+
hash: _$viem.Hash;
|
|
305
|
+
input: _$viem.Hex;
|
|
306
306
|
nonce: number;
|
|
307
|
+
to: Address | null;
|
|
308
|
+
typeHex: _$viem.Hex | null;
|
|
309
|
+
accessList: _$viem.AccessList;
|
|
310
|
+
authorizationList?: undefined | undefined;
|
|
307
311
|
blobVersionedHashes?: undefined | undefined;
|
|
312
|
+
chainId: number;
|
|
308
313
|
gasPrice?: undefined | undefined;
|
|
309
314
|
maxFeePerBlobGas?: undefined | undefined;
|
|
310
315
|
maxFeePerGas: bigint;
|
|
311
316
|
maxPriorityFeePerGas: bigint;
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
hash: _$viem.Hash;
|
|
315
|
-
input: _$viem.Hex;
|
|
316
|
-
typeHex: _$viem.Hex | null;
|
|
317
|
-
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_6 ? T_6 extends (blockTag extends "pending" ? true : false) ? T_6 extends true ? null : bigint : never : never;
|
|
318
|
-
blockHash: (blockTag extends "pending" ? true : false) extends infer T_7 ? T_7 extends (blockTag extends "pending" ? true : false) ? T_7 extends true ? null : `0x${string}` : never : never;
|
|
317
|
+
blockHash: (blockTag extends "pending" ? true : false) extends infer T_6 ? T_6 extends (blockTag extends "pending" ? true : false) ? T_6 extends true ? null : `0x${string}` : never : never;
|
|
318
|
+
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_7 ? T_7 extends (blockTag extends "pending" ? true : false) ? T_7 extends true ? null : bigint : never : never;
|
|
319
319
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_8 ? T_8 extends (blockTag extends "pending" ? true : false) ? T_8 extends true ? null : number : never : never;
|
|
320
320
|
} | {
|
|
321
321
|
type: "eip4844";
|
|
322
|
-
|
|
322
|
+
v: bigint;
|
|
323
323
|
r: _$viem.Hex;
|
|
324
324
|
s: _$viem.Hex;
|
|
325
|
-
v: bigint;
|
|
326
|
-
yParity: number;
|
|
327
325
|
value: bigint;
|
|
328
|
-
|
|
326
|
+
yParity: number;
|
|
329
327
|
from: Address;
|
|
330
328
|
gas: bigint;
|
|
329
|
+
hash: _$viem.Hash;
|
|
330
|
+
input: _$viem.Hex;
|
|
331
331
|
nonce: number;
|
|
332
|
+
to: Address | null;
|
|
333
|
+
typeHex: _$viem.Hex | null;
|
|
334
|
+
accessList: _$viem.AccessList;
|
|
335
|
+
authorizationList?: undefined | undefined;
|
|
332
336
|
blobVersionedHashes: readonly _$viem.Hex[];
|
|
337
|
+
chainId: number;
|
|
333
338
|
gasPrice?: undefined | undefined;
|
|
334
339
|
maxFeePerBlobGas: bigint;
|
|
335
340
|
maxFeePerGas: bigint;
|
|
336
341
|
maxPriorityFeePerGas: bigint;
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
hash: _$viem.Hash;
|
|
340
|
-
input: _$viem.Hex;
|
|
341
|
-
typeHex: _$viem.Hex | null;
|
|
342
|
-
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_9 ? T_9 extends (blockTag extends "pending" ? true : false) ? T_9 extends true ? null : bigint : never : never;
|
|
343
|
-
blockHash: (blockTag extends "pending" ? true : false) extends infer T_10 ? T_10 extends (blockTag extends "pending" ? true : false) ? T_10 extends true ? null : `0x${string}` : never : never;
|
|
342
|
+
blockHash: (blockTag extends "pending" ? true : false) extends infer T_9 ? T_9 extends (blockTag extends "pending" ? true : false) ? T_9 extends true ? null : `0x${string}` : never : never;
|
|
343
|
+
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_10 ? T_10 extends (blockTag extends "pending" ? true : false) ? T_10 extends true ? null : bigint : never : never;
|
|
344
344
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_11 ? T_11 extends (blockTag extends "pending" ? true : false) ? T_11 extends true ? null : number : never : never;
|
|
345
345
|
} | {
|
|
346
346
|
type: "eip7702";
|
|
347
|
-
|
|
347
|
+
v: bigint;
|
|
348
348
|
r: _$viem.Hex;
|
|
349
349
|
s: _$viem.Hex;
|
|
350
|
-
v: bigint;
|
|
351
|
-
yParity: number;
|
|
352
350
|
value: bigint;
|
|
353
|
-
|
|
351
|
+
yParity: number;
|
|
354
352
|
from: Address;
|
|
355
353
|
gas: bigint;
|
|
354
|
+
hash: _$viem.Hash;
|
|
355
|
+
input: _$viem.Hex;
|
|
356
356
|
nonce: number;
|
|
357
|
+
to: Address | null;
|
|
358
|
+
typeHex: _$viem.Hex | null;
|
|
359
|
+
accessList: _$viem.AccessList;
|
|
360
|
+
authorizationList: _$viem.SignedAuthorizationList;
|
|
357
361
|
blobVersionedHashes?: undefined | undefined;
|
|
362
|
+
chainId: number;
|
|
358
363
|
gasPrice?: undefined | undefined;
|
|
359
364
|
maxFeePerBlobGas?: undefined | undefined;
|
|
360
365
|
maxFeePerGas: bigint;
|
|
361
366
|
maxPriorityFeePerGas: bigint;
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
hash: _$viem.Hash;
|
|
365
|
-
input: _$viem.Hex;
|
|
366
|
-
typeHex: _$viem.Hex | null;
|
|
367
|
-
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_12 ? T_12 extends (blockTag extends "pending" ? true : false) ? T_12 extends true ? null : bigint : never : never;
|
|
368
|
-
blockHash: (blockTag extends "pending" ? true : false) extends infer T_13 ? T_13 extends (blockTag extends "pending" ? true : false) ? T_13 extends true ? null : `0x${string}` : never : never;
|
|
367
|
+
blockHash: (blockTag extends "pending" ? true : false) extends infer T_12 ? T_12 extends (blockTag extends "pending" ? true : false) ? T_12 extends true ? null : `0x${string}` : never : never;
|
|
368
|
+
blockNumber: (blockTag extends "pending" ? true : false) extends infer T_13 ? T_13 extends (blockTag extends "pending" ? true : false) ? T_13 extends true ? null : bigint : never : never;
|
|
369
369
|
transactionIndex: (blockTag extends "pending" ? true : false) extends infer T_14 ? T_14 extends (blockTag extends "pending" ? true : false) ? T_14 extends true ? null : number : never : never;
|
|
370
370
|
}>;
|
|
371
371
|
getTransactionConfirmations: (args: _$viem.GetTransactionConfirmationsParameters<Chain | undefined>) => Promise<_$viem.GetTransactionConfirmationsReturnType>;
|
|
@@ -3624,7 +3624,7 @@ declare class CoreSDK extends CsmSDKCacheable {
|
|
|
3624
3624
|
authorizationList: _$viem.TransactionSerializableEIP7702["authorizationList"];
|
|
3625
3625
|
} ? "eip7702" : never) | (request["type"] extends string | undefined ? Extract<request["type"], string> : never)>) ? T_12 extends "eip7702" ? _$viem.TransactionRequestEIP7702 : never : never : never)>> & {
|
|
3626
3626
|
chainId?: number | undefined;
|
|
3627
|
-
}, (request["parameters"] extends readonly _$viem.PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "type" | "
|
|
3627
|
+
}, (request["parameters"] extends readonly _$viem.PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "type" | "fees" | "gas" | "nonce" | "blobVersionedHashes" | "chainId") extends infer T_13 ? T_13 extends (request["parameters"] extends readonly _$viem.PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "type" | "fees" | "gas" | "nonce" | "blobVersionedHashes" | "chainId") ? T_13 extends "fees" ? "gasPrice" | "maxFeePerGas" | "maxPriorityFeePerGas" : T_13 : never : never> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">) & {
|
|
3628
3628
|
_capabilities?: {
|
|
3629
3629
|
[x: string]: any;
|
|
3630
3630
|
} | undefined;
|
|
@@ -3635,7 +3635,7 @@ declare class CoreSDK extends CsmSDKCacheable {
|
|
|
3635
3635
|
simulate: <const calls extends readonly unknown[]>(args: _$viem.SimulateBlocksParameters<calls>) => Promise<_$viem.SimulateBlocksReturnType<calls>>;
|
|
3636
3636
|
simulateBlocks: <const calls extends readonly unknown[]>(args: _$viem.SimulateBlocksParameters<calls>) => Promise<_$viem.SimulateBlocksReturnType<calls>>;
|
|
3637
3637
|
simulateCalls: <const calls extends readonly unknown[]>(args: _$viem.SimulateCallsParameters<calls>) => Promise<_$viem.SimulateCallsReturnType<calls>>;
|
|
3638
|
-
simulateContract: <const abi extends Abi | readonly unknown[], functionName extends _$viem.ContractFunctionName<abi, "
|
|
3638
|
+
simulateContract: <const abi extends Abi | readonly unknown[], functionName extends _$viem.ContractFunctionName<abi, "payable" | "nonpayable">, const args_1 extends _$viem.ContractFunctionArgs<abi, "payable" | "nonpayable", functionName>, chainOverride extends Chain | undefined, accountOverride extends _$viem.Account | Address | undefined = undefined>(args: _$viem.SimulateContractParameters<abi, functionName, args_1, Chain | undefined, chainOverride, accountOverride>) => Promise<_$viem.SimulateContractReturnType<abi, functionName, args_1, Chain | undefined, _$viem.Account | undefined, chainOverride, accountOverride>>;
|
|
3639
3639
|
verifyHash: (args: _$viem.VerifyHashActionParameters) => Promise<_$viem.VerifyHashActionReturnType>;
|
|
3640
3640
|
verifyMessage: (args: _$viem.VerifyMessageActionParameters) => Promise<_$viem.VerifyMessageActionReturnType>;
|
|
3641
3641
|
verifySiweMessage: (args: {
|
|
@@ -3673,7 +3673,7 @@ declare class CoreSDK extends CsmSDKCacheable {
|
|
|
3673
3673
|
transport?: undefined;
|
|
3674
3674
|
type?: undefined;
|
|
3675
3675
|
uid?: undefined;
|
|
3676
|
-
} & _$viem.ExactPartial<Pick<_$viem.PublicActions<_$viem.Transport, Chain | undefined, undefined>, "
|
|
3676
|
+
} & _$viem.ExactPartial<Pick<_$viem.PublicActions<_$viem.Transport, Chain | undefined, undefined>, "call" | "createContractEventFilter" | "createEventFilter" | "estimateContractGas" | "estimateGas" | "getBlock" | "getBlockNumber" | "getChainId" | "getContractEvents" | "getEnsText" | "getFilterChanges" | "getGasPrice" | "getLogs" | "getTransaction" | "getTransactionCount" | "getTransactionReceipt" | "prepareTransactionRequest" | "readContract" | "sendRawTransaction" | "simulateContract" | "uninstallFilter" | "watchBlockNumber" | "watchContractEvent"> & Pick<_$viem.WalletActions<Chain | undefined, undefined>, "sendTransaction" | "writeContract">>>(fn: (client: _$viem.Client<_$viem.Transport, Chain | undefined, undefined, _$viem.PublicRpcSchema, _$viem.PublicActions<_$viem.Transport, Chain | undefined>>) => client) => _$viem.Client<_$viem.Transport, Chain | undefined, undefined, _$viem.PublicRpcSchema, { [K in keyof client]: client[K] } & _$viem.PublicActions<_$viem.Transport, Chain | undefined>>;
|
|
3677
3677
|
};
|
|
3678
3678
|
get walletClient(): {
|
|
3679
3679
|
account: _$viem.Account | undefined;
|
|
@@ -6955,7 +6955,7 @@ declare class CoreSDK extends CsmSDKCacheable {
|
|
|
6955
6955
|
authorizationList: _$viem.TransactionSerializableEIP7702["authorizationList"];
|
|
6956
6956
|
} ? "eip7702" : never) | (request["type"] extends string | undefined ? Extract<request["type"], string> : never)>) ? T_12 extends "eip7702" ? _$viem.TransactionRequestEIP7702 : never : never : never)>> & {
|
|
6957
6957
|
chainId?: number | undefined;
|
|
6958
|
-
}, (request["parameters"] extends readonly _$viem.PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "type" | "
|
|
6958
|
+
}, (request["parameters"] extends readonly _$viem.PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "type" | "fees" | "gas" | "nonce" | "blobVersionedHashes" | "chainId") extends infer T_13 ? T_13 extends (request["parameters"] extends readonly _$viem.PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "type" | "fees" | "gas" | "nonce" | "blobVersionedHashes" | "chainId") ? T_13 extends "fees" ? "gasPrice" | "maxFeePerGas" | "maxPriorityFeePerGas" : T_13 : never : never> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">) & {
|
|
6959
6959
|
_capabilities?: {
|
|
6960
6960
|
[x: string]: any;
|
|
6961
6961
|
} | undefined;
|
|
@@ -6969,14 +6969,14 @@ declare class CoreSDK extends CsmSDKCacheable {
|
|
|
6969
6969
|
id: string;
|
|
6970
6970
|
}>;
|
|
6971
6971
|
sendCallsSync: <const calls extends readonly unknown[], chainOverride extends Chain | undefined = undefined>(parameters: _$viem.SendCallsSyncParameters<Chain | undefined, _$viem.Account | undefined, chainOverride, calls>) => Promise<{
|
|
6972
|
+
id: string;
|
|
6973
|
+
chainId: number;
|
|
6972
6974
|
atomic: boolean;
|
|
6973
6975
|
capabilities?: {
|
|
6974
6976
|
[key: string]: any;
|
|
6975
6977
|
} | {
|
|
6976
6978
|
[x: string]: any;
|
|
6977
6979
|
} | undefined;
|
|
6978
|
-
chainId: number;
|
|
6979
|
-
id: string;
|
|
6980
6980
|
receipts?: _$viem.WalletCallReceipt<bigint, "success" | "reverted">[] | undefined;
|
|
6981
6981
|
version: string;
|
|
6982
6982
|
statusCode: number;
|
|
@@ -8092,8 +8092,8 @@ declare class CoreSDK extends CsmSDKCacheable {
|
|
|
8092
8092
|
switchChain: (args: _$viem.SwitchChainParameters) => Promise<void>;
|
|
8093
8093
|
waitForCallsStatus: (parameters: _$viem.WaitForCallsStatusParameters) => Promise<_$viem.WaitForCallsStatusReturnType>;
|
|
8094
8094
|
watchAsset: (args: _$viem.WatchAssetParameters) => Promise<_$viem.WatchAssetReturnType>;
|
|
8095
|
-
writeContract: <const abi extends Abi | readonly unknown[], functionName extends _$viem.ContractFunctionName<abi, "
|
|
8096
|
-
writeContractSync: <const abi extends Abi | readonly unknown[], functionName extends _$viem.ContractFunctionName<abi, "
|
|
8095
|
+
writeContract: <const abi extends Abi | readonly unknown[], functionName extends _$viem.ContractFunctionName<abi, "payable" | "nonpayable">, args_1 extends _$viem.ContractFunctionArgs<abi, "payable" | "nonpayable", functionName>, chainOverride extends Chain | undefined = undefined>(args: _$viem.WriteContractParameters<abi, functionName, args_1, Chain | undefined, _$viem.Account | undefined, chainOverride>) => Promise<_$viem.WriteContractReturnType>;
|
|
8096
|
+
writeContractSync: <const abi extends Abi | readonly unknown[], functionName extends _$viem.ContractFunctionName<abi, "payable" | "nonpayable">, args_1 extends _$viem.ContractFunctionArgs<abi, "payable" | "nonpayable", functionName>, chainOverride extends Chain | undefined = undefined>(args: _$viem.WriteContractSyncParameters<abi, functionName, args_1, Chain | undefined, _$viem.Account | undefined, chainOverride>) => Promise<_$viem.WriteContractSyncReturnType>;
|
|
8097
8097
|
extend: <const client extends {
|
|
8098
8098
|
[x: string]: unknown;
|
|
8099
8099
|
account?: undefined;
|
|
@@ -8110,7 +8110,7 @@ declare class CoreSDK extends CsmSDKCacheable {
|
|
|
8110
8110
|
transport?: undefined;
|
|
8111
8111
|
type?: undefined;
|
|
8112
8112
|
uid?: undefined;
|
|
8113
|
-
} & _$viem.ExactPartial<Pick<_$viem.PublicActions<_$viem.Transport, Chain | undefined, _$viem.Account | undefined>, "
|
|
8113
|
+
} & _$viem.ExactPartial<Pick<_$viem.PublicActions<_$viem.Transport, Chain | undefined, _$viem.Account | undefined>, "call" | "createContractEventFilter" | "createEventFilter" | "estimateContractGas" | "estimateGas" | "getBlock" | "getBlockNumber" | "getChainId" | "getContractEvents" | "getEnsText" | "getFilterChanges" | "getGasPrice" | "getLogs" | "getTransaction" | "getTransactionCount" | "getTransactionReceipt" | "prepareTransactionRequest" | "readContract" | "sendRawTransaction" | "simulateContract" | "uninstallFilter" | "watchBlockNumber" | "watchContractEvent"> & Pick<_$viem.WalletActions<Chain | undefined, _$viem.Account | undefined>, "sendTransaction" | "writeContract">>>(fn: (client: _$viem.Client<_$viem.Transport, Chain | undefined, _$viem.Account | undefined, _$viem.WalletRpcSchema, _$viem.WalletActions<Chain | undefined, _$viem.Account | undefined>>) => client) => _$viem.Client<_$viem.Transport, Chain | undefined, _$viem.Account | undefined, _$viem.WalletRpcSchema, { [K in keyof client]: client[K] } & _$viem.WalletActions<Chain | undefined, _$viem.Account | undefined>>;
|
|
8114
8114
|
};
|
|
8115
8115
|
get moduleContract(): CONTRACT_NAMES;
|
|
8116
8116
|
getContractAddress(contract: CONTRACT_NAMES): Address;
|