btc-wallet 0.5.11-beta → 0.5.13-beta

Sign up to get free protection for your applications and to get access to all the features.
package/dist/config.d.ts CHANGED
@@ -1,7 +1,10 @@
1
1
  export type ENV = 'mainnet' | 'testnet' | 'private_mainnet' | 'dev';
2
2
  export declare const walletConfig: Record<ENV, {
3
3
  base_url: string;
4
- token: string;
4
+ btcToken: string;
5
+ btcTokenDecimals: number;
6
+ nearToken: string;
7
+ nearTokenDecimals: number;
5
8
  accountContractId: string;
6
9
  bridgeContractId: string;
7
10
  walletUrl: string;
@@ -2,7 +2,10 @@ import type { ENV } from '../config';
2
2
  import type { FinalExecutionOutcome, Transaction } from '@near-wallet-selector/core';
3
3
  export declare function getConfig(env: ENV): Promise<{
4
4
  base_url: string;
5
- token: string;
5
+ btcToken: string;
6
+ btcTokenDecimals: number;
7
+ nearToken: string;
8
+ nearTokenDecimals: number;
6
9
  accountContractId: string;
7
10
  bridgeContractId: string;
8
11
  walletUrl: string;
@@ -20,8 +23,19 @@ export interface AccountInfo {
20
23
  amount?: string;
21
24
  };
22
25
  }
23
- export declare function getAccountInfo(csna: string, accountContractId: string): Promise<AccountInfo | undefined>;
24
- export declare function checkGasTokenBalance(csna: string, gasToken: string, minAmount: string, env: ENV): Promise<void>;
26
+ export declare function getAccountInfo({ csna, env }: {
27
+ csna: string;
28
+ env: ENV;
29
+ }): Promise<AccountInfo | undefined>;
30
+ export declare function getTokenBalance({ csna, tokenId, env, }: {
31
+ csna: string;
32
+ tokenId: string;
33
+ env: ENV;
34
+ }): Promise<{
35
+ balance: number;
36
+ rawBalance: string;
37
+ }>;
38
+ export declare function checkGasTokenBalance(csna: string, minAmount: string, env: ENV): Promise<void>;
25
39
  type CheckGasTokenDebtReturnType<T extends boolean> = T extends true ? void : {
26
40
  receiver_id: string;
27
41
  amount: string;
@@ -34,12 +48,6 @@ export declare function getBtcBalance(): Promise<{
34
48
  balance: number;
35
49
  availableBalance: number;
36
50
  }>;
37
- export declare function getNBTCBalance(address: string, env?: ENV): Promise<{
38
- balance: number;
39
- availableBalance: number;
40
- rawBalance: string;
41
- rawAvailableBalance: number;
42
- }>;
43
51
  export declare function sendBitcoin(address: string, amount: number, feeRate: number): Promise<string>;
44
52
  /** estimate deposit receive amount, deduct protocol fee and repay amount */
45
53
  export declare function estimateDepositAmount(amount: string, option?: {