essential-eth 0.5.6 → 0.5.10-next.2
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/{lib/esm → dist}/classes/Contract.d.ts +11 -11
- package/dist/classes/test/Contract/crv-abi.d.ts +2 -0
- package/dist/classes/test/Contract/ens-abi.d.ts +2 -0
- package/dist/classes/test/Contract/fei-abi.d.ts +2 -0
- package/dist/classes/test/Contract/foo-abi.d.ts +2 -0
- package/dist/classes/test/Contract/uniswap-abi.d.ts +2 -0
- package/dist/classes/utils/clean-block.d.ts +3 -0
- package/dist/classes/utils/clean-log.d.ts +2 -0
- package/{lib/esm → dist}/classes/utils/clean-transaction-receipt.d.ts +2 -2
- package/{lib/esm → dist}/classes/utils/clean-transaction.d.ts +2 -2
- package/{lib/cjs → dist}/classes/utils/encode-decode-transaction.d.ts +4 -4
- package/{lib/cjs → dist}/classes/utils/fetchers.d.ts +9 -9
- package/{lib/esm → dist}/classes/utils/hex-to-decimal.d.ts +1 -1
- package/dist/classes/utils/prepare-transaction.d.ts +2 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/{lib/cjs → dist}/index.d.ts +25 -25
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/index.modern.js +2 -0
- package/dist/index.modern.js.map +1 -0
- package/dist/index.modern.mjs +2 -0
- package/dist/index.modern.mjs.map +1 -0
- package/dist/index.module.js +2 -0
- package/dist/index.module.js.map +1 -0
- package/dist/index.umd.js +2 -0
- package/dist/index.umd.js.map +1 -0
- package/{lib/esm → dist}/logger/logger.d.ts +11 -11
- package/dist/logger/package-version.d.ts +1 -0
- package/{lib/esm → dist}/providers/BaseProvider.d.ts +24 -21
- package/{lib/esm → dist}/providers/FallthroughProvider.d.ts +11 -11
- package/{lib/esm → dist}/providers/JsonRpcProvider.d.ts +7 -7
- package/{lib/cjs → dist}/providers/test/rpc-urls.d.ts +11 -11
- package/{lib/esm → dist}/providers/utils/chains-info.d.ts +467 -412
- package/{lib/cjs → dist}/shared/tiny-big/helpers.d.ts +1 -1
- package/{lib/esm → dist}/shared/tiny-big/tiny-big.d.ts +10 -10
- package/{lib/cjs → dist}/shared/validate-type.d.ts +3 -3
- package/{lib/cjs → dist}/types/Block.types.d.ts +40 -37
- package/{lib/cjs → dist}/types/Contract.types.d.ts +24 -24
- package/dist/types/Filter.types.d.ts +12 -0
- package/{lib/esm → dist}/types/Network.types.d.ts +5 -5
- package/{lib/cjs → dist}/types/Transaction.types.d.ts +113 -96
- package/{lib/esm → dist}/utils/bytes.d.ts +40 -40
- package/{lib/esm → dist}/utils/compute-address.d.ts +1 -1
- package/{lib/esm → dist}/utils/compute-public-key.d.ts +2 -2
- package/{lib/esm → dist}/utils/ether-to-gwei.d.ts +3 -3
- package/dist/utils/ether-to-wei.d.ts +3 -0
- package/dist/utils/gwei-to-ether.d.ts +3 -0
- package/{lib/esm → dist}/utils/hash-message.d.ts +2 -2
- package/{lib/esm → dist}/utils/is-address.d.ts +1 -1
- package/dist/utils/keccak256.d.ts +2 -0
- package/{lib/esm → dist}/utils/solidity-keccak256.d.ts +2 -2
- package/{lib/esm → dist}/utils/split-signature.d.ts +2 -2
- package/{lib/esm → dist}/utils/to-checksum-address.d.ts +1 -1
- package/{lib/cjs → dist}/utils/to-utf8-bytes.d.ts +1 -1
- package/dist/utils/wei-to-ether.d.ts +3 -0
- package/package.json +66 -19
- package/readme.md +643 -291
- package/lib/cjs/classes/Contract.d.ts +0 -72
- package/lib/cjs/classes/Contract.js +0 -129
- package/lib/cjs/classes/test/Contract/crv-abi.d.ts +0 -2
- package/lib/cjs/classes/test/Contract/crv-abi.js +0 -488
- package/lib/cjs/classes/test/Contract/ens-abi.d.ts +0 -2
- package/lib/cjs/classes/test/Contract/ens-abi.js +0 -453
- package/lib/cjs/classes/test/Contract/fei-abi.d.ts +0 -2
- package/lib/cjs/classes/test/Contract/fei-abi.js +0 -526
- package/lib/cjs/classes/test/Contract/foo-abi.d.ts +0 -2
- package/lib/cjs/classes/test/Contract/foo-abi.js +0 -42
- package/lib/cjs/classes/test/Contract/uniswap-abi.d.ts +0 -2
- package/lib/cjs/classes/test/Contract/uniswap-abi.js +0 -121
- package/lib/cjs/classes/utils/clean-block.d.ts +0 -6
- package/lib/cjs/classes/utils/clean-block.js +0 -47
- package/lib/cjs/classes/utils/clean-transaction-receipt.d.ts +0 -5
- package/lib/cjs/classes/utils/clean-transaction-receipt.js +0 -55
- package/lib/cjs/classes/utils/clean-transaction.d.ts +0 -5
- package/lib/cjs/classes/utils/clean-transaction.js +0 -42
- package/lib/cjs/classes/utils/encode-decode-transaction.js +0 -113
- package/lib/cjs/classes/utils/fetchers.js +0 -51
- package/lib/cjs/classes/utils/hex-to-decimal.d.ts +0 -5
- package/lib/cjs/classes/utils/hex-to-decimal.js +0 -11
- package/lib/cjs/index.js +0 -55
- package/lib/cjs/logger/logger.d.ts +0 -11
- package/lib/cjs/logger/logger.js +0 -36
- package/lib/cjs/logger/package-version.d.ts +0 -1
- package/lib/cjs/logger/package-version.js +0 -5
- package/lib/cjs/providers/BaseProvider.d.ts +0 -304
- package/lib/cjs/providers/BaseProvider.js +0 -405
- package/lib/cjs/providers/FallthroughProvider.d.ts +0 -24
- package/lib/cjs/providers/FallthroughProvider.js +0 -65
- package/lib/cjs/providers/JsonRpcProvider.d.ts +0 -27
- package/lib/cjs/providers/JsonRpcProvider.js +0 -40
- package/lib/cjs/providers/test/rpc-urls.js +0 -14
- package/lib/cjs/providers/types.d.ts +0 -7
- package/lib/cjs/providers/types.js +0 -2
- package/lib/cjs/providers/utils/chains-info.d.ts +0 -412
- package/lib/cjs/providers/utils/chains-info.js +0 -1237
- package/lib/cjs/shared/tiny-big/helpers.js +0 -71
- package/lib/cjs/shared/tiny-big/tiny-big.d.ts +0 -32
- package/lib/cjs/shared/tiny-big/tiny-big.js +0 -71
- package/lib/cjs/shared/validate-type.js +0 -9
- package/lib/cjs/types/Block.types.js +0 -2
- package/lib/cjs/types/Contract.types.js +0 -2
- package/lib/cjs/types/Network.types.d.ts +0 -8
- package/lib/cjs/types/Network.types.js +0 -2
- package/lib/cjs/types/Transaction.types.js +0 -2
- package/lib/cjs/utils/bytes.d.ts +0 -172
- package/lib/cjs/utils/bytes.js +0 -564
- package/lib/cjs/utils/compute-address.d.ts +0 -8
- package/lib/cjs/utils/compute-address.js +0 -24
- package/lib/cjs/utils/compute-public-key.d.ts +0 -9
- package/lib/cjs/utils/compute-public-key.js +0 -17
- package/lib/cjs/utils/ether-to-gwei.d.ts +0 -26
- package/lib/cjs/utils/ether-to-gwei.js +0 -34
- package/lib/cjs/utils/ether-to-wei.d.ts +0 -26
- package/lib/cjs/utils/ether-to-wei.js +0 -34
- package/lib/cjs/utils/gwei-to-ether.d.ts +0 -26
- package/lib/cjs/utils/gwei-to-ether.js +0 -34
- package/lib/cjs/utils/hash-message.d.ts +0 -12
- package/lib/cjs/utils/hash-message.js +0 -26
- package/lib/cjs/utils/is-address.d.ts +0 -24
- package/lib/cjs/utils/is-address.js +0 -39
- package/lib/cjs/utils/keccak256.d.ts +0 -2
- package/lib/cjs/utils/keccak256.js +0 -17
- package/lib/cjs/utils/solidity-keccak256.d.ts +0 -29
- package/lib/cjs/utils/solidity-keccak256.js +0 -118
- package/lib/cjs/utils/split-signature.d.ts +0 -26
- package/lib/cjs/utils/split-signature.js +0 -165
- package/lib/cjs/utils/to-checksum-address.d.ts +0 -17
- package/lib/cjs/utils/to-checksum-address.js +0 -46
- package/lib/cjs/utils/to-utf8-bytes.js +0 -7
- package/lib/cjs/utils/wei-to-ether.d.ts +0 -26
- package/lib/cjs/utils/wei-to-ether.js +0 -44
- package/lib/esm/classes/Contract.js +0 -65
- package/lib/esm/classes/test/Contract/crv-abi.d.ts +0 -2
- package/lib/esm/classes/test/Contract/crv-abi.js +0 -470
- package/lib/esm/classes/test/Contract/ens-abi.d.ts +0 -2
- package/lib/esm/classes/test/Contract/ens-abi.js +0 -435
- package/lib/esm/classes/test/Contract/fei-abi.d.ts +0 -2
- package/lib/esm/classes/test/Contract/fei-abi.js +0 -521
- package/lib/esm/classes/test/Contract/foo-abi.d.ts +0 -2
- package/lib/esm/classes/test/Contract/foo-abi.js +0 -33
- package/lib/esm/classes/test/Contract/uniswap-abi.d.ts +0 -2
- package/lib/esm/classes/test/Contract/uniswap-abi.js +0 -116
- package/lib/esm/classes/utils/clean-block.d.ts +0 -3
- package/lib/esm/classes/utils/clean-block.js +0 -36
- package/lib/esm/classes/utils/clean-transaction-receipt.js +0 -48
- package/lib/esm/classes/utils/clean-transaction.js +0 -33
- package/lib/esm/classes/utils/encode-decode-transaction.d.ts +0 -4
- package/lib/esm/classes/utils/encode-decode-transaction.js +0 -98
- package/lib/esm/classes/utils/fetchers.d.ts +0 -9
- package/lib/esm/classes/utils/fetchers.js +0 -43
- package/lib/esm/classes/utils/hex-to-decimal.js +0 -3
- package/lib/esm/index.d.ts +0 -25
- package/lib/esm/index.js +0 -21
- package/lib/esm/logger/logger.js +0 -33
- package/lib/esm/logger/package-version.d.ts +0 -1
- package/lib/esm/logger/package-version.js +0 -1
- package/lib/esm/providers/BaseProvider.js +0 -114
- package/lib/esm/providers/FallthroughProvider.js +0 -41
- package/lib/esm/providers/JsonRpcProvider.js +0 -15
- package/lib/esm/providers/test/rpc-urls.d.ts +0 -11
- package/lib/esm/providers/test/rpc-urls.js +0 -11
- package/lib/esm/providers/types.d.ts +0 -7
- package/lib/esm/providers/types.js +0 -1
- package/lib/esm/providers/utils/chains-info.js +0 -1233
- package/lib/esm/shared/tiny-big/helpers.d.ts +0 -1
- package/lib/esm/shared/tiny-big/helpers.js +0 -58
- package/lib/esm/shared/tiny-big/tiny-big.js +0 -41
- package/lib/esm/shared/validate-type.d.ts +0 -3
- package/lib/esm/shared/validate-type.js +0 -5
- package/lib/esm/types/Block.types.d.ts +0 -36
- package/lib/esm/types/Block.types.js +0 -1
- package/lib/esm/types/Contract.types.d.ts +0 -24
- package/lib/esm/types/Contract.types.js +0 -1
- package/lib/esm/types/Network.types.js +0 -1
- package/lib/esm/types/Transaction.types.d.ts +0 -87
- package/lib/esm/types/Transaction.types.js +0 -1
- package/lib/esm/utils/bytes.js +0 -245
- package/lib/esm/utils/compute-address.js +0 -11
- package/lib/esm/utils/compute-public-key.js +0 -6
- package/lib/esm/utils/ether-to-gwei.js +0 -7
- package/lib/esm/utils/ether-to-wei.d.ts +0 -3
- package/lib/esm/utils/ether-to-wei.js +0 -7
- package/lib/esm/utils/gwei-to-ether.d.ts +0 -3
- package/lib/esm/utils/gwei-to-ether.js +0 -7
- package/lib/esm/utils/hash-message.js +0 -12
- package/lib/esm/utils/is-address.js +0 -12
- package/lib/esm/utils/keccak256.d.ts +0 -2
- package/lib/esm/utils/keccak256.js +0 -13
- package/lib/esm/utils/solidity-keccak256.js +0 -85
- package/lib/esm/utils/split-signature.js +0 -126
- package/lib/esm/utils/to-checksum-address.js +0 -25
- package/lib/esm/utils/to-utf8-bytes.d.ts +0 -1
- package/lib/esm/utils/to-utf8-bytes.js +0 -3
- package/lib/esm/utils/wei-to-ether.d.ts +0 -3
- package/lib/esm/utils/wei-to-ether.js +0 -16
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
declare class Logger {
|
|
2
|
-
private packageVersion;
|
|
3
|
-
constructor();
|
|
4
|
-
throwError(message: string, args: {
|
|
5
|
-
[key: string]: any;
|
|
6
|
-
}): never;
|
|
7
|
-
throwArgumentError(message: string, arg: string, value: any): never;
|
|
8
|
-
checkSafeUint53(value: number, message?: string): void;
|
|
9
|
-
}
|
|
10
|
-
export declare const logger: Logger;
|
|
11
|
-
export {};
|
|
1
|
+
declare class Logger {
|
|
2
|
+
private packageVersion;
|
|
3
|
+
constructor();
|
|
4
|
+
throwError(message: string, args: {
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
}): never;
|
|
7
|
+
throwArgumentError(message: string, arg: string, value: any): never;
|
|
8
|
+
checkSafeUint53(value: number, message?: string): void;
|
|
9
|
+
}
|
|
10
|
+
export declare const logger: Logger;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const version = "0.5.10-next.2";
|
|
@@ -1,21 +1,24 @@
|
|
|
1
|
-
import { TinyBig } from '../shared/tiny-big/tiny-big';
|
|
2
|
-
import { BlockResponse, BlockTag } from '../types/Block.types';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { TransactionRequest } from '
|
|
6
|
-
export declare abstract class BaseProvider {
|
|
7
|
-
abstract selectRpcUrl(): string;
|
|
8
|
-
abstract post(body: Record<string, unknown>): Promise<any>;
|
|
9
|
-
readonly _rpcUrls: string[];
|
|
10
|
-
protected _post: (body: Record<string, unknown>) => Promise<any>;
|
|
11
|
-
constructor(rpcUrls: string[]);
|
|
12
|
-
getNetwork(): Promise<Network>;
|
|
13
|
-
getBlockNumber(): Promise<number>;
|
|
14
|
-
getTransaction(transactionHash: string): Promise<TransactionResponse>;
|
|
15
|
-
getTransactionReceipt(transactionHash: string): Promise<TransactionReceipt>;
|
|
16
|
-
getTransactionCount(address: string, blockTag?: BlockTag): Promise<number>;
|
|
17
|
-
getBlock(timeFrame?: BlockTag, returnTransactionObjects?: boolean): Promise<BlockResponse>;
|
|
18
|
-
getGasPrice(): Promise<TinyBig>;
|
|
19
|
-
getBalance(address: string, blockTag?: BlockTag): Promise<TinyBig>;
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
import type { TinyBig } from '../shared/tiny-big/tiny-big';
|
|
2
|
+
import type { BlockResponse, BlockTag } from '../types/Block.types';
|
|
3
|
+
import type { Filter, FilterByBlockHash } from '../types/Filter.types';
|
|
4
|
+
import type { Network } from '../types/Network.types';
|
|
5
|
+
import type { Log, TransactionReceipt, TransactionRequest, TransactionResponse } from '../types/Transaction.types';
|
|
6
|
+
export declare abstract class BaseProvider {
|
|
7
|
+
abstract selectRpcUrl(): string;
|
|
8
|
+
abstract post(body: Record<string, unknown>): Promise<any>;
|
|
9
|
+
readonly _rpcUrls: string[];
|
|
10
|
+
protected _post: (body: Record<string, unknown>) => Promise<any>;
|
|
11
|
+
constructor(rpcUrls: string[]);
|
|
12
|
+
getNetwork(): Promise<Network>;
|
|
13
|
+
getBlockNumber(): Promise<number>;
|
|
14
|
+
getTransaction(transactionHash: string): Promise<TransactionResponse>;
|
|
15
|
+
getTransactionReceipt(transactionHash: string): Promise<TransactionReceipt>;
|
|
16
|
+
getTransactionCount(address: string, blockTag?: BlockTag): Promise<number>;
|
|
17
|
+
getBlock(timeFrame?: BlockTag, returnTransactionObjects?: boolean): Promise<BlockResponse>;
|
|
18
|
+
getGasPrice(): Promise<TinyBig>;
|
|
19
|
+
getBalance(address: string, blockTag?: BlockTag): Promise<TinyBig>;
|
|
20
|
+
getCode(address: string, blockTag?: BlockTag): Promise<string>;
|
|
21
|
+
estimateGas(transaction: TransactionRequest): Promise<TinyBig>;
|
|
22
|
+
getLogs(filter: Filter | FilterByBlockHash): Promise<Array<Log>>;
|
|
23
|
+
call(transaction: TransactionRequest, blockTag?: BlockTag): Promise<string>;
|
|
24
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { BaseProvider } from './BaseProvider';
|
|
2
|
-
export interface ConstructorOptions {
|
|
3
|
-
timeoutDuration?: number;
|
|
4
|
-
}
|
|
5
|
-
export declare class FallthroughProvider extends BaseProvider {
|
|
6
|
-
private rpcUrlCounter;
|
|
7
|
-
private readonly timeoutDuration;
|
|
8
|
-
selectRpcUrl(): string;
|
|
9
|
-
constructor(rpcUrls: string[], options?: ConstructorOptions);
|
|
10
|
-
post: (body: Record<string, unknown>) => Promise<any>;
|
|
11
|
-
}
|
|
1
|
+
import { BaseProvider } from './BaseProvider';
|
|
2
|
+
export interface ConstructorOptions {
|
|
3
|
+
timeoutDuration?: number;
|
|
4
|
+
}
|
|
5
|
+
export declare class FallthroughProvider extends BaseProvider {
|
|
6
|
+
private rpcUrlCounter;
|
|
7
|
+
private readonly timeoutDuration;
|
|
8
|
+
selectRpcUrl(): string;
|
|
9
|
+
constructor(rpcUrls: string[], options?: ConstructorOptions);
|
|
10
|
+
post: (body: Record<string, unknown>) => Promise<any>;
|
|
11
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BaseProvider } from './BaseProvider';
|
|
2
|
-
export declare class JsonRpcProvider extends BaseProvider {
|
|
3
|
-
selectRpcUrl(): string;
|
|
4
|
-
post(body: Record<string, unknown>): Promise<any>;
|
|
5
|
-
constructor(rpcUrl?: string);
|
|
6
|
-
}
|
|
7
|
-
export declare function jsonRpcProvider(rpcUrl?: string): JsonRpcProvider;
|
|
1
|
+
import { BaseProvider } from './BaseProvider';
|
|
2
|
+
export declare class JsonRpcProvider extends BaseProvider {
|
|
3
|
+
selectRpcUrl(): string;
|
|
4
|
+
post(body: Record<string, unknown>): Promise<any>;
|
|
5
|
+
constructor(rpcUrl?: string);
|
|
6
|
+
}
|
|
7
|
+
export declare function jsonRpcProvider(rpcUrl?: string): JsonRpcProvider;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export declare const fakeUrls: {
|
|
2
|
-
readonly notRPCButRealHttp: "https://httpstat.us/200";
|
|
3
|
-
};
|
|
4
|
-
export declare const rpcUrls: {
|
|
5
|
-
mainnet: string;
|
|
6
|
-
matic: string;
|
|
7
|
-
gno: string;
|
|
8
|
-
bnb: string;
|
|
9
|
-
arb1: string;
|
|
10
|
-
gor: string;
|
|
11
|
-
};
|
|
1
|
+
export declare const fakeUrls: {
|
|
2
|
+
readonly notRPCButRealHttp: "https://httpstat.us/200";
|
|
3
|
+
};
|
|
4
|
+
export declare const rpcUrls: {
|
|
5
|
+
mainnet: string;
|
|
6
|
+
matic: string;
|
|
7
|
+
gno: string;
|
|
8
|
+
bnb: string;
|
|
9
|
+
arb1: string;
|
|
10
|
+
gor: string;
|
|
11
|
+
};
|