@dynamic-labs/bitcoin 4.0.0-alpha.46 → 4.0.0-alpha.47
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 +15 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +6 -6
- package/src/wallet/BitcoinWallet.cjs +14 -0
- package/src/wallet/BitcoinWallet.d.ts +10 -0
- package/src/wallet/BitcoinWallet.js +14 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
|
|
2
|
+
## [4.0.0-alpha.47](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.46...v4.0.0-alpha.47) (2024-12-17)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### ⚠ BREAKING CHANGES
|
|
6
|
+
|
|
7
|
+
* stop exposing authToken and minAuthToken from dynamic context (#7629)
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* allow re-linking unknown wallet when there's another account of the same wallet provider already linked ([#7628](https://github.com/dynamic-labs/dynamic-auth/issues/7628)) ([20c6dc3](https://github.com/dynamic-labs/dynamic-auth/commit/20c6dc3b1847d82bd46f0df5abaef4efe1e24e38))
|
|
12
|
+
* ensure wallet connector will not get removed ([#7625](https://github.com/dynamic-labs/dynamic-auth/issues/7625)) ([b764846](https://github.com/dynamic-labs/dynamic-auth/commit/b764846b56428e2997d33858e29a87f44359eb6c))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
* stop exposing authToken and minAuthToken from dynamic context ([#7629](https://github.com/dynamic-labs/dynamic-auth/issues/7629)) ([9648870](https://github.com/dynamic-labs/dynamic-auth/commit/9648870478cdcecde279117ada2a1095dab54e2c))
|
|
16
|
+
|
|
2
17
|
## [4.0.0-alpha.46](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.45...v4.0.0-alpha.46) (2024-12-17)
|
|
3
18
|
|
|
4
19
|
|
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.47",
|
|
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.47",
|
|
29
|
+
"@dynamic-labs/types": "4.0.0-alpha.47",
|
|
30
|
+
"@dynamic-labs/utils": "4.0.0-alpha.47",
|
|
31
|
+
"@dynamic-labs/wallet-book": "4.0.0-alpha.47",
|
|
32
|
+
"@dynamic-labs/wallet-connector-core": "4.0.0-alpha.47",
|
|
33
33
|
"eventemitter3": "5.0.1"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {}
|
|
@@ -7,6 +7,20 @@ var _tslib = require('../../_virtual/_tslib.cjs');
|
|
|
7
7
|
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
8
8
|
|
|
9
9
|
class BitcoinWallet extends walletConnectorCore.Wallet {
|
|
10
|
+
/**
|
|
11
|
+
* Sends the native balance of the wallet to the given address.
|
|
12
|
+
* @param amount - The amount of balance to send (in satoshis).
|
|
13
|
+
* @param toAddress - The address to send the balance to.
|
|
14
|
+
* @returns The signature of the sent transaction.
|
|
15
|
+
*/
|
|
16
|
+
sendBalance(_a) {
|
|
17
|
+
return _tslib.__awaiter(this, arguments, void 0, function* ({ amount, toAddress, }) {
|
|
18
|
+
return this.sendBitcoin({
|
|
19
|
+
amount: BigInt(amount),
|
|
20
|
+
recipientAddress: toAddress,
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
}
|
|
10
24
|
/**
|
|
11
25
|
* Sends a raw transaction
|
|
12
26
|
* @returns A promise that resolves to the transaction id
|
|
@@ -3,6 +3,16 @@ import type { WalletAddressType } from '@dynamic-labs/types';
|
|
|
3
3
|
import { BitcoinWalletConnector } from '../connectors';
|
|
4
4
|
import { BitcoinSignPsbtRequest, BitcoinSignPsbtResponse, BitcoinTransaction } from '../types';
|
|
5
5
|
export declare class BitcoinWallet extends Wallet<BitcoinWalletConnector> {
|
|
6
|
+
/**
|
|
7
|
+
* Sends the native balance of the wallet to the given address.
|
|
8
|
+
* @param amount - The amount of balance to send (in satoshis).
|
|
9
|
+
* @param toAddress - The address to send the balance to.
|
|
10
|
+
* @returns The signature of the sent transaction.
|
|
11
|
+
*/
|
|
12
|
+
sendBalance({ amount, toAddress, }: {
|
|
13
|
+
amount: string;
|
|
14
|
+
toAddress: string;
|
|
15
|
+
}): Promise<string | undefined>;
|
|
6
16
|
/**
|
|
7
17
|
* Sends a raw transaction
|
|
8
18
|
* @returns A promise that resolves to the transaction id
|
|
@@ -3,6 +3,20 @@ import { __awaiter } from '../../_virtual/_tslib.js';
|
|
|
3
3
|
import { Wallet } from '@dynamic-labs/wallet-connector-core';
|
|
4
4
|
|
|
5
5
|
class BitcoinWallet extends Wallet {
|
|
6
|
+
/**
|
|
7
|
+
* Sends the native balance of the wallet to the given address.
|
|
8
|
+
* @param amount - The amount of balance to send (in satoshis).
|
|
9
|
+
* @param toAddress - The address to send the balance to.
|
|
10
|
+
* @returns The signature of the sent transaction.
|
|
11
|
+
*/
|
|
12
|
+
sendBalance(_a) {
|
|
13
|
+
return __awaiter(this, arguments, void 0, function* ({ amount, toAddress, }) {
|
|
14
|
+
return this.sendBitcoin({
|
|
15
|
+
amount: BigInt(amount),
|
|
16
|
+
recipientAddress: toAddress,
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
}
|
|
6
20
|
/**
|
|
7
21
|
* Sends a raw transaction
|
|
8
22
|
* @returns A promise that resolves to the transaction id
|