@dynamic-labs/bitcoin 2.0.0-alpha.10 → 2.0.0-alpha.11
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 +27 -0
- package/package.json +4 -4
- package/src/BitcoinBtcKitConnector.cjs +3 -3
- package/src/BitcoinBtcKitConnector.d.ts +1 -1
- package/src/BitcoinBtcKitConnector.js +3 -3
- package/src/BitcoinSatsConnectConnector.cjs +2 -2
- package/src/BitcoinSatsConnectConnector.d.ts +1 -1
- package/src/BitcoinSatsConnectConnector.js +2 -2
- package/src/BitcoinWalletConnector.cjs +1 -1
- package/src/BitcoinWalletConnector.js +1 -1
- package/src/OkxConnector.cjs +2 -2
- package/src/OkxConnector.d.ts +1 -1
- package/src/OkxConnector.js +2 -2
- package/src/UnisatConnector.cjs +2 -2
- package/src/UnisatConnector.d.ts +1 -1
- package/src/UnisatConnector.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,31 @@
|
|
|
1
1
|
|
|
2
|
+
## [2.0.0-alpha.11](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.10...v2.0.0-alpha.11) (2024-03-12)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### ⚠ BREAKING CHANGES
|
|
6
|
+
|
|
7
|
+
* rename FetchPublicAddressOpts to GetAddressOpts (#4910)
|
|
8
|
+
* remove use effect in useWalletEventListeners (#4843)
|
|
9
|
+
* rename fetchPublicAddress to getAddress (#4851)
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* Add farcaster to iconic ([#4925](https://github.com/dynamic-labs/DynamicAuth/issues/4925)) ([ab282dc](https://github.com/dynamic-labs/DynamicAuth/commit/ab282dc9cdcc0fe11f014d002b056ef4d3b34234))
|
|
14
|
+
* use transaction confirmation ui on signAndSendTransaction for solana embedded wallets ([#4909](https://github.com/dynamic-labs/DynamicAuth/issues/4909)) ([d77e89e](https://github.com/dynamic-labs/DynamicAuth/commit/d77e89ecff9dfc67ed48537f541a9995b2662e1e))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* add back connect button css variables ([#4922](https://github.com/dynamic-labs/DynamicAuth/issues/4922)) ([1119d62](https://github.com/dynamic-labs/DynamicAuth/commit/1119d62c2db6504952393060930524c3823e4a00))
|
|
20
|
+
* keep adaptive wallet list height ([#4916](https://github.com/dynamic-labs/DynamicAuth/issues/4916)) ([62aa54e](https://github.com/dynamic-labs/DynamicAuth/commit/62aa54e81d563082f7aa519f2ff2b5132e7dd83d))
|
|
21
|
+
* pass account and chain to walletClient ([#4865](https://github.com/dynamic-labs/DynamicAuth/issues/4865)) ([17a143f](https://github.com/dynamic-labs/DynamicAuth/commit/17a143f87a77e56227b2517038c20cf67f8e08bf))
|
|
22
|
+
* update walletbook to fix zerion in-app browser detection issue ([#4917](https://github.com/dynamic-labs/DynamicAuth/issues/4917)) ([48b05d7](https://github.com/dynamic-labs/DynamicAuth/commit/48b05d78e4f7add09787b64505723d4eca34d3e0))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
* remove use effect in useWalletEventListeners ([#4843](https://github.com/dynamic-labs/DynamicAuth/issues/4843)) ([2e948bb](https://github.com/dynamic-labs/DynamicAuth/commit/2e948bbca0dbdceab7460a844d0988eacd47f581))
|
|
26
|
+
* rename fetchPublicAddress to getAddress ([#4851](https://github.com/dynamic-labs/DynamicAuth/issues/4851)) ([668e7dd](https://github.com/dynamic-labs/DynamicAuth/commit/668e7dd62e1f323dbe64209b5c59c2cd0ee45d61))
|
|
27
|
+
* rename FetchPublicAddressOpts to GetAddressOpts ([#4910](https://github.com/dynamic-labs/DynamicAuth/issues/4910)) ([e5e4b1b](https://github.com/dynamic-labs/DynamicAuth/commit/e5e4b1b08a4e010afa44f8abb0bf6af7f236a86a))
|
|
28
|
+
|
|
2
29
|
## [2.0.0-alpha.10](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.9...v2.0.0-alpha.10) (2024-03-08)
|
|
3
30
|
|
|
4
31
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/bitcoin",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.11",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"@wallet-standard/base": "1.0.1",
|
|
33
33
|
"bitcoinjs-lib": "6.1.5",
|
|
34
34
|
"sats-connect": "1.1.2",
|
|
35
|
-
"@dynamic-labs/utils": "2.0.0-alpha.
|
|
36
|
-
"@dynamic-labs/wallet-book": "2.0.0-alpha.
|
|
37
|
-
"@dynamic-labs/wallet-connector-core": "2.0.0-alpha.
|
|
35
|
+
"@dynamic-labs/utils": "2.0.0-alpha.11",
|
|
36
|
+
"@dynamic-labs/wallet-book": "2.0.0-alpha.11",
|
|
37
|
+
"@dynamic-labs/wallet-connector-core": "2.0.0-alpha.11",
|
|
38
38
|
"stream": "0.0.2"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {}
|
|
@@ -16,7 +16,7 @@ class BitcoinBtcKitConnector extends BitcoinWalletConnector.BitcoinWalletConnect
|
|
|
16
16
|
this.currentNetwork = satsConnect.BitcoinNetworkType.Mainnet;
|
|
17
17
|
this.btcKit = btcKit;
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
getAddress() {
|
|
20
20
|
var _a;
|
|
21
21
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
22
22
|
const [connectedAccount] = yield this.getConnectedAccounts();
|
|
@@ -59,7 +59,7 @@ class BitcoinBtcKitConnector extends BitcoinWalletConnector.BitcoinWalletConnect
|
|
|
59
59
|
}
|
|
60
60
|
sendBitcoin(transaction) {
|
|
61
61
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
62
|
-
const connectedAddress = yield this.
|
|
62
|
+
const connectedAddress = yield this.getAddress();
|
|
63
63
|
if (!connectedAddress || !this.btcKit) {
|
|
64
64
|
return;
|
|
65
65
|
}
|
|
@@ -82,7 +82,7 @@ class BitcoinBtcKitConnector extends BitcoinWalletConnector.BitcoinWalletConnect
|
|
|
82
82
|
signPsbt(request) {
|
|
83
83
|
var _a, _b;
|
|
84
84
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
85
|
-
const connectedAddress = yield this.
|
|
85
|
+
const connectedAddress = yield this.getAddress();
|
|
86
86
|
if (!connectedAddress || !this.btcKit) {
|
|
87
87
|
return;
|
|
88
88
|
}
|
|
@@ -10,7 +10,7 @@ export declare abstract class BitcoinBtcKitConnector extends BitcoinWalletConnec
|
|
|
10
10
|
currentNetwork: BitcoinNetworkType;
|
|
11
11
|
private btcKit;
|
|
12
12
|
constructor(opts: BitcoinWalletConnectorOpts, btcKit: BtcKitProvider);
|
|
13
|
-
|
|
13
|
+
getAddress(): Promise<string | undefined>;
|
|
14
14
|
signMessage(messageToSign: string): Promise<string | undefined>;
|
|
15
15
|
sendBitcoin(transaction: BitcoinTransaction): Promise<string | undefined>;
|
|
16
16
|
convertNetworkTypeToNetworkMode(): "mainnet" | "testnet";
|
|
@@ -12,7 +12,7 @@ class BitcoinBtcKitConnector extends BitcoinWalletConnector {
|
|
|
12
12
|
this.currentNetwork = BitcoinNetworkType.Mainnet;
|
|
13
13
|
this.btcKit = btcKit;
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
getAddress() {
|
|
16
16
|
var _a;
|
|
17
17
|
return __awaiter(this, void 0, void 0, function* () {
|
|
18
18
|
const [connectedAccount] = yield this.getConnectedAccounts();
|
|
@@ -55,7 +55,7 @@ class BitcoinBtcKitConnector extends BitcoinWalletConnector {
|
|
|
55
55
|
}
|
|
56
56
|
sendBitcoin(transaction) {
|
|
57
57
|
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
-
const connectedAddress = yield this.
|
|
58
|
+
const connectedAddress = yield this.getAddress();
|
|
59
59
|
if (!connectedAddress || !this.btcKit) {
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
@@ -78,7 +78,7 @@ class BitcoinBtcKitConnector extends BitcoinWalletConnector {
|
|
|
78
78
|
signPsbt(request) {
|
|
79
79
|
var _a, _b;
|
|
80
80
|
return __awaiter(this, void 0, void 0, function* () {
|
|
81
|
-
const connectedAddress = yield this.
|
|
81
|
+
const connectedAddress = yield this.getAddress();
|
|
82
82
|
if (!connectedAddress || !this.btcKit) {
|
|
83
83
|
return;
|
|
84
84
|
}
|
|
@@ -19,7 +19,7 @@ class BitcoinSatsConnectConnector extends BitcoinWalletConnector.BitcoinWalletCo
|
|
|
19
19
|
super(opts);
|
|
20
20
|
this.currentNetwork = satsConnect.BitcoinNetworkType.Mainnet;
|
|
21
21
|
}
|
|
22
|
-
|
|
22
|
+
getAddress() {
|
|
23
23
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
24
24
|
// xverse doesn't support wallet standard, so we won't have a wallet object,
|
|
25
25
|
// but it's already the default provider for sats-connect, so it's ok
|
|
@@ -98,7 +98,7 @@ class BitcoinSatsConnectConnector extends BitcoinWalletConnector.BitcoinWalletCo
|
|
|
98
98
|
sendBitcoin(transaction) {
|
|
99
99
|
var _a;
|
|
100
100
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
101
|
-
const mainAddress = yield this.
|
|
101
|
+
const mainAddress = yield this.getAddress();
|
|
102
102
|
const senderAddress = (_a = (yield this.getAdditionalAddresses(mainAddress)).find((address) => address.type === 'payment')) === null || _a === void 0 ? void 0 : _a.address;
|
|
103
103
|
if (!senderAddress || !supportsSatsConnect.supportsSatsConnect(this)) {
|
|
104
104
|
return;
|
|
@@ -4,7 +4,7 @@ import { BitcoinTransaction, SatsConnectSignTransactionInput, BitcoinSignPsbtReq
|
|
|
4
4
|
export declare abstract class BitcoinSatsConnectConnector extends BitcoinWalletConnector {
|
|
5
5
|
currentNetwork: BitcoinNetworkType;
|
|
6
6
|
constructor(opts: BitcoinWalletConnectorOpts);
|
|
7
|
-
|
|
7
|
+
getAddress(): Promise<string | undefined>;
|
|
8
8
|
signMessage(messageToSign: string): Promise<string | undefined>;
|
|
9
9
|
sendBitcoin(transaction: BitcoinTransaction): Promise<string | undefined>;
|
|
10
10
|
signTransaction(params: SatsConnectSignTransactionInput): Promise<SignTransactionResponse | undefined>;
|
|
@@ -15,7 +15,7 @@ class BitcoinSatsConnectConnector extends BitcoinWalletConnector {
|
|
|
15
15
|
super(opts);
|
|
16
16
|
this.currentNetwork = BitcoinNetworkType.Mainnet;
|
|
17
17
|
}
|
|
18
|
-
|
|
18
|
+
getAddress() {
|
|
19
19
|
return __awaiter(this, void 0, void 0, function* () {
|
|
20
20
|
// xverse doesn't support wallet standard, so we won't have a wallet object,
|
|
21
21
|
// but it's already the default provider for sats-connect, so it's ok
|
|
@@ -94,7 +94,7 @@ class BitcoinSatsConnectConnector extends BitcoinWalletConnector {
|
|
|
94
94
|
sendBitcoin(transaction) {
|
|
95
95
|
var _a;
|
|
96
96
|
return __awaiter(this, void 0, void 0, function* () {
|
|
97
|
-
const mainAddress = yield this.
|
|
97
|
+
const mainAddress = yield this.getAddress();
|
|
98
98
|
const senderAddress = (_a = (yield this.getAdditionalAddresses(mainAddress)).find((address) => address.type === 'payment')) === null || _a === void 0 ? void 0 : _a.address;
|
|
99
99
|
if (!senderAddress || !supportsSatsConnect(this)) {
|
|
100
100
|
return;
|
|
@@ -92,7 +92,7 @@ class BitcoinWalletConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
92
92
|
if (!this.canFetchConnectedAccounts) {
|
|
93
93
|
return this.getConnectedAccountsFromCache();
|
|
94
94
|
}
|
|
95
|
-
const connectedAccounts = yield this.
|
|
95
|
+
const connectedAccounts = yield this.getAddress();
|
|
96
96
|
if (!connectedAccounts) {
|
|
97
97
|
return [];
|
|
98
98
|
}
|
|
@@ -88,7 +88,7 @@ class BitcoinWalletConnector extends WalletConnectorBase {
|
|
|
88
88
|
if (!this.canFetchConnectedAccounts) {
|
|
89
89
|
return this.getConnectedAccountsFromCache();
|
|
90
90
|
}
|
|
91
|
-
const connectedAccounts = yield this.
|
|
91
|
+
const connectedAccounts = yield this.getAddress();
|
|
92
92
|
if (!connectedAccounts) {
|
|
93
93
|
return [];
|
|
94
94
|
}
|
package/src/OkxConnector.cjs
CHANGED
|
@@ -13,7 +13,7 @@ class OkxConnector extends BitcoinWalletConnector.BitcoinWalletConnector {
|
|
|
13
13
|
this.name = 'OKX Wallet (Bitcoin)';
|
|
14
14
|
this.canFetchConnectedAccounts = true;
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
getAddress() {
|
|
17
17
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
18
18
|
const provider = this.getProvider();
|
|
19
19
|
if (!provider) {
|
|
@@ -40,7 +40,7 @@ class OkxConnector extends BitcoinWalletConnector.BitcoinWalletConnector {
|
|
|
40
40
|
sendBitcoin(transaction) {
|
|
41
41
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
42
42
|
const provider = this.getProvider();
|
|
43
|
-
const connectedAddress = yield this.
|
|
43
|
+
const connectedAddress = yield this.getAddress();
|
|
44
44
|
if (!connectedAddress || !provider) {
|
|
45
45
|
return;
|
|
46
46
|
}
|
package/src/OkxConnector.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare class OkxConnector extends BitcoinWalletConnector {
|
|
|
4
4
|
name: string;
|
|
5
5
|
canFetchConnectedAccounts: boolean;
|
|
6
6
|
constructor(opts: BitcoinWalletConnectorOpts);
|
|
7
|
-
|
|
7
|
+
getAddress(): Promise<string | undefined>;
|
|
8
8
|
signMessage(messageToSign: string): Promise<string | undefined>;
|
|
9
9
|
sendBitcoin(transaction: BitcoinTransaction): Promise<string | undefined>;
|
|
10
10
|
signPsbt(request: BitcoinSignPsbtRequest): Promise<BitcoinSignPsbtResponse | undefined>;
|
package/src/OkxConnector.js
CHANGED
|
@@ -9,7 +9,7 @@ class OkxConnector extends BitcoinWalletConnector {
|
|
|
9
9
|
this.name = 'OKX Wallet (Bitcoin)';
|
|
10
10
|
this.canFetchConnectedAccounts = true;
|
|
11
11
|
}
|
|
12
|
-
|
|
12
|
+
getAddress() {
|
|
13
13
|
return __awaiter(this, void 0, void 0, function* () {
|
|
14
14
|
const provider = this.getProvider();
|
|
15
15
|
if (!provider) {
|
|
@@ -36,7 +36,7 @@ class OkxConnector extends BitcoinWalletConnector {
|
|
|
36
36
|
sendBitcoin(transaction) {
|
|
37
37
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38
38
|
const provider = this.getProvider();
|
|
39
|
-
const connectedAddress = yield this.
|
|
39
|
+
const connectedAddress = yield this.getAddress();
|
|
40
40
|
if (!connectedAddress || !provider) {
|
|
41
41
|
return;
|
|
42
42
|
}
|
package/src/UnisatConnector.cjs
CHANGED
|
@@ -14,7 +14,7 @@ class UnisatConnector extends BitcoinWalletConnector.BitcoinWalletConnector {
|
|
|
14
14
|
this.overrideKey = 'unisat';
|
|
15
15
|
this.canFetchConnectedAccounts = true;
|
|
16
16
|
}
|
|
17
|
-
|
|
17
|
+
getAddress() {
|
|
18
18
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
19
19
|
const provider = this.getProvider();
|
|
20
20
|
if (!provider) {
|
|
@@ -42,7 +42,7 @@ class UnisatConnector extends BitcoinWalletConnector.BitcoinWalletConnector {
|
|
|
42
42
|
sendBitcoin(transaction) {
|
|
43
43
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
44
44
|
const provider = this.getProvider();
|
|
45
|
-
const connectedAddress = yield this.
|
|
45
|
+
const connectedAddress = yield this.getAddress();
|
|
46
46
|
if (!connectedAddress || !provider) {
|
|
47
47
|
return;
|
|
48
48
|
}
|
package/src/UnisatConnector.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare class UnisatConnector extends BitcoinWalletConnector {
|
|
|
5
5
|
overrideKey: string;
|
|
6
6
|
canFetchConnectedAccounts: boolean;
|
|
7
7
|
constructor(opts: BitcoinWalletConnectorOpts);
|
|
8
|
-
|
|
8
|
+
getAddress(): Promise<string | undefined>;
|
|
9
9
|
signMessage(messageToSign: string): Promise<string | undefined>;
|
|
10
10
|
sendBitcoin(transaction: BitcoinTransaction): Promise<string | undefined>;
|
|
11
11
|
signPsbt(request: BitcoinSignPsbtRequest): Promise<BitcoinSignPsbtResponse | undefined>;
|
package/src/UnisatConnector.js
CHANGED
|
@@ -10,7 +10,7 @@ class UnisatConnector extends BitcoinWalletConnector {
|
|
|
10
10
|
this.overrideKey = 'unisat';
|
|
11
11
|
this.canFetchConnectedAccounts = true;
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
getAddress() {
|
|
14
14
|
return __awaiter(this, void 0, void 0, function* () {
|
|
15
15
|
const provider = this.getProvider();
|
|
16
16
|
if (!provider) {
|
|
@@ -38,7 +38,7 @@ class UnisatConnector extends BitcoinWalletConnector {
|
|
|
38
38
|
sendBitcoin(transaction) {
|
|
39
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
40
|
const provider = this.getProvider();
|
|
41
|
-
const connectedAddress = yield this.
|
|
41
|
+
const connectedAddress = yield this.getAddress();
|
|
42
42
|
if (!connectedAddress || !provider) {
|
|
43
43
|
return;
|
|
44
44
|
}
|