btc-wallet 0.5.53-beta → 0.5.56-beta
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/README.md +25 -16
- package/dist/core/setupBTCWallet/index.d.ts +2 -1
- package/dist/core/setupModal.d.ts +7 -1
- package/dist/index.js +190 -97
- package/dist/index.js.map +3 -3
- package/dist/utils/index.d.ts +10 -0
- package/dist/utils/initWalletButton.d.ts +7 -1
- package/dist/utils/satoshi.d.ts +4 -1
- package/esm/index.js +188 -95
- package/esm/index.js.map +3 -3
- package/package.json +1 -1
package/dist/utils/index.d.ts
CHANGED
@@ -11,3 +11,13 @@ export declare function retryOperation<T>(operation: () => Promise<T> | T, shoul
|
|
11
11
|
}): Promise<T>;
|
12
12
|
export declare function toHex(originalString: string): string;
|
13
13
|
export declare function isMobile(): boolean;
|
14
|
+
export declare function safeJSONParse<T>(str: string): T | undefined;
|
15
|
+
export declare function safeJSONStringify(obj: any): string | undefined;
|
16
|
+
export declare function storageStore(namespace?: string, options?: {
|
17
|
+
storage?: Storage;
|
18
|
+
}): {
|
19
|
+
set(key: string, value: any): void;
|
20
|
+
get<T>(key: string): T | undefined;
|
21
|
+
remove(key: string): void;
|
22
|
+
clearAll: () => void;
|
23
|
+
} | undefined;
|
@@ -1,9 +1,15 @@
|
|
1
1
|
import type { Wallet } from '@near-wallet-selector/core';
|
2
2
|
import { type ENV } from '../config';
|
3
|
+
interface setupWalletButtonOptions {
|
4
|
+
env: ENV;
|
5
|
+
nearWallet: Wallet;
|
6
|
+
btcWallet?: OriginalWallet;
|
7
|
+
walletUrl?: string;
|
8
|
+
}
|
3
9
|
interface OriginalWallet {
|
4
10
|
account: string | undefined;
|
5
11
|
getPublicKey: () => Promise<string | undefined>;
|
6
12
|
}
|
7
|
-
export declare function setupWalletButton(env
|
13
|
+
export declare function setupWalletButton({ env, nearWallet, btcWallet, walletUrl, }: setupWalletButtonOptions): void;
|
8
14
|
export declare function removeWalletButton(): void;
|
9
15
|
export {};
|
package/dist/utils/satoshi.d.ts
CHANGED
@@ -100,9 +100,12 @@ interface CalculateGasLimitParams {
|
|
100
100
|
transactions: Transaction[];
|
101
101
|
csna: string;
|
102
102
|
env: ENV;
|
103
|
+
gasStrategy?: 'auto' | 'near' | 'btc';
|
103
104
|
}
|
104
105
|
export declare function calculateGasLimit(params: CalculateGasLimitParams): Promise<string>;
|
105
|
-
export declare function calculateGasStrategy({ csna, transactions, env, }: CalculateGasLimitParams
|
106
|
+
export declare function calculateGasStrategy({ csna, transactions, env, gasStrategy, }: CalculateGasLimitParams & {
|
107
|
+
gasStrategy?: 'auto' | 'near' | 'btc';
|
108
|
+
}): Promise<{
|
106
109
|
transferGasTransaction?: Transaction;
|
107
110
|
useNearPayGas: boolean;
|
108
111
|
gasLimit: string;
|