-
Notifications
You must be signed in to change notification settings - Fork 24
/
index.d.ts
99 lines (99 loc) · 2.44 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
import * as protobuf from '@aelfqueen/protobufjs/light';
import HttpProvider from './util/httpProvider';
import Wallet from './wallet/index';
import * as proto from './util/proto';
import * as utils from './util/utils';
import { sha256 } from 'js-sha256';
import * as transform from './util/transform';
import {
arrayToHex,
padLeft,
padRight,
decodeAddressRep,
encodeAddressRep,
isBigNumber,
isString,
isFunction,
isObject,
isBoolean,
isJson,
toBigNumber,
getValueOfUnit,
fromWei,
toWei,
toTwosComplement,
uint8ArrayToHex,
noop,
setPath,
unpackSpecifiedTypeData,
deserializeTransaction,
getAuthorization,
} from './util/utils';
import {
isInBloom,
isEventInBloom,
isIndexedInBloom,
isAddressInBloom,
} from './util/bloom';
interface IUtils {
base58: utils.base58;
chainIdConvertor: utils.chainIdConvertor;
arrayToHex: typeof arrayToHex;
padLeft: typeof padLeft;
padRight: typeof padRight;
decodeAddressRep: typeof decodeAddressRep;
encodeAddressRep: typeof encodeAddressRep;
isBigNumber: typeof isBigNumber;
isString: typeof isString;
isFunction: typeof isFunction;
isObject: typeof isObject;
isBoolean: typeof isBoolean;
isJson: typeof isJson;
toBigNumber: typeof toBigNumber;
getValueOfUnit: typeof getValueOfUnit;
fromWei: typeof fromWei;
toWei: typeof toWei;
toTwosComplement: typeof toTwosComplement;
uint8ArrayToHex: typeof uint8ArrayToHex;
noop: typeof noop;
setPath: typeof setPath;
unpackSpecifiedTypeData: typeof unpackSpecifiedTypeData;
deserializeTransaction: typeof deserializeTransaction;
getAuthorization: typeof getAuthorization;
}
import Settings from './util/settings';
interface IBloom {
isInBloom: typeof isInBloom;
isEventInBloom: typeof isEventInBloom;
isIndexedInBloom: typeof isIndexedInBloom;
isAddressInBloom: typeof isAddressInBloom;
}
type TUtil = IUtils &
IBloom & {
sha256: typeof sha256;
} & {
transform: typeof transform;
};
interface IVersion {
api?: string;
}
declare namespace AElf {}
export declare class AElf {
constructor(provider: HttpProvider);
static version?: string;
static providers: {
HttpProvider: HttpProvider;
};
static pbjs: typeof protobuf;
static pbUtils: typeof proto;
static wallet: Wallet;
static utils: TUtil;
providers: {
HttpProvider: HttpProvider;
};
settings: Settings;
version: IVersion;
isConnected(): boolean;
setProvider(provider: HttpProvider): void;
}
export default AElf;