@injectivelabs/wallet-base 1.16.25-alpha.0 → 1.16.25
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/cjs/base.d.ts +9 -0
- package/dist/cjs/base.js +17 -0
- package/dist/cjs/index.d.ts +3 -0
- package/dist/cjs/index.js +24 -0
- package/dist/cjs/package.json +2 -2
- package/dist/cjs/types/enums.d.ts +64 -0
- package/dist/cjs/types/enums.js +53 -0
- package/dist/cjs/types/index.d.ts +3 -0
- package/dist/cjs/types/index.js +18 -0
- package/dist/cjs/types/provider.d.ts +38 -0
- package/dist/cjs/types/provider.js +2 -0
- package/dist/cjs/types/strategy.d.ts +256 -0
- package/dist/cjs/types/strategy.js +8 -0
- package/dist/cjs/utils/address.d.ts +2 -0
- package/dist/cjs/utils/address.js +30 -0
- package/dist/cjs/utils/alchemy.d.ts +1 -0
- package/dist/cjs/utils/alchemy.js +11 -0
- package/dist/cjs/utils/constants.d.ts +6 -0
- package/dist/cjs/utils/constants.js +9 -0
- package/dist/cjs/utils/cosmos.d.ts +2 -0
- package/dist/cjs/utils/cosmos.js +13 -0
- package/dist/cjs/utils/index.d.ts +6 -0
- package/dist/cjs/utils/index.js +22 -0
- package/dist/cjs/utils/tx.d.ts +31 -0
- package/dist/cjs/utils/tx.js +14 -0
- package/dist/cjs/utils/wallet.d.ts +7 -0
- package/dist/cjs/utils/wallet.js +52 -0
- package/dist/esm/base.d.ts +9 -0
- package/dist/esm/base.js +14 -0
- package/dist/esm/index.d.ts +3 -436
- package/dist/esm/index.js +3 -1496
- package/dist/esm/package.json +2 -2
- package/dist/esm/types/enums.d.ts +64 -0
- package/dist/esm/types/enums.js +50 -0
- package/dist/esm/types/index.d.ts +3 -0
- package/dist/esm/types/index.js +2 -0
- package/dist/esm/types/provider.d.ts +38 -0
- package/dist/esm/types/provider.js +1 -0
- package/dist/esm/types/strategy.d.ts +256 -0
- package/dist/esm/types/strategy.js +5 -0
- package/dist/esm/utils/address.d.ts +2 -0
- package/dist/esm/utils/address.js +25 -0
- package/dist/esm/utils/alchemy.d.ts +1 -0
- package/dist/esm/utils/alchemy.js +7 -0
- package/dist/esm/utils/constants.d.ts +6 -0
- package/dist/esm/utils/constants.js +6 -0
- package/dist/esm/utils/cosmos.d.ts +2 -0
- package/dist/esm/utils/cosmos.js +9 -0
- package/dist/esm/utils/index.d.ts +6 -0
- package/dist/esm/utils/index.js +6 -0
- package/dist/esm/utils/tx.d.ts +31 -0
- package/dist/esm/utils/tx.js +10 -0
- package/dist/esm/utils/wallet.d.ts +7 -0
- package/dist/esm/utils/wallet.js +43 -0
- package/package.json +17 -17
- package/dist/cjs/index.cjs +0 -1805
- package/dist/cjs/index.d.cts +0 -436
- package/dist/esm/chunk-BIPRnmEv.js +0 -23
package/dist/cjs/index.d.cts
DELETED
|
@@ -1,436 +0,0 @@
|
|
|
1
|
-
import { StdSignDoc } from "@keplr-wallet/types";
|
|
2
|
-
import { OfflineSigner } from "@cosmjs/proto-signing";
|
|
3
|
-
import { AccountAddress, ChainId, CosmosChainId, EvmChainId } from "@injectivelabs/ts-types";
|
|
4
|
-
import { AminoSignResponse, CosmosTxV1Beta1TxPb, DirectSignResponse, Msgs, TxRaw, TxResponse } from "@injectivelabs/sdk-ts";
|
|
5
|
-
import { EIP1193Provider } from "eip1193-provider";
|
|
6
|
-
import { BigNumber } from "bignumber.js";
|
|
7
|
-
|
|
8
|
-
//#region src/types/enums.d.ts
|
|
9
|
-
declare const BroadcastMode: {
|
|
10
|
-
readonly Block: "block";
|
|
11
|
-
readonly Sync: "sync";
|
|
12
|
-
readonly Async: "async";
|
|
13
|
-
};
|
|
14
|
-
type BroadcastMode = (typeof BroadcastMode)[keyof typeof BroadcastMode];
|
|
15
|
-
declare const Wallet: {
|
|
16
|
-
readonly Leap: "leap";
|
|
17
|
-
readonly Keplr: "keplr";
|
|
18
|
-
readonly Ninji: "ninji";
|
|
19
|
-
readonly Magic: "magic";
|
|
20
|
-
readonly Rabby: "rabby";
|
|
21
|
-
readonly Ledger: "ledger";
|
|
22
|
-
readonly BitGet: "BitGet";
|
|
23
|
-
readonly OWallet: "owallet";
|
|
24
|
-
readonly Phantom: "phantom";
|
|
25
|
-
readonly Rainbow: "rainbow";
|
|
26
|
-
readonly Turnkey: "turnkey";
|
|
27
|
-
readonly Metamask: "metamask";
|
|
28
|
-
readonly OkxWallet: "okx-wallet";
|
|
29
|
-
readonly PrivateKey: "private-key";
|
|
30
|
-
readonly TrustWallet: "trust-wallet";
|
|
31
|
-
readonly TrezorBip32: "trezor-bip32";
|
|
32
|
-
readonly TrezorBip44: "trezor-bip44";
|
|
33
|
-
readonly Cosmostation: "cosmostation";
|
|
34
|
-
readonly LedgerCosmos: "ledger-cosmos";
|
|
35
|
-
readonly LedgerLegacy: "ledger-legacy";
|
|
36
|
-
readonly WalletConnect: "wallet-connect";
|
|
37
|
-
readonly CosmostationEth: "cosmostation-eth";
|
|
38
|
-
};
|
|
39
|
-
type Wallet = (typeof Wallet)[keyof typeof Wallet];
|
|
40
|
-
declare const MagicProvider: {
|
|
41
|
-
readonly Email: "email";
|
|
42
|
-
readonly Apple: "apple";
|
|
43
|
-
readonly Github: "github";
|
|
44
|
-
readonly Google: "google";
|
|
45
|
-
readonly Discord: "discord";
|
|
46
|
-
readonly Twitter: "twitter";
|
|
47
|
-
readonly Facebook: "facebook";
|
|
48
|
-
};
|
|
49
|
-
type MagicProvider = (typeof MagicProvider)[keyof typeof MagicProvider];
|
|
50
|
-
declare const WalletDeviceType: {
|
|
51
|
-
readonly Mobile: "mobile";
|
|
52
|
-
readonly Other: "other";
|
|
53
|
-
readonly Browser: "browser";
|
|
54
|
-
readonly Hardware: "hardware";
|
|
55
|
-
};
|
|
56
|
-
type WalletDeviceType = (typeof WalletDeviceType)[keyof typeof WalletDeviceType];
|
|
57
|
-
declare const WalletEventListener: {
|
|
58
|
-
readonly AccountChange: "account-change";
|
|
59
|
-
readonly ChainIdChange: "chain-id-change";
|
|
60
|
-
};
|
|
61
|
-
type WalletEventListener = (typeof WalletEventListener)[keyof typeof WalletEventListener];
|
|
62
|
-
declare const WalletAction: {
|
|
63
|
-
GetChainId: "get-chain-id";
|
|
64
|
-
GetAccounts: "get-accounts";
|
|
65
|
-
GetNetworkId: "get-network-id";
|
|
66
|
-
SignArbitrary: "sign-arbitrary";
|
|
67
|
-
SignTransaction: "sign-transaction";
|
|
68
|
-
SendTransaction: "send-transaction";
|
|
69
|
-
SendEvmTransaction: "send-evm-transaction";
|
|
70
|
-
SignEvmTransaction: "sign-evm-transaction";
|
|
71
|
-
GetEvmTransactionReceipt: "get-evm-transaction-receipt";
|
|
72
|
-
};
|
|
73
|
-
//#endregion
|
|
74
|
-
//#region src/types/strategy.d.ts
|
|
75
|
-
type onAccountChangeCallback = (account: string | string[]) => void;
|
|
76
|
-
type onChainIdChangeCallback = () => void;
|
|
77
|
-
type Eip1193Provider = {
|
|
78
|
-
request: (args: {
|
|
79
|
-
method: string;
|
|
80
|
-
params: any[];
|
|
81
|
-
}) => Promise<any>;
|
|
82
|
-
on: (event: string, listener: (...args: any[]) => void) => void;
|
|
83
|
-
removeListener: (event: string, listener: (...args: any[]) => void) => void;
|
|
84
|
-
};
|
|
85
|
-
type CosmosWalletAbstraction = {
|
|
86
|
-
enableGasCheck?(chainId: ChainId): Promise<void> | void;
|
|
87
|
-
disableGasCheck?(chainId: ChainId): Promise<void> | void;
|
|
88
|
-
signEIP712CosmosTx(args: {
|
|
89
|
-
signDoc: StdSignDoc;
|
|
90
|
-
eip712: any;
|
|
91
|
-
}): Promise<AminoSignResponse>;
|
|
92
|
-
};
|
|
93
|
-
type MagicMetadata = {
|
|
94
|
-
apiKey?: string;
|
|
95
|
-
rpcEndpoint?: string;
|
|
96
|
-
};
|
|
97
|
-
type PrivateKeyMetadata = {
|
|
98
|
-
privateKey: string;
|
|
99
|
-
};
|
|
100
|
-
type WalletConnectMetadata = {
|
|
101
|
-
projectId?: string;
|
|
102
|
-
};
|
|
103
|
-
interface WalletStrategyEvmOptions {
|
|
104
|
-
evmChainId: EvmChainId;
|
|
105
|
-
rpcUrl?: string;
|
|
106
|
-
rpcUrls?: Partial<Record<EvmChainId, string>>;
|
|
107
|
-
}
|
|
108
|
-
interface SendTransactionOptions {
|
|
109
|
-
address: string;
|
|
110
|
-
chainId: ChainId;
|
|
111
|
-
txTimeout?: number;
|
|
112
|
-
endpoints: {
|
|
113
|
-
rest: string;
|
|
114
|
-
grpc: string;
|
|
115
|
-
tm?: string;
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
declare const TurnkeyProvider: {
|
|
119
|
-
readonly Email: "email";
|
|
120
|
-
readonly Google: "google";
|
|
121
|
-
readonly Apple: "apple";
|
|
122
|
-
};
|
|
123
|
-
type TurnkeyProvider = (typeof TurnkeyProvider)[keyof typeof TurnkeyProvider];
|
|
124
|
-
type TurnkeySession = {
|
|
125
|
-
sessionType: any;
|
|
126
|
-
userId: string;
|
|
127
|
-
organizationId: string;
|
|
128
|
-
expiry: number;
|
|
129
|
-
token: string;
|
|
130
|
-
};
|
|
131
|
-
interface TurnkeyMetadata {
|
|
132
|
-
apiBaseUrl: string;
|
|
133
|
-
otpInitPath?: string;
|
|
134
|
-
otpVerifyPath?: string;
|
|
135
|
-
googleClientId?: string;
|
|
136
|
-
oauthLoginPath?: string;
|
|
137
|
-
session?: TurnkeySession;
|
|
138
|
-
apiServerEndpoint: string;
|
|
139
|
-
credentialBundle?: string;
|
|
140
|
-
googleRedirectUri?: string;
|
|
141
|
-
expirationSeconds?: string;
|
|
142
|
-
defaultOrganizationId: string;
|
|
143
|
-
}
|
|
144
|
-
interface WalletMetadata {
|
|
145
|
-
magic?: MagicMetadata;
|
|
146
|
-
turnkey?: Partial<TurnkeyMetadata>;
|
|
147
|
-
walletConnect?: WalletConnectMetadata;
|
|
148
|
-
privateKey?: PrivateKeyMetadata;
|
|
149
|
-
}
|
|
150
|
-
interface ConcreteWalletStrategyArgs {
|
|
151
|
-
chainId: ChainId;
|
|
152
|
-
metadata?: WalletMetadata;
|
|
153
|
-
}
|
|
154
|
-
interface ConcreteEvmWalletStrategyArgs extends ConcreteWalletStrategyArgs {
|
|
155
|
-
evmOptions: WalletStrategyEvmOptions;
|
|
156
|
-
}
|
|
157
|
-
interface ConcreteCosmosWalletStrategyArgs extends ConcreteWalletStrategyArgs {
|
|
158
|
-
wallet?: Wallet;
|
|
159
|
-
}
|
|
160
|
-
interface ConcreteCosmosWalletStrategy {
|
|
161
|
-
metadata?: WalletMetadata;
|
|
162
|
-
setMetadata?(metadata?: WalletMetadata): void;
|
|
163
|
-
/**
|
|
164
|
-
* The accounts from the wallet (addresses)
|
|
165
|
-
*/
|
|
166
|
-
getAddresses(args?: unknown): Promise<string[]>;
|
|
167
|
-
/**
|
|
168
|
-
* Return the WalletDeviceType connected on the
|
|
169
|
-
* wallet provider (extension, mobile, hardware wallet)
|
|
170
|
-
*/
|
|
171
|
-
getWalletDeviceType(): Promise<WalletDeviceType>;
|
|
172
|
-
/**
|
|
173
|
-
* Get the PubKey from the wallet
|
|
174
|
-
* in base64 for Cosmos native wallets
|
|
175
|
-
*/
|
|
176
|
-
getPubKey(address?: string): Promise<string>;
|
|
177
|
-
/**
|
|
178
|
-
* Perform validations and checks
|
|
179
|
-
* for the wallet (if the chain is supported, etc)
|
|
180
|
-
*/
|
|
181
|
-
enable(args?: unknown): Promise<boolean>;
|
|
182
|
-
/**
|
|
183
|
-
* Sends Cosmos transaction. Returns a transaction hash
|
|
184
|
-
* @param transaction should implement TransactionConfig
|
|
185
|
-
* @param options
|
|
186
|
-
*/
|
|
187
|
-
sendTransaction(transaction: DirectSignResponse | TxRaw, options: SendTransactionOptions): Promise<TxResponse>;
|
|
188
|
-
signCosmosTransaction(transaction: {
|
|
189
|
-
txRaw: TxRaw;
|
|
190
|
-
chainId: string;
|
|
191
|
-
accountNumber: number;
|
|
192
|
-
address: string;
|
|
193
|
-
}): Promise<DirectSignResponse>;
|
|
194
|
-
signAminoTransaction(transaction: {
|
|
195
|
-
stdSignDoc: StdSignDoc;
|
|
196
|
-
address: string;
|
|
197
|
-
}): Promise<AminoSignResponse>;
|
|
198
|
-
}
|
|
199
|
-
type ConcreteStrategiesArg = { [key in Wallet]?: ConcreteWalletStrategy };
|
|
200
|
-
interface WalletStrategyArguments {
|
|
201
|
-
chainId: ChainId;
|
|
202
|
-
metadata?: WalletMetadata;
|
|
203
|
-
evmOptions?: WalletStrategyEvmOptions;
|
|
204
|
-
disabledWallets?: Wallet[];
|
|
205
|
-
wallet?: Wallet;
|
|
206
|
-
strategies: ConcreteStrategiesArg;
|
|
207
|
-
}
|
|
208
|
-
interface ConcreteWalletStrategy extends Omit<ConcreteCosmosWalletStrategy, 'sendTransaction' | 'isChainIdSupported' | 'signAminoTransaction'> {
|
|
209
|
-
/**
|
|
210
|
-
* Sends Cosmos transaction. Returns a transaction hash
|
|
211
|
-
* @param transaction should implement TransactionConfig
|
|
212
|
-
* @param options
|
|
213
|
-
*/
|
|
214
|
-
sendTransaction(transaction: DirectSignResponse | TxRaw, options: {
|
|
215
|
-
address: string;
|
|
216
|
-
chainId: ChainId;
|
|
217
|
-
txTimeout?: number;
|
|
218
|
-
endpoints?: {
|
|
219
|
-
rest: string;
|
|
220
|
-
grpc: string;
|
|
221
|
-
tm?: string;
|
|
222
|
-
};
|
|
223
|
-
}): Promise<TxResponse>;
|
|
224
|
-
/**
|
|
225
|
-
* Confirm the address on the wallet
|
|
226
|
-
* @param address address
|
|
227
|
-
*/
|
|
228
|
-
getSessionOrConfirm(address?: string): Promise<string>;
|
|
229
|
-
/**
|
|
230
|
-
* Sends Ethereum transaction. Returns a transaction hash
|
|
231
|
-
* @param transaction should implement TransactionConfig
|
|
232
|
-
* @param options
|
|
233
|
-
*/
|
|
234
|
-
sendEvmTransaction(transaction: unknown, options: {
|
|
235
|
-
address: string;
|
|
236
|
-
evmChainId: EvmChainId;
|
|
237
|
-
}): Promise<string>;
|
|
238
|
-
/**
|
|
239
|
-
* Sign a cosmos transaction using the wallet provider
|
|
240
|
-
*
|
|
241
|
-
* @param transaction
|
|
242
|
-
* @param address - injective address
|
|
243
|
-
*/
|
|
244
|
-
signCosmosTransaction(transaction: {
|
|
245
|
-
txRaw: TxRaw;
|
|
246
|
-
accountNumber: number;
|
|
247
|
-
chainId: string;
|
|
248
|
-
address: string;
|
|
249
|
-
}): Promise<DirectSignResponse>;
|
|
250
|
-
/**
|
|
251
|
-
* Sign an amino sign doc using the wallet provider
|
|
252
|
-
*
|
|
253
|
-
* @param transaction
|
|
254
|
-
* @param address - injective address
|
|
255
|
-
*/
|
|
256
|
-
signAminoCosmosTransaction(transaction: {
|
|
257
|
-
signDoc: StdSignDoc;
|
|
258
|
-
address: string;
|
|
259
|
-
}): Promise<AminoSignResponse>;
|
|
260
|
-
/**
|
|
261
|
-
* Sign EIP712 TypedData using the wallet provider
|
|
262
|
-
* @param eip712TypedData
|
|
263
|
-
* @param address - ethereum address
|
|
264
|
-
*/
|
|
265
|
-
signEip712TypedData(eip712TypedData: string, address: string, options?: {
|
|
266
|
-
txTimeout?: number;
|
|
267
|
-
}): Promise<string>;
|
|
268
|
-
signArbitrary(signer: string, data: string | Uint8Array): Promise<string>;
|
|
269
|
-
getEthereumChainId(): Promise<string>;
|
|
270
|
-
getEvmTransactionReceipt(txHash: string, evmChainId?: EvmChainId): void;
|
|
271
|
-
onAccountChange?(callback: onAccountChangeCallback): Promise<void> | void;
|
|
272
|
-
onChainIdChange?(callback: onChainIdChangeCallback): Promise<void> | void;
|
|
273
|
-
disconnect?(): Promise<void> | void;
|
|
274
|
-
getCosmosWallet?(chainId: ChainId): CosmosWalletAbstraction;
|
|
275
|
-
getWalletClient?<T>(): Promise<T>;
|
|
276
|
-
getEip1193Provider?(): Promise<Eip1193Provider>;
|
|
277
|
-
getOfflineSigner?(chainId: string): Promise<OfflineSigner>;
|
|
278
|
-
}
|
|
279
|
-
interface WalletStrategy {
|
|
280
|
-
strategies: ConcreteStrategiesArg;
|
|
281
|
-
wallet: Wallet;
|
|
282
|
-
args: WalletStrategyArguments;
|
|
283
|
-
metadata?: WalletMetadata;
|
|
284
|
-
getWallet(): Wallet;
|
|
285
|
-
getWalletClient?<T>(): Promise<T>;
|
|
286
|
-
setWallet(wallet: Wallet): void;
|
|
287
|
-
setMetadata(metadata?: WalletMetadata): void;
|
|
288
|
-
getStrategy(): ConcreteWalletStrategy;
|
|
289
|
-
getAddresses(args?: unknown): Promise<AccountAddress[]>;
|
|
290
|
-
getWalletDeviceType(): Promise<WalletDeviceType>;
|
|
291
|
-
getPubKey(address?: string): Promise<string>;
|
|
292
|
-
enable(args?: unknown): Promise<boolean>;
|
|
293
|
-
enableAndGetAddresses(args?: unknown): Promise<AccountAddress[]>;
|
|
294
|
-
getEthereumChainId(): Promise<string>;
|
|
295
|
-
getEvmTransactionReceipt(txHash: string, evmChainId?: EvmChainId): Promise<void>;
|
|
296
|
-
getSessionOrConfirm(address?: AccountAddress): Promise<string>;
|
|
297
|
-
sendTransaction(tx: DirectSignResponse | TxRaw, options: SendTransactionOptions): Promise<TxResponse>;
|
|
298
|
-
sendEvmTransaction(tx: any, options: {
|
|
299
|
-
address: AccountAddress;
|
|
300
|
-
evmChainId: EvmChainId;
|
|
301
|
-
}): Promise<string>;
|
|
302
|
-
signEip712TypedData(eip712TypedData: string, address: AccountAddress, options?: {
|
|
303
|
-
txTimeout?: number;
|
|
304
|
-
}): Promise<string>;
|
|
305
|
-
signAminoCosmosTransaction(transaction: {
|
|
306
|
-
signDoc: StdSignDoc;
|
|
307
|
-
address: string;
|
|
308
|
-
}): Promise<AminoSignResponse>;
|
|
309
|
-
signCosmosTransaction(transaction: {
|
|
310
|
-
txRaw: TxRaw;
|
|
311
|
-
accountNumber: number;
|
|
312
|
-
chainId: string;
|
|
313
|
-
address: string;
|
|
314
|
-
}): Promise<DirectSignResponse>;
|
|
315
|
-
signArbitrary(signer: string, data: string | Uint8Array): Promise<string | void>;
|
|
316
|
-
onAccountChange(callback: onAccountChangeCallback): Promise<void>;
|
|
317
|
-
onChainIdChange(callback: onChainIdChangeCallback): Promise<void>;
|
|
318
|
-
disconnect(): Promise<void>;
|
|
319
|
-
getCosmosWallet?(chainId: ChainId): CosmosWalletAbstraction;
|
|
320
|
-
getEip1193Provider?(): Promise<Eip1193Provider>;
|
|
321
|
-
getOfflineSigner?(chainId: string): Promise<OfflineSigner>;
|
|
322
|
-
}
|
|
323
|
-
//#endregion
|
|
324
|
-
//#region src/types/provider.d.ts
|
|
325
|
-
interface BrowserEip1993Provider extends EIP1193Provider {
|
|
326
|
-
removeAllListeners(): void;
|
|
327
|
-
isTrust: boolean;
|
|
328
|
-
isRabby: boolean;
|
|
329
|
-
isRainbow: boolean;
|
|
330
|
-
isPhantom: boolean;
|
|
331
|
-
isMetaMask: boolean;
|
|
332
|
-
isOkxWallet: boolean;
|
|
333
|
-
isTrustWallet: boolean;
|
|
334
|
-
}
|
|
335
|
-
interface WindowWithEip1193Provider extends Window {
|
|
336
|
-
rainbow: BrowserEip1993Provider;
|
|
337
|
-
rabby: BrowserEip1993Provider;
|
|
338
|
-
ethereum: BrowserEip1993Provider;
|
|
339
|
-
okxwallet: BrowserEip1993Provider;
|
|
340
|
-
providers: BrowserEip1993Provider[];
|
|
341
|
-
trustWallet?: BrowserEip1993Provider;
|
|
342
|
-
bitkeep: {
|
|
343
|
-
ethereum: BrowserEip1993Provider;
|
|
344
|
-
};
|
|
345
|
-
phantom?: {
|
|
346
|
-
ethereum?: BrowserEip1993Provider;
|
|
347
|
-
};
|
|
348
|
-
}
|
|
349
|
-
interface EIP6963ProviderInfo {
|
|
350
|
-
rdns: string;
|
|
351
|
-
uuid: string;
|
|
352
|
-
name: string;
|
|
353
|
-
icon: string;
|
|
354
|
-
}
|
|
355
|
-
interface EIP6963ProviderDetail {
|
|
356
|
-
info: EIP6963ProviderInfo;
|
|
357
|
-
provider: BrowserEip1993Provider;
|
|
358
|
-
}
|
|
359
|
-
type EIP6963AnnounceProviderEvent = {
|
|
360
|
-
detail: EIP6963ProviderDetail;
|
|
361
|
-
};
|
|
362
|
-
//#endregion
|
|
363
|
-
//#region src/utils/tx.d.ts
|
|
364
|
-
declare const createEip712StdSignDoc: ({
|
|
365
|
-
memo,
|
|
366
|
-
chainId,
|
|
367
|
-
accountNumber,
|
|
368
|
-
timeoutHeight,
|
|
369
|
-
sequence,
|
|
370
|
-
gas,
|
|
371
|
-
msgs
|
|
372
|
-
}: {
|
|
373
|
-
memo?: string;
|
|
374
|
-
chainId: ChainId;
|
|
375
|
-
timeoutHeight?: string;
|
|
376
|
-
accountNumber: number;
|
|
377
|
-
sequence: number;
|
|
378
|
-
gas?: string;
|
|
379
|
-
msgs: Msgs[];
|
|
380
|
-
}) => {
|
|
381
|
-
chain_id: ChainId;
|
|
382
|
-
timeout_height: string;
|
|
383
|
-
account_number: string;
|
|
384
|
-
sequence: string;
|
|
385
|
-
fee: {
|
|
386
|
-
amount: {
|
|
387
|
-
denom: string;
|
|
388
|
-
amount: string;
|
|
389
|
-
}[];
|
|
390
|
-
gas: string;
|
|
391
|
-
payer: string | undefined;
|
|
392
|
-
granter: string | undefined;
|
|
393
|
-
feePayer: string | undefined;
|
|
394
|
-
};
|
|
395
|
-
msgs: {
|
|
396
|
-
type: string;
|
|
397
|
-
value: ObjectRepresentation | SnakeCaseKeys$12<ProtoRepresentation>;
|
|
398
|
-
}[];
|
|
399
|
-
memo: string;
|
|
400
|
-
};
|
|
401
|
-
//#endregion
|
|
402
|
-
//#region src/utils/wallet.d.ts
|
|
403
|
-
declare const isEvmWallet: (wallet: Wallet) => boolean;
|
|
404
|
-
declare const isCosmosWallet: (wallet: Wallet) => boolean;
|
|
405
|
-
declare const isEvmBrowserWallet: (wallet: Wallet) => boolean;
|
|
406
|
-
declare const isCosmosBrowserWallet: (wallet: Wallet) => boolean;
|
|
407
|
-
declare const isEip712V2OnlyWallet: (wallet: Wallet) => boolean;
|
|
408
|
-
declare const isCosmosAminoOnlyWallet: (wallet: Wallet) => boolean;
|
|
409
|
-
//#endregion
|
|
410
|
-
//#region src/utils/cosmos.d.ts
|
|
411
|
-
declare const createCosmosSignDocFromSignDoc: (signDoc: CosmosTxV1Beta1TxPb.SignDoc) => any;
|
|
412
|
-
//#endregion
|
|
413
|
-
//#region src/utils/address.d.ts
|
|
414
|
-
declare const getInjectiveSignerAddress: (address: string | undefined) => string;
|
|
415
|
-
declare const getEthereumSignerAddress: (address: string | undefined) => string;
|
|
416
|
-
//#endregion
|
|
417
|
-
//#region src/utils/alchemy.d.ts
|
|
418
|
-
declare const getKeyFromRpcUrl: (rpcUrl: string) => string;
|
|
419
|
-
//#endregion
|
|
420
|
-
//#region src/utils/constants.d.ts
|
|
421
|
-
declare const GWEI_IN_WEI: BigNumber;
|
|
422
|
-
declare const TIP_IN_GWEI: BigNumber;
|
|
423
|
-
declare const DEFAULT_BASE_DERIVATION_PATH = "m/44'/60'";
|
|
424
|
-
declare const DEFAULT_NUM_ADDRESSES_TO_FETCH = 5;
|
|
425
|
-
declare const DEFAULT_ADDRESS_SEARCH_LIMIT = 100;
|
|
426
|
-
//#endregion
|
|
427
|
-
//#region src/base.d.ts
|
|
428
|
-
declare abstract class BaseConcreteStrategy {
|
|
429
|
-
protected chainId: ChainId | CosmosChainId;
|
|
430
|
-
protected evmChainId?: EvmChainId;
|
|
431
|
-
protected listeners: Partial<Record<WalletEventListener, any>>;
|
|
432
|
-
metadata?: WalletMetadata;
|
|
433
|
-
constructor(args: ConcreteWalletStrategyArgs | ConcreteEvmWalletStrategyArgs | ConcreteCosmosWalletStrategyArgs);
|
|
434
|
-
}
|
|
435
|
-
//#endregion
|
|
436
|
-
export { BaseConcreteStrategy, BroadcastMode, BrowserEip1993Provider, ConcreteCosmosWalletStrategy, ConcreteCosmosWalletStrategyArgs, ConcreteEvmWalletStrategyArgs, ConcreteStrategiesArg, ConcreteWalletStrategy, ConcreteWalletStrategyArgs, CosmosWalletAbstraction, DEFAULT_ADDRESS_SEARCH_LIMIT, DEFAULT_BASE_DERIVATION_PATH, DEFAULT_NUM_ADDRESSES_TO_FETCH, EIP6963AnnounceProviderEvent, EIP6963ProviderDetail, EIP6963ProviderInfo, Eip1193Provider, GWEI_IN_WEI, MagicMetadata, MagicProvider, PrivateKeyMetadata, SendTransactionOptions, type StdSignDoc, TIP_IN_GWEI, TurnkeyMetadata, TurnkeyProvider, TurnkeySession, Wallet, WalletAction, WalletConnectMetadata, WalletDeviceType, WalletEventListener, WalletMetadata, WalletStrategy, WalletStrategyArguments, WalletStrategyEvmOptions, WindowWithEip1193Provider, createCosmosSignDocFromSignDoc, createEip712StdSignDoc, getEthereumSignerAddress, getInjectiveSignerAddress, getKeyFromRpcUrl, isCosmosAminoOnlyWallet, isCosmosBrowserWallet, isCosmosWallet, isEip712V2OnlyWallet, isEvmBrowserWallet, isEvmWallet, onAccountChangeCallback, onChainIdChangeCallback };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
//#region rolldown:runtime
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
10
|
-
key = keys[i];
|
|
11
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
12
|
-
get: ((k) => from[k]).bind(null, key),
|
|
13
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
19
|
-
value: mod,
|
|
20
|
-
enumerable: true
|
|
21
|
-
}) : target, mod));
|
|
22
|
-
|
|
23
|
-
//#endregion
|