@dynamic-labs-wallet/btc-utils 0.0.317 → 0.0.319-beta.1

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.
Files changed (135) hide show
  1. package/index.cjs.js +2 -2
  2. package/index.esm.js +2 -2
  3. package/package.json +2 -2
  4. package/src/calculateBip322Hash/calculateBip322Hash.d.ts +0 -16
  5. package/src/calculateBip322Hash/calculateBip322Hash.d.ts.map +0 -1
  6. package/src/calculateBip322Hash/index.d.ts +0 -2
  7. package/src/calculateBip322Hash/index.d.ts.map +0 -1
  8. package/src/calculateTaprootTweak/calculateTaprootTweak.d.ts +0 -7
  9. package/src/calculateTaprootTweak/calculateTaprootTweak.d.ts.map +0 -1
  10. package/src/calculateTaprootTweak/index.d.ts +0 -2
  11. package/src/calculateTaprootTweak/index.d.ts.map +0 -1
  12. package/src/collectPSBTInputData/collectPSBTInputData.d.ts +0 -13
  13. package/src/collectPSBTInputData/collectPSBTInputData.d.ts.map +0 -1
  14. package/src/collectPSBTInputData/index.d.ts +0 -2
  15. package/src/collectPSBTInputData/index.d.ts.map +0 -1
  16. package/src/computeBip322HashHex/computeBip322HashHex.d.ts +0 -17
  17. package/src/computeBip322HashHex/computeBip322HashHex.d.ts.map +0 -1
  18. package/src/computeBip322HashHex/index.d.ts +0 -2
  19. package/src/computeBip322HashHex/index.d.ts.map +0 -1
  20. package/src/convertPublicKeyToBuffer/convertPublicKeyToBuffer.d.ts +0 -15
  21. package/src/convertPublicKeyToBuffer/convertPublicKeyToBuffer.d.ts.map +0 -1
  22. package/src/convertPublicKeyToBuffer/index.d.ts +0 -2
  23. package/src/convertPublicKeyToBuffer/index.d.ts.map +0 -1
  24. package/src/convertSignatureToDER/convertSignatureToDER.d.ts +0 -9
  25. package/src/convertSignatureToDER/convertSignatureToDER.d.ts.map +0 -1
  26. package/src/convertSignatureToDER/index.d.ts +0 -2
  27. package/src/convertSignatureToDER/index.d.ts.map +0 -1
  28. package/src/convertSignatureToTaprootBuffer/convertSignatureToTaprootBuffer.d.ts +0 -9
  29. package/src/convertSignatureToTaprootBuffer/convertSignatureToTaprootBuffer.d.ts.map +0 -1
  30. package/src/convertSignatureToTaprootBuffer/index.d.ts +0 -2
  31. package/src/convertSignatureToTaprootBuffer/index.d.ts.map +0 -1
  32. package/src/createLegacyAddress/createLegacyAddress.d.ts +0 -10
  33. package/src/createLegacyAddress/createLegacyAddress.d.ts.map +0 -1
  34. package/src/createLegacyAddress/index.d.ts +0 -2
  35. package/src/createLegacyAddress/index.d.ts.map +0 -1
  36. package/src/createNativeSegWitAddress/createNativeSegWitAddress.d.ts +0 -11
  37. package/src/createNativeSegWitAddress/createNativeSegWitAddress.d.ts.map +0 -1
  38. package/src/createNativeSegWitAddress/index.d.ts +0 -2
  39. package/src/createNativeSegWitAddress/index.d.ts.map +0 -1
  40. package/src/createSegWitAddress/createSegWitAddress.d.ts +0 -10
  41. package/src/createSegWitAddress/createSegWitAddress.d.ts.map +0 -1
  42. package/src/createSegWitAddress/index.d.ts +0 -2
  43. package/src/createSegWitAddress/index.d.ts.map +0 -1
  44. package/src/createTaprootAddress/createTaprootAddress.d.ts +0 -11
  45. package/src/createTaprootAddress/createTaprootAddress.d.ts.map +0 -1
  46. package/src/createTaprootAddress/index.d.ts +0 -2
  47. package/src/createTaprootAddress/index.d.ts.map +0 -1
  48. package/src/doesInputBelongToAddress/doesInputBelongToAddress.d.ts +0 -11
  49. package/src/doesInputBelongToAddress/doesInputBelongToAddress.d.ts.map +0 -1
  50. package/src/doesInputBelongToAddress/index.d.ts +0 -2
  51. package/src/doesInputBelongToAddress/index.d.ts.map +0 -1
  52. package/src/encodeBip322Signature/encodeBip322Signature.d.ts +0 -13
  53. package/src/encodeBip322Signature/encodeBip322Signature.d.ts.map +0 -1
  54. package/src/encodeBip322Signature/index.d.ts +0 -2
  55. package/src/encodeBip322Signature/index.d.ts.map +0 -1
  56. package/src/extractPsbtSighashes/extractPsbtSighashes.d.ts +0 -11
  57. package/src/extractPsbtSighashes/extractPsbtSighashes.d.ts.map +0 -1
  58. package/src/extractPsbtSighashes/index.d.ts +0 -2
  59. package/src/extractPsbtSighashes/index.d.ts.map +0 -1
  60. package/src/extractPublicKeyHex/extractPublicKeyHex.d.ts +0 -10
  61. package/src/extractPublicKeyHex/extractPublicKeyHex.d.ts.map +0 -1
  62. package/src/extractPublicKeyHex/index.d.ts +0 -2
  63. package/src/extractPublicKeyHex/index.d.ts.map +0 -1
  64. package/src/getAddressTypeFromDerivationPath/getAddressTypeFromDerivationPath.d.ts +0 -9
  65. package/src/getAddressTypeFromDerivationPath/getAddressTypeFromDerivationPath.d.ts.map +0 -1
  66. package/src/getAddressTypeFromDerivationPath/index.d.ts +0 -2
  67. package/src/getAddressTypeFromDerivationPath/index.d.ts.map +0 -1
  68. package/src/getBitcoinNetwork/getBitcoinNetwork.d.ts +0 -10
  69. package/src/getBitcoinNetwork/getBitcoinNetwork.d.ts.map +0 -1
  70. package/src/getBitcoinNetwork/index.d.ts +0 -2
  71. package/src/getBitcoinNetwork/index.d.ts.map +0 -1
  72. package/src/getDefaultRpcUrl/getDefaultRpcUrl.d.ts +0 -9
  73. package/src/getDefaultRpcUrl/getDefaultRpcUrl.d.ts.map +0 -1
  74. package/src/getDefaultRpcUrl/index.d.ts +0 -2
  75. package/src/getDefaultRpcUrl/index.d.ts.map +0 -1
  76. package/src/getFeeRates/getFeeRates.d.ts +0 -18
  77. package/src/getFeeRates/getFeeRates.d.ts.map +0 -1
  78. package/src/getFeeRates/index.d.ts +0 -2
  79. package/src/getFeeRates/index.d.ts.map +0 -1
  80. package/src/getPublicKeyFromPrivateKey/getPublicKeyFromPrivateKey.d.ts +0 -13
  81. package/src/getPublicKeyFromPrivateKey/getPublicKeyFromPrivateKey.d.ts.map +0 -1
  82. package/src/getPublicKeyFromPrivateKey/index.d.ts +0 -2
  83. package/src/getPublicKeyFromPrivateKey/index.d.ts.map +0 -1
  84. package/src/getUTXOs/getUTXOs.d.ts +0 -16
  85. package/src/getUTXOs/getUTXOs.d.ts.map +0 -1
  86. package/src/getUTXOs/index.d.ts +0 -2
  87. package/src/getUTXOs/index.d.ts.map +0 -1
  88. package/src/index.d.ts +0 -32
  89. package/src/index.d.ts.map +0 -1
  90. package/src/initEccLib/index.d.ts +0 -2
  91. package/src/initEccLib/index.d.ts.map +0 -1
  92. package/src/initEccLib/initEccLib.d.ts +0 -7
  93. package/src/initEccLib/initEccLib.d.ts.map +0 -1
  94. package/src/normalizeForCompressed/index.d.ts +0 -2
  95. package/src/normalizeForCompressed/index.d.ts.map +0 -1
  96. package/src/normalizeForCompressed/normalizeForCompressed.d.ts +0 -9
  97. package/src/normalizeForCompressed/normalizeForCompressed.d.ts.map +0 -1
  98. package/src/normalizeForTaproot/index.d.ts +0 -2
  99. package/src/normalizeForTaproot/index.d.ts.map +0 -1
  100. package/src/normalizeForTaproot/normalizeForTaproot.d.ts +0 -9
  101. package/src/normalizeForTaproot/normalizeForTaproot.d.ts.map +0 -1
  102. package/src/normalizePublicKey/index.d.ts +0 -2
  103. package/src/normalizePublicKey/index.d.ts.map +0 -1
  104. package/src/normalizePublicKey/normalizePublicKey.d.ts +0 -19
  105. package/src/normalizePublicKey/normalizePublicKey.d.ts.map +0 -1
  106. package/src/privateKeyToWIF/index.d.ts +0 -2
  107. package/src/privateKeyToWIF/index.d.ts.map +0 -1
  108. package/src/privateKeyToWIF/privateKeyToWIF.d.ts +0 -24
  109. package/src/privateKeyToWIF/privateKeyToWIF.d.ts.map +0 -1
  110. package/src/publicKeyToBitcoinAddress/index.d.ts +0 -2
  111. package/src/publicKeyToBitcoinAddress/index.d.ts.map +0 -1
  112. package/src/publicKeyToBitcoinAddress/publicKeyToBitcoinAddress.d.ts +0 -12
  113. package/src/publicKeyToBitcoinAddress/publicKeyToBitcoinAddress.d.ts.map +0 -1
  114. package/src/selectUTXOs/index.d.ts +0 -2
  115. package/src/selectUTXOs/index.d.ts.map +0 -1
  116. package/src/selectUTXOs/selectUTXOs.d.ts +0 -19
  117. package/src/selectUTXOs/selectUTXOs.d.ts.map +0 -1
  118. package/src/toBitcoinAddressType/index.d.ts +0 -2
  119. package/src/toBitcoinAddressType/index.d.ts.map +0 -1
  120. package/src/toBitcoinAddressType/toBitcoinAddressType.d.ts +0 -10
  121. package/src/toBitcoinAddressType/toBitcoinAddressType.d.ts.map +0 -1
  122. package/src/toBitcoinNetwork/index.d.ts +0 -2
  123. package/src/toBitcoinNetwork/index.d.ts.map +0 -1
  124. package/src/toBitcoinNetwork/toBitcoinNetwork.d.ts +0 -10
  125. package/src/toBitcoinNetwork/toBitcoinNetwork.d.ts.map +0 -1
  126. package/src/toBuffer/index.d.ts +0 -2
  127. package/src/toBuffer/index.d.ts.map +0 -1
  128. package/src/toBuffer/toBuffer.d.ts +0 -8
  129. package/src/toBuffer/toBuffer.d.ts.map +0 -1
  130. package/src/types.d.ts +0 -35
  131. package/src/types.d.ts.map +0 -1
  132. package/src/wifToPrivateKey/index.d.ts +0 -2
  133. package/src/wifToPrivateKey/index.d.ts.map +0 -1
  134. package/src/wifToPrivateKey/wifToPrivateKey.d.ts +0 -19
  135. package/src/wifToPrivateKey/wifToPrivateKey.d.ts.map +0 -1
