essential-eth 0.9.2-beta.3 → 0.9.2-beta.4

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.
Files changed (102) hide show
  1. package/dist/cjs/classes/Contract.d.ts +81 -11
  2. package/dist/cjs/classes/test/Contract/crv-abi.d.ts +2 -2
  3. package/dist/cjs/classes/test/Contract/ens-abi.d.ts +2 -2
  4. package/dist/cjs/classes/test/Contract/fei-abi.d.ts +2 -2
  5. package/dist/cjs/classes/test/Contract/foo-abi.d.ts +2 -2
  6. package/dist/cjs/classes/test/Contract/uniswap-abi.d.ts +2 -2
  7. package/dist/cjs/classes/utils/clean-block.d.ts +120 -2
  8. package/dist/cjs/classes/utils/clean-log.d.ts +9 -2
  9. package/dist/cjs/classes/utils/clean-transaction-receipt.d.ts +14 -2
  10. package/dist/cjs/classes/utils/clean-transaction.d.ts +14 -2
  11. package/dist/cjs/classes/utils/encode-decode-transaction.d.ts +16 -4
  12. package/dist/cjs/classes/utils/fetchers.d.ts +53 -15
  13. package/dist/cjs/classes/utils/hex-to-decimal.d.ts +18 -1
  14. package/dist/cjs/classes/utils/prepare-transaction.d.ts +6 -2
  15. package/dist/cjs/index.d.ts +24 -24
  16. package/dist/cjs/logger/logger.d.ts +11 -11
  17. package/dist/cjs/logger/package-version.d.ts +1 -1
  18. package/dist/cjs/logger/package-version.js +1 -1
  19. package/dist/cjs/providers/AlchemyProvider.d.ts +4 -4
  20. package/dist/cjs/providers/BaseProvider.d.ts +374 -26
  21. package/dist/cjs/providers/FallthroughProvider.d.ts +24 -11
  22. package/dist/cjs/providers/JsonRpcProvider.d.ts +33 -7
  23. package/dist/cjs/providers/test/json-rpc-provider/get-logs/mocks.d.ts +14 -14
  24. package/dist/cjs/providers/test/mock-of.d.ts +9 -2
  25. package/dist/cjs/providers/test/rpc-urls.d.ts +12 -12
  26. package/dist/cjs/providers/utils/chains-info.d.ts +24 -24
  27. package/dist/cjs/shared/tiny-big/helpers.d.ts +17 -1
  28. package/dist/cjs/shared/tiny-big/tiny-big.d.ts +58 -10
  29. package/dist/cjs/shared/validate-type.d.ts +3 -3
  30. package/dist/cjs/types/Block.types.d.ts +41 -40
  31. package/dist/cjs/types/Contract.types.d.ts +24 -24
  32. package/dist/cjs/types/FeeData.types.d.ts +7 -7
  33. package/dist/cjs/types/Filter.types.d.ts +16 -12
  34. package/dist/cjs/types/Network.types.d.ts +8 -5
  35. package/dist/cjs/types/Transaction.types.d.ts +123 -113
  36. package/dist/cjs/utils/bytes.d.ts +289 -40
  37. package/dist/cjs/utils/compute-address.d.ts +17 -1
  38. package/dist/cjs/utils/compute-public-key.d.ts +18 -2
  39. package/dist/cjs/utils/ether-to-gwei.d.ts +27 -3
  40. package/dist/cjs/utils/ether-to-wei.d.ts +27 -3
  41. package/dist/cjs/utils/gwei-to-ether.d.ts +27 -3
  42. package/dist/cjs/utils/hash-message.d.ts +14 -2
  43. package/dist/cjs/utils/is-address.d.ts +24 -1
  44. package/dist/cjs/utils/keccak256.d.ts +16 -2
  45. package/dist/cjs/utils/solidity-keccak256.d.ts +39 -2
  46. package/dist/cjs/utils/split-signature.d.ts +24 -2
  47. package/dist/cjs/utils/to-checksum-address.d.ts +17 -1
  48. package/dist/cjs/utils/to-utf8-bytes.d.ts +15 -1
  49. package/dist/cjs/utils/wei-to-ether.d.ts +27 -3
  50. package/dist/esm/classes/Contract.d.ts +11 -11
  51. package/dist/esm/classes/test/Contract/crv-abi.d.ts +2 -2
  52. package/dist/esm/classes/test/Contract/ens-abi.d.ts +2 -2
  53. package/dist/esm/classes/test/Contract/fei-abi.d.ts +2 -2
  54. package/dist/esm/classes/test/Contract/foo-abi.d.ts +2 -2
  55. package/dist/esm/classes/test/Contract/uniswap-abi.d.ts +2 -2
  56. package/dist/esm/classes/utils/clean-block.d.ts +2 -2
  57. package/dist/esm/classes/utils/clean-log.d.ts +2 -2
  58. package/dist/esm/classes/utils/clean-transaction-receipt.d.ts +2 -2
  59. package/dist/esm/classes/utils/clean-transaction.d.ts +2 -2
  60. package/dist/esm/classes/utils/encode-decode-transaction.d.ts +4 -4
  61. package/dist/esm/classes/utils/fetchers.d.ts +15 -15
  62. package/dist/esm/classes/utils/hex-to-decimal.d.ts +1 -1
  63. package/dist/esm/classes/utils/prepare-transaction.d.ts +2 -2
  64. package/dist/esm/index.d.ts +24 -24
  65. package/dist/esm/logger/logger.d.ts +11 -11
  66. package/dist/esm/logger/package-version.d.ts +1 -1
  67. package/dist/esm/logger/package-version.js +1 -1
  68. package/dist/esm/providers/AlchemyProvider.d.ts +4 -4
  69. package/dist/esm/providers/BaseProvider.d.ts +26 -26
  70. package/dist/esm/providers/FallthroughProvider.d.ts +11 -11
  71. package/dist/esm/providers/JsonRpcProvider.d.ts +7 -7
  72. package/dist/esm/providers/test/json-rpc-provider/get-logs/mocks.d.ts +14 -14
  73. package/dist/esm/providers/test/mock-of.d.ts +2 -2
  74. package/dist/esm/providers/test/rpc-urls.d.ts +12 -12
  75. package/dist/esm/providers/utils/chains-info.d.ts +24 -24
  76. package/dist/esm/shared/tiny-big/helpers.d.ts +1 -1
  77. package/dist/esm/shared/tiny-big/tiny-big.d.ts +10 -10
  78. package/dist/esm/shared/validate-type.d.ts +3 -3
  79. package/dist/esm/types/Block.types.d.ts +40 -40
  80. package/dist/esm/types/Contract.types.d.ts +24 -24
  81. package/dist/esm/types/FeeData.types.d.ts +7 -7
  82. package/dist/esm/types/Filter.types.d.ts +12 -12
  83. package/dist/esm/types/Network.types.d.ts +5 -5
  84. package/dist/esm/types/Transaction.types.d.ts +113 -113
  85. package/dist/esm/utils/bytes.d.ts +40 -40
  86. package/dist/esm/utils/compute-address.d.ts +1 -1
  87. package/dist/esm/utils/compute-public-key.d.ts +2 -2
  88. package/dist/esm/utils/ether-to-gwei.d.ts +3 -3
  89. package/dist/esm/utils/ether-to-wei.d.ts +3 -3
  90. package/dist/esm/utils/gwei-to-ether.d.ts +3 -3
  91. package/dist/esm/utils/hash-message.d.ts +2 -2
  92. package/dist/esm/utils/is-address.d.ts +1 -1
  93. package/dist/esm/utils/keccak256.d.ts +2 -2
  94. package/dist/esm/utils/solidity-keccak256.d.ts +2 -2
  95. package/dist/esm/utils/split-signature.d.ts +2 -2
  96. package/dist/esm/utils/to-checksum-address.d.ts +1 -1
  97. package/dist/esm/utils/to-utf8-bytes.d.ts +1 -1
  98. package/dist/esm/utils/wei-to-ether.d.ts +3 -3
  99. package/dist/{cjs/index.umd.js → essential-eth.umd.js} +2 -2
  100. package/dist/essential-eth.umd.js.map +1 -0
  101. package/package.json +6 -7
  102. package/dist/cjs/index.umd.js.map +0 -1
