@btc-vision/bitcoin 6.4.11 → 6.5.2
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/browser/chunks/crypto-0PweVewC.js +2033 -0
- package/browser/chunks/payments-CgasufRS.js +1047 -0
- package/browser/chunks/psbt-BIwOrKer.js +4096 -0
- package/browser/chunks/script-CROJPzz_.js +318 -0
- package/browser/chunks/transaction-DchBu35N.js +432 -0
- package/browser/chunks/utils-CO5kmxe9.js +761 -0
- package/browser/crypto/crypto.d.ts +1 -1
- package/browser/crypto.d.ts +1 -1
- package/browser/hooks/HookedSigner.d.ts +1 -1
- package/browser/index.d.ts +6 -4
- package/browser/index.js +92 -2
- package/browser/payments/index.d.ts +2 -2
- package/browser/payments/lazy.d.ts +1 -1
- package/browser/psbt/bip371.d.ts +5 -1
- package/browser/psbt.d.ts +1 -1
- package/browser/typeforce.d.ts +38 -0
- package/browser/types.d.ts +22 -20
- package/build/address.js +2 -2
- package/build/bip66.js +2 -2
- package/build/block.js +2 -2
- package/build/crypto.d.ts +1 -1
- package/build/crypto.js +2 -3
- package/build/hooks/HookedSigner.d.ts +1 -1
- package/build/index.d.ts +6 -4
- package/build/index.js +2 -2
- package/build/payments/bip341.js +1 -1
- package/build/payments/index.d.ts +2 -2
- package/build/payments/lazy.d.ts +1 -1
- package/build/payments/p2op.js +3 -3
- package/build/payments/p2pk.js +1 -1
- package/build/payments/p2pkh.js +3 -3
- package/build/payments/p2sh.js +3 -3
- package/build/payments/p2tr.js +9 -5
- package/build/payments/p2wpkh.js +3 -3
- package/build/payments/p2wsh.js +2 -2
- package/build/psbt/bip371.d.ts +5 -1
- package/build/psbt/bip371.js +10 -7
- package/build/psbt/psbtutils.js +5 -4
- package/build/psbt.d.ts +1 -1
- package/build/psbt.js +78 -45
- package/build/script.js +2 -2
- package/build/script_signature.js +7 -7
- package/build/transaction.js +22 -10
- package/build/tsconfig.tsbuildinfo +1 -0
- package/build/types.d.ts +22 -20
- package/build/types.js +10 -9
- package/package.json +37 -63
- package/src/address.ts +2 -2
- package/src/bip66.ts +2 -2
- package/src/block.ts +8 -5
- package/src/crypto.ts +3 -4
- package/src/ecc_lib.ts +1 -1
- package/src/hooks/HookedSigner.ts +1 -1
- package/src/index.ts +6 -6
- package/src/payments/bip341.ts +1 -1
- package/src/payments/embed.ts +1 -2
- package/src/payments/index.ts +4 -4
- package/src/payments/lazy.ts +3 -3
- package/src/payments/p2op.ts +4 -3
- package/src/payments/p2pk.ts +1 -1
- package/src/payments/p2pkh.ts +3 -3
- package/src/payments/p2sh.ts +13 -5
- package/src/payments/p2tr.ts +8 -9
- package/src/payments/p2wpkh.ts +3 -3
- package/src/payments/p2wsh.ts +4 -4
- package/src/psbt/bip371.ts +22 -13
- package/src/psbt/psbtutils.ts +8 -5
- package/src/psbt.ts +127 -80
- package/src/script.ts +4 -4
- package/src/script_signature.ts +7 -7
- package/src/transaction.ts +31 -18
- package/src/typeforce.d.ts +38 -0
- package/src/types.ts +34 -29
- package/test/address.spec.ts +12 -4
- package/test/bitcoin.core.spec.ts +1 -1
- package/test/block.spec.ts +1 -1
- package/test/bufferutils.spec.ts +1 -1
- package/test/crypto.spec.ts +3 -2
- package/test/fixtures/address.json +1 -1
- package/test/integration/addresses.spec.ts +1 -1
- package/test/integration/bip32.spec.ts +2 -2
- package/test/integration/blocks.spec.ts +1 -1
- package/test/integration/cltv.spec.ts +3 -3
- package/test/integration/csv.spec.ts +3 -3
- package/test/integration/payments.spec.ts +1 -1
- package/test/integration/taproot.spec.ts +8 -7
- package/test/integration/transactions.spec.ts +2 -2
- package/test/payments.spec.ts +4 -3
- package/test/psbt.spec.ts +106 -74
- package/test/script.spec.ts +73 -7
- package/test/script_number.spec.ts +1 -1
- package/test/script_signature.spec.ts +1 -1
- package/test/transaction.spec.ts +1 -1
- package/test/tsconfig.json +1 -1
- package/test/types.spec.ts +1 -1
- package/vite.config.browser.ts +93 -0
- package/vitest.config.ts +16 -0
- package/.babelrc +0 -4
- package/.mocharc.json +0 -13
- package/browser/index.js.LICENSE.txt +0 -14
- package/cjs/package.json +0 -3
- package/gulpfile.js +0 -42
- package/src/crypto/crypto-browser.js +0 -75
- package/test/ts-node-register.js +0 -7
- package/webpack.config.js +0 -79
|
@@ -1 +1 @@
|
|
|
1
|
-
export { createHash, createHmac, pbkdf2Sync, randomBytes } from 'crypto';
|
|
1
|
+
export { createHash, createHmac, pbkdf2Sync, randomBytes } from './crypto-browser.js';
|
package/browser/crypto.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare function sha256(buffer: Buffer): Buffer;
|
|
|
4
4
|
export declare function hash160(buffer: Buffer): Buffer;
|
|
5
5
|
export declare function hash256(buffer: Buffer): Buffer;
|
|
6
6
|
export declare const TAGS: readonly ["BIP0340/challenge", "BIP0340/aux", "BIP0340/nonce", "TapLeaf", "TapBranch", "TapSighash", "TapTweak", "KeyAgg list", "KeyAgg coefficient"];
|
|
7
|
-
export type TaggedHashPrefix = typeof TAGS[number];
|
|
7
|
+
export type TaggedHashPrefix = (typeof TAGS)[number];
|
|
8
8
|
type TaggedHashPrefixes = {
|
|
9
9
|
[key in TaggedHashPrefix]: Buffer;
|
|
10
10
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BIP32Interface } from 'bip32';
|
|
1
|
+
import { BIP32Interface } from '@btc-vision/bip32';
|
|
2
2
|
import { ECPairInterface } from 'ecpair';
|
|
3
3
|
import { Signer, SignerAlternative, SignerAsync } from '../psbt.js';
|
|
4
4
|
export declare function hookSigner(keyPair: Signer | SignerAlternative | SignerAsync | BIP32Interface | ECPairInterface): void;
|
package/browser/index.d.ts
CHANGED
|
@@ -15,10 +15,11 @@ export * from './crypto.js';
|
|
|
15
15
|
export * from './psbt.js';
|
|
16
16
|
export { opcodes } from './opcodes.js';
|
|
17
17
|
export { Transaction } from './transaction.js';
|
|
18
|
-
export { Network } from './networks.js';
|
|
18
|
+
export type { Network } from './networks.js';
|
|
19
19
|
export { initEccLib } from './ecc_lib.js';
|
|
20
|
-
export {
|
|
21
|
-
export {
|
|
20
|
+
export { PaymentType } from './payments/index.js';
|
|
21
|
+
export type { Payment, PaymentCreator, PaymentOpts, Stack, StackElement, P2WSHPayment, P2PKPayment, BasePayment, P2SHPayment, P2TRPayment, P2WPKHPayment, P2PKHPayment, P2MSPayment, EmbedPayment, P2OPPayment, P2OPPaymentParams, StackFunction, } from './payments/index.js';
|
|
22
|
+
export type { Input as TxInput, Output as TxOutput } from './transaction.js';
|
|
22
23
|
export interface PsbtInput extends _PsbtInput {
|
|
23
24
|
}
|
|
24
25
|
export interface PsbtOutput extends _PsbtOutput {
|
|
@@ -46,7 +47,8 @@ export * from './address.js';
|
|
|
46
47
|
export * from './bufferutils.js';
|
|
47
48
|
export * from './payments/bip341.js';
|
|
48
49
|
export * from './psbt/psbtutils.js';
|
|
49
|
-
export {
|
|
50
|
+
export { TAPLEAF_VERSION_MASK } from './types.js';
|
|
51
|
+
export type { Taptree, XOnlyPointAddTweakResult, Tapleaf, TinySecp256k1Interface, } from './types.js';
|
|
50
52
|
declare const bitcoin: {
|
|
51
53
|
networks: typeof networks;
|
|
52
54
|
address: typeof address;
|