Move type decl. to typescript-typings
This commit is contained in:
@@ -1,18 +1,11 @@
|
||||
import { AssetProxyId, ERC20AssetData, ERC721AssetData } from '@0xproject/types';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import BN = require('bn.js');
|
||||
import ethAbi = require('ethereumjs-abi');
|
||||
import ethUtil = require('ethereumjs-util');
|
||||
|
||||
import { constants } from './constants';
|
||||
|
||||
// TODO: Push upstream to DefinitelyTyped
|
||||
interface EthAbi {
|
||||
simpleEncode(signature: string, ...args: any[]): Buffer;
|
||||
rawDecode(signature: string[], data: Buffer): any[];
|
||||
}
|
||||
// tslint:disable:no-var-requires
|
||||
const ethAbi = require('ethereumjs-abi') as EthAbi;
|
||||
|
||||
export const assetDataUtils = {
|
||||
encodeUint256(value: BigNumber): Buffer {
|
||||
const base = 10;
|
||||
|
||||
7
packages/typescript-typings/types/ethereumjs-abi/index.d.ts
vendored
Normal file
7
packages/typescript-typings/types/ethereumjs-abi/index.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
declare module 'ethereumjs-util' {
|
||||
export function soliditySHA3(argTypes: string[], args: any[]): Buffer;
|
||||
export function soliditySHA256(argTypes: string[], args: any[]): Buffer;
|
||||
export function methodID(name: string, types: string[]): Buffer;
|
||||
export function simpleEncode(signature: string, ...args: any[]): Buffer;
|
||||
export function rawDecode(signature: string[], data: Buffer): any[];
|
||||
}
|
||||
Reference in New Issue
Block a user