viem 0.2.0-0-2-0.20230320T235312 → 0.2.0-0-2-0.20230328T063845
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/accounts/package.json +4 -0
- package/dist/abi.d.ts +3 -3
- package/dist/abi.js +2 -2
- package/dist/abi.mjs +1 -1
- package/dist/accounts/index.d.ts +90 -0
- package/dist/accounts/index.js +152 -0
- package/dist/accounts/index.js.map +1 -0
- package/dist/accounts/index.mjs +152 -0
- package/dist/accounts/index.mjs.map +1 -0
- package/dist/{chain-b2e88e30.d.ts → chain-5b28fc53.d.ts} +121 -85
- package/dist/{chain-c4f924cf.d.ts → chain-e9b996ff.d.ts} +1 -1
- package/dist/chains.d.ts +3 -3
- package/dist/chains.js +63 -63
- package/dist/chains.mjs +1 -1
- package/dist/{chunk-T4AH4Y6Y.js → chunk-564BCC7H.js} +813 -206
- package/dist/chunk-564BCC7H.js.map +1 -0
- package/dist/chunk-7QEOFHC7.mjs +31 -0
- package/dist/chunk-7QEOFHC7.mjs.map +1 -0
- package/dist/{chunk-4DIN6KDM.mjs → chunk-BJ5KRDTG.mjs} +2 -2
- package/dist/chunk-BJ5KRDTG.mjs.map +1 -0
- package/dist/{chunk-BLB7NERO.js → chunk-CXE4XSMF.js} +19 -19
- package/dist/chunk-CXE4XSMF.js.map +1 -0
- package/dist/chunk-D3ALNUWN.js +31 -0
- package/dist/chunk-D3ALNUWN.js.map +1 -0
- package/dist/{chunk-KOAJUBTN.mjs → chunk-UCZWRYV5.mjs} +803 -196
- package/dist/chunk-UCZWRYV5.mjs.map +1 -0
- package/dist/contract.d.ts +9 -8
- package/dist/contract.js +2 -2
- package/dist/contract.mjs +1 -1
- package/dist/{createClient-d4f1dea1.d.ts → createClient-e52de308.d.ts} +23 -9
- package/dist/{eip1193-cd3e872a.d.ts → eip1193-9080db42.d.ts} +1 -1
- package/dist/{encodeFunctionResult-750c9055.d.ts → encodeFunctionResult-47ad60ed.d.ts} +1 -1
- package/dist/{encodePacked-de74201f.d.ts → encodePacked-35c796fb.d.ts} +1 -1
- package/dist/ens.d.ts +6 -5
- package/dist/ens.js +3 -3
- package/dist/ens.mjs +2 -2
- package/dist/ethers.d.ts +5 -4
- package/dist/ethers.js +7 -5
- package/dist/ethers.js.map +1 -1
- package/dist/ethers.mjs +7 -5
- package/dist/ethers.mjs.map +1 -1
- package/dist/{formatAbiItem-fdbdda39.d.ts → formatAbiItem-d9e801dd.d.ts} +1 -1
- package/dist/{getAbiItem-9d709e3b.d.ts → getAbiItem-1d94ae0e.d.ts} +1 -1
- package/dist/index.d.ts +23 -16
- package/dist/index.js +130 -103
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +72 -45
- package/dist/index.mjs.map +1 -1
- package/dist/parseAccount-4209fa24.d.ts +6 -0
- package/dist/{parseGwei-f930d155.d.ts → parseGwei-85b2bbc3.d.ts} +61 -18
- package/dist/public.d.ts +6 -5
- package/dist/public.js +2 -2
- package/dist/public.mjs +1 -1
- package/dist/test-f3d06763.d.ts +198 -0
- package/dist/test.d.ts +11 -11
- package/dist/test.js +2 -2
- package/dist/test.mjs +1 -1
- package/dist/{account-07d04222.d.ts → typedData-42b43450.d.ts} +46 -27
- package/dist/utils/index.d.ts +17 -35
- package/dist/utils/index.js +18 -2
- package/dist/utils/index.mjs +19 -3
- package/dist/wallet.d.ts +6 -5
- package/dist/wallet.js +2 -2
- package/dist/wallet.mjs +1 -1
- package/dist/{createPublicClient-3a714a8d.d.ts → watchPendingTransactions-ad90553c.d.ts} +336 -301
- package/dist/window.d.ts +2 -2
- package/package.json +9 -1
- package/dist/chunk-4DIN6KDM.mjs.map +0 -1
- package/dist/chunk-BLB7NERO.js.map +0 -1
- package/dist/chunk-KOAJUBTN.mjs.map +0 -1
- package/dist/chunk-T4AH4Y6Y.js.map +0 -1
- package/dist/test-c70126a6.d.ts +0 -206
package/dist/contract.d.ts
CHANGED
@@ -1,10 +1,11 @@
|
|
1
|
-
export { D as DecodeAbiParametersReturnType, E as EncodeAbiParametersReturnType, G as GetAbiItemParameters, d as decodeAbiParameters, e as encodeAbiParameters, g as getAbiItem } from './getAbiItem-
|
2
|
-
export { D as DecodeErrorResultParameters, a as DecodeErrorResultReturnType, b as DecodeEventLogParameters, c as DecodeEventLogReturnType, d as DecodeFunctionDataParameters, e as DecodeFunctionResultParameters, f as DecodeFunctionResultReturnType, E as EncodeDeployDataParameters, g as EncodeErrorResultParameters, h as EncodeEventTopicsParameters, i as EncodeFunctionDataParameters, j as EncodeFunctionResultParameters, k as decodeErrorResult, l as decodeEventLog, m as decodeFunctionData, n as decodeFunctionResult, o as encodeDeployData, p as encodeErrorResult, q as encodeEventTopics, r as encodeFunctionData, s as encodeFunctionResult } from './encodeFunctionResult-
|
3
|
-
export { a as formatAbiItem, f as formatAbiItemWithArgs } from './formatAbiItem-
|
4
|
-
export {
|
1
|
+
export { D as DecodeAbiParametersReturnType, E as EncodeAbiParametersReturnType, G as GetAbiItemParameters, d as decodeAbiParameters, e as encodeAbiParameters, g as getAbiItem } from './getAbiItem-1d94ae0e.js';
|
2
|
+
export { D as DecodeErrorResultParameters, a as DecodeErrorResultReturnType, b as DecodeEventLogParameters, c as DecodeEventLogReturnType, d as DecodeFunctionDataParameters, e as DecodeFunctionResultParameters, f as DecodeFunctionResultReturnType, E as EncodeDeployDataParameters, g as EncodeErrorResultParameters, h as EncodeEventTopicsParameters, i as EncodeFunctionDataParameters, j as EncodeFunctionResultParameters, k as decodeErrorResult, l as decodeEventLog, m as decodeFunctionData, n as decodeFunctionResult, o as encodeDeployData, p as encodeErrorResult, q as encodeEventTopics, r as encodeFunctionData, s as encodeFunctionResult } from './encodeFunctionResult-47ad60ed.js';
|
3
|
+
export { a as formatAbiItem, f as formatAbiItemWithArgs } from './formatAbiItem-d9e801dd.js';
|
4
|
+
export { c as CreateContractEventFilterParameters, d as CreateContractEventFilterReturnType, D as DeployContractParameters, h as DeployContractReturnType, aO as EstimateContractGasParameters, aP as EstimateContractGasReturnType, r as GetBytecodeParameters, s as GetBytecodeReturnType, I as GetStorageAtParameters, J as GetStorageAtReturnType, S as MulticallParameters, aQ as MulticallReturnType, X as OnLogsFn, Y as OnLogsParameter, $ as ReadContractParameters, a0 as ReadContractReturnType, a9 as SimulateContractParameters, aa as SimulateContractReturnType, am as WatchContractEventParameters, as as WriteContractParameters, at as WriteContractReturnType, aR as createContractEventFilter, aZ as deployContract, aS as estimateContractGas, aT as getBytecode, aU as getStorageAt, aV as multicall, aW as readContract, aX as simulateContract, aY as watchContractEvent, a_ as writeContract } from './watchPendingTransactions-ad90553c.js';
|
5
5
|
import 'abitype';
|
6
|
-
import './chain-
|
6
|
+
import './chain-5b28fc53.js';
|
7
7
|
import '@wagmi/chains';
|
8
|
-
import './
|
9
|
-
import './
|
10
|
-
import './
|
8
|
+
import './createClient-e52de308.js';
|
9
|
+
import './eip1193-9080db42.js';
|
10
|
+
import './typedData-42b43450.js';
|
11
|
+
import '@scure/bip32';
|
package/dist/contract.js
CHANGED
@@ -23,7 +23,7 @@
|
|
23
23
|
|
24
24
|
|
25
25
|
|
26
|
-
var
|
26
|
+
var _chunk564BCC7Hjs = require('./chunk-564BCC7H.js');
|
27
27
|
|
28
28
|
|
29
29
|
|
@@ -49,5 +49,5 @@ var _chunkT4AH4Y6Yjs = require('./chunk-T4AH4Y6Y.js');
|
|
49
49
|
|
50
50
|
|
51
51
|
|
52
|
-
exports.createContractEventFilter =
|
52
|
+
exports.createContractEventFilter = _chunk564BCC7Hjs.createContractEventFilter; exports.decodeAbiParameters = _chunk564BCC7Hjs.decodeAbiParameters; exports.decodeErrorResult = _chunk564BCC7Hjs.decodeErrorResult; exports.decodeEventLog = _chunk564BCC7Hjs.decodeEventLog; exports.decodeFunctionData = _chunk564BCC7Hjs.decodeFunctionData; exports.decodeFunctionResult = _chunk564BCC7Hjs.decodeFunctionResult; exports.deployContract = _chunk564BCC7Hjs.deployContract; exports.encodeAbiParameters = _chunk564BCC7Hjs.encodeAbiParameters; exports.encodeDeployData = _chunk564BCC7Hjs.encodeDeployData; exports.encodeErrorResult = _chunk564BCC7Hjs.encodeErrorResult; exports.encodeEventTopics = _chunk564BCC7Hjs.encodeEventTopics; exports.encodeFunctionData = _chunk564BCC7Hjs.encodeFunctionData; exports.encodeFunctionResult = _chunk564BCC7Hjs.encodeFunctionResult; exports.estimateContractGas = _chunk564BCC7Hjs.estimateContractGas; exports.formatAbiItem = _chunk564BCC7Hjs.formatAbiItem; exports.formatAbiItemWithArgs = _chunk564BCC7Hjs.formatAbiItemWithArgs; exports.getAbiItem = _chunk564BCC7Hjs.getAbiItem; exports.getBytecode = _chunk564BCC7Hjs.getBytecode; exports.getStorageAt = _chunk564BCC7Hjs.getStorageAt; exports.multicall = _chunk564BCC7Hjs.multicall; exports.readContract = _chunk564BCC7Hjs.readContract; exports.simulateContract = _chunk564BCC7Hjs.simulateContract; exports.watchContractEvent = _chunk564BCC7Hjs.watchContractEvent; exports.writeContract = _chunk564BCC7Hjs.writeContract;
|
53
53
|
//# sourceMappingURL=contract.js.map
|
package/dist/contract.mjs
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { R as Requests } from './eip1193-
|
2
|
-
import { C as Chain } from './chain-
|
1
|
+
import { R as Requests } from './eip1193-9080db42.js';
|
2
|
+
import { C as Chain } from './chain-5b28fc53.js';
|
3
3
|
|
4
4
|
type BaseRpcRequests = {
|
5
5
|
request(...args: any): Promise<any>;
|
@@ -31,12 +31,29 @@ type Transport<TType extends string = string, TRpcAttributes = Record<string, an
|
|
31
31
|
/**
|
32
32
|
* @description Creates an transport intended to be used with a client.
|
33
33
|
*/
|
34
|
-
declare function createTransport<TType extends string
|
34
|
+
declare function createTransport<TType extends string, TRpcAttributes extends Record<string, any>>({ key, name, request, retryCount, retryDelay, timeout, type, }: TransportConfig<TType>, value?: TRpcAttributes): ReturnType<Transport<TType, TRpcAttributes>>;
|
35
35
|
|
36
|
-
type
|
36
|
+
type ClientConfig<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined> = {
|
37
37
|
/** Chain for the client. */
|
38
38
|
chain?: TChain;
|
39
39
|
/** A key for the client. */
|
40
|
+
key?: string;
|
41
|
+
/** A name for the client. */
|
42
|
+
name?: string;
|
43
|
+
/**
|
44
|
+
* Frequency (in ms) for polling enabled actions & events.
|
45
|
+
* @default 4_000
|
46
|
+
*/
|
47
|
+
pollingInterval?: number;
|
48
|
+
/** The RPC transport */
|
49
|
+
transport: TTransport;
|
50
|
+
/** The type of client. */
|
51
|
+
type?: string;
|
52
|
+
};
|
53
|
+
type Client<TTransport extends Transport = Transport, TRequests extends BaseRpcRequests = Requests, TChain extends Chain | undefined = Chain | undefined> = {
|
54
|
+
/** Chain for the client. */
|
55
|
+
chain: TChain;
|
56
|
+
/** A key for the client. */
|
40
57
|
key: string;
|
41
58
|
/** A name for the client. */
|
42
59
|
name: string;
|
@@ -44,19 +61,16 @@ type Client<TTransport extends Transport = Transport, TChain extends Chain | und
|
|
44
61
|
pollingInterval: number;
|
45
62
|
/** Request function wrapped with friendly error handling */
|
46
63
|
request: TRequests['request'];
|
47
|
-
/** The RPC transport
|
64
|
+
/** The RPC transport */
|
48
65
|
transport: ReturnType<TTransport>['config'] & ReturnType<TTransport>['value'];
|
49
66
|
/** The type of client. */
|
50
67
|
type: string;
|
51
68
|
/** A unique ID for the client. */
|
52
69
|
uid: string;
|
53
70
|
};
|
54
|
-
type ClientConfig<TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain, TRequests extends BaseRpcRequests = Requests> = Partial<Pick<Client<TTransport, TChain, TRequests>, 'chain' | 'key' | 'name' | 'pollingInterval' | 'type'>> & {
|
55
|
-
transport: TTransport;
|
56
|
-
};
|
57
71
|
/**
|
58
72
|
* @description Creates a base client with the given transport.
|
59
73
|
*/
|
60
|
-
declare function createClient<TTransport extends Transport, TChain extends Chain | undefined
|
74
|
+
declare function createClient<TTransport extends Transport, TRequests extends BaseRpcRequests, TChain extends Chain | undefined = undefined>({ chain, key, name, pollingInterval, transport, type, }: ClientConfig<TTransport, TChain>): Client<TTransport, TRequests, TChain>;
|
61
75
|
|
62
76
|
export { BaseRpcRequests as B, Client as C, TransportConfig as T, Transport as a, ClientConfig as b, createClient as c, createTransport as d };
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Address } from 'abitype';
|
2
|
-
import { a as Hash,
|
2
|
+
import { a as Hash, ak as Quantity, D as RpcTransactionRequest, u as RpcBlockNumber, f as BlockTag, t as RpcBlockIdentifier, H as Hex, v as RpcFeeHistory, R as RpcBlock, x as RpcLog, an as LogTopic, y as RpcTransaction, z as RpcTransactionReceipt, G as RpcUncle } from './chain-5b28fc53.js';
|
3
3
|
|
4
4
|
declare class RpcError extends Error {
|
5
5
|
code: number;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Abi, Narrow } from 'abitype';
|
2
|
-
import { H as Hex, A as AbiItem, m as ExtractEventNameFromAbi, l as ExtractEventArgsFromTopics, n as ExtractFunctionNameFromAbi, E as ExtractArgsFromAbi, p as ExtractResultFromAbi, h as ExtractConstructorArgsFromAbi, j as ExtractErrorNameFromAbi, i as ExtractErrorArgsFromAbi, k as ExtractEventArgsFromAbi } from './chain-
|
2
|
+
import { H as Hex, A as AbiItem, m as ExtractEventNameFromAbi, l as ExtractEventArgsFromTopics, n as ExtractFunctionNameFromAbi, E as ExtractArgsFromAbi, p as ExtractResultFromAbi, h as ExtractConstructorArgsFromAbi, j as ExtractErrorNameFromAbi, i as ExtractErrorArgsFromAbi, k as ExtractEventArgsFromAbi } from './chain-5b28fc53.js';
|
3
3
|
|
4
4
|
type DecodeErrorResultParameters = {
|
5
5
|
abi?: Abi;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Narrow, SolidityAddress, SolidityBool, SolidityBytes, SolidityInt, SolidityString, SolidityArrayWithoutTuple, AbiType, AbiParameterToPrimitiveType } from 'abitype';
|
2
|
-
import { H as Hex } from './chain-
|
2
|
+
import { H as Hex } from './chain-5b28fc53.js';
|
3
3
|
|
4
4
|
type PackedAbiType = SolidityAddress | SolidityBool | SolidityBytes | SolidityInt | SolidityString | SolidityArrayWithoutTuple;
|
5
5
|
type EncodePackedValues<TPackedAbiTypes extends PackedAbiType[] | unknown[]> = {
|
package/dist/ens.d.ts
CHANGED
@@ -1,11 +1,12 @@
|
|
1
|
-
export {
|
1
|
+
export { a$ as GetEnsAddressParameters, b0 as GetEnsNameParameters, b1 as getEnsAddress, b2 as getEnsName } from './watchPendingTransactions-ad90553c.js';
|
2
2
|
export { l as labelhash, n as namehash } from './namehash-afff0feb.js';
|
3
|
-
import './
|
3
|
+
import './createClient-e52de308.js';
|
4
|
+
import './eip1193-9080db42.js';
|
4
5
|
import 'abitype';
|
5
|
-
import './chain-
|
6
|
+
import './chain-5b28fc53.js';
|
6
7
|
import '@wagmi/chains';
|
7
|
-
import './
|
8
|
-
import '
|
8
|
+
import './typedData-42b43450.js';
|
9
|
+
import '@scure/bip32';
|
9
10
|
|
10
11
|
/**
|
11
12
|
* @description Normalizes ENS name
|
package/dist/ens.js
CHANGED
@@ -3,8 +3,8 @@
|
|
3
3
|
|
4
4
|
|
5
5
|
|
6
|
-
var
|
7
|
-
require('./chunk-
|
6
|
+
var _chunkCXE4XSMFjs = require('./chunk-CXE4XSMF.js');
|
7
|
+
require('./chunk-564BCC7H.js');
|
8
8
|
|
9
9
|
// src/utils/ens/normalize.ts
|
10
10
|
var _idnauts46hx = require('idna-uts46-hx');
|
@@ -17,5 +17,5 @@ function normalize(name) {
|
|
17
17
|
|
18
18
|
|
19
19
|
|
20
|
-
exports.getEnsAddress =
|
20
|
+
exports.getEnsAddress = _chunkCXE4XSMFjs.getEnsAddress; exports.getEnsName = _chunkCXE4XSMFjs.getEnsName; exports.labelhash = _chunkCXE4XSMFjs.labelhash; exports.namehash = _chunkCXE4XSMFjs.namehash; exports.normalize = normalize;
|
21
21
|
//# sourceMappingURL=ens.js.map
|
package/dist/ens.mjs
CHANGED
package/dist/ethers.d.ts
CHANGED
@@ -1,6 +1,7 @@
|
|
1
|
-
import { L as LocalAccount } from './
|
1
|
+
import { L as LocalAccount } from './typedData-42b43450.js';
|
2
|
+
import '@scure/bip32';
|
2
3
|
import 'abitype';
|
3
|
-
import './chain-
|
4
|
+
import './chain-5b28fc53.js';
|
4
5
|
import '@wagmi/chains';
|
5
6
|
|
6
7
|
type BigNumberish = string | number | bigint;
|
@@ -27,6 +28,6 @@ type EthersWallet = {
|
|
27
28
|
signTypedData?: never;
|
28
29
|
_signTypedData(domain: TypedDataDomain, types: Record<string, TypedDataField[]>, value: Record<string, any>): Promise<string>;
|
29
30
|
});
|
30
|
-
declare const
|
31
|
+
declare const ethersWalletToAccount: (wallet: EthersWallet) => LocalAccount<"custom", `0x${string}`>;
|
31
32
|
|
32
|
-
export {
|
33
|
+
export { ethersWalletToAccount };
|
package/dist/ethers.js
CHANGED
@@ -1,13 +1,15 @@
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
2
2
|
|
3
|
+
var _chunkD3ALNUWNjs = require('./chunk-D3ALNUWN.js');
|
3
4
|
|
4
|
-
|
5
|
+
|
6
|
+
var _chunk564BCC7Hjs = require('./chunk-564BCC7H.js');
|
5
7
|
|
6
8
|
// src/adapters/ethers.ts
|
7
|
-
var
|
9
|
+
var ethersWalletToAccount = (wallet) => _chunkD3ALNUWNjs.toAccount.call(void 0, {
|
8
10
|
address: wallet.address,
|
9
|
-
async signMessage(message) {
|
10
|
-
return await wallet.signMessage(
|
11
|
+
async signMessage({ message }) {
|
12
|
+
return await wallet.signMessage(_chunk564BCC7Hjs.toBytes.call(void 0, message));
|
11
13
|
},
|
12
14
|
async signTransaction(txn) {
|
13
15
|
return await wallet.signTransaction({
|
@@ -27,5 +29,5 @@ var getAccount2 = (wallet) => _chunkT4AH4Y6Yjs.getAccount.call(void 0, {
|
|
27
29
|
});
|
28
30
|
|
29
31
|
|
30
|
-
exports.
|
32
|
+
exports.ethersWalletToAccount = ethersWalletToAccount;
|
31
33
|
//# sourceMappingURL=ethers.js.map
|
package/dist/ethers.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/adapters/ethers.ts"],"names":[
|
1
|
+
{"version":3,"sources":["../src/adapters/ethers.ts"],"names":[],"mappings":";;;;;;;;AA0CO,IAAM,wBAAwB,CAAC,WACpC,UAAU;AAAA,EACR,SAAS,OAAO;AAAA,EAChB,MAAM,YAAY,EAAE,QAAQ,GAAG;AAC7B,WAAQ,MAAM,OAAO,YAAY,QAAQ,OAAO,CAAC;AAAA,EACnD;AAAA,EACA,MAAM,gBAAgB,KAAK;AACzB,WAAQ,MAAM,OAAO,gBAAgB;AAAA,MACnC,GAAG;AAAA,MACH,UAAU,IAAI;AAAA,IAChB,CAAC;AAAA,EACH;AAAA,EACA,MAAM,cAAc,EAAE,QAAQ,OAAO,QAAQ,QAAQ,GAAG;AACtD,UAAM,EAAE,cAAc,GAAG,GAAG,MAAM,IAAI;AACtC,UAAM,gBAAgB,OAAO,gBACzB,OAAO,cAAc,KAAK,MAAM,IAChC,OAAO,eAAe,KAAK,MAAM;AACrC,WAAQ,MAAM;AAAA,MACZ,UAAU,CAAC;AAAA,MACX;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF,CAAC","sourcesContent":["import { toAccount } from '../accounts/toAccount'\nimport type { Address, Hash } from '../types'\nimport { toBytes } from '../utils'\n\ntype BigNumberish = string | number | bigint\ntype BytesLike = string | Uint8Array\n\ntype TypedDataDomain = {\n name?: string\n version?: string\n chainId?: BigNumberish\n verifyingContract?: string\n salt?: BytesLike\n}\ntype TypedDataField = {\n name: string\n type: string\n}\n\ntype EthersWallet = {\n address: string\n signMessage(message: Uint8Array): Promise<string>\n signTransaction(txn: any): Promise<string>\n} & (\n | {\n signTypedData(\n domain: TypedDataDomain,\n types: Record<string, TypedDataField[]>,\n value: Record<string, any>,\n ): Promise<string>\n _signTypedData?: never\n }\n | {\n signTypedData?: never\n _signTypedData(\n domain: TypedDataDomain,\n types: Record<string, TypedDataField[]>,\n value: Record<string, any>,\n ): Promise<string>\n }\n)\n\nexport const ethersWalletToAccount = (wallet: EthersWallet) =>\n toAccount({\n address: wallet.address as Address,\n async signMessage({ message }) {\n return (await wallet.signMessage(toBytes(message))) as Hash\n },\n async signTransaction(txn) {\n return (await wallet.signTransaction({\n ...txn,\n gasLimit: txn.gas,\n })) as Hash\n },\n async signTypedData({ domain, types: types_, message }) {\n const { EIP712Domain: _, ...types } = types_ as any\n const signTypedData = wallet.signTypedData\n ? wallet.signTypedData.bind(wallet)\n : wallet._signTypedData.bind(wallet)\n return (await signTypedData(\n domain ?? {},\n types as Record<string, TypedDataField[]>,\n message,\n )) as Hash\n },\n })\n"]}
|
package/dist/ethers.mjs
CHANGED
@@ -1,12 +1,14 @@
|
|
1
1
|
import {
|
2
|
-
|
2
|
+
toAccount
|
3
|
+
} from "./chunk-7QEOFHC7.mjs";
|
4
|
+
import {
|
3
5
|
toBytes
|
4
|
-
} from "./chunk-
|
6
|
+
} from "./chunk-UCZWRYV5.mjs";
|
5
7
|
|
6
8
|
// src/adapters/ethers.ts
|
7
|
-
var
|
9
|
+
var ethersWalletToAccount = (wallet) => toAccount({
|
8
10
|
address: wallet.address,
|
9
|
-
async signMessage(message) {
|
11
|
+
async signMessage({ message }) {
|
10
12
|
return await wallet.signMessage(toBytes(message));
|
11
13
|
},
|
12
14
|
async signTransaction(txn) {
|
@@ -26,6 +28,6 @@ var getAccount2 = (wallet) => getAccount({
|
|
26
28
|
}
|
27
29
|
});
|
28
30
|
export {
|
29
|
-
|
31
|
+
ethersWalletToAccount
|
30
32
|
};
|
31
33
|
//# sourceMappingURL=ethers.mjs.map
|
package/dist/ethers.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/adapters/ethers.ts"],"sourcesContent":["import type { Address, Hash } from '../types'\nimport {
|
1
|
+
{"version":3,"sources":["../src/adapters/ethers.ts"],"sourcesContent":["import { toAccount } from '../accounts/toAccount'\nimport type { Address, Hash } from '../types'\nimport { toBytes } from '../utils'\n\ntype BigNumberish = string | number | bigint\ntype BytesLike = string | Uint8Array\n\ntype TypedDataDomain = {\n name?: string\n version?: string\n chainId?: BigNumberish\n verifyingContract?: string\n salt?: BytesLike\n}\ntype TypedDataField = {\n name: string\n type: string\n}\n\ntype EthersWallet = {\n address: string\n signMessage(message: Uint8Array): Promise<string>\n signTransaction(txn: any): Promise<string>\n} & (\n | {\n signTypedData(\n domain: TypedDataDomain,\n types: Record<string, TypedDataField[]>,\n value: Record<string, any>,\n ): Promise<string>\n _signTypedData?: never\n }\n | {\n signTypedData?: never\n _signTypedData(\n domain: TypedDataDomain,\n types: Record<string, TypedDataField[]>,\n value: Record<string, any>,\n ): Promise<string>\n }\n)\n\nexport const ethersWalletToAccount = (wallet: EthersWallet) =>\n toAccount({\n address: wallet.address as Address,\n async signMessage({ message }) {\n return (await wallet.signMessage(toBytes(message))) as Hash\n },\n async signTransaction(txn) {\n return (await wallet.signTransaction({\n ...txn,\n gasLimit: txn.gas,\n })) as Hash\n },\n async signTypedData({ domain, types: types_, message }) {\n const { EIP712Domain: _, ...types } = types_ as any\n const signTypedData = wallet.signTypedData\n ? wallet.signTypedData.bind(wallet)\n : wallet._signTypedData.bind(wallet)\n return (await signTypedData(\n domain ?? {},\n types as Record<string, TypedDataField[]>,\n message,\n )) as Hash\n },\n })\n"],"mappings":";;;;;;;;AA0CO,IAAM,wBAAwB,CAAC,WACpC,UAAU;AAAA,EACR,SAAS,OAAO;AAAA,EAChB,MAAM,YAAY,EAAE,QAAQ,GAAG;AAC7B,WAAQ,MAAM,OAAO,YAAY,QAAQ,OAAO,CAAC;AAAA,EACnD;AAAA,EACA,MAAM,gBAAgB,KAAK;AACzB,WAAQ,MAAM,OAAO,gBAAgB;AAAA,MACnC,GAAG;AAAA,MACH,UAAU,IAAI;AAAA,IAChB,CAAC;AAAA,EACH;AAAA,EACA,MAAM,cAAc,EAAE,QAAQ,OAAO,QAAQ,QAAQ,GAAG;AACtD,UAAM,EAAE,cAAc,GAAG,GAAG,MAAM,IAAI;AACtC,UAAM,gBAAgB,OAAO,gBACzB,OAAO,cAAc,KAAK,MAAM,IAChC,OAAO,eAAe,KAAK,MAAM;AACrC,WAAQ,MAAM;AAAA,MACZ,UAAU,CAAC;AAAA,MACX;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF,CAAC;","names":[]}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { AbiParameter, AbiParametersToPrimitiveTypes, Narrow, Abi } from 'abitype';
|
2
|
-
import { H as Hex, o as ExtractNameFromAbi, E as ExtractArgsFromAbi } from './chain-
|
2
|
+
import { H as Hex, o as ExtractNameFromAbi, E as ExtractArgsFromAbi } from './chain-5b28fc53.js';
|
3
3
|
|
4
4
|
type DecodeAbiParametersReturnType<TParams extends readonly AbiParameter[] | readonly unknown[] = readonly AbiParameter[]> = AbiParametersToPrimitiveTypes<TParams extends readonly AbiParameter[] ? TParams : AbiParameter[]>;
|
5
5
|
declare function decodeAbiParameters<TParams extends readonly AbiParameter[] | readonly unknown[]>(params: Narrow<TParams>, data: Hex): DecodeAbiParametersReturnType<TParams>;
|
package/dist/index.d.ts
CHANGED
@@ -1,21 +1,22 @@
|
|
1
|
-
|
2
|
-
export { C as Client, b as ClientConfig, a as Transport, T as TransportConfig, c as createClient, d as createTransport } from './createClient-d4f1dea1.js';
|
3
|
-
import { B as BaseError, H as HttpOptions, R as RpcResponse } from './parseGwei-f930d155.js';
|
4
|
-
export { B as BaseError, C as CallExecutionError, a as ContractFunctionExecutionError, b as ContractFunctionRevertedError, c as ContractFunctionZeroDataError, E as EstimateGasExecutionError, d as ExecutionRevertedError, F as FeeCapTooHighError, e as FeeCapTooLowError, G as GetContractAddressOptions, o as GetCreate2AddressOptions, p as GetCreateAddressOptions, q as HashTypedDataParameters, r as HashTypedDataReturnType, I as InsufficientFundsError, f as IntrinsicGasTooHighError, g as IntrinsicGasTooLowError, N as NonceMaxValueError, h as NonceTooHighError, i as NonceTooLowError, j as RawContractError, s as RecoverAddressParameters, t as RecoverAddressReturnType, u as RecoverMessageAddressParameters, v as RecoverMessageAddressReturnType, w as RecoverTypedDataAddressParameters, x as RecoverTypedDataAddressReturnType, T as TipAboveFeeCapError, y as ToRlpReturnType, k as TransactionExecutionError, m as TransactionNotFoundError, n as TransactionReceiptNotFoundError, l as TransactionTypeNotSupportedError, U as UnknownNodeError, V as VerifyMessageParameters, z as VerifyMessageReturnType, A as VerifyTypedDataParameters, D as VerifyTypedDataReturnType, W as WaitForTransactionReceiptTimeoutError, J as boolToBytes, K as boolToHex, L as bytesToBigint, M as bytesToBool, O as bytesToHex, P as bytesToNumber, Q as bytesToString, S as concat, X as concatBytes, Y as concatHex, Z as formatEther, _ as formatGwei, $ as formatUnits, a0 as fromBytes, a1 as fromHex, a2 as fromRlp, a3 as getAccount, a4 as getAddress, a5 as getContractAddress, a6 as getContractError, a7 as getCreate2Address, a8 as getCreateAddress, a9 as getEventSelector, aa as getFunctionSelector, ab as hashMessage, ac as hashTypedData, ad as hexToBigInt, ae as hexToBool, af as hexToBytes, ag as hexToNumber, ah as hexToString, ai as isAddress, aj as isAddressEqual, ak as isBytes, al as isHex, am as keccak256, an as numberToBytes, ao as numberToHex, ap as pad, aq as padBytes, ar as padHex, as as parseEther, at as parseGwei, au as parseUnits, av as recoverAddress, aw as recoverMessageAddress, ax as size, ay as slice, az as sliceBytes, aA as sliceHex, aB as stringToBytes, aC as stringToHex, aD as stringify, aE as toBytes, aF as toHex, aG as toRlp, aH as trim, aI as verifyMessage } from './parseGwei-f930d155.js';
|
5
|
-
import WebSocket from 'isomorphic-ws';
|
6
|
-
import { H as Hex, A as AbiItem, a as Hash, C as Chain, B as ByteArray } from './chain-b2e88e30.js';
|
7
|
-
export { A as AbiItem, b as AccessList, c as Block, d as BlockIdentifier, e as BlockNumber, f as BlockTag, B as ByteArray, C as Chain, g as ContractConfig, E as ExtractArgsFromAbi, h as ExtractConstructorArgsFromAbi, i as ExtractErrorArgsFromAbi, j as ExtractErrorNameFromAbi, k as ExtractEventArgsFromAbi, l as ExtractEventArgsFromTopics, m as ExtractEventNameFromAbi, W as ExtractFormatter, n as ExtractFunctionNameFromAbi, o as ExtractNameFromAbi, p as ExtractResultFromAbi, F as FeeHistory, q as FeeValues, r as FeeValuesEIP1559, s as FeeValuesLegacy, X as Formatted, Y as FormattedTransaction, a as Hash, H as Hex, L as Log, R as RpcBlock, t as RpcBlockIdentifier, u as RpcBlockNumber, v as RpcFeeHistory, w as RpcFeeValues, x as RpcLog, y as RpcTransaction, z as RpcTransactionReceipt, D as RpcTransactionRequest, G as RpcUncle, O as Transaction, P as TransactionBase, Q as TransactionEIP1559, S as TransactionEIP2930, Z as TransactionFormatter, U as TransactionLegacy, T as TransactionReceipt, I as TransactionRequest, J as TransactionRequestBase, K as TransactionRequestEIP1559, M as TransactionRequestEIP2930, N as TransactionRequestLegacy, V as Uncle, _ as defineTransaction, $ as formatTransaction, a0 as transactionType } from './chain-b2e88e30.js';
|
8
|
-
export { B as BlockFormatter, F as FormattedBlock, e as FormattedTransactionReceipt, f as FormattedTransactionRequest, P as PublicClient, a as PublicClientConfig, T as TransactionReceiptFormatter, g as TransactionRequestFormatter, W as WalletClient, b as WalletClientConfig, c as createPublicClient, d as createWalletClient, h as defineBlock, i as defineTransactionReceipt, j as defineTransactionRequest, k as formatBlock, l as formatTransactionRequest } from './createPublicClient-3a714a8d.js';
|
9
|
-
export { T as TestClient, a as TestClientConfig, c as createTestClient } from './test-c70126a6.js';
|
1
|
+
export { A as AddChainParameters, aC as BlockFormatter, C as CallParameters, a as CallReturnType, b as CreateBlockFilterReturnType, c as CreateContractEventFilterParameters, d as CreateContractEventFilterReturnType, e as CreateEventFilterParameters, f as CreateEventFilterReturnType, g as CreatePendingTransactionFilterReturnType, D as DeployContractParameters, h as DeployContractReturnType, E as EstimateGasParameters, i as EstimateGasReturnType, aD as FormattedBlock, aE as FormattedTransactionReceipt, aF as FormattedTransactionRequest, G as GetAddressesReturnType, j as GetBalanceParameters, k as GetBalanceReturnType, l as GetBlockNumberParameters, m as GetBlockNumberReturnType, n as GetBlockParameters, o as GetBlockReturnType, p as GetBlockTransactionCountParameters, q as GetBlockTransactionCountReturnType, r as GetBytecodeParameters, s as GetBytecodeReturnType, t as GetFeeHistoryParameters, u as GetFeeHistoryReturnType, v as GetFilterChangesParameters, w as GetFilterChangesReturnType, x as GetFilterLogsParameters, y as GetFilterLogsReturnType, z as GetGasPriceReturnType, B as GetLogsParameters, F as GetLogsReturnType, H as GetPermissionsReturnType, I as GetStorageAtParameters, J as GetStorageAtReturnType, K as GetTransactionConfirmationsParameters, M as GetTransactionConfirmationsReturnType, L as GetTransactionCountParameters, N as GetTransactionCountReturnType, O as GetTransactionParameters, P as GetTransactionReceiptParameters, Q as GetTransactionReceiptReturnType, R as GetTransactionReturnType, aA as GetTransportConfig, S as MulticallParameters, T as OnBlock, U as OnBlockNumberFn, V as OnBlockNumberParameter, W as OnBlockParameter, X as OnLogsFn, Y as OnLogsParameter, Z as OnTransactionsFn, _ as OnTransactionsParameter, aB as ParseAccount, au as PublicClient, av as PublicClientConfig, $ as ReadContractParameters, a0 as ReadContractReturnType, a1 as ReplacementReason, a2 as ReplacementReturnType, a3 as RequestAddressesReturnType, a4 as RequestPermissionsReturnType, a5 as SendTransactionParameters, a6 as SendTransactionReturnType, a7 as SignMessageParameters, a8 as SignMessageReturnType, a9 as SimulateContractParameters, aa as SimulateContractReturnType, ab as SwitchChainParameters, aG as TransactionReceiptFormatter, aH as TransactionRequestFormatter, ac as UninstallFilterParameters, ad as UninstallFilterReturnType, ae as WaitForTransactionReceiptParameters, af as WaitForTransactionReceiptReturnType, aw as WalletClient, ax as WalletClientConfig, ag as WatchAssetParameters, ah as WatchAssetReturnType, ai as WatchBlockNumberParameters, aj as WatchBlockNumberReturnType, ak as WatchBlocksParameters, al as WatchBlocksReturnType, am as WatchContractEventParameters, an as WatchContractEventReturnType, ao as WatchEventParameters, ap as WatchEventReturnType, aq as WatchPendingTransactionsParameters, ar as WatchPendingTransactionsReturnType, as as WriteContractParameters, at as WriteContractReturnType, ay as createPublicClient, az as createWalletClient, aI as defineBlock, aJ as defineTransactionReceipt, aK as defineTransactionRequest, aL as formatBlock, aM as formatTransactionRequest } from './watchPendingTransactions-ad90553c.js';
|
10
2
|
import { AbiParameter } from 'abitype';
|
11
3
|
export { Address, ParseAbi, ParseAbiItem, ParseAbiParameter, ParseAbiParameters, parseAbi, parseAbiItem, parseAbiParameter, parseAbiParameters } from 'abitype';
|
12
|
-
|
4
|
+
import { T as TransportConfig, a as Transport, B as BaseRpcRequests } from './createClient-e52de308.js';
|
5
|
+
export { C as Client, b as ClientConfig, a as Transport, T as TransportConfig, c as createClient, d as createTransport } from './createClient-e52de308.js';
|
6
|
+
import { B as BaseError, H as HttpOptions, R as RpcResponse } from './parseGwei-85b2bbc3.js';
|
7
|
+
export { B as BaseError, C as CallExecutionError, a as ContractFunctionExecutionError, b as ContractFunctionRevertedError, c as ContractFunctionZeroDataError, E as EstimateGasExecutionError, d as ExecutionRevertedError, F as FeeCapTooHighError, e as FeeCapTooLowError, G as GetContractAddressOptions, p as GetCreate2AddressOptions, q as GetCreateAddressOptions, r as GetSerializedTransactionType, s as GetTransactionType, t as HashTypedDataParameters, u as HashTypedDataReturnType, I as InsufficientFundsError, f as IntrinsicGasTooHighError, g as IntrinsicGasTooLowError, h as InvalidLegacyVError, N as NonceMaxValueError, i as NonceTooHighError, j as NonceTooLowError, k as RawContractError, v as RecoverAddressParameters, w as RecoverAddressReturnType, x as RecoverMessageAddressParameters, y as RecoverMessageAddressReturnType, z as RecoverTypedDataAddressParameters, A as RecoverTypedDataAddressReturnType, T as TipAboveFeeCapError, D as ToRlpReturnType, l as TransactionExecutionError, n as TransactionNotFoundError, o as TransactionReceiptNotFoundError, m as TransactionTypeNotSupportedError, U as UnknownNodeError, V as VerifyMessageParameters, J as VerifyMessageReturnType, K as VerifyTypedDataParameters, L as VerifyTypedDataReturnType, W as WaitForTransactionReceiptTimeoutError, M as assertRequest, O as assertTransactionEIP1559, P as assertTransactionEIP2930, Q as assertTransactionLegacy, S as boolToBytes, X as boolToHex, Y as bytesToBigint, Z as bytesToBool, _ as bytesToHex, $ as bytesToNumber, a0 as bytesToString, a1 as concat, a2 as concatBytes, a3 as concatHex, a4 as formatEther, a5 as formatGwei, a6 as formatUnits, a7 as fromBytes, a8 as fromHex, a9 as fromRlp, aa as getAddress, ab as getContractAddress, ac as getContractError, ad as getCreate2Address, ae as getCreateAddress, af as getEventSelector, ag as getFunctionSelector, ah as getSerializedTransactionType, ai as getTransactionType, aj as hashMessage, ak as hashTypedData, al as hexToBigInt, am as hexToBool, an as hexToBytes, ao as hexToNumber, ap as hexToString, aq as isAddress, ar as isAddressEqual, as as isBytes, at as isHash, au as isHex, av as keccak256, aw as numberToBytes, ax as numberToHex, ay as pad, az as padBytes, aA as padHex, aB as parseEther, aC as parseGwei, aD as parseTransaction, aE as parseUnits, aF as prepareRequest, aG as recoverAddress, aH as recoverMessageAddress, aI as serializeTransaction, aJ as size, aK as slice, aL as sliceBytes, aM as sliceHex, aN as stringToBytes, aO as stringToHex, aP as stringify, aQ as toBytes, aR as toHex, aS as toRlp, aT as trim, aU as validateTypedData, aV as verifyMessage } from './parseGwei-85b2bbc3.js';
|
8
|
+
import WebSocket from 'isomorphic-ws';
|
9
|
+
import { H as Hex, A as AbiItem, a as Hash, C as Chain, B as ByteArray } from './chain-5b28fc53.js';
|
10
|
+
export { A as AbiItem, b as AccessList, c as Block, d as BlockIdentifier, e as BlockNumber, f as BlockTag, B as ByteArray, C as Chain, g as ContractConfig, E as ExtractArgsFromAbi, h as ExtractConstructorArgsFromAbi, i as ExtractErrorArgsFromAbi, j as ExtractErrorNameFromAbi, k as ExtractEventArgsFromAbi, l as ExtractEventArgsFromTopics, m as ExtractEventNameFromAbi, a4 as ExtractFormatter, n as ExtractFunctionNameFromAbi, o as ExtractNameFromAbi, p as ExtractResultFromAbi, F as FeeHistory, q as FeeValues, r as FeeValuesEIP1559, s as FeeValuesLegacy, a5 as Formatted, a6 as FormattedTransaction, a as Hash, H as Hex, L as Log, R as RpcBlock, t as RpcBlockIdentifier, u as RpcBlockNumber, v as RpcFeeHistory, w as RpcFeeValues, x as RpcLog, y as RpcTransaction, z as RpcTransactionReceipt, D as RpcTransactionRequest, G as RpcUncle, T as Transaction, J as TransactionBase, K as TransactionEIP1559, M as TransactionEIP2930, a7 as TransactionFormatter, N as TransactionLegacy, O as TransactionReceipt, P as TransactionRequest, Q as TransactionRequestBase, S as TransactionRequestEIP1559, U as TransactionRequestEIP2930, V as TransactionRequestLegacy, W as TransactionSerializable, X as TransactionSerializableBase, Y as TransactionSerializableEIP1559, Z as TransactionSerializableEIP2930, _ as TransactionSerializableLegacy, $ as TransactionSerialized, a0 as TransactionSerializedEIP1559, a1 as TransactionSerializedEIP2930, a2 as TransactionSerializedLegacy, I as TransactionType, a3 as Uncle, a8 as defineTransaction, a9 as formatTransaction, aa as transactionType } from './chain-5b28fc53.js';
|
11
|
+
export { D as DropTransactionParameters, I as ImpersonateAccountParameters, a as IncreaseTimeParameters, M as MineParameters, R as ResetParameters, b as RevertParameters, S as SendUnsignedTransactionParameters, c as SendUnsignedTransactionReturnType, d as SetBalanceParameters, e as SetBlockGasLimitParameters, f as SetBlockTimestampIntervalParameters, g as SetCodeParameters, h as SetCoinbaseParameters, i as SetIntervalMiningParameters, j as SetMinGasPriceParameters, k as SetNextBlockBaseFeePerGasParameters, l as SetNextBlockTimestampParameters, m as SetNonceParameters, n as SetStorageAtParameters, o as StopImpersonatingAccountParameters, T as TestClient, p as TestClientConfig, q as createTestClient } from './test-f3d06763.js';
|
13
12
|
export { l as labelhash, n as namehash } from './namehash-afff0feb.js';
|
14
|
-
export { D as DecodeAbiParametersReturnType, E as EncodeAbiParametersReturnType, G as GetAbiItemParameters, d as decodeAbiParameters, e as encodeAbiParameters, g as getAbiItem } from './getAbiItem-
|
15
|
-
export { D as DecodeErrorResultParameters, a as DecodeErrorResultReturnType, b as DecodeEventLogParameters, c as DecodeEventLogReturnType, d as DecodeFunctionDataParameters, e as DecodeFunctionResultParameters, f as DecodeFunctionResultReturnType, E as EncodeDeployDataParameters, g as EncodeErrorResultParameters, h as EncodeEventTopicsParameters, i as EncodeFunctionDataParameters, j as EncodeFunctionResultParameters, k as decodeErrorResult, l as decodeEventLog, m as decodeFunctionData, n as decodeFunctionResult, o as encodeDeployData, p as encodeErrorResult, q as encodeEventTopics, r as encodeFunctionData, s as encodeFunctionResult } from './encodeFunctionResult-
|
16
|
-
export { e as encodePacked } from './encodePacked-
|
17
|
-
export {
|
18
|
-
|
13
|
+
export { D as DecodeAbiParametersReturnType, E as EncodeAbiParametersReturnType, G as GetAbiItemParameters, d as decodeAbiParameters, e as encodeAbiParameters, g as getAbiItem } from './getAbiItem-1d94ae0e.js';
|
14
|
+
export { D as DecodeErrorResultParameters, a as DecodeErrorResultReturnType, b as DecodeEventLogParameters, c as DecodeEventLogReturnType, d as DecodeFunctionDataParameters, e as DecodeFunctionResultParameters, f as DecodeFunctionResultReturnType, E as EncodeDeployDataParameters, g as EncodeErrorResultParameters, h as EncodeEventTopicsParameters, i as EncodeFunctionDataParameters, j as EncodeFunctionResultParameters, k as decodeErrorResult, l as decodeEventLog, m as decodeFunctionData, n as decodeFunctionResult, o as encodeDeployData, p as encodeErrorResult, q as encodeEventTopics, r as encodeFunctionData, s as encodeFunctionResult } from './encodeFunctionResult-47ad60ed.js';
|
15
|
+
export { e as encodePacked } from './encodePacked-35c796fb.js';
|
16
|
+
export { A as Account, a as AccountSource, C as CustomSource, H as HDAccount, b as HDOptions, J as JsonRpcAccount, L as LocalAccount } from './typedData-42b43450.js';
|
17
|
+
export { d as defineChain } from './chain-e9b996ff.js';
|
18
|
+
export { HDKey } from '@scure/bip32';
|
19
|
+
import './eip1193-9080db42.js';
|
19
20
|
import '@wagmi/chains';
|
20
21
|
|
21
22
|
declare class AbiConstructorNotFoundError extends BaseError {
|
@@ -163,6 +164,12 @@ declare class ChainDoesNotSupportContract extends BaseError {
|
|
163
164
|
};
|
164
165
|
});
|
165
166
|
}
|
167
|
+
declare class InvalidChainIdError extends BaseError {
|
168
|
+
name: string;
|
169
|
+
constructor({ chainId }: {
|
170
|
+
chainId: number;
|
171
|
+
});
|
172
|
+
}
|
166
173
|
|
167
174
|
declare class SizeExceedsPaddingSizeError extends BaseError {
|
168
175
|
name: string;
|
@@ -502,4 +509,4 @@ declare const weiUnits: {
|
|
502
509
|
gwei: number;
|
503
510
|
};
|
504
511
|
|
505
|
-
export { AbiConstructorNotFoundError, AbiConstructorParamsNotFoundError, AbiDecodingDataSizeInvalidError, AbiDecodingZeroDataError, AbiEncodingArrayLengthMismatchError, AbiEncodingLengthMismatchError, AbiErrorInputsNotFoundError, AbiErrorNotFoundError, AbiErrorSignatureNotFoundError, AbiEventNotFoundError, AbiEventSignatureEmptyTopicsError, AbiEventSignatureNotFoundError, AbiFunctionNotFoundError, AbiFunctionOutputsNotFoundError, AbiFunctionSignatureNotFoundError, BlockNotFoundError, ChainDoesNotSupportContract, CustomTransport, CustomTransportConfig, DataLengthTooLongError, DataLengthTooShortError, DecodeLogTopicsMismatch, FallbackTransport, FallbackTransportConfig, FilterTypeNotSupportedError, HttpRequestError, HttpTransport, HttpTransportConfig, InternalRpcError, InvalidAbiDecodingTypeError, InvalidAbiEncodingTypeError, InvalidAddressError, InvalidArrayError, InvalidBytesBooleanError, InvalidDefinitionTypeError, InvalidHexBooleanError, InvalidHexValueError, InvalidInputRpcError, InvalidParamsRpcError, InvalidRequestRpcError, JsonRpcVersionUnsupportedError, LimitExceededRpcError, MethodNotFoundRpcError, MethodNotSupportedRpcError, OffsetOutOfBoundsError, ParseRpcError, RequestError, ResourceNotFoundRpcError, ResourceUnavailableRpcError, RpcError, RpcRequestError, SizeExceedsPaddingSizeError, SwitchChainError, TimeoutError, TransactionRejectedRpcError, UnknownRpcError, UrlRequiredError, UserRejectedRequestError, WebSocketRequestError, WebSocketTransport, WebSocketTransportConfig, custom, etherUnits, fallback, gweiUnits, http, multicall3Abi, webSocket, weiUnits };
|
512
|
+
export { AbiConstructorNotFoundError, AbiConstructorParamsNotFoundError, AbiDecodingDataSizeInvalidError, AbiDecodingZeroDataError, AbiEncodingArrayLengthMismatchError, AbiEncodingLengthMismatchError, AbiErrorInputsNotFoundError, AbiErrorNotFoundError, AbiErrorSignatureNotFoundError, AbiEventNotFoundError, AbiEventSignatureEmptyTopicsError, AbiEventSignatureNotFoundError, AbiFunctionNotFoundError, AbiFunctionOutputsNotFoundError, AbiFunctionSignatureNotFoundError, BlockNotFoundError, ChainDoesNotSupportContract, CustomTransport, CustomTransportConfig, DataLengthTooLongError, DataLengthTooShortError, DecodeLogTopicsMismatch, FallbackTransport, FallbackTransportConfig, FilterTypeNotSupportedError, HttpRequestError, HttpTransport, HttpTransportConfig, InternalRpcError, InvalidAbiDecodingTypeError, InvalidAbiEncodingTypeError, InvalidAddressError, InvalidArrayError, InvalidBytesBooleanError, InvalidChainIdError, InvalidDefinitionTypeError, InvalidHexBooleanError, InvalidHexValueError, InvalidInputRpcError, InvalidParamsRpcError, InvalidRequestRpcError, JsonRpcVersionUnsupportedError, LimitExceededRpcError, MethodNotFoundRpcError, MethodNotSupportedRpcError, OffsetOutOfBoundsError, ParseRpcError, RequestError, ResourceNotFoundRpcError, ResourceUnavailableRpcError, RpcError, RpcRequestError, SizeExceedsPaddingSizeError, SwitchChainError, TimeoutError, TransactionRejectedRpcError, UnknownRpcError, UrlRequiredError, UserRejectedRequestError, WebSocketRequestError, WebSocketTransport, WebSocketTransportConfig, custom, etherUnits, fallback, gweiUnits, http, multicall3Abi, webSocket, weiUnits };
|