@trustwallet/wallet-core 3.1.1 → 3.1.3
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.
- package/dist/lib/wallet-core.js +1 -1
- package/dist/lib/wallet-core.wasm +0 -0
- package/dist/src/wallet-core.d.ts +496 -496
- package/package.json +1 -1
package/dist/lib/wallet-core.js
CHANGED
@@ -34,7 +34,7 @@ function Ra(){I++;g.monitorRunDependencies&&g.monitorRunDependencies(I);assert(!
|
|
34
34
|
function Sa(){return K.startsWith("data:application/octet-stream;base64,")}function L(a){return function(){var b=g.asm;assert(Na,"native function `"+a+"` called before runtime initialization");b[a]||assert(b[a],"exported native function `"+a+"` not found");return b[a].apply(null,arguments)}}var K;K="wallet-core.wasm";if(!Sa()){var Ta=K;K=g.locateFile?g.locateFile(Ta,x):x+Ta}
|
35
35
|
function Ua(){var a=K;try{if(a==K&&qa)return new Uint8Array(qa);if(ka)return ka(a);throw"both async and sync fetching of the wasm failed";}catch(b){n(b)}}
|
36
36
|
function Va(){if(!qa&&(ea||fa)){if("function"==typeof fetch&&!K.startsWith("file://"))return fetch(K,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+K+"'";return a.arrayBuffer()}).catch(function(){return Ua()});if(ja)return new Promise(function(a,b){ja(K,function(c){a(new Uint8Array(c))},b)})}return Promise.resolve().then(function(){return Ua()})}
|
37
|
-
var Wa,Xa,Ya={
|
37
|
+
var Wa,Xa,Ya={563572:()=>{if(void 0===g.ea)try{var a="object"===typeof window?window:self,b="undefined"!==typeof a.crypto?a.crypto:a.msCrypto;a=function(){var d=new Uint32Array(1);b.getRandomValues(d);return d[0]>>>0};a();g.ea=a}catch(d){try{var c=require("crypto");a=function(){var e=c.randomBytes(4);return(e[0]<<24|e[1]<<16|e[2]<<8|e[3])>>>0};a();g.ea=a}catch(e){throw"No secure random number generator found";}}},564294:()=>g.ea()};function Za(a){for(;0<a.length;)a.shift()(g)}
|
38
38
|
function $a(a){return a.replace(/\b_Z[\w\d_]+/g,function(b){va("warning: build with -sDEMANGLE_SUPPORT to link in libcxxabi demangling");return b===b?b:b+" ["+b+"]"})}function va(a){ab||(ab={});ab[a]||(ab[a]=1,v&&(a="warning: "+a),y(a))}var ab;function bb(a,b){assert(0<=a.length,"writeArrayToMemory array must have a length (should be an array or typed array)");D.set(a,b)}
|
39
39
|
function cb(a){this.l=a-24;this.Ma=function(b){G[this.l+4>>2]=b};this.Ha=function(b){G[this.l+8>>2]=b};this.Ia=function(){F[this.l>>2]=0};this.Da=function(){D[this.l+12>>0]=0};this.Ja=function(){D[this.l+13>>0]=0};this.I=function(b,c){this.Ca();this.Ma(b);this.Ha(c);this.Ia();this.Da();this.Ja()};this.Ca=function(){G[this.l+16>>2]=0}}
|
40
40
|
var db=0,eb=(a,b)=>{for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a},fb=a=>{var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=eb(a.split("/").filter(d=>!!d),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a},gb=a=>{var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b},hb=
|
Binary file
|
@@ -6,48 +6,109 @@
|
|
6
6
|
//
|
7
7
|
// This is a GENERATED FILE, changes made here WILL BE LOST.
|
8
8
|
//
|
9
|
+
export namespace HexCoding {
|
10
|
+
export function decode(hex: string): Uint8Array;
|
11
|
+
export function encode(buffer: Uint8Array | Buffer): string;
|
12
|
+
}
|
9
13
|
export class AnySigner {
|
10
14
|
static sign(data: Uint8Array | Buffer, coin: CoinType): Uint8Array;
|
11
15
|
static plan(data: Uint8Array | Buffer, coin: CoinType): Uint8Array;
|
12
16
|
static supportsJSON(coin: CoinType): boolean;
|
13
17
|
}
|
14
|
-
export
|
15
|
-
|
16
|
-
|
18
|
+
export class EthereumAbiValue {
|
19
|
+
static encodeBool(value: boolean): Uint8Array;
|
20
|
+
static encodeInt32(value: number): Uint8Array;
|
21
|
+
static encodeUInt32(value: number): Uint8Array;
|
22
|
+
static encodeInt256(value: Uint8Array | Buffer): Uint8Array;
|
23
|
+
static encodeUInt256(value: Uint8Array | Buffer): Uint8Array;
|
24
|
+
static encodeAddress(value: Uint8Array | Buffer): Uint8Array;
|
25
|
+
static encodeString(value: string): Uint8Array;
|
26
|
+
static encodeBytes(value: Uint8Array | Buffer): Uint8Array;
|
27
|
+
static encodeBytesDyn(value: Uint8Array | Buffer): Uint8Array;
|
28
|
+
static decodeUInt256(input: Uint8Array | Buffer): string;
|
29
|
+
static decodeValue(input: Uint8Array | Buffer, type: string): string;
|
30
|
+
static decodeArray(input: Uint8Array | Buffer, type: string): string;
|
17
31
|
}
|
18
|
-
export class
|
19
|
-
static
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
32
|
+
export class Account {
|
33
|
+
static create(address: string, coin: CoinType, derivation: Derivation, derivationPath: string, publicKey: string, extendedPublicKey: string): Account;
|
34
|
+
address(): string;
|
35
|
+
derivation(): Derivation;
|
36
|
+
derivationPath(): string;
|
37
|
+
publicKey(): string;
|
38
|
+
extendedPublicKey(): string;
|
39
|
+
coin(): CoinType;
|
26
40
|
delete(): void;
|
27
41
|
}
|
28
|
-
export class
|
42
|
+
export class StellarVersionByte {
|
29
43
|
value: number;
|
30
|
-
static
|
31
|
-
static
|
44
|
+
static accountID: StellarVersionByte;
|
45
|
+
static seed: StellarVersionByte;
|
46
|
+
static preAuthTX: StellarVersionByte;
|
47
|
+
static sha256Hash: StellarVersionByte;
|
32
48
|
}
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
49
|
+
export class PrivateKey {
|
50
|
+
static isValid(data: Uint8Array | Buffer, curve: Curve): boolean;
|
51
|
+
static create(): PrivateKey;
|
52
|
+
static createWithData(data: Uint8Array | Buffer): PrivateKey;
|
53
|
+
static createCopy(key: PrivateKey): PrivateKey;
|
54
|
+
data(): Uint8Array;
|
55
|
+
getPublicKey(coinType: CoinType): PublicKey;
|
56
|
+
getPublicKeyByType(pubkeyType: PublicKeyType): PublicKey;
|
57
|
+
getPublicKeySecp256k1(compressed: boolean): PublicKey;
|
58
|
+
getPublicKeyNist256p1(): PublicKey;
|
59
|
+
getPublicKeyEd25519(): PublicKey;
|
60
|
+
getPublicKeyEd25519Blake2b(): PublicKey;
|
61
|
+
getPublicKeyEd25519Cardano(): PublicKey;
|
62
|
+
getPublicKeyCurve25519(): PublicKey;
|
63
|
+
getSharedKey(publicKey: PublicKey, curve: Curve): Uint8Array;
|
64
|
+
sign(digest: Uint8Array | Buffer, curve: Curve): Uint8Array;
|
65
|
+
signAsDER(digest: Uint8Array | Buffer): Uint8Array;
|
66
|
+
signZilliqaSchnorr(message: Uint8Array | Buffer): Uint8Array;
|
67
|
+
delete(): void;
|
68
|
+
}
|
69
|
+
export class Derivation {
|
37
70
|
value: number;
|
38
|
-
static
|
39
|
-
static
|
71
|
+
static default: Derivation;
|
72
|
+
static custom: Derivation;
|
73
|
+
static bitcoinSegwit: Derivation;
|
74
|
+
static bitcoinLegacy: Derivation;
|
75
|
+
static bitcoinTestnet: Derivation;
|
76
|
+
static litecoinLegacy: Derivation;
|
77
|
+
static solanaSolana: Derivation;
|
40
78
|
}
|
41
|
-
export class
|
42
|
-
static
|
43
|
-
|
79
|
+
export class StoredKey {
|
80
|
+
static load(path: string): StoredKey;
|
81
|
+
static importPrivateKey(privateKey: Uint8Array | Buffer, name: string, password: Uint8Array | Buffer, coin: CoinType): StoredKey;
|
82
|
+
static importPrivateKeyWithEncryption(privateKey: Uint8Array | Buffer, name: string, password: Uint8Array | Buffer, coin: CoinType, encryption: StoredKeyEncryption): StoredKey;
|
83
|
+
static importHDWallet(mnemonic: string, name: string, password: Uint8Array | Buffer, coin: CoinType): StoredKey;
|
84
|
+
static importHDWalletWithEncryption(mnemonic: string, name: string, password: Uint8Array | Buffer, coin: CoinType, encryption: StoredKeyEncryption): StoredKey;
|
85
|
+
static importJSON(json: Uint8Array | Buffer): StoredKey;
|
86
|
+
static createLevel(name: string, password: Uint8Array | Buffer, encryptionLevel: StoredKeyEncryptionLevel): StoredKey;
|
87
|
+
static createLevelAndEncryption(name: string, password: Uint8Array | Buffer, encryptionLevel: StoredKeyEncryptionLevel, encryption: StoredKeyEncryption): StoredKey;
|
88
|
+
static create(name: string, password: Uint8Array | Buffer): StoredKey;
|
89
|
+
static createEncryption(name: string, password: Uint8Array | Buffer, encryption: StoredKeyEncryption): StoredKey;
|
90
|
+
identifier(): string;
|
91
|
+
name(): string;
|
92
|
+
isMnemonic(): boolean;
|
93
|
+
accountCount(): number;
|
94
|
+
encryptionParameters(): string;
|
95
|
+
account(index: number): Account;
|
96
|
+
accountForCoin(coin: CoinType, wallet: HDWallet): Account;
|
97
|
+
accountForCoinDerivation(coin: CoinType, derivation: Derivation, wallet: HDWallet): Account;
|
98
|
+
addAccountDerivation(address: string, coin: CoinType, derivation: Derivation, derivationPath: string, publicKey: string, extendedPublicKey: string): void;
|
99
|
+
addAccount(address: string, coin: CoinType, derivationPath: string, publicKey: string, extendedPublicKey: string): void;
|
100
|
+
removeAccountForCoin(coin: CoinType): void;
|
101
|
+
removeAccountForCoinDerivation(coin: CoinType, derivation: Derivation): void;
|
102
|
+
removeAccountForCoinDerivationPath(coin: CoinType, derivationPath: string): void;
|
103
|
+
store(path: string): boolean;
|
104
|
+
decryptPrivateKey(password: Uint8Array | Buffer): Uint8Array;
|
105
|
+
decryptMnemonic(password: Uint8Array | Buffer): string;
|
106
|
+
privateKey(coin: CoinType, password: Uint8Array | Buffer): PrivateKey;
|
107
|
+
wallet(password: Uint8Array | Buffer): HDWallet;
|
108
|
+
exportJSON(): Uint8Array;
|
109
|
+
fixAddresses(password: Uint8Array | Buffer): boolean;
|
44
110
|
delete(): void;
|
45
111
|
}
|
46
|
-
export class Mnemonic {
|
47
|
-
static isValid(mnemonic: string): boolean;
|
48
|
-
static isValidWord(word: string): boolean;
|
49
|
-
static suggest(prefix: string): string;
|
50
|
-
}
|
51
112
|
export class EthereumAbiFunction {
|
52
113
|
static createWithString(name: string): EthereumAbiFunction;
|
53
114
|
getType(): string;
|
@@ -94,14 +155,18 @@ export class EthereumAbiFunction {
|
|
94
155
|
addInArrayParamBytesFix(arrayIdx: number, size: number, val: Uint8Array | Buffer): number;
|
95
156
|
delete(): void;
|
96
157
|
}
|
97
|
-
export class
|
158
|
+
export class Curve {
|
98
159
|
value: number;
|
99
|
-
static
|
100
|
-
static
|
101
|
-
static
|
102
|
-
static
|
103
|
-
static
|
160
|
+
static secp256k1: Curve;
|
161
|
+
static ed25519: Curve;
|
162
|
+
static ed25519Blake2bNano: Curve;
|
163
|
+
static curve25519: Curve;
|
164
|
+
static nist256p1: Curve;
|
165
|
+
static ed25519ExtendedCardano: Curve;
|
104
166
|
}
|
167
|
+
|
168
|
+
declare function describeCurve(value: Curve): string;
|
169
|
+
|
105
170
|
export class CoinTypeConfiguration {
|
106
171
|
static getSymbol(type: CoinType): string;
|
107
172
|
static getDecimals(type: CoinType): number;
|
@@ -110,163 +175,106 @@ export class CoinTypeConfiguration {
|
|
110
175
|
static getID(type: CoinType): string;
|
111
176
|
static getName(type: CoinType): string;
|
112
177
|
}
|
113
|
-
export class
|
114
|
-
static encodeBool(value: boolean): Uint8Array;
|
115
|
-
static encodeInt32(value: number): Uint8Array;
|
116
|
-
static encodeUInt32(value: number): Uint8Array;
|
117
|
-
static encodeInt256(value: Uint8Array | Buffer): Uint8Array;
|
118
|
-
static encodeUInt256(value: Uint8Array | Buffer): Uint8Array;
|
119
|
-
static encodeAddress(value: Uint8Array | Buffer): Uint8Array;
|
120
|
-
static encodeString(value: string): Uint8Array;
|
121
|
-
static encodeBytes(value: Uint8Array | Buffer): Uint8Array;
|
122
|
-
static encodeBytesDyn(value: Uint8Array | Buffer): Uint8Array;
|
123
|
-
static decodeUInt256(input: Uint8Array | Buffer): string;
|
124
|
-
static decodeValue(input: Uint8Array | Buffer, type: string): string;
|
125
|
-
static decodeArray(input: Uint8Array | Buffer, type: string): string;
|
126
|
-
}
|
127
|
-
export class Derivation {
|
178
|
+
export class StellarMemoType {
|
128
179
|
value: number;
|
129
|
-
static
|
130
|
-
static
|
131
|
-
static
|
132
|
-
static
|
133
|
-
static
|
134
|
-
static litecoinLegacy: Derivation;
|
135
|
-
static solanaSolana: Derivation;
|
180
|
+
static none: StellarMemoType;
|
181
|
+
static text: StellarMemoType;
|
182
|
+
static id: StellarMemoType;
|
183
|
+
static hash: StellarMemoType;
|
184
|
+
static return: StellarMemoType;
|
136
185
|
}
|
137
|
-
export class
|
186
|
+
export class HRP {
|
138
187
|
value: number;
|
139
|
-
static
|
140
|
-
static
|
141
|
-
static
|
142
|
-
static
|
143
|
-
static
|
144
|
-
|
145
|
-
|
146
|
-
static
|
147
|
-
static
|
148
|
-
static
|
149
|
-
static
|
150
|
-
|
151
|
-
|
152
|
-
static
|
153
|
-
static
|
154
|
-
static
|
155
|
-
static
|
156
|
-
static
|
157
|
-
static
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
static
|
165
|
-
|
166
|
-
|
167
|
-
static
|
168
|
-
static isValidString(string: string): boolean;
|
169
|
-
static createWithString(string: string): GroestlcoinAddress;
|
170
|
-
static createWithPublicKey(publicKey: PublicKey, prefix: number): GroestlcoinAddress;
|
171
|
-
description(): string;
|
172
|
-
delete(): void;
|
173
|
-
}
|
174
|
-
export class Account {
|
175
|
-
static create(address: string, coin: CoinType, derivation: Derivation, derivationPath: string, publicKey: string, extendedPublicKey: string): Account;
|
176
|
-
address(): string;
|
177
|
-
derivation(): Derivation;
|
178
|
-
derivationPath(): string;
|
179
|
-
publicKey(): string;
|
180
|
-
extendedPublicKey(): string;
|
181
|
-
coin(): CoinType;
|
182
|
-
delete(): void;
|
188
|
+
static unknown: HRP;
|
189
|
+
static bitcoin: HRP;
|
190
|
+
static litecoin: HRP;
|
191
|
+
static viacoin: HRP;
|
192
|
+
static groestlcoin: HRP;
|
193
|
+
static digiByte: HRP;
|
194
|
+
static monacoin: HRP;
|
195
|
+
static cosmos: HRP;
|
196
|
+
static bitcoinCash: HRP;
|
197
|
+
static bitcoinGold: HRP;
|
198
|
+
static ioTeX: HRP;
|
199
|
+
static nervos: HRP;
|
200
|
+
static zilliqa: HRP;
|
201
|
+
static terra: HRP;
|
202
|
+
static cryptoOrg: HRP;
|
203
|
+
static kava: HRP;
|
204
|
+
static oasis: HRP;
|
205
|
+
static bluzelle: HRP;
|
206
|
+
static bandChain: HRP;
|
207
|
+
static elrond: HRP;
|
208
|
+
static binance: HRP;
|
209
|
+
static ecash: HRP;
|
210
|
+
static thorchain: HRP;
|
211
|
+
static harmony: HRP;
|
212
|
+
static cardano: HRP;
|
213
|
+
static qtum: HRP;
|
214
|
+
static osmosis: HRP;
|
215
|
+
static terraV2: HRP;
|
216
|
+
static nativeEvmos: HRP;
|
183
217
|
}
|
218
|
+
|
219
|
+
declare function describeHRP(value: HRP): string;
|
220
|
+
|
184
221
|
export class PBKDF2 {
|
185
222
|
static hmacSha256(password: Uint8Array | Buffer, salt: Uint8Array | Buffer, iterations: number, dkLen: number): Uint8Array;
|
186
223
|
static hmacSha512(password: Uint8Array | Buffer, salt: Uint8Array | Buffer, iterations: number, dkLen: number): Uint8Array;
|
187
224
|
}
|
188
|
-
export class
|
189
|
-
static isValid(data: Uint8Array | Buffer, curve: Curve): boolean;
|
190
|
-
static create(): PrivateKey;
|
191
|
-
static createWithData(data: Uint8Array | Buffer): PrivateKey;
|
192
|
-
static createCopy(key: PrivateKey): PrivateKey;
|
193
|
-
data(): Uint8Array;
|
194
|
-
getPublicKey(coinType: CoinType): PublicKey;
|
195
|
-
getPublicKeyByType(pubkeyType: PublicKeyType): PublicKey;
|
196
|
-
getPublicKeySecp256k1(compressed: boolean): PublicKey;
|
197
|
-
getPublicKeyNist256p1(): PublicKey;
|
198
|
-
getPublicKeyEd25519(): PublicKey;
|
199
|
-
getPublicKeyEd25519Blake2b(): PublicKey;
|
200
|
-
getPublicKeyEd25519Cardano(): PublicKey;
|
201
|
-
getPublicKeyCurve25519(): PublicKey;
|
202
|
-
getSharedKey(publicKey: PublicKey, curve: Curve): Uint8Array;
|
203
|
-
sign(digest: Uint8Array | Buffer, curve: Curve): Uint8Array;
|
204
|
-
signAsDER(digest: Uint8Array | Buffer): Uint8Array;
|
205
|
-
signZilliqaSchnorr(message: Uint8Array | Buffer): Uint8Array;
|
206
|
-
delete(): void;
|
207
|
-
}
|
208
|
-
export class BitcoinScript {
|
209
|
-
static equal(lhs: BitcoinScript, rhs: BitcoinScript): boolean;
|
210
|
-
static buildPayToPublicKey(pubkey: Uint8Array | Buffer): BitcoinScript;
|
211
|
-
static buildPayToPublicKeyHash(hash: Uint8Array | Buffer): BitcoinScript;
|
212
|
-
static buildPayToScriptHash(scriptHash: Uint8Array | Buffer): BitcoinScript;
|
213
|
-
static buildPayToWitnessPubkeyHash(hash: Uint8Array | Buffer): BitcoinScript;
|
214
|
-
static buildPayToWitnessScriptHash(scriptHash: Uint8Array | Buffer): BitcoinScript;
|
215
|
-
static lockScriptForAddress(address: string, coin: CoinType): BitcoinScript;
|
216
|
-
static hashTypeForCoin(coinType: CoinType): number;
|
217
|
-
static create(): BitcoinScript;
|
218
|
-
static createWithData(data: Uint8Array | Buffer): BitcoinScript;
|
219
|
-
static createCopy(script: BitcoinScript): BitcoinScript;
|
220
|
-
size(): number;
|
221
|
-
data(): Uint8Array;
|
222
|
-
scriptHash(): Uint8Array;
|
223
|
-
isPayToScriptHash(): boolean;
|
224
|
-
isPayToWitnessScriptHash(): boolean;
|
225
|
-
isPayToWitnessPublicKeyHash(): boolean;
|
226
|
-
isWitnessProgram(): boolean;
|
227
|
-
matchPayToPubkey(): Uint8Array;
|
228
|
-
matchPayToPubkeyHash(): Uint8Array;
|
229
|
-
matchPayToScriptHash(): Uint8Array;
|
230
|
-
matchPayToWitnessPublicKeyHash(): Uint8Array;
|
231
|
-
matchPayToWitnessScriptHash(): Uint8Array;
|
232
|
-
encode(): Uint8Array;
|
233
|
-
delete(): void;
|
234
|
-
}
|
235
|
-
export class StellarVersionByte {
|
236
|
-
value: number;
|
237
|
-
static accountID: StellarVersionByte;
|
238
|
-
static seed: StellarVersionByte;
|
239
|
-
static preAuthTX: StellarVersionByte;
|
240
|
-
static sha256Hash: StellarVersionByte;
|
241
|
-
}
|
242
|
-
export class NEARAccount {
|
243
|
-
static createWithString(string: string): NEARAccount;
|
244
|
-
description(): string;
|
245
|
-
delete(): void;
|
246
|
-
}
|
247
|
-
export class Base58 {
|
248
|
-
static encode(data: Uint8Array | Buffer): string;
|
249
|
-
static encodeNoCheck(data: Uint8Array | Buffer): string;
|
250
|
-
static decode(string: string): Uint8Array;
|
251
|
-
static decodeNoCheck(string: string): Uint8Array;
|
252
|
-
}
|
253
|
-
export class SS58AddressType {
|
225
|
+
export class Blockchain {
|
254
226
|
value: number;
|
255
|
-
static
|
256
|
-
static
|
227
|
+
static bitcoin: Blockchain;
|
228
|
+
static ethereum: Blockchain;
|
229
|
+
static vechain: Blockchain;
|
230
|
+
static tron: Blockchain;
|
231
|
+
static icon: Blockchain;
|
232
|
+
static binance: Blockchain;
|
233
|
+
static ripple: Blockchain;
|
234
|
+
static tezos: Blockchain;
|
235
|
+
static nimiq: Blockchain;
|
236
|
+
static stellar: Blockchain;
|
237
|
+
static aion: Blockchain;
|
238
|
+
static cosmos: Blockchain;
|
239
|
+
static theta: Blockchain;
|
240
|
+
static ontology: Blockchain;
|
241
|
+
static zilliqa: Blockchain;
|
242
|
+
static ioTeX: Blockchain;
|
243
|
+
static eos: Blockchain;
|
244
|
+
static nano: Blockchain;
|
245
|
+
static nuls: Blockchain;
|
246
|
+
static waves: Blockchain;
|
247
|
+
static aeternity: Blockchain;
|
248
|
+
static nebulas: Blockchain;
|
249
|
+
static fio: Blockchain;
|
250
|
+
static solana: Blockchain;
|
251
|
+
static harmony: Blockchain;
|
252
|
+
static near: Blockchain;
|
253
|
+
static algorand: Blockchain;
|
254
|
+
static polkadot: Blockchain;
|
255
|
+
static cardano: Blockchain;
|
256
|
+
static neo: Blockchain;
|
257
|
+
static filecoin: Blockchain;
|
258
|
+
static elrondNetwork: Blockchain;
|
259
|
+
static oasisNetwork: Blockchain;
|
260
|
+
static decred: Blockchain;
|
261
|
+
static zcash: Blockchain;
|
262
|
+
static groestlcoin: Blockchain;
|
263
|
+
static thorchain: Blockchain;
|
264
|
+
static ronin: Blockchain;
|
265
|
+
static kusama: Blockchain;
|
266
|
+
static nervos: Blockchain;
|
267
|
+
static everscale: Blockchain;
|
268
|
+
static aptos: Blockchain;
|
269
|
+
static hedera: Blockchain;
|
257
270
|
}
|
258
|
-
export class
|
271
|
+
export class AESPaddingMode {
|
259
272
|
value: number;
|
260
|
-
static
|
261
|
-
static
|
262
|
-
static aes192Ctr: StoredKeyEncryption;
|
263
|
-
static aes256Ctr: StoredKeyEncryption;
|
273
|
+
static zero: AESPaddingMode;
|
274
|
+
static pkcs7: AESPaddingMode;
|
264
275
|
}
|
265
|
-
export class
|
266
|
-
static
|
267
|
-
static decodeUrl(string: string): Uint8Array;
|
268
|
-
static encode(data: Uint8Array | Buffer): string;
|
269
|
-
static encodeUrl(data: Uint8Array | Buffer): string;
|
276
|
+
export class THORChainSwap {
|
277
|
+
static buildSwap(input: Uint8Array | Buffer): Uint8Array;
|
270
278
|
}
|
271
279
|
export class HDWallet {
|
272
280
|
static getPublicKeyFromExtended(extended: string, coin: CoinType, derivationPath: string): PublicKey;
|
@@ -293,6 +301,29 @@ export class HDWallet {
|
|
293
301
|
getExtendedPublicKeyDerivation(purpose: Purpose, coin: CoinType, derivation: Derivation, version: HDVersion): string;
|
294
302
|
delete(): void;
|
295
303
|
}
|
304
|
+
export class PrivateKeyType {
|
305
|
+
value: number;
|
306
|
+
static default: PrivateKeyType;
|
307
|
+
static cardano: PrivateKeyType;
|
308
|
+
}
|
309
|
+
export class TransactionCompiler {
|
310
|
+
static buildInput(coinType: CoinType, from: string, to: string, amount: string, asset: string, memo: string, chainId: string): Uint8Array;
|
311
|
+
static preImageHashes(coinType: CoinType, txInputData: Uint8Array | Buffer): Uint8Array;
|
312
|
+
static compileWithSignatures(coinType: CoinType, txInputData: Uint8Array | Buffer, signatures: DataVector, publicKeys: DataVector): Uint8Array;
|
313
|
+
}
|
314
|
+
export class Base64 {
|
315
|
+
static decode(string: string): Uint8Array;
|
316
|
+
static decodeUrl(string: string): Uint8Array;
|
317
|
+
static encode(data: Uint8Array | Buffer): string;
|
318
|
+
static encodeUrl(data: Uint8Array | Buffer): string;
|
319
|
+
}
|
320
|
+
export class StoredKeyEncryptionLevel {
|
321
|
+
value: number;
|
322
|
+
static default: StoredKeyEncryptionLevel;
|
323
|
+
static minimal: StoredKeyEncryptionLevel;
|
324
|
+
static weak: StoredKeyEncryptionLevel;
|
325
|
+
static standard: StoredKeyEncryptionLevel;
|
326
|
+
}
|
296
327
|
export class SegwitAddress {
|
297
328
|
static equal(lhs: SegwitAddress, rhs: SegwitAddress): boolean;
|
298
329
|
static isValidString(string: string): boolean;
|
@@ -304,38 +335,52 @@ export class SegwitAddress {
|
|
304
335
|
witnessProgram(): Uint8Array;
|
305
336
|
delete(): void;
|
306
337
|
}
|
307
|
-
export class
|
308
|
-
|
309
|
-
static
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
338
|
+
export class Purpose {
|
339
|
+
value: number;
|
340
|
+
static bip44: Purpose;
|
341
|
+
static bip49: Purpose;
|
342
|
+
static bip84: Purpose;
|
343
|
+
static bip1852: Purpose;
|
344
|
+
}
|
345
|
+
export class AnyAddress {
|
346
|
+
static equal(lhs: AnyAddress, rhs: AnyAddress): boolean;
|
347
|
+
static isValid(string: string, coin: CoinType): boolean;
|
348
|
+
static isValidBech32(string: string, coin: CoinType, hrp: string): boolean;
|
349
|
+
static isValidSS58(string: string, coin: CoinType, ss58Prefix: number): boolean;
|
350
|
+
static createWithString(string: string, coin: CoinType): AnyAddress;
|
351
|
+
static createBech32(string: string, coin: CoinType, hrp: string): AnyAddress;
|
352
|
+
static createSS58(string: string, coin: CoinType, ss58Prefix: number): AnyAddress;
|
353
|
+
static createWithPublicKey(publicKey: PublicKey, coin: CoinType): AnyAddress;
|
354
|
+
static createWithPublicKeyDerivation(publicKey: PublicKey, coin: CoinType, derivation: Derivation): AnyAddress;
|
355
|
+
static createBech32WithPublicKey(publicKey: PublicKey, coin: CoinType, hrp: string): AnyAddress;
|
356
|
+
static createSS58WithPublicKey(publicKey: PublicKey, coin: CoinType, ss58Prefix: number): AnyAddress;
|
315
357
|
description(): string;
|
316
|
-
|
317
|
-
|
358
|
+
coin(): CoinType;
|
359
|
+
data(): Uint8Array;
|
318
360
|
delete(): void;
|
319
361
|
}
|
320
|
-
export class
|
321
|
-
static
|
322
|
-
static
|
323
|
-
static
|
324
|
-
static
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
static
|
330
|
-
static
|
331
|
-
static
|
332
|
-
static
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
static
|
362
|
+
export class GroestlcoinAddress {
|
363
|
+
static equal(lhs: GroestlcoinAddress, rhs: GroestlcoinAddress): boolean;
|
364
|
+
static isValidString(string: string): boolean;
|
365
|
+
static createWithString(string: string): GroestlcoinAddress;
|
366
|
+
static createWithPublicKey(publicKey: PublicKey, prefix: number): GroestlcoinAddress;
|
367
|
+
description(): string;
|
368
|
+
delete(): void;
|
369
|
+
}
|
370
|
+
export class RippleXAddress {
|
371
|
+
static equal(lhs: RippleXAddress, rhs: RippleXAddress): boolean;
|
372
|
+
static isValidString(string: string): boolean;
|
373
|
+
static createWithString(string: string): RippleXAddress;
|
374
|
+
static createWithPublicKey(publicKey: PublicKey, tag: number): RippleXAddress;
|
375
|
+
description(): string;
|
376
|
+
tag(): number;
|
377
|
+
delete(): void;
|
378
|
+
}
|
379
|
+
export class SolanaAddress {
|
380
|
+
static createWithString(string: string): SolanaAddress;
|
381
|
+
description(): string;
|
382
|
+
defaultTokenAddress(tokenMintAddress: string): string;
|
383
|
+
delete(): void;
|
339
384
|
}
|
340
385
|
export class PublicKey {
|
341
386
|
static isValid(data: Uint8Array | Buffer, type: PublicKeyType): boolean;
|
@@ -352,104 +397,98 @@ export class PublicKey {
|
|
352
397
|
verifyZilliqaSchnorr(signature: Uint8Array | Buffer, message: Uint8Array | Buffer): boolean;
|
353
398
|
delete(): void;
|
354
399
|
}
|
355
|
-
export class
|
356
|
-
value: number;
|
357
|
-
static ethereum: EthereumChainID;
|
358
|
-
static classic: EthereumChainID;
|
359
|
-
static poa: EthereumChainID;
|
360
|
-
static vechain: EthereumChainID;
|
361
|
-
static callisto: EthereumChainID;
|
362
|
-
static tomochain: EthereumChainID;
|
363
|
-
static polygon: EthereumChainID;
|
364
|
-
static okc: EthereumChainID;
|
365
|
-
static thundertoken: EthereumChainID;
|
366
|
-
static gochain: EthereumChainID;
|
367
|
-
static meter: EthereumChainID;
|
368
|
-
static celo: EthereumChainID;
|
369
|
-
static wanchain: EthereumChainID;
|
370
|
-
static cronos: EthereumChainID;
|
371
|
-
static optimism: EthereumChainID;
|
372
|
-
static xdai: EthereumChainID;
|
373
|
-
static smartbch: EthereumChainID;
|
374
|
-
static fantom: EthereumChainID;
|
375
|
-
static zksync: EthereumChainID;
|
376
|
-
static boba: EthereumChainID;
|
377
|
-
static kcc: EthereumChainID;
|
378
|
-
static heco: EthereumChainID;
|
379
|
-
static metis: EthereumChainID;
|
380
|
-
static moonbeam: EthereumChainID;
|
381
|
-
static moonriver: EthereumChainID;
|
382
|
-
static ronin: EthereumChainID;
|
383
|
-
static kavaevm: EthereumChainID;
|
384
|
-
static klaytn: EthereumChainID;
|
385
|
-
static avalanchec: EthereumChainID;
|
386
|
-
static evmos: EthereumChainID;
|
387
|
-
static arbitrum: EthereumChainID;
|
388
|
-
static smartchain: EthereumChainID;
|
389
|
-
static aurora: EthereumChainID;
|
390
|
-
}
|
391
|
-
export class StoredKeyEncryptionLevel {
|
400
|
+
export class BitcoinSigHashType {
|
392
401
|
value: number;
|
393
|
-
static
|
394
|
-
static
|
395
|
-
static
|
396
|
-
static
|
402
|
+
static all: BitcoinSigHashType;
|
403
|
+
static none: BitcoinSigHashType;
|
404
|
+
static single: BitcoinSigHashType;
|
405
|
+
static fork: BitcoinSigHashType;
|
406
|
+
static forkBTG: BitcoinSigHashType;
|
397
407
|
}
|
398
408
|
export class Cardano {
|
399
409
|
static minAdaAmount(tokenBundle: Uint8Array | Buffer): number;
|
400
410
|
static getStakingAddress(baseAddress: string): string;
|
401
411
|
}
|
412
|
+
export class BitcoinAddress {
|
413
|
+
static equal(lhs: BitcoinAddress, rhs: BitcoinAddress): boolean;
|
414
|
+
static isValid(data: Uint8Array | Buffer): boolean;
|
415
|
+
static isValidString(string: string): boolean;
|
416
|
+
static createWithString(string: string): BitcoinAddress;
|
417
|
+
static createWithData(data: Uint8Array | Buffer): BitcoinAddress;
|
418
|
+
static createWithPublicKey(publicKey: PublicKey, prefix: number): BitcoinAddress;
|
419
|
+
description(): string;
|
420
|
+
prefix(): number;
|
421
|
+
keyhash(): Uint8Array;
|
422
|
+
delete(): void;
|
423
|
+
}
|
424
|
+
export class PublicKeyType {
|
425
|
+
value: number;
|
426
|
+
static secp256k1: PublicKeyType;
|
427
|
+
static secp256k1Extended: PublicKeyType;
|
428
|
+
static nist256p1: PublicKeyType;
|
429
|
+
static nist256p1Extended: PublicKeyType;
|
430
|
+
static ed25519: PublicKeyType;
|
431
|
+
static ed25519Blake2b: PublicKeyType;
|
432
|
+
static curve25519: PublicKeyType;
|
433
|
+
static ed25519Cardano: PublicKeyType;
|
434
|
+
}
|
435
|
+
export class StoredKeyEncryption {
|
436
|
+
value: number;
|
437
|
+
static aes128Ctr: StoredKeyEncryption;
|
438
|
+
static aes128Cbc: StoredKeyEncryption;
|
439
|
+
static aes192Ctr: StoredKeyEncryption;
|
440
|
+
static aes256Ctr: StoredKeyEncryption;
|
441
|
+
}
|
442
|
+
export class AES {
|
443
|
+
static encryptCBC(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer, mode: AESPaddingMode): Uint8Array;
|
444
|
+
static decryptCBC(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer, mode: AESPaddingMode): Uint8Array;
|
445
|
+
static encryptCTR(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer): Uint8Array;
|
446
|
+
static decryptCTR(key: Uint8Array | Buffer, data: Uint8Array | Buffer, iv: Uint8Array | Buffer): Uint8Array;
|
447
|
+
}
|
448
|
+
export class DerivationPathIndex {
|
449
|
+
static create(value: number, hardened: boolean): DerivationPathIndex;
|
450
|
+
value(): number;
|
451
|
+
hardened(): boolean;
|
452
|
+
description(): string;
|
453
|
+
delete(): void;
|
454
|
+
}
|
455
|
+
export class FIOAccount {
|
456
|
+
static createWithString(string: string): FIOAccount;
|
457
|
+
description(): string;
|
458
|
+
delete(): void;
|
459
|
+
}
|
402
460
|
export class EthereumAbi {
|
403
461
|
static encode(fn: EthereumAbiFunction): Uint8Array;
|
404
462
|
static decodeOutput(fn: EthereumAbiFunction, encoded: Uint8Array | Buffer): boolean;
|
405
463
|
static decodeCall(data: Uint8Array | Buffer, abi: string): string;
|
406
464
|
static encodeTyped(messageJson: string): Uint8Array;
|
407
465
|
}
|
408
|
-
export class
|
409
|
-
|
410
|
-
static
|
411
|
-
static
|
412
|
-
|
413
|
-
|
414
|
-
static
|
415
|
-
static
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
static
|
428
|
-
static
|
429
|
-
|
430
|
-
|
431
|
-
static
|
432
|
-
|
433
|
-
|
434
|
-
static harmony: Blockchain;
|
435
|
-
static near: Blockchain;
|
436
|
-
static algorand: Blockchain;
|
437
|
-
static polkadot: Blockchain;
|
438
|
-
static cardano: Blockchain;
|
439
|
-
static neo: Blockchain;
|
440
|
-
static filecoin: Blockchain;
|
441
|
-
static elrondNetwork: Blockchain;
|
442
|
-
static oasisNetwork: Blockchain;
|
443
|
-
static decred: Blockchain;
|
444
|
-
static zcash: Blockchain;
|
445
|
-
static groestlcoin: Blockchain;
|
446
|
-
static thorchain: Blockchain;
|
447
|
-
static ronin: Blockchain;
|
448
|
-
static kusama: Blockchain;
|
449
|
-
static nervos: Blockchain;
|
450
|
-
static everscale: Blockchain;
|
451
|
-
static aptos: Blockchain;
|
452
|
-
static hedera: Blockchain;
|
466
|
+
export class Mnemonic {
|
467
|
+
static isValid(mnemonic: string): boolean;
|
468
|
+
static isValidWord(word: string): boolean;
|
469
|
+
static suggest(prefix: string): string;
|
470
|
+
}
|
471
|
+
export class DerivationPath {
|
472
|
+
static create(purpose: Purpose, coin: number, account: number, change: number, address: number): DerivationPath;
|
473
|
+
static createWithString(string: string): DerivationPath;
|
474
|
+
purpose(): Purpose;
|
475
|
+
coin(): number;
|
476
|
+
account(): number;
|
477
|
+
change(): number;
|
478
|
+
address(): number;
|
479
|
+
description(): string;
|
480
|
+
indexAt(index: number): DerivationPathIndex;
|
481
|
+
indicesCount(): number;
|
482
|
+
delete(): void;
|
483
|
+
}
|
484
|
+
export class BitcoinMessageSigner {
|
485
|
+
static signMessage(privateKey: PrivateKey, address: string, message: string): string;
|
486
|
+
static verifyMessage(address: string, message: string, signature: string): boolean;
|
487
|
+
}
|
488
|
+
export class NEARAccount {
|
489
|
+
static createWithString(string: string): NEARAccount;
|
490
|
+
description(): string;
|
491
|
+
delete(): void;
|
453
492
|
}
|
454
493
|
export class HDVersion {
|
455
494
|
value: number;
|
@@ -469,23 +508,126 @@ export class HDVersion {
|
|
469
508
|
static dgub: HDVersion;
|
470
509
|
static dgpv: HDVersion;
|
471
510
|
}
|
472
|
-
export class
|
473
|
-
static
|
474
|
-
static
|
475
|
-
static
|
476
|
-
static
|
477
|
-
|
478
|
-
|
479
|
-
static
|
480
|
-
static
|
481
|
-
static
|
482
|
-
static
|
483
|
-
static
|
484
|
-
|
485
|
-
coin
|
511
|
+
export class Base32 {
|
512
|
+
static decodeWithAlphabet(string: string, alphabet: string): Uint8Array;
|
513
|
+
static decode(string: string): Uint8Array;
|
514
|
+
static encodeWithAlphabet(data: Uint8Array | Buffer, alphabet: string): string;
|
515
|
+
static encode(data: Uint8Array | Buffer): string;
|
516
|
+
}
|
517
|
+
export class BitcoinScript {
|
518
|
+
static equal(lhs: BitcoinScript, rhs: BitcoinScript): boolean;
|
519
|
+
static buildPayToPublicKey(pubkey: Uint8Array | Buffer): BitcoinScript;
|
520
|
+
static buildPayToPublicKeyHash(hash: Uint8Array | Buffer): BitcoinScript;
|
521
|
+
static buildPayToScriptHash(scriptHash: Uint8Array | Buffer): BitcoinScript;
|
522
|
+
static buildPayToWitnessPubkeyHash(hash: Uint8Array | Buffer): BitcoinScript;
|
523
|
+
static buildPayToWitnessScriptHash(scriptHash: Uint8Array | Buffer): BitcoinScript;
|
524
|
+
static lockScriptForAddress(address: string, coin: CoinType): BitcoinScript;
|
525
|
+
static hashTypeForCoin(coinType: CoinType): number;
|
526
|
+
static create(): BitcoinScript;
|
527
|
+
static createWithData(data: Uint8Array | Buffer): BitcoinScript;
|
528
|
+
static createCopy(script: BitcoinScript): BitcoinScript;
|
529
|
+
size(): number;
|
486
530
|
data(): Uint8Array;
|
531
|
+
scriptHash(): Uint8Array;
|
532
|
+
isPayToScriptHash(): boolean;
|
533
|
+
isPayToWitnessScriptHash(): boolean;
|
534
|
+
isPayToWitnessPublicKeyHash(): boolean;
|
535
|
+
isWitnessProgram(): boolean;
|
536
|
+
matchPayToPubkey(): Uint8Array;
|
537
|
+
matchPayToPubkeyHash(): Uint8Array;
|
538
|
+
matchPayToScriptHash(): Uint8Array;
|
539
|
+
matchPayToWitnessPublicKeyHash(): Uint8Array;
|
540
|
+
matchPayToWitnessScriptHash(): Uint8Array;
|
541
|
+
encode(): Uint8Array;
|
542
|
+
delete(): void;
|
543
|
+
}
|
544
|
+
export class SS58AddressType {
|
545
|
+
value: number;
|
546
|
+
static polkadot: SS58AddressType;
|
547
|
+
static kusama: SS58AddressType;
|
548
|
+
}
|
549
|
+
export class StellarPassphrase {
|
550
|
+
value: number;
|
551
|
+
static stellar: StellarPassphrase;
|
552
|
+
static kin: StellarPassphrase;
|
553
|
+
}
|
554
|
+
|
555
|
+
declare function describeStellarPassphrase(value: StellarPassphrase): string;
|
556
|
+
|
557
|
+
export class Hash {
|
558
|
+
static sha1(data: Uint8Array | Buffer): Uint8Array;
|
559
|
+
static sha256(data: Uint8Array | Buffer): Uint8Array;
|
560
|
+
static sha512(data: Uint8Array | Buffer): Uint8Array;
|
561
|
+
static sha512_256(data: Uint8Array | Buffer): Uint8Array;
|
562
|
+
static keccak256(data: Uint8Array | Buffer): Uint8Array;
|
563
|
+
static keccak512(data: Uint8Array | Buffer): Uint8Array;
|
564
|
+
static sha3_256(data: Uint8Array | Buffer): Uint8Array;
|
565
|
+
static sha3_512(data: Uint8Array | Buffer): Uint8Array;
|
566
|
+
static ripemd(data: Uint8Array | Buffer): Uint8Array;
|
567
|
+
static blake256(data: Uint8Array | Buffer): Uint8Array;
|
568
|
+
static blake2b(data: Uint8Array | Buffer, size: number): Uint8Array;
|
569
|
+
static groestl512(data: Uint8Array | Buffer): Uint8Array;
|
570
|
+
static sha256SHA256(data: Uint8Array | Buffer): Uint8Array;
|
571
|
+
static sha256RIPEMD(data: Uint8Array | Buffer): Uint8Array;
|
572
|
+
static sha3_256RIPEMD(data: Uint8Array | Buffer): Uint8Array;
|
573
|
+
static blake256Blake256(data: Uint8Array | Buffer): Uint8Array;
|
574
|
+
static blake256RIPEMD(data: Uint8Array | Buffer): Uint8Array;
|
575
|
+
static groestl512Groestl512(data: Uint8Array | Buffer): Uint8Array;
|
576
|
+
}
|
577
|
+
export class DataVector {
|
578
|
+
static create(): DataVector;
|
579
|
+
static createWithData(data: Uint8Array | Buffer): DataVector;
|
580
|
+
size(): number;
|
581
|
+
add(data: Uint8Array | Buffer): void;
|
582
|
+
get(index: number): Uint8Array;
|
583
|
+
delete(): void;
|
584
|
+
}
|
585
|
+
export class NervosAddress {
|
586
|
+
static equal(lhs: NervosAddress, rhs: NervosAddress): boolean;
|
587
|
+
static isValidString(string: string): boolean;
|
588
|
+
static createWithString(string: string): NervosAddress;
|
589
|
+
description(): string;
|
590
|
+
codeHash(): Uint8Array;
|
591
|
+
hashType(): string;
|
592
|
+
args(): Uint8Array;
|
487
593
|
delete(): void;
|
488
594
|
}
|
595
|
+
export class EthereumChainID {
|
596
|
+
value: number;
|
597
|
+
static ethereum: EthereumChainID;
|
598
|
+
static classic: EthereumChainID;
|
599
|
+
static poa: EthereumChainID;
|
600
|
+
static vechain: EthereumChainID;
|
601
|
+
static callisto: EthereumChainID;
|
602
|
+
static tomochain: EthereumChainID;
|
603
|
+
static polygon: EthereumChainID;
|
604
|
+
static okc: EthereumChainID;
|
605
|
+
static thundertoken: EthereumChainID;
|
606
|
+
static gochain: EthereumChainID;
|
607
|
+
static meter: EthereumChainID;
|
608
|
+
static celo: EthereumChainID;
|
609
|
+
static wanchain: EthereumChainID;
|
610
|
+
static cronos: EthereumChainID;
|
611
|
+
static optimism: EthereumChainID;
|
612
|
+
static xdai: EthereumChainID;
|
613
|
+
static smartbch: EthereumChainID;
|
614
|
+
static fantom: EthereumChainID;
|
615
|
+
static zksync: EthereumChainID;
|
616
|
+
static boba: EthereumChainID;
|
617
|
+
static kcc: EthereumChainID;
|
618
|
+
static heco: EthereumChainID;
|
619
|
+
static metis: EthereumChainID;
|
620
|
+
static moonbeam: EthereumChainID;
|
621
|
+
static moonriver: EthereumChainID;
|
622
|
+
static ronin: EthereumChainID;
|
623
|
+
static kavaevm: EthereumChainID;
|
624
|
+
static klaytn: EthereumChainID;
|
625
|
+
static avalanchec: EthereumChainID;
|
626
|
+
static evmos: EthereumChainID;
|
627
|
+
static arbitrum: EthereumChainID;
|
628
|
+
static smartchain: EthereumChainID;
|
629
|
+
static aurora: EthereumChainID;
|
630
|
+
}
|
489
631
|
export class CoinType {
|
490
632
|
value: number;
|
491
633
|
static aeternity: CoinType;
|
@@ -585,209 +727,67 @@ export class CoinType {
|
|
585
727
|
static aptos: CoinType;
|
586
728
|
static hedera: CoinType;
|
587
729
|
}
|
588
|
-
export class
|
589
|
-
static equal(lhs: RippleXAddress, rhs: RippleXAddress): boolean;
|
590
|
-
static isValidString(string: string): boolean;
|
591
|
-
static createWithString(string: string): RippleXAddress;
|
592
|
-
static createWithPublicKey(publicKey: PublicKey, tag: number): RippleXAddress;
|
593
|
-
description(): string;
|
594
|
-
tag(): number;
|
595
|
-
delete(): void;
|
596
|
-
}
|
597
|
-
export class PrivateKeyType {
|
598
|
-
value: number;
|
599
|
-
static default: PrivateKeyType;
|
600
|
-
static cardano: PrivateKeyType;
|
601
|
-
}
|
602
|
-
export class BitcoinMessageSigner {
|
603
|
-
static signMessage(privateKey: PrivateKey, address: string, message: string): string;
|
604
|
-
static verifyMessage(address: string, message: string, signature: string): boolean;
|
605
|
-
}
|
606
|
-
export class StoredKey {
|
607
|
-
static load(path: string): StoredKey;
|
608
|
-
static importPrivateKey(privateKey: Uint8Array | Buffer, name: string, password: Uint8Array | Buffer, coin: CoinType): StoredKey;
|
609
|
-
static importPrivateKeyWithEncryption(privateKey: Uint8Array | Buffer, name: string, password: Uint8Array | Buffer, coin: CoinType, encryption: StoredKeyEncryption): StoredKey;
|
610
|
-
static importHDWallet(mnemonic: string, name: string, password: Uint8Array | Buffer, coin: CoinType): StoredKey;
|
611
|
-
static importHDWalletWithEncryption(mnemonic: string, name: string, password: Uint8Array | Buffer, coin: CoinType, encryption: StoredKeyEncryption): StoredKey;
|
612
|
-
static importJSON(json: Uint8Array | Buffer): StoredKey;
|
613
|
-
static createLevel(name: string, password: Uint8Array | Buffer, encryptionLevel: StoredKeyEncryptionLevel): StoredKey;
|
614
|
-
static createLevelAndEncryption(name: string, password: Uint8Array | Buffer, encryptionLevel: StoredKeyEncryptionLevel, encryption: StoredKeyEncryption): StoredKey;
|
615
|
-
static create(name: string, password: Uint8Array | Buffer): StoredKey;
|
616
|
-
static createEncryption(name: string, password: Uint8Array | Buffer, encryption: StoredKeyEncryption): StoredKey;
|
617
|
-
identifier(): string;
|
618
|
-
name(): string;
|
619
|
-
isMnemonic(): boolean;
|
620
|
-
accountCount(): number;
|
621
|
-
encryptionParameters(): string;
|
622
|
-
account(index: number): Account;
|
623
|
-
accountForCoin(coin: CoinType, wallet: HDWallet): Account;
|
624
|
-
accountForCoinDerivation(coin: CoinType, derivation: Derivation, wallet: HDWallet): Account;
|
625
|
-
addAccountDerivation(address: string, coin: CoinType, derivation: Derivation, derivationPath: string, publicKey: string, extendedPublicKey: string): void;
|
626
|
-
addAccount(address: string, coin: CoinType, derivationPath: string, publicKey: string, extendedPublicKey: string): void;
|
627
|
-
removeAccountForCoin(coin: CoinType): void;
|
628
|
-
removeAccountForCoinDerivation(coin: CoinType, derivation: Derivation): void;
|
629
|
-
removeAccountForCoinDerivationPath(coin: CoinType, derivationPath: string): void;
|
630
|
-
store(path: string): boolean;
|
631
|
-
decryptPrivateKey(password: Uint8Array | Buffer): Uint8Array;
|
632
|
-
decryptMnemonic(password: Uint8Array | Buffer): string;
|
633
|
-
privateKey(coin: CoinType, password: Uint8Array | Buffer): PrivateKey;
|
634
|
-
wallet(password: Uint8Array | Buffer): HDWallet;
|
635
|
-
exportJSON(): Uint8Array;
|
636
|
-
fixAddresses(password: Uint8Array | Buffer): boolean;
|
637
|
-
delete(): void;
|
638
|
-
}
|
639
|
-
export class Base32 {
|
640
|
-
static decodeWithAlphabet(string: string, alphabet: string): Uint8Array;
|
641
|
-
static decode(string: string): Uint8Array;
|
642
|
-
static encodeWithAlphabet(data: Uint8Array | Buffer, alphabet: string): string;
|
730
|
+
export class Base58 {
|
643
731
|
static encode(data: Uint8Array | Buffer): string;
|
644
|
-
|
645
|
-
|
646
|
-
static
|
647
|
-
static preImageHashes(coinType: CoinType, txInputData: Uint8Array | Buffer): Uint8Array;
|
648
|
-
static compileWithSignatures(coinType: CoinType, txInputData: Uint8Array | Buffer, signatures: DataVector, publicKeys: DataVector): Uint8Array;
|
649
|
-
}
|
650
|
-
export class Purpose {
|
651
|
-
value: number;
|
652
|
-
static bip44: Purpose;
|
653
|
-
static bip49: Purpose;
|
654
|
-
static bip84: Purpose;
|
655
|
-
static bip1852: Purpose;
|
656
|
-
}
|
657
|
-
export class Curve {
|
658
|
-
value: number;
|
659
|
-
static secp256k1: Curve;
|
660
|
-
static ed25519: Curve;
|
661
|
-
static ed25519Blake2bNano: Curve;
|
662
|
-
static curve25519: Curve;
|
663
|
-
static nist256p1: Curve;
|
664
|
-
static ed25519ExtendedCardano: Curve;
|
665
|
-
}
|
666
|
-
|
667
|
-
declare function describeCurve(value: Curve): string;
|
668
|
-
|
669
|
-
export class HRP {
|
670
|
-
value: number;
|
671
|
-
static unknown: HRP;
|
672
|
-
static bitcoin: HRP;
|
673
|
-
static litecoin: HRP;
|
674
|
-
static viacoin: HRP;
|
675
|
-
static groestlcoin: HRP;
|
676
|
-
static digiByte: HRP;
|
677
|
-
static monacoin: HRP;
|
678
|
-
static cosmos: HRP;
|
679
|
-
static bitcoinCash: HRP;
|
680
|
-
static bitcoinGold: HRP;
|
681
|
-
static ioTeX: HRP;
|
682
|
-
static nervos: HRP;
|
683
|
-
static zilliqa: HRP;
|
684
|
-
static terra: HRP;
|
685
|
-
static cryptoOrg: HRP;
|
686
|
-
static kava: HRP;
|
687
|
-
static oasis: HRP;
|
688
|
-
static bluzelle: HRP;
|
689
|
-
static bandChain: HRP;
|
690
|
-
static elrond: HRP;
|
691
|
-
static binance: HRP;
|
692
|
-
static ecash: HRP;
|
693
|
-
static thorchain: HRP;
|
694
|
-
static harmony: HRP;
|
695
|
-
static cardano: HRP;
|
696
|
-
static qtum: HRP;
|
697
|
-
static osmosis: HRP;
|
698
|
-
static terraV2: HRP;
|
699
|
-
static nativeEvmos: HRP;
|
700
|
-
}
|
701
|
-
|
702
|
-
declare function describeHRP(value: HRP): string;
|
703
|
-
|
704
|
-
export class DataVector {
|
705
|
-
static create(): DataVector;
|
706
|
-
static createWithData(data: Uint8Array | Buffer): DataVector;
|
707
|
-
size(): number;
|
708
|
-
add(data: Uint8Array | Buffer): void;
|
709
|
-
get(index: number): Uint8Array;
|
710
|
-
delete(): void;
|
711
|
-
}
|
712
|
-
export class PublicKeyType {
|
713
|
-
value: number;
|
714
|
-
static secp256k1: PublicKeyType;
|
715
|
-
static secp256k1Extended: PublicKeyType;
|
716
|
-
static nist256p1: PublicKeyType;
|
717
|
-
static nist256p1Extended: PublicKeyType;
|
718
|
-
static ed25519: PublicKeyType;
|
719
|
-
static ed25519Blake2b: PublicKeyType;
|
720
|
-
static curve25519: PublicKeyType;
|
721
|
-
static ed25519Cardano: PublicKeyType;
|
722
|
-
}
|
723
|
-
export class DerivationPathIndex {
|
724
|
-
static create(value: number, hardened: boolean): DerivationPathIndex;
|
725
|
-
value(): number;
|
726
|
-
hardened(): boolean;
|
727
|
-
description(): string;
|
728
|
-
delete(): void;
|
729
|
-
}
|
730
|
-
export class SolanaAddress {
|
731
|
-
static createWithString(string: string): SolanaAddress;
|
732
|
-
description(): string;
|
733
|
-
defaultTokenAddress(tokenMintAddress: string): string;
|
734
|
-
delete(): void;
|
732
|
+
static encodeNoCheck(data: Uint8Array | Buffer): string;
|
733
|
+
static decode(string: string): Uint8Array;
|
734
|
+
static decodeNoCheck(string: string): Uint8Array;
|
735
735
|
}
|
736
736
|
export interface WalletCore {
|
737
|
-
AnySigner: typeof AnySigner;
|
738
737
|
HexCoding: typeof HexCoding;
|
739
|
-
|
740
|
-
StellarPassphrase: typeof StellarPassphrase;
|
741
|
-
AESPaddingMode: typeof AESPaddingMode;
|
742
|
-
FIOAccount: typeof FIOAccount;
|
743
|
-
Mnemonic: typeof Mnemonic;
|
744
|
-
EthereumAbiFunction: typeof EthereumAbiFunction;
|
745
|
-
StellarMemoType: typeof StellarMemoType;
|
746
|
-
CoinTypeConfiguration: typeof CoinTypeConfiguration;
|
738
|
+
AnySigner: typeof AnySigner;
|
747
739
|
EthereumAbiValue: typeof EthereumAbiValue;
|
748
|
-
Derivation: typeof Derivation;
|
749
|
-
BitcoinSigHashType: typeof BitcoinSigHashType;
|
750
|
-
AES: typeof AES;
|
751
|
-
BitcoinAddress: typeof BitcoinAddress;
|
752
|
-
THORChainSwap: typeof THORChainSwap;
|
753
|
-
GroestlcoinAddress: typeof GroestlcoinAddress;
|
754
740
|
Account: typeof Account;
|
755
|
-
PBKDF2: typeof PBKDF2;
|
756
|
-
PrivateKey: typeof PrivateKey;
|
757
|
-
BitcoinScript: typeof BitcoinScript;
|
758
741
|
StellarVersionByte: typeof StellarVersionByte;
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
742
|
+
PrivateKey: typeof PrivateKey;
|
743
|
+
Derivation: typeof Derivation;
|
744
|
+
StoredKey: typeof StoredKey;
|
745
|
+
EthereumAbiFunction: typeof EthereumAbiFunction;
|
746
|
+
Curve: typeof Curve;
|
747
|
+
CoinTypeConfiguration: typeof CoinTypeConfiguration;
|
748
|
+
StellarMemoType: typeof StellarMemoType;
|
749
|
+
HRP: typeof HRP;
|
750
|
+
PBKDF2: typeof PBKDF2;
|
751
|
+
Blockchain: typeof Blockchain;
|
752
|
+
AESPaddingMode: typeof AESPaddingMode;
|
753
|
+
THORChainSwap: typeof THORChainSwap;
|
764
754
|
HDWallet: typeof HDWallet;
|
755
|
+
PrivateKeyType: typeof PrivateKeyType;
|
756
|
+
TransactionCompiler: typeof TransactionCompiler;
|
757
|
+
Base64: typeof Base64;
|
758
|
+
StoredKeyEncryptionLevel: typeof StoredKeyEncryptionLevel;
|
765
759
|
SegwitAddress: typeof SegwitAddress;
|
766
|
-
|
767
|
-
|
760
|
+
Purpose: typeof Purpose;
|
761
|
+
AnyAddress: typeof AnyAddress;
|
762
|
+
GroestlcoinAddress: typeof GroestlcoinAddress;
|
763
|
+
RippleXAddress: typeof RippleXAddress;
|
764
|
+
SolanaAddress: typeof SolanaAddress;
|
768
765
|
PublicKey: typeof PublicKey;
|
769
|
-
|
770
|
-
StoredKeyEncryptionLevel: typeof StoredKeyEncryptionLevel;
|
766
|
+
BitcoinSigHashType: typeof BitcoinSigHashType;
|
771
767
|
Cardano: typeof Cardano;
|
768
|
+
BitcoinAddress: typeof BitcoinAddress;
|
769
|
+
PublicKeyType: typeof PublicKeyType;
|
770
|
+
StoredKeyEncryption: typeof StoredKeyEncryption;
|
771
|
+
AES: typeof AES;
|
772
|
+
DerivationPathIndex: typeof DerivationPathIndex;
|
773
|
+
FIOAccount: typeof FIOAccount;
|
772
774
|
EthereumAbi: typeof EthereumAbi;
|
773
|
-
|
774
|
-
|
775
|
-
AnyAddress: typeof AnyAddress;
|
776
|
-
CoinType: typeof CoinType;
|
777
|
-
RippleXAddress: typeof RippleXAddress;
|
778
|
-
PrivateKeyType: typeof PrivateKeyType;
|
775
|
+
Mnemonic: typeof Mnemonic;
|
776
|
+
DerivationPath: typeof DerivationPath;
|
779
777
|
BitcoinMessageSigner: typeof BitcoinMessageSigner;
|
780
|
-
|
778
|
+
NEARAccount: typeof NEARAccount;
|
779
|
+
HDVersion: typeof HDVersion;
|
781
780
|
Base32: typeof Base32;
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
781
|
+
BitcoinScript: typeof BitcoinScript;
|
782
|
+
SS58AddressType: typeof SS58AddressType;
|
783
|
+
StellarPassphrase: typeof StellarPassphrase;
|
784
|
+
Hash: typeof Hash;
|
786
785
|
DataVector: typeof DataVector;
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
786
|
+
NervosAddress: typeof NervosAddress;
|
787
|
+
EthereumChainID: typeof EthereumChainID;
|
788
|
+
CoinType: typeof CoinType;
|
789
|
+
Base58: typeof Base58;
|
791
790
|
describeCurve: typeof describeCurve;
|
792
791
|
describeHRP: typeof describeHRP;
|
792
|
+
describeStellarPassphrase: typeof describeStellarPassphrase;
|
793
793
|
}
|