@dynamic-labs/bitcoin 2.1.3 → 2.1.5
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 +12 -0
- package/package.json +4 -4
- package/src/connectors/FallbackBitcoinConnector/FallbackBitcoinConnector.cjs +38 -0
- package/src/connectors/FallbackBitcoinConnector/FallbackBitcoinConnector.d.ts +12 -0
- package/src/connectors/FallbackBitcoinConnector/FallbackBitcoinConnector.js +34 -0
- package/src/connectors/FallbackBitcoinConnector/index.d.ts +1 -0
- package/src/connectors/index.d.ts +1 -0
- package/src/index.cjs +2 -0
- package/src/index.js +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
|
|
2
|
+
### [2.1.5](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.4...v2.1.5) (2024-06-16)
|
|
3
|
+
|
|
4
|
+
* Improve handling of unknown wallets, css fixes and copy updates in multi wallet experience
|
|
5
|
+
|
|
6
|
+
### [2.1.4](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.3...v2.1.4) (2024-06-14)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* close sign modal when signing in with a wallet when embedded wallet is enabled ([#6012](https://github.com/dynamic-labs/DynamicAuth/issues/6012)) ([d473cc8](https://github.com/dynamic-labs/DynamicAuth/commit/d473cc83ac378b7bc43e2546020c02a297d4595b))
|
|
12
|
+
* display custom network name in network picker even if it doesn't have a valid icon ([#6020](https://github.com/dynamic-labs/DynamicAuth/issues/6020)) ([5e1539e](https://github.com/dynamic-labs/DynamicAuth/commit/5e1539e1e6920fb1fdbf96c938f40e785b3ee680))
|
|
13
|
+
|
|
2
14
|
### [2.1.3](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.2...v2.1.3) (2024-06-14)
|
|
3
15
|
|
|
4
16
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/bitcoin",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.5",
|
|
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": "2.1.
|
|
36
|
-
"@dynamic-labs/wallet-book": "2.1.
|
|
37
|
-
"@dynamic-labs/wallet-connector-core": "2.1.
|
|
35
|
+
"@dynamic-labs/utils": "2.1.5",
|
|
36
|
+
"@dynamic-labs/wallet-book": "2.1.5",
|
|
37
|
+
"@dynamic-labs/wallet-connector-core": "2.1.5",
|
|
38
38
|
"stream": "0.0.2"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var _tslib = require('../../../_virtual/_tslib.cjs');
|
|
7
|
+
var BitcoinWalletConnector = require('../BitcoinWalletConnector.cjs');
|
|
8
|
+
|
|
9
|
+
class FallbackBitcoinConnector extends BitcoinWalletConnector.BitcoinWalletConnector {
|
|
10
|
+
constructor(opts) {
|
|
11
|
+
super(Object.assign(Object.assign({}, opts), { overrideKey: 'fallbackconnector' }));
|
|
12
|
+
this.name = 'Fallback Connector';
|
|
13
|
+
this.overrideKey = 'fallbackconnector';
|
|
14
|
+
this.isAvailable = false;
|
|
15
|
+
this.canFetchConnectedAccounts = false;
|
|
16
|
+
}
|
|
17
|
+
getAddress() {
|
|
18
|
+
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
return;
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
signPsbt(
|
|
23
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
24
|
+
_request) {
|
|
25
|
+
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
return;
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
sendBitcoin(
|
|
30
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
31
|
+
_transaction) {
|
|
32
|
+
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
33
|
+
return;
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
exports.FallbackBitcoinConnector = FallbackBitcoinConnector;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BitcoinSignPsbtRequest, BitcoinSignPsbtResponse, BitcoinTransaction } from '../../types';
|
|
2
|
+
import { BitcoinWalletConnector, BitcoinWalletConnectorOpts } from '../BitcoinWalletConnector';
|
|
3
|
+
export declare class FallbackBitcoinConnector extends BitcoinWalletConnector {
|
|
4
|
+
name: string;
|
|
5
|
+
overrideKey: string;
|
|
6
|
+
isAvailable: boolean;
|
|
7
|
+
canFetchConnectedAccounts: boolean;
|
|
8
|
+
constructor(opts: BitcoinWalletConnectorOpts);
|
|
9
|
+
getAddress(): Promise<string | undefined>;
|
|
10
|
+
signPsbt(_request: BitcoinSignPsbtRequest): Promise<BitcoinSignPsbtResponse | undefined>;
|
|
11
|
+
sendBitcoin(_transaction: BitcoinTransaction): Promise<string | undefined>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import { __awaiter } from '../../../_virtual/_tslib.js';
|
|
3
|
+
import { BitcoinWalletConnector } from '../BitcoinWalletConnector.js';
|
|
4
|
+
|
|
5
|
+
class FallbackBitcoinConnector extends BitcoinWalletConnector {
|
|
6
|
+
constructor(opts) {
|
|
7
|
+
super(Object.assign(Object.assign({}, opts), { overrideKey: 'fallbackconnector' }));
|
|
8
|
+
this.name = 'Fallback Connector';
|
|
9
|
+
this.overrideKey = 'fallbackconnector';
|
|
10
|
+
this.isAvailable = false;
|
|
11
|
+
this.canFetchConnectedAccounts = false;
|
|
12
|
+
}
|
|
13
|
+
getAddress() {
|
|
14
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
15
|
+
return;
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
signPsbt(
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
20
|
+
_request) {
|
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
return;
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
sendBitcoin(
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
27
|
+
_transaction) {
|
|
28
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
+
return;
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { FallbackBitcoinConnector };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { FallbackBitcoinConnector } from './FallbackBitcoinConnector';
|
package/src/index.cjs
CHANGED
|
@@ -20,6 +20,7 @@ var PhantomConnector = require('./connectors/PhantomConnector/PhantomConnector.c
|
|
|
20
20
|
var OkxConnector = require('./connectors/OkxConnector/OkxConnector.cjs');
|
|
21
21
|
var UnisatConnector = require('./connectors/UnisatConnector/UnisatConnector.cjs');
|
|
22
22
|
var UnknownInjected = require('./connectors/UnknownInjected/UnknownInjected.cjs');
|
|
23
|
+
var FallbackBitcoinConnector = require('./connectors/FallbackBitcoinConnector/FallbackBitcoinConnector.cjs');
|
|
23
24
|
|
|
24
25
|
const BitcoinWalletConnectors = (props) => [
|
|
25
26
|
...fetchSatsConnectConnectors.fetchSatsConnectConnectors(props),
|
|
@@ -28,6 +29,7 @@ const BitcoinWalletConnectors = (props) => [
|
|
|
28
29
|
OkxConnector.OkxConnector,
|
|
29
30
|
UnisatConnector.UnisatConnector,
|
|
30
31
|
UnknownInjected.UnknownInjectedConnector,
|
|
32
|
+
FallbackBitcoinConnector.FallbackBitcoinConnector,
|
|
31
33
|
];
|
|
32
34
|
|
|
33
35
|
exports.BitcoinWalletConnector = BitcoinWalletConnector.BitcoinWalletConnector;
|
package/src/index.js
CHANGED
|
@@ -18,6 +18,7 @@ import { PhantomConnector } from './connectors/PhantomConnector/PhantomConnector
|
|
|
18
18
|
import { OkxConnector } from './connectors/OkxConnector/OkxConnector.js';
|
|
19
19
|
import { UnisatConnector } from './connectors/UnisatConnector/UnisatConnector.js';
|
|
20
20
|
import { UnknownInjectedConnector } from './connectors/UnknownInjected/UnknownInjected.js';
|
|
21
|
+
import { FallbackBitcoinConnector } from './connectors/FallbackBitcoinConnector/FallbackBitcoinConnector.js';
|
|
21
22
|
|
|
22
23
|
const BitcoinWalletConnectors = (props) => [
|
|
23
24
|
...fetchSatsConnectConnectors(props),
|
|
@@ -26,6 +27,7 @@ const BitcoinWalletConnectors = (props) => [
|
|
|
26
27
|
OkxConnector,
|
|
27
28
|
UnisatConnector,
|
|
28
29
|
UnknownInjectedConnector,
|
|
30
|
+
FallbackBitcoinConnector,
|
|
29
31
|
];
|
|
30
32
|
|
|
31
33
|
export { BitcoinWalletConnectors };
|