package/index.cjs.js CHANGED
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var core = require('@dynamic-labs-wallet/core');
4
- var bitcoin = require('bitcoinjs-lib');
5
3
  var bip322Js = require('bip322-js');
4
+ var bitcoin = require('bitcoinjs-lib');
5
+ var core = require('@dynamic-labs-wallet/core');
6
6
  var bs58 = require('bs58');
7
7
  var sha256 = require('@noble/hashes/sha256');
8
8
 
package/index.esm.js CHANGED
@@ -1,7 +1,7 @@
1
- import { BitcoinNetwork, BitcoinAddressType } from '@dynamic-labs-wallet/core';
1
+ import { Address, BIP322 } from 'bip322-js';
2
2
  import * as bitcoin from 'bitcoinjs-lib';
3
3
  import { initEccLib as initEccLib$1, payments } from 'bitcoinjs-lib';
4
- import { Address, BIP322 } from 'bip322-js';
4
+ import { BitcoinNetwork, BitcoinAddressType } from '@dynamic-labs-wallet/core';
5
5
  import bs58 from 'bs58';
6
6
  import { sha256 } from '@noble/hashes/sha256';
7
7
 
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@dynamic-labs-wallet/btc-utils",
3
- "version": "0.0.317",
3
+ "version": "0.0.319-beta.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "dependencies": {
8
- "@dynamic-labs-wallet/core": "0.0.317",
8
+ "@dynamic-labs-wallet/core": "0.0.319-beta.1",
9
9
  "bitcoinjs-lib": "^7.0.0",
10
10
  "bip322-js": "^3.0.0",
11
11
  "@noble/hashes": "1.7.1",
