@leather.io/bitcoin 0.19.30 → 0.19.31
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/.turbo/turbo-build.log +4 -4
- package/CHANGELOG.md +22 -0
- package/dist/index.d.ts +12 -12
- package/package.json +10 -10
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @leather.io/bitcoin@0.19.
|
|
2
|
+
> @leather.io/bitcoin@0.19.31 build /home/runner/work/mono/mono/packages/bitcoin
|
|
3
3
|
> tsup
|
|
4
4
|
|
|
5
5
|
CLI Building entry: src/index.ts
|
|
@@ -10,7 +10,7 @@ CLI Target: es2022
|
|
|
10
10
|
ESM Build start
|
|
11
11
|
ESM dist/index.js 53.95 KB
|
|
12
12
|
ESM dist/index.js.map 106.90 KB
|
|
13
|
-
ESM ⚡️ Build success in
|
|
13
|
+
ESM ⚡️ Build success in 119ms
|
|
14
14
|
DTS Build start
|
|
15
|
-
DTS ⚡️ Build success in
|
|
16
|
-
DTS dist/index.d.ts 26.
|
|
15
|
+
DTS ⚡️ Build success in 5231ms
|
|
16
|
+
DTS dist/index.d.ts 26.20 KB
|
package/CHANGELOG.md
CHANGED
|
@@ -547,6 +547,28 @@
|
|
|
547
547
|
* devDependencies
|
|
548
548
|
* @leather.io/rpc bumped to 2.6.1
|
|
549
549
|
|
|
550
|
+
## [0.19.31](https://github.com/leather-io/mono/compare/@leather.io/bitcoin-v0.19.30...@leather.io/bitcoin-v0.19.31) (2025-02-21)
|
|
551
|
+
|
|
552
|
+
|
|
553
|
+
### Bug Fixes
|
|
554
|
+
|
|
555
|
+
* upgrade prettier ([5a1577c](https://github.com/leather-io/mono/commit/5a1577cc382b4399d427dbf049d1f1d08d984f33))
|
|
556
|
+
* upgrade typescript ([14b91ee](https://github.com/leather-io/mono/commit/14b91ee484d89d25399af7b3e9144e1b4e6a48a7))
|
|
557
|
+
|
|
558
|
+
|
|
559
|
+
### Dependencies
|
|
560
|
+
|
|
561
|
+
* The following workspace dependencies were updated
|
|
562
|
+
* dependencies
|
|
563
|
+
* @leather.io/constants bumped to 0.17.2
|
|
564
|
+
* @leather.io/crypto bumped to 1.6.44
|
|
565
|
+
* @leather.io/models bumped to 0.26.2
|
|
566
|
+
* @leather.io/utils bumped to 0.27.4
|
|
567
|
+
* devDependencies
|
|
568
|
+
* @leather.io/prettier-config bumped to 0.6.1
|
|
569
|
+
* @leather.io/rpc bumped to 2.6.3
|
|
570
|
+
* @leather.io/tsconfig-config bumped to 0.6.1
|
|
571
|
+
|
|
550
572
|
## [0.19.30](https://github.com/leather-io/mono/compare/@leather.io/bitcoin-v0.19.29...@leather.io/bitcoin-v0.19.30) (2025-02-21)
|
|
551
573
|
|
|
552
574
|
|
package/dist/index.d.ts
CHANGED
|
@@ -14,9 +14,9 @@ import { SigHash } from '@scure/btc-signer/transaction';
|
|
|
14
14
|
import { Network } from 'bitcoin-address-validation';
|
|
15
15
|
|
|
16
16
|
declare function ecPairFromPrivateKey(key: Uint8Array): ecpair.ECPairInterface;
|
|
17
|
-
declare function hashBip322Message(message: Uint8Array | string): Uint8Array
|
|
17
|
+
declare function hashBip322Message(message: Uint8Array | string): Uint8Array<ArrayBufferLike>;
|
|
18
18
|
declare const bip322TransactionToSignValues: {
|
|
19
|
-
prevoutHash: Uint8Array
|
|
19
|
+
prevoutHash: Uint8Array<ArrayBufferLike>;
|
|
20
20
|
prevoutIndex: number;
|
|
21
21
|
sequence: number;
|
|
22
22
|
};
|
|
@@ -25,7 +25,7 @@ declare function isSupportedMessageSigningPaymentType(paymentType: string): bool
|
|
|
25
25
|
* Encode witness data for a BIP322 message
|
|
26
26
|
* TODO: Refactor to remove `Buffer` use
|
|
27
27
|
*/
|
|
28
|
-
declare function encodeMessageWitnessData(witnessArray: Buffer[]): Buffer
|
|
28
|
+
declare function encodeMessageWitnessData(witnessArray: Buffer[]): Buffer<ArrayBuffer>;
|
|
29
29
|
declare function tweakSigner(signer: bitcoin.Signer, opts?: any): bitcoin.Signer;
|
|
30
30
|
|
|
31
31
|
type BitcoinAddress = string & {
|
|
@@ -38,7 +38,7 @@ declare function createNativeSegwitBitcoinJsSigner(privateKey: Buffer): ecpair.E
|
|
|
38
38
|
declare function createTaprootBitcoinJsSigner(privateKey: Buffer): bitcoin.Signer;
|
|
39
39
|
declare function createToSpendTx(address: BitcoinAddress, message: string, network: BitcoinNetworkModes): {
|
|
40
40
|
virtualToSpend: bitcoin.Transaction;
|
|
41
|
-
script: Buffer
|
|
41
|
+
script: Buffer<ArrayBufferLike>;
|
|
42
42
|
};
|
|
43
43
|
interface SignBip322MessageSimple {
|
|
44
44
|
address: BitcoinAddress;
|
|
@@ -49,7 +49,7 @@ interface SignBip322MessageSimple {
|
|
|
49
49
|
declare function signBip322MessageSimple(args: SignBip322MessageSimple): Promise<{
|
|
50
50
|
virtualToSpend: bitcoin.Transaction;
|
|
51
51
|
virtualToSign: bitcoin.Transaction;
|
|
52
|
-
unencodedSig: Buffer
|
|
52
|
+
unencodedSig: Buffer<ArrayBuffer>;
|
|
53
53
|
signature: string;
|
|
54
54
|
}>;
|
|
55
55
|
|
|
@@ -222,8 +222,8 @@ declare function getBitcoinCoinTypeIndexByNetwork(network: BitcoinNetworkModes):
|
|
|
222
222
|
declare function deriveAddressIndexKeychainFromAccount(keychain: HDKey): (index: number) => HDKey;
|
|
223
223
|
declare function deriveAddressIndexZeroFromAccount(keychain: HDKey): HDKey;
|
|
224
224
|
declare const ecdsaPublicKeyLength = 33;
|
|
225
|
-
declare function ecdsaPublicKeyToSchnorr(pubKey: Uint8Array): Uint8Array
|
|
226
|
-
declare function toXOnly(pubKey: Buffer): Buffer
|
|
225
|
+
declare function ecdsaPublicKeyToSchnorr(pubKey: Uint8Array): Uint8Array<ArrayBuffer>;
|
|
226
|
+
declare function toXOnly(pubKey: Buffer): Buffer<TArrayBuffer>;
|
|
227
227
|
declare function decodeBitcoinTx(tx: string): ReturnType<typeof btc.RawTx.decode>;
|
|
228
228
|
declare function getAddressFromOutScript(script: Uint8Array, bitcoinNetwork: BtcSignerNetwork): string;
|
|
229
229
|
/**
|
|
@@ -318,10 +318,10 @@ declare const deriveBtcBip49SeedFromMnemonic: typeof deriveBip39SeedFromMnemonic
|
|
|
318
318
|
* Use `deriveRootBip32Keychain` from `@leather.io/crypto`
|
|
319
319
|
*/
|
|
320
320
|
declare const deriveRootBtcKeychain: typeof deriveRootBip32Keychain;
|
|
321
|
-
declare function decodeCompressedWifPrivateKey(key: string): Uint8Array
|
|
321
|
+
declare function decodeCompressedWifPrivateKey(key: string): Uint8Array<ArrayBuffer>;
|
|
322
322
|
declare const payToScriptHashTestnetPrefix = 196;
|
|
323
|
-
declare function makePayToScriptHashKeyHash(publicKey: Uint8Array): Uint8Array
|
|
324
|
-
declare function makePayToScriptHashAddressBytes(keyHash: Uint8Array): Uint8Array
|
|
323
|
+
declare function makePayToScriptHashKeyHash(publicKey: Uint8Array): Uint8Array<ArrayBufferLike>;
|
|
324
|
+
declare function makePayToScriptHashAddressBytes(keyHash: Uint8Array): Uint8Array<ArrayBufferLike>;
|
|
325
325
|
declare function makePayToScriptHashAddress(addressBytes: Uint8Array, network: NetworkModes): string;
|
|
326
326
|
declare function publicKeyToPayToScriptHashAddress(publicKey: Uint8Array, network: NetworkModes): string;
|
|
327
327
|
|
|
@@ -445,7 +445,7 @@ declare function deriveBitcoinPayerFromAccount(descriptor: string, network: Bitc
|
|
|
445
445
|
network: BitcoinNetworkModes;
|
|
446
446
|
payment: P2Ret;
|
|
447
447
|
readonly address: string;
|
|
448
|
-
readonly publicKey: Uint8Array
|
|
448
|
+
readonly publicKey: Uint8Array<ArrayBufferLike>;
|
|
449
449
|
};
|
|
450
450
|
interface BtcSignerDerivationPath {
|
|
451
451
|
fingerprint: number;
|
|
@@ -512,7 +512,7 @@ interface GenerateBitcoinUnsignedTransactionArgs {
|
|
|
512
512
|
declare function generateBitcoinUnsignedTransactionNativeSegwit({ feeRate, isSendingMax, payerAddress, payerPublicKey, bip32Derivation, network, recipients, utxos, }: GenerateBitcoinUnsignedTransactionArgs): {
|
|
513
513
|
tx: btc.Transaction;
|
|
514
514
|
hex: string;
|
|
515
|
-
psbt: Uint8Array
|
|
515
|
+
psbt: Uint8Array<ArrayBufferLike>;
|
|
516
516
|
inputs: CoinSelectionUtxo[];
|
|
517
517
|
fee: _leather_io_models.Money;
|
|
518
518
|
};
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@leather.io/bitcoin",
|
|
3
3
|
"author": "Leather.io contact@leather.io",
|
|
4
4
|
"description": "Shared bitcoin utilities",
|
|
5
|
-
"version": "0.19.
|
|
5
|
+
"version": "0.19.31",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/leather.io/mono/tree/dev/packages/bitcoin",
|
|
8
8
|
"repository": {
|
|
@@ -30,20 +30,20 @@
|
|
|
30
30
|
"ecpair": "2.1.0",
|
|
31
31
|
"just-memoize": "2.2.0",
|
|
32
32
|
"varuint-bitcoin": "1.1.2",
|
|
33
|
-
"@leather.io/
|
|
34
|
-
"@leather.io/models": "0.26.
|
|
35
|
-
"@leather.io/
|
|
36
|
-
"@leather.io/
|
|
33
|
+
"@leather.io/constants": "0.17.2",
|
|
34
|
+
"@leather.io/models": "0.26.2",
|
|
35
|
+
"@leather.io/crypto": "1.6.44",
|
|
36
|
+
"@leather.io/utils": "0.27.4"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"prettier": "3.
|
|
39
|
+
"prettier": "3.5.1",
|
|
40
40
|
"tslib": "2.6.2",
|
|
41
41
|
"tsup": "8.1.0",
|
|
42
|
-
"typescript": "5.
|
|
42
|
+
"typescript": "5.7.3",
|
|
43
43
|
"vitest": "2.1.9",
|
|
44
|
-
"@leather.io/prettier-config": "0.6.
|
|
45
|
-
"@leather.io/
|
|
46
|
-
"@leather.io/
|
|
44
|
+
"@leather.io/prettier-config": "0.6.1",
|
|
45
|
+
"@leather.io/rpc": "2.6.3",
|
|
46
|
+
"@leather.io/tsconfig-config": "0.6.1"
|
|
47
47
|
},
|
|
48
48
|
"keywords": [
|
|
49
49
|
"bitcoin",
|