@btc-vision/bitcoin 6.3.5 → 6.4.0

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 (72) hide show
  1. package/.mocharc.json +13 -0
  2. package/browser/address.d.ts +1 -1
  3. package/browser/index.js +1 -1
  4. package/browser/index.js.LICENSE.txt +3 -3
  5. package/browser/networks.d.ts +1 -0
  6. package/browser/psbt/psbtutils.d.ts +1 -1
  7. package/build/address.d.ts +1 -1
  8. package/build/address.js +12 -5
  9. package/build/block.js +2 -2
  10. package/build/bufferutils.js +5 -5
  11. package/build/networks.d.ts +1 -0
  12. package/build/networks.js +11 -0
  13. package/build/psbt/psbtutils.js +2 -2
  14. package/build/psbt.js +3 -7
  15. package/package.json +26 -26
  16. package/src/address.ts +20 -6
  17. package/src/block.ts +233 -233
  18. package/src/bufferutils.ts +188 -180
  19. package/src/index.ts +86 -86
  20. package/src/networks.ts +12 -0
  21. package/src/psbt/bip371.ts +441 -441
  22. package/src/psbt/psbtutils.ts +4 -3
  23. package/src/psbt.ts +2187 -2187
  24. package/test/address.spec.ts +155 -177
  25. package/test/bitcoin.core.spec.ts +212 -234
  26. package/test/block.spec.ts +171 -194
  27. package/test/bufferutils.spec.ts +450 -513
  28. package/test/crypto.spec.ts +49 -55
  29. package/test/fixtures/address.json +3 -3
  30. package/test/integration/addresses.spec.ts +142 -154
  31. package/test/integration/bip32.spec.ts +130 -151
  32. package/test/integration/blocks.spec.ts +28 -28
  33. package/test/integration/cltv.spec.ts +241 -283
  34. package/test/integration/csv.spec.ts +452 -527
  35. package/test/integration/payments.spec.ts +110 -135
  36. package/test/integration/taproot.spec.ts +663 -707
  37. package/test/integration/transactions.spec.ts +668 -769
  38. package/test/payments.spec.ts +114 -125
  39. package/test/payments.utils.ts +165 -208
  40. package/test/psbt.spec.ts +1285 -1414
  41. package/test/script.spec.ts +186 -210
  42. package/test/script_number.spec.ts +26 -29
  43. package/test/script_signature.spec.ts +66 -66
  44. package/test/transaction.spec.ts +337 -387
  45. package/test/ts-node-register.js +7 -5
  46. package/test/tsconfig.json +4 -1
  47. package/test/types.spec.ts +53 -58
  48. package/.nyc_output/6368a5b2-daa5-4821-8ed0-b742d6fc7eab.json +0 -1
  49. package/.nyc_output/processinfo/6368a5b2-daa5-4821-8ed0-b742d6fc7eab.json +0 -1
  50. package/.nyc_output/processinfo/index.json +0 -1
  51. package/test/address.spec.js +0 -124
  52. package/test/bitcoin.core.spec.js +0 -170
  53. package/test/block.spec.js +0 -141
  54. package/test/bufferutils.spec.js +0 -427
  55. package/test/crypto.spec.js +0 -41
  56. package/test/integration/_regtest.js +0 -7
  57. package/test/integration/addresses.spec.js +0 -116
  58. package/test/integration/bip32.spec.js +0 -85
  59. package/test/integration/blocks.spec.js +0 -26
  60. package/test/integration/cltv.spec.js +0 -199
  61. package/test/integration/csv.spec.js +0 -362
  62. package/test/integration/payments.spec.js +0 -98
  63. package/test/integration/taproot.spec.js +0 -532
  64. package/test/integration/transactions.spec.js +0 -561
  65. package/test/payments.spec.js +0 -97
  66. package/test/payments.utils.js +0 -190
  67. package/test/psbt.spec.js +0 -1044
  68. package/test/script.spec.js +0 -151
  69. package/test/script_number.spec.js +0 -24
  70. package/test/script_signature.spec.js +0 -52
  71. package/test/transaction.spec.js +0 -269
  72. package/test/types.spec.js +0 -46
package/.mocharc.json ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "loader": "ts-node/esm",
3
+ "node-option": [
4
+ "experimental-specifier-resolution=node"
5
+ ],
6
+ "extensions": [
7
+ "ts"
8
+ ],
9
+ "spec": [
10
+ "test/**/*.spec.ts"
11
+ ],
12
+ "timeout": 10000
13
+ }
@@ -11,6 +11,6 @@ export interface Bech32Result {
11
11
  export declare function fromBase58Check(address: string): Base58CheckResult;
12
12
  export declare function fromBech32(address: string): Bech32Result;
13
13
  export declare function toBase58Check(hash: Buffer, version: number): string;
14
- export declare function toBech32(data: Buffer, version: number, prefix: string): string;
14
+ export declare function toBech32(data: Buffer, version: number, prefix: string, prefixOpnet?: string): string;
15
15
  export declare function fromOutputScript(output: Buffer, network?: Network): string;
16
16
  export declare function toOutputScript(address: string, network?: Network): Buffer;