@dynamic-labs/bitcoin 4.0.0-alpha.27 → 4.0.0-alpha.28
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 +19 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +6 -6
- package/src/connectors/BitcoinSatsConnectConnector/BitcoinSatsConnectConnector.cjs +1 -3
- package/src/connectors/BitcoinSatsConnectConnector/BitcoinSatsConnectConnector.js +1 -3
- package/src/connectors/OkxConnector/OkxConnector.cjs +3 -6
- package/src/connectors/OkxConnector/OkxConnector.d.ts +0 -1
- package/src/connectors/OkxConnector/OkxConnector.js +3 -6
- package/src/index.cjs +0 -1
- package/src/index.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,23 @@
|
|
|
1
1
|
|
|
2
|
+
## [4.0.0-alpha.28](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.27...v4.0.0-alpha.28) (2024-11-07)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### ⚠ BREAKING CHANGES
|
|
6
|
+
|
|
7
|
+
* upgrade to starknet v6
|
|
8
|
+
See this guide for more details: https://starknetjs.com/docs/guides/migrate/
|
|
9
|
+
There are no code changes required on the Dynamic SDK side, however if you have installed the `starknet` package, you will need to upgrade to >= v6.11.0.
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* new transaction modal and ui for sign/signAll ([#7296](https://github.com/dynamic-labs/dynamic-auth/issues/7296)) ([05a8af1](https://github.com/dynamic-labs/dynamic-auth/commit/05a8af1eb772b2b8087ed96a54caf4b6ae8b79d2)), closes [#7297](https://github.com/dynamic-labs/dynamic-auth/issues/7297) [#7298](https://github.com/dynamic-labs/dynamic-auth/issues/7298)
|
|
14
|
+
* upgrade to starknet v6 ([#7189](https://github.com/dynamic-labs/dynamic-auth/issues/7189)) ([2a6e24e](https://github.com/dynamic-labs/dynamic-auth/commit/2a6e24e4178fcee671b381c28f6a681f4ce52c62))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* transaction confirmation modal popup ([#7368](https://github.com/dynamic-labs/dynamic-auth/issues/7368)) ([3c48658](https://github.com/dynamic-labs/dynamic-auth/commit/3c48658a62874d908bba8f06fb092ff5983ede16))
|
|
20
|
+
|
|
2
21
|
## [4.0.0-alpha.27](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.26...v4.0.0-alpha.27) (2024-11-06)
|
|
3
22
|
|
|
4
23
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/bitcoin",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.28",
|
|
4
4
|
"description": "A React SDK for implementing wallet web3 authentication and authorization to your website.",
|
|
5
5
|
"author": "Dynamic Labs, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"bitcoinjs-lib": "6.1.5",
|
|
26
26
|
"sats-connect": "2.8.0",
|
|
27
27
|
"jsontokens": "4.0.1",
|
|
28
|
-
"@dynamic-labs/assert-package-version": "4.0.0-alpha.
|
|
29
|
-
"@dynamic-labs/types": "4.0.0-alpha.
|
|
30
|
-
"@dynamic-labs/utils": "4.0.0-alpha.
|
|
31
|
-
"@dynamic-labs/wallet-book": "4.0.0-alpha.
|
|
32
|
-
"@dynamic-labs/wallet-connector-core": "4.0.0-alpha.
|
|
28
|
+
"@dynamic-labs/assert-package-version": "4.0.0-alpha.28",
|
|
29
|
+
"@dynamic-labs/types": "4.0.0-alpha.28",
|
|
30
|
+
"@dynamic-labs/utils": "4.0.0-alpha.28",
|
|
31
|
+
"@dynamic-labs/wallet-book": "4.0.0-alpha.28",
|
|
32
|
+
"@dynamic-labs/wallet-connector-core": "4.0.0-alpha.28",
|
|
33
33
|
"eventemitter3": "5.0.1"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {}
|
|
@@ -7,7 +7,6 @@ var _tslib = require('../../../_virtual/_tslib.cjs');
|
|
|
7
7
|
var bitcoinjsLib = require('bitcoinjs-lib');
|
|
8
8
|
var satsConnect = require('sats-connect');
|
|
9
9
|
var utils = require('@dynamic-labs/utils');
|
|
10
|
-
var walletBook = require('@dynamic-labs/wallet-book');
|
|
11
10
|
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
12
11
|
var bitcoinNetworkTypeToNetworks = require('../../utils/psbt/bitcoinNetworkTypeToNetworks.cjs');
|
|
13
12
|
var BitcoinWalletConnector = require('../BitcoinWalletConnector.cjs');
|
|
@@ -58,8 +57,7 @@ class BitcoinSatsConnectConnector extends BitcoinWalletConnector.BitcoinWalletCo
|
|
|
58
57
|
*/
|
|
59
58
|
handleInAppBrowserGetAddress() {
|
|
60
59
|
var _a;
|
|
61
|
-
const
|
|
62
|
-
const inAppBrowserUrl = (_a = wallet === null || wallet === void 0 ? void 0 : wallet.mobile) === null || _a === void 0 ? void 0 : _a.inAppBrowser;
|
|
60
|
+
const inAppBrowserUrl = (_a = this._metadata) === null || _a === void 0 ? void 0 : _a.inAppBrowserUrl;
|
|
63
61
|
if (!utils.isMobile() ||
|
|
64
62
|
this.isInstalledOnBrowser() ||
|
|
65
63
|
!inAppBrowserUrl ||
|
|
@@ -3,7 +3,6 @@ import { __awaiter } from '../../../_virtual/_tslib.js';
|
|
|
3
3
|
import { Psbt } from 'bitcoinjs-lib';
|
|
4
4
|
import { BitcoinNetworkType, request, AddressPurpose, signMultipleTransactions, addListener } from 'sats-connect';
|
|
5
5
|
import { isMobile, template } from '@dynamic-labs/utils';
|
|
6
|
-
import { findWalletBookWallet } from '@dynamic-labs/wallet-book';
|
|
7
6
|
import { logger, eventListenerHandlers } from '@dynamic-labs/wallet-connector-core';
|
|
8
7
|
import { convertNetworkTypeForPsbt } from '../../utils/psbt/bitcoinNetworkTypeToNetworks.js';
|
|
9
8
|
import { BitcoinWalletConnector } from '../BitcoinWalletConnector.js';
|
|
@@ -54,8 +53,7 @@ class BitcoinSatsConnectConnector extends BitcoinWalletConnector {
|
|
|
54
53
|
*/
|
|
55
54
|
handleInAppBrowserGetAddress() {
|
|
56
55
|
var _a;
|
|
57
|
-
const
|
|
58
|
-
const inAppBrowserUrl = (_a = wallet === null || wallet === void 0 ? void 0 : wallet.mobile) === null || _a === void 0 ? void 0 : _a.inAppBrowser;
|
|
56
|
+
const inAppBrowserUrl = (_a = this._metadata) === null || _a === void 0 ? void 0 : _a.inAppBrowserUrl;
|
|
59
57
|
if (!isMobile() ||
|
|
60
58
|
this.isInstalledOnBrowser() ||
|
|
61
59
|
!inAppBrowserUrl ||
|
|
@@ -20,17 +20,14 @@ class OkxConnector extends BitcoinWalletConnector.BitcoinWalletConnector {
|
|
|
20
20
|
super(Object.assign(Object.assign({}, opts), { metadata, overrideKey: OKX_KEY }));
|
|
21
21
|
this.name = 'OKX Wallet';
|
|
22
22
|
}
|
|
23
|
-
get walletBookWallet() {
|
|
24
|
-
return this.walletBook.wallets[this.key];
|
|
25
|
-
}
|
|
26
23
|
getAddress() {
|
|
27
24
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
25
|
+
var _a;
|
|
28
26
|
if (!this.isInstalledOnBrowser() &&
|
|
29
27
|
utils.isMobile() &&
|
|
30
|
-
this.
|
|
31
|
-
this.walletBookWallet.mobile.inAppBrowser &&
|
|
28
|
+
((_a = this._metadata) === null || _a === void 0 ? void 0 : _a.inAppBrowserUrl) &&
|
|
32
29
|
this.mobileExperience === 'in-app-browser') {
|
|
33
|
-
const inAppBrowserCompiledTemplate = utils.template(this.
|
|
30
|
+
const inAppBrowserCompiledTemplate = utils.template(this._metadata.inAppBrowserUrl);
|
|
34
31
|
const deepLink = inAppBrowserCompiledTemplate({
|
|
35
32
|
encodedDappURI: encodeURIComponent(window.location.toString()),
|
|
36
33
|
});
|
|
@@ -3,7 +3,6 @@ import { BitcoinTransaction, BitcoinSignPsbtRequest, BitcoinSignPsbtResponse } f
|
|
|
3
3
|
export declare class OkxConnector extends BitcoinWalletConnector {
|
|
4
4
|
name: string;
|
|
5
5
|
constructor(opts: BitcoinWalletConnectorOpts);
|
|
6
|
-
private get walletBookWallet();
|
|
7
6
|
getAddress(): Promise<string | undefined>;
|
|
8
7
|
signMessage(messageToSign: string): Promise<string | undefined>;
|
|
9
8
|
sendBitcoin(transaction: BitcoinTransaction): Promise<string | undefined>;
|
|
@@ -16,17 +16,14 @@ class OkxConnector extends BitcoinWalletConnector {
|
|
|
16
16
|
super(Object.assign(Object.assign({}, opts), { metadata, overrideKey: OKX_KEY }));
|
|
17
17
|
this.name = 'OKX Wallet';
|
|
18
18
|
}
|
|
19
|
-
get walletBookWallet() {
|
|
20
|
-
return this.walletBook.wallets[this.key];
|
|
21
|
-
}
|
|
22
19
|
getAddress() {
|
|
23
20
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
var _a;
|
|
24
22
|
if (!this.isInstalledOnBrowser() &&
|
|
25
23
|
isMobile() &&
|
|
26
|
-
this.
|
|
27
|
-
this.walletBookWallet.mobile.inAppBrowser &&
|
|
24
|
+
((_a = this._metadata) === null || _a === void 0 ? void 0 : _a.inAppBrowserUrl) &&
|
|
28
25
|
this.mobileExperience === 'in-app-browser') {
|
|
29
|
-
const inAppBrowserCompiledTemplate = template(this.
|
|
26
|
+
const inAppBrowserCompiledTemplate = template(this._metadata.inAppBrowserUrl);
|
|
30
27
|
const deepLink = inAppBrowserCompiledTemplate({
|
|
31
28
|
encodedDappURI: encodeURIComponent(window.location.toString()),
|
|
32
29
|
});
|
package/src/index.cjs
CHANGED
|
@@ -11,7 +11,6 @@ require('sats-connect');
|
|
|
11
11
|
require('bitcoinjs-lib');
|
|
12
12
|
require('@dynamic-labs/wallet-connector-core');
|
|
13
13
|
require('@dynamic-labs/utils');
|
|
14
|
-
require('@dynamic-labs/wallet-book');
|
|
15
14
|
var MagicEdenConnector = require('./connectors/MagicEdenConnector/MagicEdenConnector.cjs');
|
|
16
15
|
var PhantomConnector = require('./connectors/PhantomConnector/PhantomConnector.cjs');
|
|
17
16
|
var OkxConnector = require('./connectors/OkxConnector/OkxConnector.cjs');
|
package/src/index.js
CHANGED
|
@@ -7,7 +7,6 @@ import 'sats-connect';
|
|
|
7
7
|
import 'bitcoinjs-lib';
|
|
8
8
|
import '@dynamic-labs/wallet-connector-core';
|
|
9
9
|
import '@dynamic-labs/utils';
|
|
10
|
-
import '@dynamic-labs/wallet-book';
|
|
11
10
|
import { MagicEdenConnector } from './connectors/MagicEdenConnector/MagicEdenConnector.js';
|
|
12
11
|
import { PhantomConnector } from './connectors/PhantomConnector/PhantomConnector.js';
|
|
13
12
|
import { OkxConnector } from './connectors/OkxConnector/OkxConnector.js';
|