-
Notifications
You must be signed in to change notification settings - Fork 0
/
raw-loader!web3-eth-contract-types-index-d-ts.0.24.1.1655931290200.js
14 lines (10 loc) · 5.01 KB
/
raw-loader!web3-eth-contract-types-index-d-ts.0.24.1.1655931290200.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[39],{
/***/ 2918:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("/*\n This file is part of web3.js.\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see <http://www.gnu.org/licenses/>.\n*/\n/**\n * @file index.d.ts\n * @author Josh Stevens <[email protected]>\n * @date 2018\n */\n\nimport BN = require('bn.js');\nimport {Common, PromiEvent, provider, hardfork, chain, BlockNumber, PastLogsOptions, LogsOptions} from 'web3-core';\nimport {AbiItem} from 'web3-utils';\n\n// TODO: Add generic type!\nexport class Contract {\n constructor(\n jsonInterface: AbiItem[],\n address?: string,\n options?: ContractOptions\n );\n\n private _address: string;\n private _jsonInterface: AbiItem[];\n defaultAccount: string | null;\n defaultBlock: BlockNumber;\n defaultCommon: Common;\n defaultHardfork: hardfork;\n defaultChain: chain;\n transactionPollingTimeout: number;\n transactionConfirmationBlocks: number;\n transactionBlockTimeout: number;\n handleRevert: boolean;\n\n options: Options;\n\n clone(): Contract;\n\n deploy(options: DeployOptions): ContractSendMethod;\n\n methods: any;\n\n once(\n event: string,\n callback: (error: Error, event: EventData) => void\n ): void;\n once(\n event: string,\n options: EventOptions,\n callback: (error: Error, event: EventData) => void\n ): void;\n\n events: any;\n\n getPastEvents(event: string): Promise<EventData[]>;\n getPastEvents(\n event: string,\n options: PastEventOptions,\n callback: (error: Error, event: EventData) => void\n ): Promise<EventData[]>;\n getPastEvents(event: string, options: PastEventOptions): Promise<EventData[]>;\n getPastEvents(\n event: string,\n callback: (error: Error, event: EventData) => void\n ): Promise<EventData[]>;\n}\n\nexport interface Options extends ContractOptions {\n address: string;\n jsonInterface: AbiItem[];\n}\n\nexport interface DeployOptions {\n data: string;\n arguments?: any[];\n}\n\nexport interface ContractSendMethod {\n send(\n options: SendOptions,\n callback?: (err: Error, transactionHash: string) => void\n ): PromiEvent<Contract>;\n\n call(\n options?: CallOptions,\n callback?: (err: Error, result: any) => void\n ): Promise<any>;\n\n estimateGas(\n options: EstimateGasOptions,\n callback?: (err: Error, gas: number) => void\n ): Promise<number>;\n\n estimateGas(callback: (err: Error, gas: number) => void): Promise<number>;\n\n estimateGas(\n options: EstimateGasOptions,\n callback: (err: Error, gas: number) => void\n ): Promise<number>;\n\n estimateGas(options: EstimateGasOptions): Promise<number>;\n\n estimateGas(): Promise<number>;\n\n encodeABI(): string;\n}\n\nexport interface CallOptions {\n from?: string;\n gasPrice?: string;\n gas?: number;\n}\n\nexport interface SendOptions {\n from: string;\n gasPrice?: string;\n gas?: number;\n value?: number | string | BN;\n nonce?: number;\n}\n\nexport interface EstimateGasOptions {\n from?: string;\n gas?: number;\n value?: number | string | BN;\n}\n\nexport interface ContractOptions {\n // Sender to use for contract calls\n from?: string;\n // Gas price to use for contract calls\n gasPrice?: string;\n // Gas to use for contract calls\n gas?: number;\n // Contract code\n data?: string;\n}\n\nexport interface PastEventOptions extends PastLogsOptions {\n filter?: Filter;\n}\n\nexport interface EventOptions extends LogsOptions {\n filter?: Filter;\n}\n\nexport interface Filter {\n [key: string]: number | string | string[] | number[];\n}\n\nexport interface EventData {\n returnValues: {\n [key: string]: any;\n };\n raw: {\n data: string;\n topics: string[];\n };\n event: string;\n signature: string;\n logIndex: number;\n transactionIndex: number;\n transactionHash: string;\n blockHash: string;\n blockNumber: number;\n address: string;\n}\n");
/***/ })
}]);
//# sourceMappingURL=raw-loader!web3-eth-contract-types-index-d-ts.0.24.1.1655931290200.js.map
//# sourceMappingURL=raw-loader!web3-eth-contract-types-index-d-ts.0.24.1.1655931290200.js.map