@dynamic-labs/bitcoin 3.0.0-alpha.57 → 3.0.0-alpha.58
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/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
|
|
2
|
+
## [3.0.0-alpha.58](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.57...v3.0.0-alpha.58) (2024-09-05)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### ⚠ BREAKING CHANGES
|
|
6
|
+
|
|
7
|
+
* remove headless prop from DynamicContextProvider ([#6806](https://github.com/dynamic-labs/DynamicAuth/issues/6806)) ([1ab55a1](https://github.com/dynamic-labs/DynamicAuth/commit/1ab55a1cf5d143316617aa88a487bb59446f6f28))
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* allow selecting which MetaMask account to connect with when linking new wallet ([#6796](https://github.com/dynamic-labs/DynamicAuth/issues/6796)) ([83e270f](https://github.com/dynamic-labs/DynamicAuth/commit/83e270ffd53d5f6c95464cf570663e1008ffa6fb))
|
|
12
|
+
|
|
2
13
|
## [3.0.0-alpha.57](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.56...v3.0.0-alpha.57) (2024-09-05)
|
|
3
14
|
|
|
4
15
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/bitcoin",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.58",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/dynamic-labs/dynamic-auth.git",
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"@wallet-standard/base": "1.0.1",
|
|
33
33
|
"bitcoinjs-lib": "6.1.5",
|
|
34
34
|
"sats-connect": "2.0.0",
|
|
35
|
-
"@dynamic-labs/utils": "3.0.0-alpha.
|
|
36
|
-
"@dynamic-labs/wallet-book": "3.0.0-alpha.
|
|
37
|
-
"@dynamic-labs/wallet-connector-core": "3.0.0-alpha.
|
|
35
|
+
"@dynamic-labs/utils": "3.0.0-alpha.58",
|
|
36
|
+
"@dynamic-labs/wallet-book": "3.0.0-alpha.58",
|
|
37
|
+
"@dynamic-labs/wallet-connector-core": "3.0.0-alpha.58",
|
|
38
38
|
"stream": "0.0.2"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {}
|
|
@@ -110,12 +110,12 @@ class BitcoinWalletConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
110
110
|
];
|
|
111
111
|
});
|
|
112
112
|
}
|
|
113
|
-
getConnectedAccounts(
|
|
113
|
+
getConnectedAccounts(options) {
|
|
114
114
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
115
115
|
// some wallets like xverse don't support fetching connected accounts
|
|
116
116
|
// without prompting for a connection
|
|
117
117
|
// to avoid this behavior, we cache the connected accounts
|
|
118
|
-
if (!this.canFetchConnectedAccounts && !forceFetch) {
|
|
118
|
+
if (!this.canFetchConnectedAccounts && !(options === null || options === void 0 ? void 0 : options.forceFetch)) {
|
|
119
119
|
return this.getConnectedAccountsFromCache();
|
|
120
120
|
}
|
|
121
121
|
// if we decide that is ok to prompt for a connection when fetching connected accounts
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// <reference types="node" />
|
|
3
3
|
import { EventEmitter } from 'stream';
|
|
4
4
|
import type { Wallet } from '@wallet-standard/base';
|
|
5
|
-
import { Chain, IBitcoinWalletConnector, WalletConnectorBase } from '@dynamic-labs/wallet-connector-core';
|
|
5
|
+
import { Chain, IBitcoinWalletConnector, WalletConnectorBase, GetConnectedAccountsOpts } from '@dynamic-labs/wallet-connector-core';
|
|
6
6
|
import { WalletBookSchema, WalletSchema } from '@dynamic-labs/wallet-book';
|
|
7
7
|
import { JwtVerifiedCredential, WalletAdditionalAddress } from '@dynamic-labs/sdk-api-core';
|
|
8
8
|
import { IBitcoinSessionCache } from '../BitcoinLocalStorageCache';
|
|
@@ -36,7 +36,7 @@ export declare abstract class BitcoinWalletConnector extends WalletConnectorBase
|
|
|
36
36
|
endSession(): Promise<void>;
|
|
37
37
|
getBalance(address: string): Promise<string | undefined>;
|
|
38
38
|
getConnectedAccountsFromCache(): Promise<string[]>;
|
|
39
|
-
getConnectedAccounts(
|
|
39
|
+
getConnectedAccounts(options?: GetConnectedAccountsOpts): Promise<string[]>;
|
|
40
40
|
getAdditionalAddresses(mainAddress?: string): Promise<WalletAdditionalAddress[]>;
|
|
41
41
|
setAdditionalAddresses(mainAddress: string, additionalAddresses: WalletAdditionalAddress[]): Promise<void>;
|
|
42
42
|
sendRawTransaction(rawTransaction: string): Promise<string>;
|
|
@@ -106,12 +106,12 @@ class BitcoinWalletConnector extends WalletConnectorBase {
|
|
|
106
106
|
];
|
|
107
107
|
});
|
|
108
108
|
}
|
|
109
|
-
getConnectedAccounts(
|
|
109
|
+
getConnectedAccounts(options) {
|
|
110
110
|
return __awaiter(this, void 0, void 0, function* () {
|
|
111
111
|
// some wallets like xverse don't support fetching connected accounts
|
|
112
112
|
// without prompting for a connection
|
|
113
113
|
// to avoid this behavior, we cache the connected accounts
|
|
114
|
-
if (!this.canFetchConnectedAccounts && !forceFetch) {
|
|
114
|
+
if (!this.canFetchConnectedAccounts && !(options === null || options === void 0 ? void 0 : options.forceFetch)) {
|
|
115
115
|
return this.getConnectedAccountsFromCache();
|
|
116
116
|
}
|
|
117
117
|
// if we decide that is ok to prompt for a connection when fetching connected accounts
|