Move our contract templates to accept Provider instead of Web3Wrapper
This commit is contained in:
1
packages/typescript-typings/types/async-child-process/index.d.ts
vendored
Normal file
1
packages/typescript-typings/types/async-child-process/index.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
declare module 'async-child-process';
|
11
packages/typescript-typings/types/blockies/index.d.ts
vendored
Normal file
11
packages/typescript-typings/types/blockies/index.d.ts
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
// blockies declarations
|
||||
declare interface BlockiesIcon {
|
||||
toDataURL(): string;
|
||||
}
|
||||
declare interface BlockiesConfig {
|
||||
seed: string;
|
||||
}
|
||||
declare function blockies(config: BlockiesConfig): BlockiesIcon;
|
||||
declare module 'blockies' {
|
||||
export = blockies;
|
||||
}
|
5
packages/typescript-typings/types/compare-versions/index.d.ts
vendored
Normal file
5
packages/typescript-typings/types/compare-versions/index.d.ts
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
// compare-version declarations
|
||||
declare function compareVersions(firstVersion: string, secondVersion: string): number;
|
||||
declare module 'compare-versions' {
|
||||
export = compareVersions;
|
||||
}
|
1
packages/typescript-typings/types/es6-promisify/index.d.ts
vendored
Normal file
1
packages/typescript-typings/types/es6-promisify/index.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
declare module 'es6-promisify';
|
4
packages/typescript-typings/types/find-versions/index.d.ts
vendored
Normal file
4
packages/typescript-typings/types/find-versions/index.d.ts
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
declare function findVersions(version: string): string[];
|
||||
declare module 'find-versions' {
|
||||
export = findVersions;
|
||||
}
|
14
packages/typescript-typings/types/ganache-core/index.d.ts
vendored
Normal file
14
packages/typescript-typings/types/ganache-core/index.d.ts
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
declare module 'ganache-core' {
|
||||
import { Provider } from '@0xproject/types';
|
||||
export interface GanacheOpts {
|
||||
verbose?: boolean;
|
||||
logger?: {
|
||||
log(msg: string): void;
|
||||
};
|
||||
port?: number;
|
||||
network_id?: number;
|
||||
mnemonic?: string;
|
||||
}
|
||||
// tslint:disable-next-line:completed-docs
|
||||
export function provider(opts: GanacheOpts): Provider;
|
||||
}
|
4
packages/typescript-typings/types/is-mobile/index.d.ts
vendored
Normal file
4
packages/typescript-typings/types/is-mobile/index.d.ts
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
declare function isMobile(): boolean;
|
||||
declare module 'is-mobile' {
|
||||
export = isMobile;
|
||||
}
|
1
packages/typescript-typings/types/keccak/index.d.ts
vendored
Normal file
1
packages/typescript-typings/types/keccak/index.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
declare module 'keccak';
|
17
packages/typescript-typings/types/lerna-get-packages/index.d.ts
vendored
Normal file
17
packages/typescript-typings/types/lerna-get-packages/index.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
declare interface LernaPackage {
|
||||
location: string;
|
||||
package: {
|
||||
private?: boolean;
|
||||
version: string;
|
||||
name: string;
|
||||
main?: string;
|
||||
config?: {
|
||||
additionalTsTypings?: string[];
|
||||
};
|
||||
};
|
||||
}
|
||||
declare function lernaGetPackages(path: string): LernaPackage[];
|
||||
// lerna-get-packages declarations
|
||||
declare module 'lerna-get-packages' {
|
||||
export = lernaGetPackages;
|
||||
}
|
24
packages/typescript-typings/types/newman/index.d.ts
vendored
Normal file
24
packages/typescript-typings/types/newman/index.d.ts
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
declare module 'newman' {
|
||||
export interface NewmanRunSummary {
|
||||
run: NewmanRun;
|
||||
}
|
||||
export interface NewmanRun {
|
||||
executions: NewmanRunExecution[];
|
||||
}
|
||||
export interface NewmanRunExecution {
|
||||
item: NewmanRunExecutionItem;
|
||||
assertions: NewmanRunExecutionAssertion[];
|
||||
}
|
||||
export interface NewmanRunExecutionItem {
|
||||
name: string;
|
||||
}
|
||||
export interface NewmanRunExecutionAssertion {
|
||||
assertion: string;
|
||||
error: NewmanRunExecutionAssertionError;
|
||||
}
|
||||
export interface NewmanRunExecutionAssertionError {
|
||||
message: string;
|
||||
}
|
||||
// tslint:disable-next-line:completed-docs
|
||||
export function run(options: any, callback?: (err: Error | null, summary: NewmanRunSummary) => void): void;
|
||||
}
|
1
packages/typescript-typings/types/promisify-child-process/index.d.ts
vendored
Normal file
1
packages/typescript-typings/types/promisify-child-process/index.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
declare module 'promisify-child-process';
|
1
packages/typescript-typings/types/publish-release/index.d.ts
vendored
Normal file
1
packages/typescript-typings/types/publish-release/index.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
declare module 'publish-release';
|
1
packages/typescript-typings/types/react-highlight/index.d.ts
vendored
Normal file
1
packages/typescript-typings/types/react-highlight/index.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
declare module 'react-highlight';
|
1
packages/typescript-typings/types/react-tooltip/index.d.ts
vendored
Normal file
1
packages/typescript-typings/types/react-tooltip/index.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
declare module 'react-tooltip';
|
1
packages/typescript-typings/types/request-promise-native/index.d.ts
vendored
Normal file
1
packages/typescript-typings/types/request-promise-native/index.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
declare module 'request-promise-native';
|
1
packages/typescript-typings/types/rollbar/index.d.ts
vendored
Normal file
1
packages/typescript-typings/types/rollbar/index.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
declare module 'rollbar';
|
1
packages/typescript-typings/types/semver-diff/index.d.ts
vendored
Normal file
1
packages/typescript-typings/types/semver-diff/index.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
declare module 'semver-diff';
|
3
packages/typescript-typings/types/semver-sort/index.d.ts
vendored
Normal file
3
packages/typescript-typings/types/semver-sort/index.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
declare module 'semver-sort' {
|
||||
const desc: (versions: string[]) => string[];
|
||||
}
|
314
packages/typescript-typings/types/solidity-parser-antlr/index.d.ts
vendored
Normal file
314
packages/typescript-typings/types/solidity-parser-antlr/index.d.ts
vendored
Normal file
@@ -0,0 +1,314 @@
|
||||
declare module 'solidity-parser-antlr' {
|
||||
export interface BaseASTNode {
|
||||
range: [number, number];
|
||||
}
|
||||
export interface SourceUnit extends BaseASTNode {}
|
||||
export interface PragmaDirective extends BaseASTNode {}
|
||||
export interface PragmaName extends BaseASTNode {}
|
||||
export interface PragmaValue extends BaseASTNode {}
|
||||
export interface Version extends BaseASTNode {}
|
||||
export interface VersionOperator extends BaseASTNode {}
|
||||
export interface VersionConstraint extends BaseASTNode {}
|
||||
export interface ImportDeclaration extends BaseASTNode {}
|
||||
export interface ImportDirective extends BaseASTNode {}
|
||||
export interface ContractDefinition extends BaseASTNode {}
|
||||
export interface InheritanceSpecifier extends BaseASTNode {}
|
||||
export interface ContractPart extends BaseASTNode {}
|
||||
export interface StateVariableDeclaration extends BaseASTNode {
|
||||
variables: VariableDeclaration[];
|
||||
}
|
||||
export interface UsingForDeclaration extends BaseASTNode {}
|
||||
export interface StructDefinition extends BaseASTNode {}
|
||||
export interface ModifierDefinition extends BaseASTNode {
|
||||
name: string;
|
||||
}
|
||||
export interface ModifierInvocation extends BaseASTNode {
|
||||
name: string;
|
||||
}
|
||||
export interface FunctionDefinition extends BaseASTNode {
|
||||
name: string;
|
||||
}
|
||||
export interface ReturnParameters extends BaseASTNode {}
|
||||
export interface ModifierList extends BaseASTNode {}
|
||||
export interface EventDefinition extends BaseASTNode {}
|
||||
export interface EnumValue extends BaseASTNode {}
|
||||
export interface EnumDefinition extends BaseASTNode {}
|
||||
export interface ParameterList extends BaseASTNode {}
|
||||
export interface Parameter extends BaseASTNode {}
|
||||
export interface EventParameterList extends BaseASTNode {}
|
||||
export interface EventParameter extends BaseASTNode {}
|
||||
export interface FunctionTypeParameterList extends BaseASTNode {}
|
||||
export interface FunctionTypeParameter extends BaseASTNode {}
|
||||
export interface VariableDeclaration extends BaseASTNode {
|
||||
visibility: 'public' | 'private';
|
||||
isStateVar: boolean;
|
||||
}
|
||||
export interface TypeName extends BaseASTNode {}
|
||||
export interface UserDefinedTypeName extends BaseASTNode {}
|
||||
export interface Mapping extends BaseASTNode {}
|
||||
export interface FunctionTypeName extends BaseASTNode {}
|
||||
export interface StorageLocation extends BaseASTNode {}
|
||||
export interface StateMutability extends BaseASTNode {}
|
||||
export interface Block extends BaseASTNode {}
|
||||
export interface Statement extends BaseASTNode {}
|
||||
export interface ExpressionStatement extends BaseASTNode {
|
||||
expression: ASTNode;
|
||||
}
|
||||
export interface IfStatement extends BaseASTNode {
|
||||
trueBody: ASTNode;
|
||||
falseBody: ASTNode;
|
||||
}
|
||||
export interface WhileStatement extends BaseASTNode {}
|
||||
export interface SimpleStatement extends BaseASTNode {}
|
||||
export interface ForStatement extends BaseASTNode {}
|
||||
export interface InlineAssemblyStatement extends BaseASTNode {}
|
||||
export interface DoWhileStatement extends BaseASTNode {}
|
||||
export interface ContinueStatement extends BaseASTNode {}
|
||||
export interface BreakStatement extends BaseASTNode {}
|
||||
export interface ReturnStatement extends BaseASTNode {}
|
||||
export interface ThrowStatement extends BaseASTNode {}
|
||||
export interface VariableDeclarationStatement extends BaseASTNode {}
|
||||
export interface IdentifierList extends BaseASTNode {}
|
||||
export interface ElementaryTypeName extends BaseASTNode {}
|
||||
export interface Expression extends BaseASTNode {}
|
||||
export interface PrimaryExpression extends BaseASTNode {}
|
||||
export interface ExpressionList extends BaseASTNode {}
|
||||
export interface NameValueList extends BaseASTNode {}
|
||||
export interface NameValue extends BaseASTNode {}
|
||||
export interface FunctionCallArguments extends BaseASTNode {}
|
||||
export interface AssemblyBlock extends BaseASTNode {}
|
||||
export interface AssemblyItem extends BaseASTNode {}
|
||||
export interface AssemblyExpression extends BaseASTNode {}
|
||||
export interface AssemblyCall extends BaseASTNode {}
|
||||
export interface AssemblyLocalDefinition extends BaseASTNode {}
|
||||
export interface AssemblyAssignment extends BaseASTNode {}
|
||||
export interface AssemblyIdentifierOrList extends BaseASTNode {}
|
||||
export interface AssemblyIdentifierList extends BaseASTNode {}
|
||||
export interface AssemblyStackAssignment extends BaseASTNode {}
|
||||
export interface LabelDefinition extends BaseASTNode {}
|
||||
export interface AssemblySwitch extends BaseASTNode {}
|
||||
export interface AssemblyCase extends BaseASTNode {}
|
||||
export interface AssemblyFunctionDefinition extends BaseASTNode {}
|
||||
export interface AssemblyFunctionReturns extends BaseASTNode {}
|
||||
export interface AssemblyFor extends BaseASTNode {}
|
||||
export interface AssemblyIf extends BaseASTNode {}
|
||||
export interface AssemblyLiteral extends BaseASTNode {}
|
||||
export interface SubAssembly extends BaseASTNode {}
|
||||
export interface TupleExpression extends BaseASTNode {}
|
||||
export interface ElementaryTypeNameExpression extends BaseASTNode {}
|
||||
export interface NumberLiteral extends BaseASTNode {}
|
||||
export interface Identifier extends BaseASTNode {}
|
||||
export type BinOp =
|
||||
| '+'
|
||||
| '-'
|
||||
| '*'
|
||||
| '/'
|
||||
| '**'
|
||||
| '%'
|
||||
| '<<'
|
||||
| '>>'
|
||||
| '&&'
|
||||
| '||'
|
||||
| '&'
|
||||
| '|'
|
||||
| '^'
|
||||
| '<'
|
||||
| '>'
|
||||
| '<='
|
||||
| '>='
|
||||
| '=='
|
||||
| '!='
|
||||
| '='
|
||||
| '|='
|
||||
| '^='
|
||||
| '&='
|
||||
| '<<='
|
||||
| '>>='
|
||||
| '+='
|
||||
| '-='
|
||||
| '*='
|
||||
| '/='
|
||||
| '%=';
|
||||
export interface BinaryOperation extends BaseASTNode {
|
||||
left: ASTNode;
|
||||
right: ASTNode;
|
||||
operator: BinOp;
|
||||
}
|
||||
export interface Conditional extends BaseASTNode {
|
||||
trueExpression: ASTNode;
|
||||
falseExpression: ASTNode;
|
||||
}
|
||||
|
||||
export type ASTNode =
|
||||
| SourceUnit
|
||||
| PragmaDirective
|
||||
| PragmaName
|
||||
| PragmaValue
|
||||
| Version
|
||||
| VersionOperator
|
||||
| VersionConstraint
|
||||
| ImportDeclaration
|
||||
| ImportDirective
|
||||
| ContractDefinition
|
||||
| InheritanceSpecifier
|
||||
| ContractPart
|
||||
| StateVariableDeclaration
|
||||
| UsingForDeclaration
|
||||
| StructDefinition
|
||||
| ModifierDefinition
|
||||
| ModifierInvocation
|
||||
| FunctionDefinition
|
||||
| ReturnParameters
|
||||
| ModifierList
|
||||
| EventDefinition
|
||||
| EnumValue
|
||||
| EnumDefinition
|
||||
| ParameterList
|
||||
| Parameter
|
||||
| EventParameterList
|
||||
| EventParameter
|
||||
| FunctionTypeParameterList
|
||||
| FunctionTypeParameter
|
||||
| VariableDeclaration
|
||||
| TypeName
|
||||
| UserDefinedTypeName
|
||||
| Mapping
|
||||
| FunctionTypeName
|
||||
| StorageLocation
|
||||
| StateMutability
|
||||
| Block
|
||||
| Statement
|
||||
| ExpressionStatement
|
||||
| IfStatement
|
||||
| WhileStatement
|
||||
| SimpleStatement
|
||||
| ForStatement
|
||||
| InlineAssemblyStatement
|
||||
| DoWhileStatement
|
||||
| ContinueStatement
|
||||
| BreakStatement
|
||||
| ReturnStatement
|
||||
| ThrowStatement
|
||||
| VariableDeclarationStatement
|
||||
| IdentifierList
|
||||
| ElementaryTypeName
|
||||
| Expression
|
||||
| PrimaryExpression
|
||||
| ExpressionList
|
||||
| NameValueList
|
||||
| NameValue
|
||||
| FunctionCallArguments
|
||||
| AssemblyBlock
|
||||
| AssemblyItem
|
||||
| AssemblyExpression
|
||||
| AssemblyCall
|
||||
| AssemblyLocalDefinition
|
||||
| AssemblyAssignment
|
||||
| AssemblyIdentifierOrList
|
||||
| AssemblyIdentifierList
|
||||
| AssemblyStackAssignment
|
||||
| LabelDefinition
|
||||
| AssemblySwitch
|
||||
| AssemblyCase
|
||||
| AssemblyFunctionDefinition
|
||||
| AssemblyFunctionReturns
|
||||
| AssemblyFor
|
||||
| AssemblyIf
|
||||
| AssemblyLiteral
|
||||
| SubAssembly
|
||||
| TupleExpression
|
||||
| ElementaryTypeNameExpression
|
||||
| NumberLiteral
|
||||
| Identifier
|
||||
| BinaryOperation
|
||||
| Conditional;
|
||||
export interface Visitor {
|
||||
SourceUnit?: (node: SourceUnit) => void;
|
||||
PragmaDirective?: (node: PragmaDirective) => void;
|
||||
PragmaName?: (node: PragmaName) => void;
|
||||
PragmaValue?: (node: PragmaValue) => void;
|
||||
Version?: (node: Version) => void;
|
||||
VersionOperator?: (node: VersionOperator) => void;
|
||||
VersionConstraint?: (node: VersionConstraint) => void;
|
||||
ImportDeclaration?: (node: ImportDeclaration) => void;
|
||||
ImportDirective?: (node: ImportDirective) => void;
|
||||
ContractDefinition?: (node: ContractDefinition) => void;
|
||||
InheritanceSpecifier?: (node: InheritanceSpecifier) => void;
|
||||
ContractPart?: (node: ContractPart) => void;
|
||||
StateVariableDeclaration?: (node: StateVariableDeclaration) => void;
|
||||
UsingForDeclaration?: (node: UsingForDeclaration) => void;
|
||||
StructDefinition?: (node: StructDefinition) => void;
|
||||
ModifierDefinition?: (node: ModifierDefinition) => void;
|
||||
ModifierInvocation?: (node: ModifierInvocation) => void;
|
||||
FunctionDefinition?: (node: FunctionDefinition) => void;
|
||||
ReturnParameters?: (node: ReturnParameters) => void;
|
||||
ModifierList?: (node: ModifierList) => void;
|
||||
EventDefinition?: (node: EventDefinition) => void;
|
||||
EnumValue?: (node: EnumValue) => void;
|
||||
EnumDefinition?: (node: EnumDefinition) => void;
|
||||
ParameterList?: (node: ParameterList) => void;
|
||||
Parameter?: (node: Parameter) => void;
|
||||
EventParameterList?: (node: EventParameterList) => void;
|
||||
EventParameter?: (node: EventParameter) => void;
|
||||
FunctionTypeParameterList?: (node: FunctionTypeParameterList) => void;
|
||||
FunctionTypeParameter?: (node: FunctionTypeParameter) => void;
|
||||
VariableDeclaration?: (node: VariableDeclaration) => void;
|
||||
TypeName?: (node: TypeName) => void;
|
||||
UserDefinedTypeName?: (node: UserDefinedTypeName) => void;
|
||||
Mapping?: (node: Mapping) => void;
|
||||
FunctionTypeName?: (node: FunctionTypeName) => void;
|
||||
StorageLocation?: (node: StorageLocation) => void;
|
||||
StateMutability?: (node: StateMutability) => void;
|
||||
Block?: (node: Block) => void;
|
||||
Statement?: (node: Statement) => void;
|
||||
ExpressionStatement?: (node: ExpressionStatement) => void;
|
||||
IfStatement?: (node: IfStatement) => void;
|
||||
WhileStatement?: (node: WhileStatement) => void;
|
||||
SimpleStatement?: (node: SimpleStatement) => void;
|
||||
ForStatement?: (node: ForStatement) => void;
|
||||
InlineAssemblyStatement?: (node: InlineAssemblyStatement) => void;
|
||||
DoWhileStatement?: (node: DoWhileStatement) => void;
|
||||
ContinueStatement?: (node: ContinueStatement) => void;
|
||||
BreakStatement?: (node: BreakStatement) => void;
|
||||
ReturnStatement?: (node: ReturnStatement) => void;
|
||||
ThrowStatement?: (node: ThrowStatement) => void;
|
||||
VariableDeclarationStatement?: (node: VariableDeclarationStatement) => void;
|
||||
IdentifierList?: (node: IdentifierList) => void;
|
||||
ElementaryTypeName?: (node: ElementaryTypeName) => void;
|
||||
Expression?: (node: Expression) => void;
|
||||
PrimaryExpression?: (node: PrimaryExpression) => void;
|
||||
ExpressionList?: (node: ExpressionList) => void;
|
||||
NameValueList?: (node: NameValueList) => void;
|
||||
NameValue?: (node: NameValue) => void;
|
||||
FunctionCallArguments?: (node: FunctionCallArguments) => void;
|
||||
AssemblyBlock?: (node: AssemblyBlock) => void;
|
||||
AssemblyItem?: (node: AssemblyItem) => void;
|
||||
AssemblyExpression?: (node: AssemblyExpression) => void;
|
||||
AssemblyCall?: (node: AssemblyCall) => void;
|
||||
AssemblyLocalDefinition?: (node: AssemblyLocalDefinition) => void;
|
||||
AssemblyAssignment?: (node: AssemblyAssignment) => void;
|
||||
AssemblyIdentifierOrList?: (node: AssemblyIdentifierOrList) => void;
|
||||
AssemblyIdentifierList?: (node: AssemblyIdentifierList) => void;
|
||||
AssemblyStackAssignment?: (node: AssemblyStackAssignment) => void;
|
||||
LabelDefinition?: (node: LabelDefinition) => void;
|
||||
AssemblySwitch?: (node: AssemblySwitch) => void;
|
||||
AssemblyCase?: (node: AssemblyCase) => void;
|
||||
AssemblyFunctionDefinition?: (node: AssemblyFunctionDefinition) => void;
|
||||
AssemblyFunctionReturns?: (node: AssemblyFunctionReturns) => void;
|
||||
AssemblyFor?: (node: AssemblyFor) => void;
|
||||
AssemblyIf?: (node: AssemblyIf) => void;
|
||||
AssemblyLiteral?: (node: AssemblyLiteral) => void;
|
||||
SubAssembly?: (node: SubAssembly) => void;
|
||||
TupleExpression?: (node: TupleExpression) => void;
|
||||
ElementaryTypeNameExpression?: (node: ElementaryTypeNameExpression) => void;
|
||||
NumberLiteral?: (node: NumberLiteral) => void;
|
||||
Identifier?: (node: Identifier) => void;
|
||||
BinaryOperation?: (node: BinaryOperation) => void;
|
||||
Conditional?: (node: Conditional) => void;
|
||||
}
|
||||
export interface ParserOpts {
|
||||
range?: boolean;
|
||||
}
|
||||
export function parse(sourceCode: string, parserOpts: ParserOpts): ASTNode;
|
||||
export function visit(ast: ASTNode, visitor: Visitor): void;
|
||||
}
|
4
packages/typescript-typings/types/to-snake-case/index.d.ts
vendored
Normal file
4
packages/typescript-typings/types/to-snake-case/index.d.ts
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
declare function toSnakeCase(str: string): string;
|
||||
declare module 'to-snake-case' {
|
||||
export = toSnakeCase;
|
||||
}
|
@@ -1,7 +1,6 @@
|
||||
declare module 'truffle-hdwallet-provider' {
|
||||
import { JSONRPCRequestPayload, JSONRPCResponsePayload } from '@0xproject/types';
|
||||
import * as Web3 from 'web3';
|
||||
class HDWalletProvider implements Web3.Provider {
|
||||
import { JSONRPCRequestPayload, JSONRPCResponsePayload, Provider } from '@0xproject/types';
|
||||
class HDWalletProvider implements Provider {
|
||||
constructor(mnemonic: string, rpcUrl: string);
|
||||
public sendAsync(
|
||||
payload: JSONRPCRequestPayload,
|
||||
|
@@ -9,3 +9,42 @@ declare module 'web3-provider-engine' {
|
||||
}
|
||||
export = Web3ProviderEngine;
|
||||
}
|
||||
|
||||
declare module 'web3-provider-engine/subproviders/nonce-tracker';
|
||||
declare module 'web3-provider-engine/subproviders/hooked-wallet';
|
||||
declare module 'web3-provider-engine/subproviders/filters';
|
||||
// web3-provider-engine declarations
|
||||
declare module 'web3-provider-engine/subproviders/subprovider' {
|
||||
class Subprovider {}
|
||||
export = Subprovider;
|
||||
}
|
||||
declare module 'web3-provider-engine/subproviders/rpc' {
|
||||
import { JSONRPCRequestPayload } from '@0xproject/types';
|
||||
class RpcSubprovider {
|
||||
constructor(options: { rpcUrl: string });
|
||||
public handleRequest(
|
||||
payload: JSONRPCRequestPayload,
|
||||
next: () => void,
|
||||
end: (err: Error | null, data?: any) => void,
|
||||
): void;
|
||||
}
|
||||
export = RpcSubprovider;
|
||||
}
|
||||
declare module 'web3-provider-engine/util/rpc-cache-utils' {
|
||||
class ProviderEngineRpcUtils {
|
||||
public static blockTagForPayload(payload: any): string | null;
|
||||
}
|
||||
export = ProviderEngineRpcUtils;
|
||||
}
|
||||
declare module 'web3-provider-engine/subproviders/fixture' {
|
||||
import { JSONRPCRequestPayload } from '@0xproject/types';
|
||||
class FixtureSubprovider {
|
||||
constructor(staticResponses: any);
|
||||
public handleRequest(
|
||||
payload: JSONRPCRequestPayload,
|
||||
next: () => void,
|
||||
end: (err: Error | null, data?: any) => void,
|
||||
): void;
|
||||
}
|
||||
export = FixtureSubprovider;
|
||||
}
|
||||
|
@@ -6,6 +6,7 @@ declare module 'web3' {
|
||||
BlockWithoutTransactionData,
|
||||
BlockParam,
|
||||
CallData,
|
||||
Provider,
|
||||
Unit,
|
||||
TxData,
|
||||
Transaction,
|
||||
@@ -21,17 +22,17 @@ declare module 'web3' {
|
||||
|
||||
class Web3 {
|
||||
public static providers: typeof providers;
|
||||
public currentProvider: Web3.Provider;
|
||||
public currentProvider: Provider;
|
||||
|
||||
public eth: Web3.EthApi;
|
||||
public personal: Web3.PersonalApi | undefined;
|
||||
public version: Web3.VersionApi;
|
||||
public net: Web3.NetApi;
|
||||
|
||||
public constructor(provider?: Web3.Provider);
|
||||
public constructor(provider?: Provider);
|
||||
|
||||
public isConnected(): boolean;
|
||||
public setProvider(provider: Web3.Provider): void;
|
||||
public setProvider(provider: Provider): void;
|
||||
public reset(keepIsSyncing: boolean): void;
|
||||
public toHex(data: MixedData): string;
|
||||
public toAscii(hex: string): string;
|
||||
@@ -49,7 +50,7 @@ declare module 'web3' {
|
||||
}
|
||||
|
||||
namespace providers {
|
||||
class HttpProvider implements Web3.Provider {
|
||||
class HttpProvider implements Provider {
|
||||
constructor(url?: string, timeout?: number, username?: string, password?: string);
|
||||
public sendAsync(
|
||||
payload: JSONRPCRequestPayload,
|
||||
@@ -77,13 +78,6 @@ declare module 'web3' {
|
||||
stopWatching(callback?: () => void): void;
|
||||
}
|
||||
|
||||
interface Provider {
|
||||
sendAsync(
|
||||
payload: JSONRPCRequestPayload,
|
||||
callback: (err: Error, result: JSONRPCResponsePayload) => void,
|
||||
): void;
|
||||
}
|
||||
|
||||
interface Sha3Options {
|
||||
encoding: 'hex';
|
||||
}
|
||||
|
1
packages/typescript-typings/types/web3_beta/index.d.ts
vendored
Normal file
1
packages/typescript-typings/types/web3_beta/index.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
declare module 'web3_beta';
|
7
packages/typescript-typings/types/xml-js/index.d.ts
vendored
Normal file
7
packages/typescript-typings/types/xml-js/index.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
declare interface XML2JSONOpts {
|
||||
compact?: boolean;
|
||||
spaces?: number;
|
||||
}
|
||||
declare module 'xml-js' {
|
||||
const xml2json: (xml: string, opts: XML2JSONOpts) => string;
|
||||
}
|
Reference in New Issue
Block a user