btc-wallet 0.5.15-beta → 0.5.16-beta
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/config.d.ts +12 -0
- package/dist/core/btcUtils.d.ts +1 -37
- package/dist/core/{setupBTCWallet.d.ts → setupBTCWallet/index.d.ts} +2 -2
- package/dist/core/setupBTCWallet/state.d.ts +16 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +547 -390
- package/dist/index.js.map +4 -4
- package/dist/utils/satoshi.d.ts +49 -0
- package/esm/index.js +547 -390
- package/esm/index.js.map +4 -4
- package/package.json +1 -1
package/dist/utils/satoshi.d.ts
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
import type { Transaction } from '@near-wallet-selector/core';
|
2
|
+
import { type ENV } from '../config';
|
1
3
|
export declare function getNonce(url: string, accountId: string): Promise<string>;
|
2
4
|
export declare function getNearNonce(url: string, accountId: string): Promise<string>;
|
3
5
|
export declare function receiveTransaction(url: string, data: any): Promise<any>;
|
@@ -20,4 +22,51 @@ export declare function checkBtcTransactionStatus(url: string, sig: string): Pro
|
|
20
22
|
}>;
|
21
23
|
export declare function getWhitelist(url: string): Promise<string[]>;
|
22
24
|
export declare function receiveWithdrawMsg(url: string, txHash: string): Promise<any>;
|
25
|
+
export interface AccountInfo {
|
26
|
+
nonce: string;
|
27
|
+
gas_token: Record<string, string>;
|
28
|
+
debt_info?: {
|
29
|
+
gas_token_id: string;
|
30
|
+
near_gas_debt_amount: string;
|
31
|
+
protocol_fee_debt_amount: string;
|
32
|
+
};
|
33
|
+
relayer_fee?: {
|
34
|
+
amount?: string;
|
35
|
+
};
|
36
|
+
}
|
37
|
+
export declare function getAccountInfo({ csna, env }: {
|
38
|
+
csna: string;
|
39
|
+
env: ENV;
|
40
|
+
}): Promise<AccountInfo | undefined>;
|
41
|
+
export declare function getTokenBalance({ csna, tokenId, env, }: {
|
42
|
+
csna: string;
|
43
|
+
tokenId: string;
|
44
|
+
env: ENV;
|
45
|
+
}): Promise<{
|
46
|
+
balance: number;
|
47
|
+
rawBalance: string;
|
48
|
+
}>;
|
49
|
+
export declare function checkGasTokenBalance(csna: string, minAmount: string, env: ENV): Promise<void>;
|
50
|
+
export declare function convertTransactionToTxHex({ transaction, accountId, publicKey, env, index, }: {
|
51
|
+
transaction: Transaction;
|
52
|
+
accountId: string;
|
53
|
+
publicKey: string;
|
54
|
+
env: ENV;
|
55
|
+
index?: number;
|
56
|
+
}): Promise<{
|
57
|
+
txBytes: Uint8Array;
|
58
|
+
txHex: string;
|
59
|
+
hash: string;
|
60
|
+
}>;
|
61
|
+
interface CalculateGasLimitParams {
|
62
|
+
transactions: Transaction[];
|
63
|
+
csna: string;
|
64
|
+
env: ENV;
|
65
|
+
}
|
66
|
+
export declare function calculateGasLimit(params: CalculateGasLimitParams): Promise<string>;
|
67
|
+
export declare function calculateGasStrategy({ csna, transactions, env, }: CalculateGasLimitParams): Promise<{
|
68
|
+
transferGasTransaction?: Transaction;
|
69
|
+
useNearPayGas: boolean;
|
70
|
+
gasLimit: string;
|
71
|
+
}>;
|
23
72
|
export {};
|