@dynamic-labs/bitcoin 2.1.0-alpha.21 → 2.1.0-alpha.22
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 +2 -0
- package/package.json +4 -4
- package/src/UnknownInjected.cjs +37 -0
- package/src/UnknownInjected.d.ts +11 -0
- package/src/UnknownInjected.js +33 -0
- package/src/index.cjs +2 -0
- package/src/index.js +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
|
|
2
|
+
## [2.1.0-alpha.22](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.21...v2.1.0-alpha.22) (2024-05-21)
|
|
3
|
+
|
|
2
4
|
## [2.1.0-alpha.21](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.20...v2.1.0-alpha.21) (2024-05-21)
|
|
3
5
|
|
|
4
6
|
## [2.1.0-alpha.20](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.0-alpha.19...v2.1.0-alpha.20) (2024-05-21)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/bitcoin",
|
|
3
|
-
"version": "2.1.0-alpha.
|
|
3
|
+
"version": "2.1.0-alpha.22",
|
|
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": "2.0.0",
|
|
35
|
-
"@dynamic-labs/utils": "2.1.0-alpha.
|
|
36
|
-
"@dynamic-labs/wallet-book": "2.1.0-alpha.
|
|
37
|
-
"@dynamic-labs/wallet-connector-core": "2.1.0-alpha.
|
|
35
|
+
"@dynamic-labs/utils": "2.1.0-alpha.22",
|
|
36
|
+
"@dynamic-labs/wallet-book": "2.1.0-alpha.22",
|
|
37
|
+
"@dynamic-labs/wallet-connector-core": "2.1.0-alpha.22",
|
|
38
38
|
"stream": "0.0.2"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {}
|
|
@@ -0,0 +1,37 @@
|
|
|
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 UnknownInjectedConnector extends BitcoinWalletConnector.BitcoinWalletConnector {
|
|
10
|
+
constructor(opts) {
|
|
11
|
+
super(Object.assign(Object.assign({}, opts), { overrideKey: 'unknown' }));
|
|
12
|
+
this.name = 'Unknown';
|
|
13
|
+
this.overrideKey = 'unknown';
|
|
14
|
+
this.canFetchConnectedAccounts = false;
|
|
15
|
+
}
|
|
16
|
+
getAddress() {
|
|
17
|
+
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
18
|
+
return;
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
signPsbt(
|
|
22
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
23
|
+
_request) {
|
|
24
|
+
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
25
|
+
return;
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
sendBitcoin(
|
|
29
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
30
|
+
_transaction) {
|
|
31
|
+
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
return;
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
exports.UnknownInjectedConnector = UnknownInjectedConnector;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BitcoinWalletConnector, BitcoinWalletConnectorOpts } from './BitcoinWalletConnector';
|
|
2
|
+
import { BitcoinSignPsbtRequest, BitcoinSignPsbtResponse, BitcoinTransaction } from './types';
|
|
3
|
+
export declare class UnknownInjectedConnector extends BitcoinWalletConnector {
|
|
4
|
+
name: string;
|
|
5
|
+
overrideKey: string;
|
|
6
|
+
canFetchConnectedAccounts: boolean;
|
|
7
|
+
constructor(opts: BitcoinWalletConnectorOpts);
|
|
8
|
+
getAddress(): Promise<string | undefined>;
|
|
9
|
+
signPsbt(_request: BitcoinSignPsbtRequest): Promise<BitcoinSignPsbtResponse | undefined>;
|
|
10
|
+
sendBitcoin(_transaction: BitcoinTransaction): Promise<string | undefined>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import { __awaiter } from '../_virtual/_tslib.js';
|
|
3
|
+
import { BitcoinWalletConnector } from './BitcoinWalletConnector.js';
|
|
4
|
+
|
|
5
|
+
class UnknownInjectedConnector extends BitcoinWalletConnector {
|
|
6
|
+
constructor(opts) {
|
|
7
|
+
super(Object.assign(Object.assign({}, opts), { overrideKey: 'unknown' }));
|
|
8
|
+
this.name = 'Unknown';
|
|
9
|
+
this.overrideKey = 'unknown';
|
|
10
|
+
this.canFetchConnectedAccounts = false;
|
|
11
|
+
}
|
|
12
|
+
getAddress() {
|
|
13
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
14
|
+
return;
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
signPsbt(
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
19
|
+
_request) {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
return;
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
sendBitcoin(
|
|
25
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
26
|
+
_transaction) {
|
|
27
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
return;
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export { UnknownInjectedConnector };
|
package/src/index.cjs
CHANGED
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
|
|
6
6
|
var OkxConnector = require('./OkxConnector.cjs');
|
|
7
7
|
var UnisatConnector = require('./UnisatConnector.cjs');
|
|
8
|
+
var UnknownInjected = require('./UnknownInjected.cjs');
|
|
8
9
|
var BitcoinWalletConnector = require('./BitcoinWalletConnector.cjs');
|
|
9
10
|
var fetchBtcKitConnectors = require('./utils/fetchBtcKitConnectors/fetchBtcKitConnectors.cjs');
|
|
10
11
|
var fetchSatsConnectConnectors = require('./utils/fetchSatsConnectConnectors/fetchSatsConnectConnectors.cjs');
|
|
@@ -17,6 +18,7 @@ const BitcoinWalletConnectors = (props) => [
|
|
|
17
18
|
...fetchBtcKitConnectors.fetchBtcKitConnectors(props),
|
|
18
19
|
OkxConnector.OkxConnector,
|
|
19
20
|
UnisatConnector.UnisatConnector,
|
|
21
|
+
UnknownInjected.UnknownInjectedConnector,
|
|
20
22
|
];
|
|
21
23
|
|
|
22
24
|
exports.BitcoinWalletConnector = BitcoinWalletConnector.BitcoinWalletConnector;
|
package/src/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { OkxConnector } from './OkxConnector.js';
|
|
3
3
|
import { UnisatConnector } from './UnisatConnector.js';
|
|
4
|
+
import { UnknownInjectedConnector } from './UnknownInjected.js';
|
|
4
5
|
export { BitcoinWalletConnector } from './BitcoinWalletConnector.js';
|
|
5
6
|
import { fetchBtcKitConnectors } from './utils/fetchBtcKitConnectors/fetchBtcKitConnectors.js';
|
|
6
7
|
export { fetchBtcKitConnectors } from './utils/fetchBtcKitConnectors/fetchBtcKitConnectors.js';
|
|
@@ -15,6 +16,7 @@ const BitcoinWalletConnectors = (props) => [
|
|
|
15
16
|
...fetchBtcKitConnectors(props),
|
|
16
17
|
OkxConnector,
|
|
17
18
|
UnisatConnector,
|
|
19
|
+
UnknownInjectedConnector,
|
|
18
20
|
];
|
|
19
21
|
|
|
20
22
|
export { BitcoinWalletConnectors };
|