@@ -1,11 +1,11 @@
1
- import type { JsonRpcProvider } from '../providers/JsonRpcProvider';
2
- import type { ContractInterface } from '../types/Contract.types';
3
- export declare class BaseContract {
4
- private readonly _address;
5
- private readonly _provider;
6
- constructor(addressOrName: string, contractInterface: ContractInterface, signerOrProvider: JsonRpcProvider);
7
- }
8
- export declare function defineReadOnly<T>(object: T, name: string, value: any): void;
9
- export declare class Contract extends BaseContract {
10
- readonly [key: string]: any;
11
- }
1
+ import type { JsonRpcProvider } from '../providers/JsonRpcProvider';
2
+ import type { ContractInterface } from '../types/Contract.types';
3
+ export declare class BaseContract {
4
+ private readonly _address;
5
+ private readonly _provider;
6
+ constructor(addressOrName: string, contractInterface: ContractInterface, signerOrProvider: JsonRpcProvider);
7
+ }
8
+ export declare function defineReadOnly<T>(object: T, name: string, value: any): void;
9
+ export declare class Contract extends BaseContract {
10
+ readonly [key: string]: any;
11
+ }
@@ -1,2 +1,2 @@
1
- import type { JSONABI } from '../../../types/Contract.types';
2
- export declare const abi: JSONABI;
1
+ import type { JSONABI } from '../../../types/Contract.types';
2
+ export declare const abi: JSONABI;
@@ -1,2 +1,2 @@
1
- import type { JSONABI } from '../../../types/Contract.types';
2
- export declare const ensABI: JSONABI;
1
+ import type { JSONABI } from '../../../types/Contract.types';
2
+ export declare const ensABI: JSONABI;
@@ -1,2 +1,2 @@
1
- import type { JSONABI } from '../../../types/Contract.types';
2
- export declare const feiABI: JSONABI;
1
+ import type { JSONABI } from '../../../types/Contract.types';
2
+ export declare const feiABI: JSONABI;
@@ -1,2 +1,2 @@
1
- import type { JSONABI } from '../../../types/Contract.types';
2
- export declare const fooABI: JSONABI;
1
+ import type { JSONABI } from '../../../types/Contract.types';
2
+ export declare const fooABI: JSONABI;
@@ -1,2 +1,2 @@
1
- import type { JSONABI } from '../../../types/Contract.types';
2
- export declare const uniswapABI: JSONABI;
1
+ import type { JSONABI } from '../../../types/Contract.types';
2
+ export declare const uniswapABI: JSONABI;
@@ -1,2 +1,2 @@
1
- import type { BlockResponse, RPCBlock } from '../../types/Block.types';
2
- export declare function cleanBlock(block: RPCBlock, returnTransactionObjects: boolean): BlockResponse;
1
+ import type { BlockResponse, RPCBlock } from '../../types/Block.types';
2
+ export declare function cleanBlock(block: RPCBlock, returnTransactionObjects: boolean): BlockResponse;
@@ -1,2 +1,2 @@
1
- import type { Log, RPCLog } from './../../types/Transaction.types';
2
- export declare function cleanLog(log: RPCLog, receiptLog: boolean): Log;
1
+ import type { Log, RPCLog } from './../../types/Transaction.types';
2
+ export declare function cleanLog(log: RPCLog, receiptLog: boolean): Log;
@@ -1,2 +1,2 @@
1
- import type { RPCTransactionReceipt, TransactionReceipt } from '../../types/Transaction.types';
2
- export declare function cleanTransactionReceipt(transactionReceipt: RPCTransactionReceipt): TransactionReceipt;
1
+ import type { RPCTransactionReceipt, TransactionReceipt } from '../../types/Transaction.types';
2
+ export declare function cleanTransactionReceipt(transactionReceipt: RPCTransactionReceipt): TransactionReceipt;
@@ -1,2 +1,2 @@
1
- import type { RPCTransaction, TransactionResponse } from '../../types/Transaction.types';
2
- export declare function cleanTransaction(transaction: RPCTransaction): TransactionResponse;
1
+ import type { RPCTransaction, TransactionResponse } from '../../types/Transaction.types';
2
+ export declare function cleanTransaction(transaction: RPCTransaction): TransactionResponse;
@@ -1,4 +1,4 @@
1
- import type { JSONABIArgument } from '../../types/Contract.types';
2
- export declare const hexFalse: string;
3
- export declare function encodeData(jsonABIArgument: JSONABIArgument, args: any[]): string;
4
- export declare function decodeRPCResponse(jsonABIArgument: JSONABIArgument, nodeResponse: string): string | number | boolean | import("../../shared/tiny-big/tiny-big").TinyBig | (string | number | boolean | import("../../shared/tiny-big/tiny-big").TinyBig)[];
1
+ import type { JSONABIArgument } from '../../types/Contract.types';
2
+ export declare const hexFalse: string;
3
+ export declare function encodeData(jsonABIArgument: JSONABIArgument, args: any[]): string;
4
+ export declare function decodeRPCResponse(jsonABIArgument: JSONABIArgument, nodeResponse: string): string | number | boolean | import("../../shared/tiny-big/tiny-big").TinyBig | (string | number | boolean | import("../../shared/tiny-big/tiny-big").TinyBig)[];
@@ -1,15 +1,15 @@
1
- export declare function buildFetchInit<T>(body: T): {
2
- method: string;
3
- headers: {
4
- 'Content-Type': string;
5
- };
6
- body: string;
7
- };
8
- export declare function post(url: string, body: Record<string, unknown>): Promise<any>;
9
- export type RPCMethodName = 'eth_getBlockByNumber' | 'eth_getBlockByHash' | 'eth_call' | 'eth_chainId' | 'eth_gasPrice' | 'eth_getBalance' | 'eth_getTransactionByHash' | 'eth_getTransactionReceipt' | 'eth_getTransactionCount' | 'eth_getCode' | 'eth_blockNumber' | 'eth_estimateGas' | 'eth_getLogs';
10
- export declare function buildRPCPostBody(method: RPCMethodName, params: unknown[]): {
11
- jsonrpc: string;
12
- id: number;
13
- method: RPCMethodName;
14
- params: unknown[];
15
- };
1
+ export declare function buildFetchInit<T>(body: T): {
2
+ method: string;
3
+ headers: {
4
+ 'Content-Type': string;
5
+ };
6
+ body: string;
7
+ };
8
+ export declare function post(url: string, body: Record<string, unknown>): Promise<any>;
9
+ export type RPCMethodName = 'eth_getBlockByNumber' | 'eth_getBlockByHash' | 'eth_call' | 'eth_chainId' | 'eth_gasPrice' | 'eth_getBalance' | 'eth_getTransactionByHash' | 'eth_getTransactionReceipt' | 'eth_getTransactionCount' | 'eth_getCode' | 'eth_blockNumber' | 'eth_estimateGas' | 'eth_getLogs';
10
+ export declare function buildRPCPostBody(method: RPCMethodName, params: unknown[]): {
11
+ jsonrpc: string;
12
+ id: number;
13
+ method: RPCMethodName;
14
+ params: unknown[];
15
+ };
@@ -1 +1 @@
1
- export declare function hexToDecimal(hex: string): string;
1
+ export declare function hexToDecimal(hex: string): string;
@@ -1,2 +1,2 @@
1
- import type { RPCTransactionRequest, TransactionRequest } from './../../types/Transaction.types';
2
- export declare function prepareTransaction(transaction: TransactionRequest): RPCTransactionRequest;
1
+ import type { RPCTransactionRequest, TransactionRequest } from './../../types/Transaction.types';
2
+ export declare function prepareTransaction(transaction: TransactionRequest): RPCTransactionRequest;
@@ -1,24 +1,24 @@
1
- export { Contract, BaseContract } from './classes/Contract';
2
- export { AlchemyProvider } from './providers/AlchemyProvider';
3
- export { FallthroughProvider, ConstructorOptions, } from './providers/FallthroughProvider';
4
- export { jsonRpcProvider, JsonRpcProvider } from './providers/JsonRpcProvider';
5
- export { tinyBig, TinyBig } from './shared/tiny-big/tiny-big';
6
- export { BlockResponse, RPCBlock, BlockTag } from './types/Block.types';
7
- export { ContractTypes, JSONABI, JSONABIArgument, } from './types/Contract.types';
8
- export { Filter, FilterByBlockHash } from './types/Filter.types';
9
- export { Network } from './types/Network.types';
10
- export { TransactionResponse, RPCTransaction, RPCTransactionReceipt, TransactionRequest, RPCTransactionRequest, TransactionReceipt, RPCLog, Log, BlockTransactionResponse, } from './types/Transaction.types';
11
- export { computeAddress } from './utils/compute-address';
12
- export { computePublicKey } from './utils/compute-public-key';
13
- export { etherToGwei } from './utils/ether-to-gwei';
14
- export { etherToWei } from './utils/ether-to-wei';
15
- export { gweiToEther } from './utils/gwei-to-ether';
16
- export { hashMessage } from './utils/hash-message';
17
- export { isAddress } from './utils/is-address';
18
- export { splitSignature } from './utils/split-signature';
19
- export { toChecksumAddress } from './utils/to-checksum-address';
20
- export { toUtf8Bytes } from './utils/to-utf8-bytes';
21
- export { weiToEther } from './utils/wei-to-ether';
22
- export { Bytes, BytesLike, BytesLikeWithNumber, DataOptions, Hexable, SignatureLike, Signature, isBytesLike, isBytes, arrayify, concat, stripZeros, zeroPad, isHexString, hexlify, hexDataLength, hexDataSlice, hexConcat, hexValue, hexStripZeros, hexZeroPad, } from './utils/bytes';
23
- export { keccak256 } from './utils/keccak256';
24
- export { pack, solidityKeccak256 } from './utils/solidity-keccak256';
1
+ export { Contract, BaseContract } from './classes/Contract';
2
+ export { AlchemyProvider } from './providers/AlchemyProvider';
3
+ export { FallthroughProvider, ConstructorOptions, } from './providers/FallthroughProvider';
4
+ export { jsonRpcProvider, JsonRpcProvider } from './providers/JsonRpcProvider';
5
+ export { tinyBig, TinyBig } from './shared/tiny-big/tiny-big';
6
+ export { BlockResponse, RPCBlock, BlockTag } from './types/Block.types';
7
+ export { ContractTypes, JSONABI, JSONABIArgument, } from './types/Contract.types';
8
+ export { Filter, FilterByBlockHash } from './types/Filter.types';
9
+ export { Network } from './types/Network.types';
10
+ export { TransactionResponse, RPCTransaction, RPCTransactionReceipt, TransactionRequest, RPCTransactionRequest, TransactionReceipt, RPCLog, Log, BlockTransactionResponse, } from './types/Transaction.types';
11
+ export { computeAddress } from './utils/compute-address';
12
+ export { computePublicKey } from './utils/compute-public-key';
13
+ export { etherToGwei } from './utils/ether-to-gwei';
14
+ export { etherToWei } from './utils/ether-to-wei';
15
+ export { gweiToEther } from './utils/gwei-to-ether';
16
+ export { hashMessage } from './utils/hash-message';
17
+ export { isAddress } from './utils/is-address';
18
+ export { splitSignature } from './utils/split-signature';
19
+ export { toChecksumAddress } from './utils/to-checksum-address';
20
+ export { toUtf8Bytes } from './utils/to-utf8-bytes';
21
+ export { weiToEther } from './utils/wei-to-ether';
22
+ export { Bytes, BytesLike, BytesLikeWithNumber, DataOptions, Hexable, SignatureLike, Signature, isBytesLike, isBytes, arrayify, concat, stripZeros, zeroPad, isHexString, hexlify, hexDataLength, hexDataSlice, hexConcat, hexValue, hexStripZeros, hexZeroPad, } from './utils/bytes';
23
+ export { keccak256 } from './utils/keccak256';
24
+ export { pack, solidityKeccak256 } from './utils/solidity-keccak256';
@@ -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 {};
@@ -1 +1 @@
1
- export declare const version = "0.9.2-beta.3";
1
+ export declare const version = "0.9.2-beta.4";
@@ -1 +1 @@
1
- export const version = '0.9.2-beta.3';
1
+ export const version = '0.9.2-beta.4';
@@ -1,4 +1,4 @@
1
- import { JsonRpcProvider } from './JsonRpcProvider';
2
- export declare class AlchemyProvider extends JsonRpcProvider {
3
- constructor(apiKey: string, network?: string);
4
- }
1
+ import { JsonRpcProvider } from './JsonRpcProvider';
2
+ export declare class AlchemyProvider extends JsonRpcProvider {
3
+ constructor(apiKey: string, network?: string);
4
+ }
@@ -1,26 +1,26 @@
1
- import type { TinyBig } from '../shared/tiny-big/tiny-big';
2
- import type { BlockResponse, BlockTag } from '../types/Block.types';
3
- import type { FeeData } from '../types/FeeData.types';
4
- import type { Filter, FilterByBlockHash } from '../types/Filter.types';
5
- import type { Network } from '../types/Network.types';
6
- import type { Log, TransactionReceipt, TransactionRequest, TransactionResponse } from '../types/Transaction.types';
7
- export declare abstract class BaseProvider {
8
- abstract selectRpcUrl(): string;
9
- abstract post(body: Record<string, unknown>): Promise<any>;
10
- readonly _rpcUrls: string[];
11
- protected _post: (body: Record<string, unknown>) => Promise<any>;
12
- constructor(rpcUrls: string[]);
13
- getNetwork(): Promise<Network>;
14
- getBlockNumber(): Promise<number>;
15
- getTransaction(transactionHash: string): Promise<TransactionResponse>;
16
- getTransactionReceipt(transactionHash: string): Promise<TransactionReceipt>;
17
- getTransactionCount(address: string, blockTag?: BlockTag): Promise<number>;
18
- getBlock(timeFrame?: BlockTag, returnTransactionObjects?: boolean): Promise<BlockResponse>;
19
- getGasPrice(): Promise<TinyBig>;
20
- getBalance(address: string, blockTag?: BlockTag): Promise<TinyBig>;
21
- getCode(address: string, blockTag?: BlockTag): Promise<string>;
22
- estimateGas(transaction: TransactionRequest): Promise<TinyBig>;
23
- getFeeData(): Promise<FeeData>;
24
- getLogs(filter: Filter | FilterByBlockHash): Promise<Array<Log>>;
25
- call(transaction: TransactionRequest, blockTag?: BlockTag): Promise<string>;
26
- }
1
+ import type { TinyBig } from '../shared/tiny-big/tiny-big';
2
+ import type { BlockResponse, BlockTag } from '../types/Block.types';
3
+ import type { FeeData } from '../types/FeeData.types';
4
+ import type { Filter, FilterByBlockHash } from '../types/Filter.types';
5
+ import type { Network } from '../types/Network.types';
6
+ import type { Log, TransactionReceipt, TransactionRequest, TransactionResponse } from '../types/Transaction.types';
7
+ export declare abstract class BaseProvider {
8
+ abstract selectRpcUrl(): string;
9
+ abstract post(body: Record<string, unknown>): Promise<any>;
10
+ readonly _rpcUrls: string[];
11
+ protected _post: (body: Record<string, unknown>) => Promise<any>;
12
+ constructor(rpcUrls: string[]);
13
+ getNetwork(): Promise<Network>;
14
+ getBlockNumber(): Promise<number>;
15
+ getTransaction(transactionHash: string): Promise<TransactionResponse>;
16
+ getTransactionReceipt(transactionHash: string): Promise<TransactionReceipt>;
17
+ getTransactionCount(address: string, blockTag?: BlockTag): Promise<number>;
18
+ getBlock(timeFrame?: BlockTag, returnTransactionObjects?: boolean): Promise<BlockResponse>;
19
+ getGasPrice(): Promise<TinyBig>;
20
+ getBalance(address: string, blockTag?: BlockTag): Promise<TinyBig>;
21
+ getCode(address: string, blockTag?: BlockTag): Promise<string>;
22
+ estimateGas(transaction: TransactionRequest): Promise<TinyBig>;
23
+ getFeeData(): Promise<FeeData>;
24
+ getLogs(filter: Filter | FilterByBlockHash): Promise<Array<Log>>;
25
+ call(transaction: TransactionRequest, blockTag?: BlockTag): Promise<string>;
26
+ }
@@ -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,14 +1,14 @@
1
- import type { Filter } from '../../../../types/Filter.types';
2
- import type { RPCLog } from '../../../../types/Transaction.types';
3
- export declare const STRONGBLOCK_ADDRESS = "0xfbddadd80fe7bda00b901fbaf73803f2238ae655";
4
- export declare const filterAddressFromTo: Filter;
5
- export declare const RARELAND_ADDRESS = "0x596a0f276ee432d8a28441e55737ff55cf30d0f7";
6
- export declare const filterAddressTopics: Filter;
7
- export declare const WETH_ADDRESS = "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2";
8
- export declare const filterAll: Filter;
9
- export declare const mockfilterAddressFromToLogs: RPCLog[];
10
- export declare const mockfilterAddressTopicsLogs: RPCLog[];
11
- export declare const mockfilterAllLogs: RPCLog[];
12
- export declare const mockRpcAddressFromToResponse: string;
13
- export declare const mockRpcAddressTopicsResponse: string;
14
- export declare const mockRpcAllResponse: string;
1
+ import type { Filter } from '../../../../types/Filter.types';
2
+ import type { RPCLog } from '../../../../types/Transaction.types';
3
+ export declare const STRONGBLOCK_ADDRESS = "0xfbddadd80fe7bda00b901fbaf73803f2238ae655";
4
+ export declare const filterAddressFromTo: Filter;
5
+ export declare const RARELAND_ADDRESS = "0x596a0f276ee432d8a28441e55737ff55cf30d0f7";
6
+ export declare const filterAddressTopics: Filter;
7
+ export declare const WETH_ADDRESS = "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2";
8
+ export declare const filterAll: Filter;
9
+ export declare const mockfilterAddressFromToLogs: RPCLog[];
10
+ export declare const mockfilterAddressTopicsLogs: RPCLog[];
11
+ export declare const mockfilterAllLogs: RPCLog[];
12
+ export declare const mockRpcAddressFromToResponse: string;
13
+ export declare const mockRpcAddressTopicsResponse: string;
14
+ export declare const mockRpcAllResponse: string;
@@ -1,2 +1,2 @@
1
- /// <reference types="jest" />
2
- export declare const mockOf: <FunctionParameters extends unknown[], FunctionReturnType>(fn: (...args: FunctionParameters) => FunctionReturnType) => jest.Mock<FunctionReturnType, FunctionParameters>;
1
+ /// <reference types="jest" />
2
+ export declare const mockOf: <FunctionParameters extends unknown[], FunctionReturnType>(fn: (...args: FunctionParameters) => FunctionReturnType) => jest.Mock<FunctionReturnType, FunctionParameters>;
@@ -1,12 +1,12 @@
1
- export declare const fakeUrls: {
2
- readonly notRPCButRealHttp: "https://httpstat.us/200";
3
- };
4
- export declare const rpcUrls: {
5
- mainnet: string;
6
- oeth: string;
7
- matic: string;
8
- gno: string;
9
- bnb: string;
10
- arb1: string;
11
- gor: string;
12
- };
1
+ export declare const fakeUrls: {
2
+ readonly notRPCButRealHttp: "https://httpstat.us/200";
3
+ };
4
+ export declare const rpcUrls: {
5
+ mainnet: string;
6
+ oeth: string;
7
+ matic: string;
8
+ gno: string;
9
+ bnb: string;
10
+ arb1: string;
11
+ gor: string;
12
+ };
@@ -1,24 +1,24 @@
1
- declare const _default: {
2
- "1": string[];
3
- "5": string[];
4
- "10": string[];
5
- "50": string[];
6
- "56": string[];
7
- "100": string[];
8
- "137": string[];
9
- "250": string[];
10
- "324": string[];
11
- "1101": string[];
12
- "1337": string[];
13
- "7700": string[];
14
- "9001": string[];
15
- "42161": string[];
16
- "42220": string[];
17
- "43114": string[];
18
- "59140": string[];
19
- "80001": string[];
20
- "421613": string[];
21
- "534352": string[];
22
- "11155111": string[];
23
- };
24
- export default _default;
1
+ declare const _default: {
2
+ "1": string[];
3
+ "5": string[];
4
+ "10": string[];
5
+ "50": string[];
6
+ "56": string[];
7
+ "100": string[];
8
+ "137": string[];
9
+ "250": string[];
10
+ "324": string[];
11
+ "1101": string[];
12
+ "1337": string[];
13
+ "7700": string[];
14
+ "9001": string[];
15
+ "42161": string[];
16
+ "42220": string[];
17
+ "43114": string[];
18
+ "59140": string[];
19
+ "80001": string[];
20
+ "421613": string[];
21
+ "534352": string[];
22
+ "11155111": string[];
23
+ };
24
+ export default _default;
@@ -1 +1 @@
1
- export declare function scientificStrToDecimalStr(scientificString: string): string;
1
+ export declare function scientificStrToDecimalStr(scientificString: string): string;
@@ -1,10 +1,10 @@
1
- import Big from 'big.js';
2
- export declare class TinyBig extends Big {
3
- constructor(value: string | number | TinyBig | Big);
4
- toHexString(): string;
5
- toNumber(): number;
6
- toString(): string;
7
- private padAndChop;
8
- toTwos(bitCount: number): Big;
9
- }
10
- export declare function tinyBig(value: string | number | TinyBig | Big): TinyBig;
1
+ import Big from 'big.js';
2
+ export declare class TinyBig extends Big {
3
+ constructor(value: string | number | TinyBig | Big);
4
+ toHexString(): string;
5
+ toNumber(): number;
6
+ toString(): string;
7
+ private padAndChop;
8
+ toTwos(bitCount: number): Big;
9
+ }
10
+ export declare function tinyBig(value: string | number | TinyBig | Big): TinyBig;
@@ -1,3 +1,3 @@
1
- type JSPrimitiveTypes = 'string' | 'number' | 'bigint' | 'boolean' | 'symbol' | 'undefined' | 'object' | 'function';
2
- export declare const validateType: (value: unknown, allowedTypes: JSPrimitiveTypes[]) => void;
3
- export {};
1
+ type JSPrimitiveTypes = 'string' | 'number' | 'bigint' | 'boolean' | 'symbol' | 'undefined' | 'object' | 'function';
2
+ export declare const validateType: (value: unknown, allowedTypes: JSPrimitiveTypes[]) => void;
3
+ export {};
@@ -1,40 +1,40 @@
1
- import type { TinyBig } from './../shared/tiny-big/tiny-big';
2
- import type { BlockTransactionResponse, RPCTransaction } from './Transaction.types';
3
- type Modify<T, R> = Omit<T, keyof R> & R;
4
- export type BlockResponse = Modify<RPCBlock, {
5
- baseFeePerGas: TinyBig;
6
- difficulty: TinyBig;
7
- gasLimit: TinyBig;
8
- gasUsed: TinyBig;
9
- nonce: TinyBig;
10
- number: number;
11
- size: TinyBig;
12
- timestamp: TinyBig;
13
- totalDifficulty: TinyBig;
14
- transactions: Array<string | BlockTransactionResponse>;
15
- }>;
16
- export interface RPCBlock {
17
- baseFeePerGas: string;
18
- difficulty: string;
19
- extraData: string;
20
- gasLimit: string;
21
- gasUsed: string;
22
- hash: string;
23
- logsBloom: string;
24
- miner: string;
25
- mixHash: string;
26
- nonce: string;
27
- number: string;
28
- parentHash: string;
29
- receiptsRoot: string;
30
- sha3Uncles: string;
31
- size: string;
32
- stateRoot: string;
33
- timestamp: string;
34
- totalDifficulty: string;
35
- transactions: Array<string | RPCTransaction>;
36
- transactionsRoot: string;
37
- uncles: Array<string>;
38
- }
39
- export type BlockTag = 'latest' | 'earliest' | 'pending' | number | string;
40
- export {};
1
+ import type { TinyBig } from './../shared/tiny-big/tiny-big';
2
+ import type { BlockTransactionResponse, RPCTransaction } from './Transaction.types';
3
+ type Modify<T, R> = Omit<T, keyof R> & R;
4
+ export type BlockResponse = Modify<RPCBlock, {
5
+ baseFeePerGas: TinyBig;
6
+ difficulty: TinyBig;
7
+ gasLimit: TinyBig;
8
+ gasUsed: TinyBig;
9
+ nonce: TinyBig;
10
+ number: number;
11
+ size: TinyBig;
12
+ timestamp: TinyBig;
13
+ totalDifficulty: TinyBig;
14
+ transactions: Array<string | BlockTransactionResponse>;
15
+ }>;
16
+ export interface RPCBlock {
17
+ baseFeePerGas: string;
18
+ difficulty: string;
19
+ extraData: string;
20
+ gasLimit: string;
21
+ gasUsed: string;
22
+ hash: string;
23
+ logsBloom: string;
24
+ miner: string;
25
+ mixHash: string;
26
+ nonce: string;
27
+ number: string;
28
+ parentHash: string;
29
+ receiptsRoot: string;
30
+ sha3Uncles: string;
31
+ size: string;
32
+ stateRoot: string;
33
+ timestamp: string;
34
+ totalDifficulty: string;
35
+ transactions: Array<string | RPCTransaction>;
36
+ transactionsRoot: string;
37
+ uncles: Array<string>;
38
+ }
39
+ export type BlockTag = 'latest' | 'earliest' | 'pending' | number | string;
40
+ export {};
@@ -1,24 +1,24 @@
1
- export type ContractTypes = 'bool' | 'bytes1' | 'bytes2' | 'bytes3' | 'bytes4' | 'bytes5' | 'bytes6' | 'bytes7' | 'bytes8' | 'bytes9' | 'bytes10' | 'bytes11' | 'bytes12' | 'bytes13' | 'bytes14' | 'bytes15' | 'bytes16' | 'bytes17' | 'bytes18' | 'bytes19' | 'bytes20' | 'bytes21' | 'bytes22' | 'bytes23' | 'bytes24' | 'bytes25' | 'bytes26' | 'bytes27' | 'bytes28' | 'bytes29' | 'bytes30' | 'bytes31' | 'bytes32' | 'bytes32[]' | 'address' | 'address payable' | 'address[4]' | 'address[100]' | 'uint256' | 'uint256[100]' | 'uint8' | 'uint32' | string;
2
- export type ContractInterface = JSONABI;
3
- export type ContractFunction<T = any> = (...args: Array<any>) => Promise<T>;
4
- export interface JSONABIArgument {
5
- anonymous?: false;
6
- inputs: {
7
- internalType?: ContractTypes | string;
8
- name: string;
9
- type: ContractTypes;
10
- indexed?: boolean;
11
- }[];
12
- name?: string;
13
- outputs?: {
14
- internalType?: ContractTypes | string;
15
- name: string;
16
- type: ContractTypes;
17
- }[];
18
- stateMutability?: 'view' | 'nonpayable' | string;
19
- type: 'function' | 'event' | 'constructor' | 'error' | 'fallback';
20
- gas?: number;
21
- constant?: boolean;
22
- payable?: boolean;
23
- }
24
- export type JSONABI = JSONABIArgument[];
1
+ export type ContractTypes = 'bool' | 'bytes1' | 'bytes2' | 'bytes3' | 'bytes4' | 'bytes5' | 'bytes6' | 'bytes7' | 'bytes8' | 'bytes9' | 'bytes10' | 'bytes11' | 'bytes12' | 'bytes13' | 'bytes14' | 'bytes15' | 'bytes16' | 'bytes17' | 'bytes18' | 'bytes19' | 'bytes20' | 'bytes21' | 'bytes22' | 'bytes23' | 'bytes24' | 'bytes25' | 'bytes26' | 'bytes27' | 'bytes28' | 'bytes29' | 'bytes30' | 'bytes31' | 'bytes32' | 'bytes32[]' | 'address' | 'address payable' | 'address[4]' | 'address[100]' | 'uint256' | 'uint256[100]' | 'uint8' | 'uint32' | string;
2
+ export type ContractInterface = JSONABI;
3
+ export type ContractFunction<T = any> = (...args: Array<any>) => Promise<T>;
4
+ export interface JSONABIArgument {
5
+ anonymous?: false;
6
+ inputs: {
7
+ internalType?: ContractTypes | string;
8
+ name: string;
9
+ type: ContractTypes;
10
+ indexed?: boolean;
11
+ }[];
12
+ name?: string;
13
+ outputs?: {
14
+ internalType?: ContractTypes | string;
15
+ name: string;
16
+ type: ContractTypes;
17
+ }[];
18
+ stateMutability?: 'view' | 'nonpayable' | string;
19
+ type: 'function' | 'event' | 'constructor' | 'error' | 'fallback';
20
+ gas?: number;
21
+ constant?: boolean;
22
+ payable?: boolean;
23
+ }
24
+ export type JSONABI = JSONABIArgument[];
@@ -1,7 +1,7 @@
1
- import type { TinyBig } from '../shared/tiny-big/tiny-big';
2
- export interface FeeData {
3
- gasPrice: TinyBig;
4
- lastBaseFeePerGas: TinyBig | null;
5
- maxFeePerGas: TinyBig | null;
6
- maxPriorityFeePerGas: TinyBig | null;
7
- }
1
+ import type { TinyBig } from '../shared/tiny-big/tiny-big';
2
+ export interface FeeData {
3
+ gasPrice: TinyBig;
4
+ lastBaseFeePerGas: TinyBig | null;
5
+ maxFeePerGas: TinyBig | null;
6
+ maxPriorityFeePerGas: TinyBig | null;
7
+ }