@@ -1,16 +0,0 @@
1
- import { BitcoinAddressType, BitcoinNetwork } from '@dynamic-labs-wallet/core';
2
- /**
3
- * Calculates the hash to be signed for a BIP-322 message verification
4
- *
5
- * @param message - The message to sign
6
- * @param pubKey - The public key of the signer
7
- * @param addressType - The address type (e.g. TAPROOT, SEGWIT)
8
- * @param network - The Bitcoin network
9
- * @param ecc - The ECC library instance (required for first call)
10
- * @returns The formatted message hash and the PSBT to be signed
11
- */
12
- export declare const calculateBip322Hash: (message: string, pubKey: any, addressType: BitcoinAddressType, network: BitcoinNetwork, ecc?: any) => {
13
- formattedMessage: Uint8Array;
14
- toSignPsbt: any;
15
- };
16
- //# sourceMappingURL=calculateBip322Hash.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"calculateBip322Hash.d.ts","sourceRoot":"","sources":["../../src/calculateBip322Hash/calculateBip322Hash.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAI/E;;;;;;;;;GASG;AACH,eAAO,MAAM,mBAAmB,YACrB,MAAM,UACP,GAAG,eACE,kBAAkB,WACtB,cAAc,QACjB,GAAG,KACR;IAAE,gBAAgB,EAAE,UAAU,CAAC;IAAC,UAAU,EAAE,GAAG,CAAA;CAiDjD,CAAC"}
@@ -1,2 +0,0 @@
1
- export { calculateBip322Hash } from './calculateBip322Hash.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/calculateBip322Hash/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -1,7 +0,0 @@
1
- /**
2
- * Calculates the Taproot tweak hash for BIP340 signing
3
- * @param pubKey - The normalized public key (32-byte x-only for Taproot)
4
- * @returns The tweak hash as a hex string (64 hex chars = 32 bytes)
5
- */
6
- export declare const calculateTaprootTweak: (pubKey: Uint8Array | Buffer) => string;
7
- //# sourceMappingURL=calculateTaprootTweak.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"calculateTaprootTweak.d.ts","sourceRoot":"","sources":["../../src/calculateTaprootTweak/calculateTaprootTweak.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,WAAY,UAAU,GAAG,MAAM,KAAG,MAGnE,CAAC"}
@@ -1,2 +0,0 @@
1
- export { calculateTaprootTweak } from './calculateTaprootTweak.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/calculateTaprootTweak/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC"}
@@ -1,13 +0,0 @@
1
- import type { Psbt } from 'bitcoinjs-lib';
2
- /**
3
- * Collects prevOutScripts and values from all PSBT inputs
4
- * Required for Taproot (BIP-341) hashForWitnessV1 calculation
5
- * @param psbt - The PSBT to collect input data from
6
- * @returns An object containing arrays of prevOutScripts and values
7
- * @throws Error if any input is missing witnessUtxo
8
- */
9
- export declare const collectPSBTInputData: (psbt: Psbt) => {
10
- prevOutScripts: Buffer[];
11
- values: bigint[];
12
- };
13
- //# sourceMappingURL=collectPSBTInputData.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"collectPSBTInputData.d.ts","sourceRoot":"","sources":["../../src/collectPSBTInputData/collectPSBTInputData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAE1C;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,SACzB,IAAI,KACT;IACD,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,MAAM,EAAE,MAAM,EAAE,CAAC;CAiBlB,CAAC"}
@@ -1,2 +0,0 @@
1
- export { collectPSBTInputData } from './collectPSBTInputData.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/collectPSBTInputData/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC"}
@@ -1,17 +0,0 @@
1
- import { BitcoinAddressType, BitcoinNetwork } from '@dynamic-labs-wallet/core';
2
- /**
3
- * Computes the BIP-322 message hash for a given message and public key,
4
- * returning the result as a hex string.
5
- *
6
- * This function implements the BIP-322 hash computation for
7
- * native_segwit and taproot address types.
8
- *
9
- * @param message - The raw message to be signed
10
- * @param publicKey - The public key (hex string, Buffer, or Uint8Array)
11
- * @param addressType - The address type (BitcoinAddressType enum or 'native_segwit', 'taproot')
12
- * @param network - BitcoinNetwork enum or 'mainnet', 'testnet' (defaults to MAINNET)
13
- * @param ecc - Optional ECC library instance
14
- * @returns The BIP-322 message hash as a hex string
15
- */
16
- export declare const computeBip322HashHex: (message: string, publicKey: string | Buffer | Uint8Array, addressType: BitcoinAddressType | "native_segwit" | "taproot", network?: BitcoinNetwork | "mainnet" | "testnet", ecc?: any) => string;
17
- //# sourceMappingURL=computeBip322HashHex.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"computeBip322HashHex.d.ts","sourceRoot":"","sources":["../../src/computeBip322HashHex/computeBip322HashHex.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAQ/E;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,oBAAoB,YACtB,MAAM,aACJ,MAAM,GAAG,MAAM,GAAG,UAAU,eAC1B,kBAAkB,GAAG,eAAe,GAAG,SAAS,YACpD,cAAc,GAAG,SAAS,GAAG,SAAS,QACzC,GAAG,KACR,MAyEF,CAAC"}
@@ -1,2 +0,0 @@
1
- export { computeBip322HashHex } from './computeBip322HashHex.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/computeBip322HashHex/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC"}
@@ -1,15 +0,0 @@
1
- type EcdsaPublicKey = {
2
- serializeUncompressed(): Uint8Array;
3
- serializeCompressed(): Uint8Array;
4
- pubKeyAsHex(): string;
5
- };
6
- /**
7
- * Converts a public key input (various formats) to a Buffer.
8
- * Handles objects with `pubkey` property, numeric key maps, `serializeUncompressed` methods, etc.
9
- *
10
- * @param pubkey - The raw public key input
11
- * @returns The public key as a Buffer
12
- */
13
- export declare const convertPublicKeyToBuffer: (pubkey: EcdsaPublicKey | Uint8Array | string | Buffer | Record<string, unknown>) => Buffer;
14
- export {};
15
- //# sourceMappingURL=convertPublicKeyToBuffer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"convertPublicKeyToBuffer.d.ts","sourceRoot":"","sources":["../../src/convertPublicKeyToBuffer/convertPublicKeyToBuffer.ts"],"names":[],"mappings":"AAEA,KAAK,cAAc,GAAG;IACpB,qBAAqB,IAAI,UAAU,CAAC;IACpC,mBAAmB,IAAI,UAAU,CAAC;IAClC,WAAW,IAAI,MAAM,CAAC;CACvB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,WAC3B,cAAc,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC9E,MA0BF,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './convertPublicKeyToBuffer.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/convertPublicKeyToBuffer/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC"}
@@ -1,9 +0,0 @@
1
- import type { EcdsaSignature } from '#internal/core';
2
- /**
3
- * Converts an ECDSA signature to DER format
4
- *
5
- * @param signature - The ECDSA signature
6
- * @returns The DER encoded signature
7
- */
8
- export declare const convertSignatureToDER: (signature: EcdsaSignature) => Uint8Array;
9
- //# sourceMappingURL=convertSignatureToDER.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"convertSignatureToDER.d.ts","sourceRoot":"","sources":["../../src/convertSignatureToDER/convertSignatureToDER.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,cAAe,cAAc,eAmB9D,CAAC"}
@@ -1,2 +0,0 @@
1
- export { convertSignatureToDER } from './convertSignatureToDER.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/convertSignatureToDER/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC"}
@@ -1,9 +0,0 @@
1
- import type { EcdsaSignature } from '#internal/core';
2
- /**
3
- * Converts a signature to a Buffer format suitable for Taproot (BIP340/Schnorr)
4
- *
5
- * @param signature - The signature from MPC (can be Uint8Array, Buffer, or EcdsaSignature object)
6
- * @returns A Buffer containing the 64-byte Schnorr signature
7
- */
8
- export declare const convertSignatureToTaprootBuffer: (signature: EcdsaSignature | Uint8Array | Buffer) => Buffer;
9
- //# sourceMappingURL=convertSignatureToTaprootBuffer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"convertSignatureToTaprootBuffer.d.ts","sourceRoot":"","sources":["../../src/convertSignatureToTaprootBuffer/convertSignatureToTaprootBuffer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD;;;;;GAKG;AACH,eAAO,MAAM,+BAA+B,cAAe,cAAc,GAAG,UAAU,GAAG,MAAM,KAAG,MAWjG,CAAC"}
@@ -1,2 +0,0 @@
1
- export { convertSignatureToTaprootBuffer } from './convertSignatureToTaprootBuffer.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/convertSignatureToTaprootBuffer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC"}
@@ -1,10 +0,0 @@
1
- import type { BitcoinNetwork } from '@dynamic-labs-wallet/core';
2
- /**
3
- * Creates a legacy P2PKH address
4
- *
5
- * @param pubKey - The public key
6
- * @param networkName - The network name
7
- * @returns The legacy P2PKH address
8
- */
9
- export declare const createLegacyAddress: (pubKey: Buffer, networkName: BitcoinNetwork) => string;
10
- //# sourceMappingURL=createLegacyAddress.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createLegacyAddress.d.ts","sourceRoot":"","sources":["../../src/createLegacyAddress/createLegacyAddress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAKhE;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,WAAY,MAAM,eAAe,cAAc,KAAG,MAUjF,CAAC"}
@@ -1,2 +0,0 @@
1
- export { createLegacyAddress } from './createLegacyAddress.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/createLegacyAddress/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -1,11 +0,0 @@
1
- import type { BitcoinNetwork } from '@dynamic-labs-wallet/core';
2
- /**
3
- * Creates a native SegWit P2WPKH address
4
- *
5
- * @param pubKey - The public key
6
- * @param networkName - The network name
7
- * @param ecc - The ECC library instance (optional, but required for first call)
8
- * @returns The native SegWit address
9
- */
10
- export declare const createNativeSegWitAddress: (pubKey: Buffer, networkName: BitcoinNetwork, ecc?: any) => string;
11
- //# sourceMappingURL=createNativeSegWitAddress.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createNativeSegWitAddress.d.ts","sourceRoot":"","sources":["../../src/createNativeSegWitAddress/createNativeSegWitAddress.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAKhE;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,WAAY,MAAM,eAAe,cAAc,QAAQ,GAAG,KAAG,MAclG,CAAC"}
@@ -1,2 +0,0 @@
1
- export { createNativeSegWitAddress } from './createNativeSegWitAddress.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/createNativeSegWitAddress/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC"}
@@ -1,10 +0,0 @@
1
- import type { BitcoinNetwork } from '@dynamic-labs-wallet/core';
2
- /**
3
- * Creates a SegWit P2SH-P2WPKH address
4
- *
5
- * @param pubKey - The public key
6
- * @param networkName - The network name
7
- * @returns The SegWit address
8
- */
9
- export declare const createSegWitAddress: (pubKey: Buffer, networkName: BitcoinNetwork) => string;
10
- //# sourceMappingURL=createSegWitAddress.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createSegWitAddress.d.ts","sourceRoot":"","sources":["../../src/createSegWitAddress/createSegWitAddress.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAIhE;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,WAAY,MAAM,eAAe,cAAc,KAAG,MAajF,CAAC"}
@@ -1,2 +0,0 @@
1
- export { createSegWitAddress } from './createSegWitAddress.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/createSegWitAddress/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -1,11 +0,0 @@
1
- import type { BitcoinNetwork } from '@dynamic-labs-wallet/core';
2
- /**
3
- * Creates a Taproot P2TR address
4
- *
5
- * @param pubKey - The public key
6
- * @param networkName - The network name
7
- * @param ecc - The ECC library instance (optional, but required for first call)
8
- * @returns The Taproot address
9
- */
10
- export declare const createTaprootAddress: (pubKey: Buffer, networkName: BitcoinNetwork, ecc?: any) => string;
11
- //# sourceMappingURL=createTaprootAddress.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createTaprootAddress.d.ts","sourceRoot":"","sources":["../../src/createTaprootAddress/createTaprootAddress.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAKhE;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,WAAY,MAAM,eAAe,cAAc,QAAQ,GAAG,KAAG,MAoB7F,CAAC"}
@@ -1,2 +0,0 @@
1
- export { createTaprootAddress } from './createTaprootAddress.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/createTaprootAddress/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC"}
@@ -1,11 +0,0 @@
1
- import type { Psbt } from 'bitcoinjs-lib';
2
- import type { BitcoinNetwork } from '@dynamic-labs-wallet/core';
3
- /**
4
- * Checks if a PSBT input belongs to a specific address
5
- * @param input - The PSBT input (from psbt.data.inputs)
6
- * @param address - The address to check against
7
- * @param network - The Bitcoin network
8
- * @returns True if the input belongs to the address, false otherwise
9
- */
10
- export declare const doesInputBelongToAddress: (input: Psbt["data"]["inputs"][number], address: string, network: BitcoinNetwork) => boolean;
11
- //# sourceMappingURL=doesInputBelongToAddress.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"doesInputBelongToAddress.d.ts","sourceRoot":"","sources":["../../src/doesInputBelongToAddress/doesInputBelongToAddress.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAGhE;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,UAC5B,IAAI,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,WAC5B,MAAM,WACN,cAAc,KACtB,OAwCF,CAAC"}
@@ -1,2 +0,0 @@
1
- export { doesInputBelongToAddress } from './doesInputBelongToAddress.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/doesInputBelongToAddress/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC"}
@@ -1,13 +0,0 @@
1
- import { BitcoinAddressType } from '@dynamic-labs-wallet/core';
2
- import type { EcdsaSignature } from '#internal/core';
3
- /**
4
- * Encodes the signature into the BIP-322 witness format
5
- *
6
- * @param toSignPsbt - The PSBT that was signed
7
- * @param pubKey - The public key of the signer
8
- * @param signature - The signature produced by the signer
9
- * @param addressType - The address type
10
- * @returns The base64 encoded BIP-322 signature
11
- */
12
- export declare const encodeBip322Signature: (toSignPsbt: any, pubKey: any, signature: EcdsaSignature | Uint8Array, addressType: BitcoinAddressType) => string;
13
- //# sourceMappingURL=encodeBip322Signature.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"encodeBip322Signature.d.ts","sourceRoot":"","sources":["../../src/encodeBip322Signature/encodeBip322Signature.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,eACpB,GAAG,UACP,GAAG,aACA,cAAc,GAAG,UAAU,eACzB,kBAAkB,KAC9B,MAsCF,CAAC"}
@@ -1,2 +0,0 @@
1
- export { encodeBip322Signature } from './encodeBip322Signature.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/encodeBip322Signature/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC"}
@@ -1,11 +0,0 @@
1
- import type { BitcoinNetwork } from '@dynamic-labs-wallet/core';
2
- /**
3
- * Extracts sighashes from a PSBT for validation.
4
- * This is used to verify that the message being signed matches the PSBT context.
5
- *
6
- * @param psbtBase64 - PSBT in base64 format
7
- * @param network - 'mainnet' or 'testnet' or BitcoinNetwork enum (defaults to 'mainnet')
8
- * @returns Array of sighash hex strings for each input
9
- */
10
- export declare const extractPsbtSighashes: (psbtBase64: string, network?: BitcoinNetwork | "mainnet" | "testnet") => string[];
11
- //# sourceMappingURL=extractPsbtSighashes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"extractPsbtSighashes.d.ts","sourceRoot":"","sources":["../../src/extractPsbtSighashes/extractPsbtSighashes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAMhE;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,eACnB,MAAM,YACT,cAAc,GAAG,SAAS,GAAG,SAAS,KAC9C,MAAM,EA4CR,CAAC"}
@@ -1,2 +0,0 @@
1
- export { extractPsbtSighashes } from './extractPsbtSighashes.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/extractPsbtSighashes/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC"}
@@ -1,10 +0,0 @@
1
- /**
2
- * Extracts the hex string representation of a public key from various formats.
3
- * Handles Uint8Array, objects with pubKeyAsHex method, and string formats.
4
- *
5
- * @param rawPublicKey - The raw public key in various formats
6
- * @returns The public key as a hex string
7
- * @throws Error if the public key format is invalid
8
- */
9
- export declare const extractPublicKeyHex: (rawPublicKey: unknown) => string;
10
- //# sourceMappingURL=extractPublicKeyHex.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"extractPublicKeyHex.d.ts","sourceRoot":"","sources":["../../src/extractPublicKeyHex/extractPublicKeyHex.ts"],"names":[],"mappings":"AAMA;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,iBAAkB,OAAO,KAAG,MAmB3D,CAAC"}
@@ -1,2 +0,0 @@
1
- export { extractPublicKeyHex } from './extractPublicKeyHex.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/extractPublicKeyHex/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -1,9 +0,0 @@
1
- import { BitcoinAddressType } from '@dynamic-labs-wallet/core';
2
- /**
3
- * Infers the Bitcoin address type from a BIP-44 derivation path
4
- *
5
- * @param derivationPathStr - The derivation path string (e.g. "m/44'/0'/0'/0/0" as JSON or string)
6
- * @returns The inferred BitcoinAddressType
7
- */
8
- export declare const getAddressTypeFromDerivationPath: (derivationPathStr: string) => BitcoinAddressType;
9
- //# sourceMappingURL=getAddressTypeFromDerivationPath.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getAddressTypeFromDerivationPath.d.ts","sourceRoot":"","sources":["../../src/getAddressTypeFromDerivationPath/getAddressTypeFromDerivationPath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D;;;;;GAKG;AACH,eAAO,MAAM,gCAAgC,sBAAuB,MAAM,KAAG,kBAyB5E,CAAC"}
@@ -1,2 +0,0 @@
1
- export { getAddressTypeFromDerivationPath } from './getAddressTypeFromDerivationPath.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/getAddressTypeFromDerivationPath/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gCAAgC,EAAE,MAAM,uCAAuC,CAAC"}
@@ -1,10 +0,0 @@
1
- import { BitcoinNetwork } from '@dynamic-labs-wallet/core';
2
- import * as bitcoin from 'bitcoinjs-lib';
3
- /**
4
- * Maps a BitcoinNetwork enum to a bitcoinjs-lib Network object.
5
- *
6
- * @param network - The network identifier (BitcoinNetwork.MAINNET or BitcoinNetwork.TESTNET).
7
- * @returns The corresponding bitcoinjs-lib Network object. Defaults to bitcoin mainnet if the network is not recognized.
8
- */
9
- export declare function getBitcoinNetwork(network: BitcoinNetwork): bitcoin.networks.Network;
10
- //# sourceMappingURL=getBitcoinNetwork.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getBitcoinNetwork.d.ts","sourceRoot":"","sources":["../../src/getBitcoinNetwork/getBitcoinNetwork.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,OAAO,MAAM,eAAe,CAAC;AAEzC;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,QAAQ,CAAC,OAAO,CASnF"}
@@ -1,2 +0,0 @@
1
- export { getBitcoinNetwork } from './getBitcoinNetwork.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/getBitcoinNetwork/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -1,9 +0,0 @@
1
- import { BitcoinNetwork } from '@dynamic-labs-wallet/core';
2
- /**
3
- * Helper to get the default RPC URL
4
- *
5
- * @param network - The Bitcoin network
6
- * @returns The default RPC URL
7
- */
8
- export declare const getDefaultRpcUrl: (network: BitcoinNetwork) => string;
9
- //# sourceMappingURL=getDefaultRpcUrl.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getDefaultRpcUrl.d.ts","sourceRoot":"","sources":["../../src/getDefaultRpcUrl/getDefaultRpcUrl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,YAAa,cAAc,KAAG,MAE1D,CAAC"}
@@ -1,2 +0,0 @@
1
- export { getDefaultRpcUrl } from './getDefaultRpcUrl.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/getDefaultRpcUrl/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -1,18 +0,0 @@
1
- import { BitcoinNetwork } from '@dynamic-labs-wallet/core';
2
- /**
3
- * Fetches current fee rates from mempool.space
4
- * Returns fees in sat/vByte
5
- *
6
- * @param network - The Bitcoin network (default: MAINNET)
7
- * @param rpcUrl - Optional custom RPC URL
8
- * @returns The fee rates for fast, medium, and slow transactions
9
- */
10
- export declare const getFeeRates: ({ network, rpcUrl, }: {
11
- network?: BitcoinNetwork;
12
- rpcUrl?: string;
13
- }) => Promise<{
14
- fast: number;
15
- medium: number;
16
- slow: number;
17
- }>;
18
- //# sourceMappingURL=getFeeRates.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getFeeRates.d.ts","sourceRoot":"","sources":["../../src/getFeeRates/getFeeRates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAG3D;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,yBAGrB;IACD,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,KAAG,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAkBzD,CAAC"}
@@ -1,2 +0,0 @@
1
- export { getFeeRates } from './getFeeRates.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/getFeeRates/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
@@ -1,13 +0,0 @@
1
- import { BitcoinAddressType, BitcoinNetwork } from '@dynamic-labs-wallet/core';
2
- /**
3
- * Derives a public key from a private key (WIF format) based on address type
4
- *
5
- * @param privateKey - Private key in WIF format (Base58 encoded)
6
- * @param addressType - Bitcoin address type (NATIVE_SEGWIT or TAPROOT)
7
- * @param ecc - The ECC library instance
8
- * @param network - Bitcoin network (defaults to MAINNET)
9
- * @returns Public key as Buffer (33 bytes for NATIVE_SEGWIT, 32 bytes for TAPROOT)
10
- * @throws Error if private key is invalid or derivation fails
11
- */
12
- export declare const getPublicKeyFromPrivateKey: (privateKey: string, addressType: BitcoinAddressType, ecc: any, network?: BitcoinNetwork) => Promise<Buffer>;
13
- //# sourceMappingURL=getPublicKeyFromPrivateKey.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getPublicKeyFromPrivateKey.d.ts","sourceRoot":"","sources":["../../src/getPublicKeyFromPrivateKey/getPublicKeyFromPrivateKey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAG/E;;;;;;;;;GASG;AACH,eAAO,MAAM,0BAA0B,eACzB,MAAM,eACL,kBAAkB,OAC1B,GAAG,YACC,cAAc,KACtB,OAAO,CAAC,MAAM,CA6BhB,CAAC"}
@@ -1,2 +0,0 @@
1
- export { getPublicKeyFromPrivateKey } from './getPublicKeyFromPrivateKey.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/getPublicKeyFromPrivateKey/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC"}
@@ -1,16 +0,0 @@
1
- import { BitcoinNetwork } from '@dynamic-labs-wallet/core';
2
- import type { UTXO } from '../types.js';
3
- /**
4
- * Fetches UTXOs for a given address using mempool.space API
5
- *
6
- * @param address - The address to fetch UTXOs for
7
- * @param network - The Bitcoin network (default: MAINNET)
8
- * @param rpcUrl - Optional custom RPC URL
9
- * @returns The list of UTXOs
10
- */
11
- export declare const getUTXOs: ({ address, network, rpcUrl, }: {
12
- address: string;
13
- network?: BitcoinNetwork;
14
- rpcUrl?: string;
15
- }) => Promise<UTXO[]>;
16
- //# sourceMappingURL=getUTXOs.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getUTXOs.d.ts","sourceRoot":"","sources":["../../src/getUTXOs/getUTXOs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAGxC;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ,kCAIlB;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,KAAG,OAAO,CAAC,IAAI,EAAE,CAmBjB,CAAC"}
@@ -1,2 +0,0 @@
1
- export { getUTXOs } from './getUTXOs.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/getUTXOs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC"}
package/src/index.d.ts DELETED
@@ -1,32 +0,0 @@
1
- export { publicKeyToBitcoinAddress } from './publicKeyToBitcoinAddress/index.js';
2
- export { normalizePublicKey } from './normalizePublicKey/index.js';
3
- export { getAddressTypeFromDerivationPath } from './getAddressTypeFromDerivationPath/index.js';
4
- export { calculateBip322Hash } from './calculateBip322Hash/index.js';
5
- export { encodeBip322Signature } from './encodeBip322Signature/index.js';
6
- export { privateKeyToWIF } from './privateKeyToWIF/index.js';
7
- export { wifToPrivateKey } from './wifToPrivateKey/index.js';
8
- export { getPublicKeyFromPrivateKey } from './getPublicKeyFromPrivateKey/index.js';
9
- export { convertSignatureToDER } from './convertSignatureToDER/index.js';
10
- export { getUTXOs } from './getUTXOs/index.js';
11
- export { selectUTXOs } from './selectUTXOs/index.js';
12
- export { getFeeRates } from './getFeeRates/index.js';
13
- export { getDefaultRpcUrl } from './getDefaultRpcUrl/index.js';
14
- export { calculateTaprootTweak } from './calculateTaprootTweak/index.js';
15
- export { convertSignatureToTaprootBuffer } from './convertSignatureToTaprootBuffer/index.js';
16
- export { collectPSBTInputData } from './collectPSBTInputData/index.js';
17
- export { doesInputBelongToAddress } from './doesInputBelongToAddress/index.js';
18
- export { getBitcoinNetwork } from './getBitcoinNetwork/index.js';
19
- export { initEccLib } from './initEccLib/index.js';
20
- export { extractPublicKeyHex } from './extractPublicKeyHex/index.js';
21
- export type { UTXO } from './types.js';
22
- export { createLegacyAddress } from './createLegacyAddress/index.js';
23
- export { createSegWitAddress } from './createSegWitAddress/index.js';
24
- export { createNativeSegWitAddress } from './createNativeSegWitAddress/index.js';
25
- export { createTaprootAddress } from './createTaprootAddress/index.js';
26
- export { toBuffer } from './toBuffer/index.js';
27
- export { normalizeForCompressed } from './normalizeForCompressed/index.js';
28
- export { normalizeForTaproot } from './normalizeForTaproot/index.js';
29
- export { toBitcoinNetwork } from './toBitcoinNetwork/index.js';
30
- export { extractPsbtSighashes } from './extractPsbtSighashes/index.js';
31
- export { computeBip322HashHex } from './computeBip322HashHex/index.js';
32
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,gCAAgC,EAAE,MAAM,6CAA6C,CAAC;AAC/F,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,0BAA0B,EAAE,MAAM,uCAAuC,CAAC;AACnF,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,+BAA+B,EAAE,MAAM,4CAA4C,CAAC;AAC7F,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,YAAY,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAGvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAGvE,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAG/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC"}
@@ -1,2 +0,0 @@
1
- export { initEccLib } from './initEccLib.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/initEccLib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
@@ -1,7 +0,0 @@
1
- /**
2
- * Initializes the ECC library if not already initialized
3
- *
4
- * @param ecc - The ECC library instance (optional, but required for first call)
5
- */
6
- export declare const initEccLib: (ecc?: any) => void;
7
- //# sourceMappingURL=initEccLib.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"initEccLib.d.ts","sourceRoot":"","sources":["../../src/initEccLib/initEccLib.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,eAAO,MAAM,UAAU,SAAU,GAAG,SAcnC,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './normalizeForCompressed.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/normalizeForCompressed/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC"}
@@ -1,9 +0,0 @@
1
- /**
2
- * Normalizes a public key buffer for Compressed formats (Legacy, SegWit, Native SegWit).
3
- * Ensures the result is a 33-byte compressed key.
4
- *
5
- * @param buffer - The public key buffer
6
- * @returns The 33-byte compressed public key buffer
7
- */
8
- export declare const normalizeForCompressed: (buffer: Buffer) => Buffer;
9
- //# sourceMappingURL=normalizeForCompressed.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"normalizeForCompressed.d.ts","sourceRoot":"","sources":["../../src/normalizeForCompressed/normalizeForCompressed.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,WAAY,MAAM,KAAG,MAoBvD,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './normalizeForTaproot.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/normalizeForTaproot/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
@@ -1,9 +0,0 @@
1
- /**
2
- * Normalizes a public key buffer for Taproot (P2TR).
3
- * Ensures the result is a 32-byte x-only key.
4
- *
5
- * @param buffer - The public key buffer
6
- * @returns The 32-byte x-only public key buffer
7
- */
8
- export declare const normalizeForTaproot: (buffer: Buffer) => Buffer;
9
- //# sourceMappingURL=normalizeForTaproot.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"normalizeForTaproot.d.ts","sourceRoot":"","sources":["../../src/normalizeForTaproot/normalizeForTaproot.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,WAAY,MAAM,KAAG,MAOpD,CAAC"}
@@ -1,2 +0,0 @@
1
- export { normalizePublicKey } from './normalizePublicKey.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/normalizePublicKey/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC"}
@@ -1,19 +0,0 @@
1
- import { BitcoinAddressType } from '@dynamic-labs-wallet/core';
2
- type EcdsaPublicKey = {
3
- serializeUncompressed(): Uint8Array;
4
- serializeCompressed(): Uint8Array;
5
- pubKeyAsHex(): string;
6
- };
7
- /**
8
- * Normalizes a public key to a standard Buffer format
9
- * Handles various input types (Uint8Array, Buffer, object with pubKeyAsHex, etc.)
10
- * and formats (32-byte x-only, 33-byte compressed, 65-byte uncompressed)
11
- * based on the target address type.
12
- *
13
- * @param pubkey - The raw public key input
14
- * @param addressType - The target Bitcoin address type
15
- * @returns The normalized public key as a Buffer
16
- */
17
- export declare const normalizePublicKey: (pubkey: EcdsaPublicKey | Uint8Array | string | Buffer, addressType?: BitcoinAddressType) => Buffer;
18
- export {};
19
- //# sourceMappingURL=normalizePublicKey.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"normalizePublicKey.d.ts","sourceRoot":"","sources":["../../src/normalizePublicKey/normalizePublicKey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAO/D,KAAK,cAAc,GAAG;IACpB,qBAAqB,IAAI,UAAU,CAAC;IACpC,mBAAmB,IAAI,UAAU,CAAC;IAClC,WAAW,IAAI,MAAM,CAAC;CACvB,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,kBAAkB,WACrB,cAAc,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,gBACvC,kBAAkB,KAC/B,MAQF,CAAC"}
@@ -1,2 +0,0 @@
1
- export { privateKeyToWIF } from './privateKeyToWIF.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/privateKeyToWIF/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC"}
@@ -1,24 +0,0 @@
1
- import { BitcoinNetwork } from '@dynamic-labs-wallet/core';
2
- /**
3
- * Converts a private key (hex string) to Bitcoin WIF (Wallet Import Format)
4
- * WIF is the standard format that Bitcoin wallets expect for importing private keys
5
- *
6
- * WIF encoding steps:
7
- * 1. Add network prefix (0x80 for mainnet, 0xef for testnet/regtest)
8
- * 2. Add compression flag (0x01) for compressed public keys (used for SegWit)
9
- * 3. Calculate checksum (double SHA-256, take first 4 bytes)
10
- * 4. Base58 encode the result
11
- *
12
- * @param privateKey - Private key as hex string (with or without 0x prefix)
13
- * @param network - Bitcoin network (BitcoinNetwork.MAINNET or BitcoinNetwork.TESTNET)
14
- * @param options - Optional configuration
15
- * @param options.compressed - Whether to use compressed format (default: true for SegWit compatibility)
16
- * @param options.onWarning - Optional callback for warnings (e.g., unexpected key length)
17
- * @returns WIF-encoded private key string
18
- * @throws Error if conversion fails
19
- */
20
- export declare const privateKeyToWIF: (privateKey: string, network?: BitcoinNetwork, options?: {
21
- compressed?: boolean;
22
- onWarning?: (message: string, data?: any) => void;
23
- }) => string;
24
- //# sourceMappingURL=privateKeyToWIF.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"privateKeyToWIF.d.ts","sourceRoot":"","sources":["../../src/privateKeyToWIF/privateKeyToWIF.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAG3D;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,eAAe,eACd,MAAM,YACT,cAAc,YACb;IACR,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;CACnD,KACA,MAiDF,CAAC"}
@@ -1,2 +0,0 @@
1
- export { publicKeyToBitcoinAddress } from './publicKeyToBitcoinAddress.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/publicKeyToBitcoinAddress/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC"}
@@ -1,12 +0,0 @@
1
- import { BitcoinAddressType, BitcoinNetwork } from '@dynamic-labs-wallet/core';
2
- /**
3
- * Converts a public key to a Bitcoin address
4
- *
5
- * @param publicKey - The public key
6
- * @param addressType - The address type (default: TAPROOT)
7
- * @param network - The Bitcoin network (default: MAINNET)
8
- * @param ecc - The ECC library instance (required for first call)
9
- * @returns The Bitcoin address
10
- */
11
- export declare const publicKeyToBitcoinAddress: (publicKey: Buffer | Uint8Array, addressType?: BitcoinAddressType, network?: BitcoinNetwork, ecc?: any) => string;
12
- //# sourceMappingURL=publicKeyToBitcoinAddress.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"publicKeyToBitcoinAddress.d.ts","sourceRoot":"","sources":["../../src/publicKeyToBitcoinAddress/publicKeyToBitcoinAddress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAM/E;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,cACzB,MAAM,GAAG,UAAU,gBACjB,kBAAkB,YACtB,cAAc,QACjB,GAAG,KACR,MAgBF,CAAC"}
@@ -1,2 +0,0 @@
1
- export { selectUTXOs } from './selectUTXOs.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/selectUTXOs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
@@ -1,19 +0,0 @@
1
- import type { UTXO } from '../types.js';
2
- /**
3
- * Simple greedy coin selection
4
- *
5
- * @param utxos - The list of UTXOs to select from
6
- * @param amount - The amount to spend
7
- * @param feeRate - The fee rate in sat/vByte
8
- * @returns The selected inputs, change amount, and fee
9
- */
10
- export declare const selectUTXOs: ({ utxos, amount, feeRate, }: {
11
- utxos: UTXO[];
12
- amount: bigint;
13
- feeRate: number;
14
- }) => {
15
- inputs: UTXO[];
16
- change: bigint;
17
- fee: bigint;
18
- };
19
- //# sourceMappingURL=selectUTXOs.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"selectUTXOs.d.ts","sourceRoot":"","sources":["../../src/selectUTXOs/selectUTXOs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACxC;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,gCAIrB;IACD,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB,KAAG;IAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAiChD,CAAC"}
@@ -1,2 +0,0 @@
1
- export { toBitcoinAddressType } from './toBitcoinAddressType.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/toBitcoinAddressType/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC"}
@@ -1,10 +0,0 @@
1
- import { BitcoinAddressType } from '@dynamic-labs-wallet/core';
2
- /**
3
- * Converts a string address type identifier to a BitcoinAddressType enum value.
4
- * If the input is already a BitcoinAddressType enum, it is returned as-is.
5
- *
6
- * @param addressType - BitcoinAddressType enum or 'native_segwit' | 'taproot' string
7
- * @returns The corresponding BitcoinAddressType enum value
8
- */
9
- export declare const toBitcoinAddressType: (addressType: BitcoinAddressType | "native_segwit" | "taproot") => BitcoinAddressType;
10
- //# sourceMappingURL=toBitcoinAddressType.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"toBitcoinAddressType.d.ts","sourceRoot":"","sources":["../../src/toBitcoinAddressType/toBitcoinAddressType.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,gBAClB,kBAAkB,GAAG,eAAe,GAAG,SAAS,KAC5D,kBAUF,CAAC"}
@@ -1,2 +0,0 @@
1
- export { toBitcoinNetwork } from './toBitcoinNetwork.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/toBitcoinNetwork/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -1,10 +0,0 @@
1
- import { BitcoinNetwork } from '@dynamic-labs-wallet/core';
2
- /**
3
- * Converts a string network identifier to a BitcoinNetwork enum value.
4
- * If the input is already a BitcoinNetwork enum, it is returned as-is.
5
- *
6
- * @param network - BitcoinNetwork enum or 'mainnet' | 'testnet' string
7
- * @returns The corresponding BitcoinNetwork enum value
8
- */
9
- export declare const toBitcoinNetwork: (network: BitcoinNetwork | "mainnet" | "testnet") => BitcoinNetwork;
10
- //# sourceMappingURL=toBitcoinNetwork.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"toBitcoinNetwork.d.ts","sourceRoot":"","sources":["../../src/toBitcoinNetwork/toBitcoinNetwork.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,YAAa,cAAc,GAAG,SAAS,GAAG,SAAS,KAAG,cAUlF,CAAC"}
@@ -1,2 +0,0 @@
1
- export { toBuffer } from './toBuffer.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/toBuffer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC"}
@@ -1,8 +0,0 @@
1
- /**
2
- * Helper to handle Buffer/Uint8Array compatibility issues
3
- *
4
- * @param data - The data to convert to a Buffer
5
- * @returns The Buffer representation of the data
6
- */
7
- export declare const toBuffer: (data: Uint8Array | Buffer) => Buffer;
8
- //# sourceMappingURL=toBuffer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"toBuffer.d.ts","sourceRoot":"","sources":["../../src/toBuffer/toBuffer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,SAAU,UAAU,GAAG,MAAM,KAAG,MAGpD,CAAC"}
package/src/types.d.ts DELETED
@@ -1,35 +0,0 @@
1
- /**
2
- * Represents an Unspent Transaction Output (UTXO).
3
- */
4
- export type UTXO = {
5
- /**
6
- * The transaction ID where this output was created.
7
- */
8
- txid: string;
9
- /**
10
- * The index of the output in the transaction.
11
- */
12
- vout: number;
13
- /**
14
- * The value of the output in satoshis.
15
- */
16
- value: bigint;
17
- /**
18
- * The script public key of the output.
19
- */
20
- scriptPubKey?: Uint8Array;
21
- /**
22
- * The witness UTXO data, used for SegWit inputs.
23
- */
24
- witnessUtxo?: {
25
- /**
26
- * The script of the witness UTXO.
27
- */
28
- script: Uint8Array;
29
- /**
30
- * The amount of the witness UTXO in satoshis.
31
- */
32
- amount: bigint;
33
- };
34
- };
35
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../packages/src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,IAAI,GAAG;IACjB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,YAAY,CAAC,EAAE,UAAU,CAAC;IAC1B;;OAEG;IACH,WAAW,CAAC,EAAE;QACZ;;WAEG;QACH,MAAM,EAAE,UAAU,CAAC;QACnB;;WAEG;QACH,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;CACH,CAAC"}
@@ -1,2 +0,0 @@
1
- export { wifToPrivateKey } from './wifToPrivateKey.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/wifToPrivateKey/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC"}
@@ -1,19 +0,0 @@
1
- import { BitcoinNetwork } from '@dynamic-labs-wallet/core';
2
- /**
3
- * Converts a Bitcoin WIF (Wallet Import Format) private key to hex format
4
- * This is the reverse operation of `privateKeyToWIF`
5
- *
6
- * WIF decoding steps:
7
- * 1. Base58 decode the WIF string
8
- * 2. Validate network prefix
9
- * 3. Validate checksum (double SHA-256, first 4 bytes)
10
- * 4. Extract private key bytes (skip prefix, compression flag, and checksum)
11
- * 5. Convert to hex string
12
- *
13
- * @param wif - Private key in WIF format (Base58 encoded)
14
- * @param network - Bitcoin network (BitcoinNetwork.MAINNET or BitcoinNetwork.TESTNET)
15
- * @returns Private key as hex string (64 characters, 32 bytes)
16
- * @throws Error if WIF format is invalid
17
- */
18
- export declare const wifToPrivateKey: (wif: string, network?: BitcoinNetwork) => string;
19
- //# sourceMappingURL=wifToPrivateKey.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wifToPrivateKey.d.ts","sourceRoot":"","sources":["../../src/wifToPrivateKey/wifToPrivateKey.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAG3D;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,eAAe,QAAS,MAAM,YAAW,cAAc,KAA4B,MA4C/F,CAAC"}