@btc-vision/transaction 1.0.119 → 1.0.120
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/_version.d.ts +1 -1
- package/browser/generators/AddressGenerator.d.ts +1 -1
- package/browser/generators/Generator.d.ts +1 -1
- package/browser/generators/builders/CalldataGenerator.d.ts +1 -1
- package/browser/generators/builders/CustomGenerator.d.ts +1 -1
- package/browser/generators/builders/DeploymentGenerator.d.ts +1 -1
- package/browser/generators/builders/LegacyCalldataGenerator.d.ts +1 -1
- package/browser/index.js +1 -1
- package/browser/keypair/Address.d.ts +1 -1
- package/browser/keypair/AddressVerificator.d.ts +1 -1
- package/browser/keypair/EcKeyPair.d.ts +1 -1
- package/browser/keypair/Wallet.d.ts +1 -1
- package/browser/metadata/ContractBaseMetadata.d.ts +1 -1
- package/browser/metadata/contracts/wBTC.d.ts +1 -1
- package/browser/signer/TweakedSigner.d.ts +1 -1
- package/browser/transaction/TransactionFactory.d.ts +1 -1
- package/browser/transaction/browser/BrowserSignerBase.d.ts +1 -1
- package/browser/transaction/browser/extensions/UnisatSigner.d.ts +1 -1
- package/browser/transaction/builders/CustomScriptTransaction.d.ts +1 -1
- package/browser/transaction/builders/DeploymentTransaction.d.ts +1 -1
- package/browser/transaction/builders/FundingTransaction.d.ts +1 -1
- package/browser/transaction/builders/InteractionTransaction.d.ts +1 -1
- package/browser/transaction/builders/MultiSignTransaction.d.ts +2 -2
- package/browser/transaction/builders/SharedInteractionTransaction.d.ts +2 -2
- package/browser/transaction/builders/TransactionBuilder.d.ts +1 -1
- package/browser/transaction/builders/UnwrapSegwitTransaction.d.ts +2 -2
- package/browser/transaction/builders/UnwrapTransaction.d.ts +2 -2
- package/browser/transaction/builders/WrapTransaction.d.ts +1 -1
- package/browser/transaction/interfaces/ITransactionParameters.d.ts +1 -1
- package/browser/transaction/interfaces/Tap.d.ts +1 -1
- package/browser/transaction/processor/PsbtTransaction.d.ts +1 -1
- package/browser/transaction/shared/P2TR_MS.d.ts +1 -1
- package/browser/transaction/shared/TweakedTransaction.d.ts +1 -1
- package/browser/utxo/OPNetLimitedProvider.d.ts +1 -1
- package/browser/verification/TapscriptVerificator.d.ts +2 -2
- package/build/_version.d.ts +1 -1
- package/build/_version.js +1 -1
- package/build/generators/AddressGenerator.d.ts +1 -1
- package/build/generators/AddressGenerator.js +2 -2
- package/build/generators/Features.js +1 -1
- package/build/generators/Generator.d.ts +1 -1
- package/build/generators/Generator.js +2 -2
- package/build/generators/builders/CalldataGenerator.d.ts +1 -1
- package/build/generators/builders/CalldataGenerator.js +1 -1
- package/build/generators/builders/CustomGenerator.d.ts +1 -1
- package/build/generators/builders/CustomGenerator.js +1 -1
- package/build/generators/builders/DeploymentGenerator.d.ts +1 -1
- package/build/generators/builders/DeploymentGenerator.js +1 -1
- package/build/generators/builders/LegacyCalldataGenerator.d.ts +1 -1
- package/build/generators/builders/LegacyCalldataGenerator.js +1 -1
- package/build/generators/builders/MultiSignGenerator.js +2 -2
- package/build/keypair/Address.d.ts +1 -1
- package/build/keypair/Address.js +1 -1
- package/build/keypair/AddressVerificator.d.ts +1 -1
- package/build/keypair/AddressVerificator.js +1 -1
- package/build/keypair/EcKeyPair.d.ts +1 -1
- package/build/keypair/EcKeyPair.js +3 -3
- package/build/keypair/Wallet.d.ts +1 -1
- package/build/keypair/Wallet.js +2 -2
- package/build/metadata/ContractBaseMetadata.d.ts +1 -1
- package/build/metadata/ContractBaseMetadata.js +1 -1
- package/build/metadata/contracts/wBTC.d.ts +1 -1
- package/build/metadata/contracts/wBTC.js +1 -1
- package/build/signer/TweakedSigner.d.ts +1 -1
- package/build/signer/TweakedSigner.js +3 -3
- package/build/transaction/TransactionFactory.d.ts +1 -1
- package/build/transaction/browser/BrowserSignerBase.d.ts +1 -1
- package/build/transaction/browser/extensions/UnisatSigner.d.ts +1 -1
- package/build/transaction/browser/extensions/UnisatSigner.js +1 -1
- package/build/transaction/builders/CustomScriptTransaction.d.ts +1 -1
- package/build/transaction/builders/CustomScriptTransaction.js +2 -2
- package/build/transaction/builders/DeploymentTransaction.d.ts +1 -1
- package/build/transaction/builders/DeploymentTransaction.js +2 -2
- package/build/transaction/builders/FundingTransaction.d.ts +1 -1
- package/build/transaction/builders/InteractionTransaction.d.ts +1 -1
- package/build/transaction/builders/MultiSignTransaction.d.ts +2 -2
- package/build/transaction/builders/MultiSignTransaction.js +2 -2
- package/build/transaction/builders/SharedInteractionTransaction.d.ts +2 -2
- package/build/transaction/builders/SharedInteractionTransaction.js +2 -2
- package/build/transaction/builders/TransactionBuilder.d.ts +1 -1
- package/build/transaction/builders/TransactionBuilder.js +2 -2
- package/build/transaction/builders/UnwrapSegwitTransaction.d.ts +2 -2
- package/build/transaction/builders/UnwrapSegwitTransaction.js +1 -1
- package/build/transaction/builders/UnwrapTransaction.d.ts +2 -2
- package/build/transaction/builders/UnwrapTransaction.js +2 -2
- package/build/transaction/builders/WrapTransaction.d.ts +1 -1
- package/build/transaction/interfaces/ITransactionParameters.d.ts +1 -1
- package/build/transaction/interfaces/Tap.d.ts +1 -1
- package/build/transaction/processor/PsbtTransaction.d.ts +1 -1
- package/build/transaction/processor/PsbtTransaction.js +1 -1
- package/build/transaction/shared/P2TR_MS.d.ts +1 -1
- package/build/transaction/shared/P2TR_MS.js +1 -1
- package/build/transaction/shared/TweakedTransaction.d.ts +1 -1
- package/build/transaction/shared/TweakedTransaction.js +3 -3
- package/build/utxo/OPNetLimitedProvider.d.ts +1 -1
- package/build/verification/TapscriptVerificator.d.ts +2 -2
- package/build/verification/TapscriptVerificator.js +2 -2
- package/package.json +2 -2
- package/src/_version.ts +1 -1
- package/src/generators/AddressGenerator.ts +2 -2
- package/src/generators/Features.ts +1 -1
- package/src/generators/Generator.ts +2 -2
- package/src/generators/builders/CalldataGenerator.ts +2 -2
- package/src/generators/builders/CustomGenerator.ts +1 -1
- package/src/generators/builders/DeploymentGenerator.ts +1 -1
- package/src/generators/builders/LegacyCalldataGenerator.ts +1 -1
- package/src/generators/builders/MultiSignGenerator.ts +2 -2
- package/src/keypair/Address.ts +2 -2
- package/src/keypair/AddressVerificator.ts +1 -1
- package/src/keypair/EcKeyPair.ts +3 -3
- package/src/keypair/Wallet.ts +2 -2
- package/src/metadata/ContractBaseMetadata.ts +1 -1
- package/src/metadata/contracts/wBTC.ts +1 -1
- package/src/signer/TweakedSigner.ts +3 -3
- package/src/transaction/TransactionFactory.ts +2 -2
- package/src/transaction/browser/BrowserSignerBase.ts +1 -1
- package/src/transaction/browser/extensions/UnisatSigner.ts +1 -1
- package/src/transaction/builders/CustomScriptTransaction.ts +3 -3
- package/src/transaction/builders/DeploymentTransaction.ts +3 -3
- package/src/transaction/builders/FundingTransaction.ts +1 -1
- package/src/transaction/builders/InteractionTransaction.ts +1 -1
- package/src/transaction/builders/MultiSignTransaction.ts +3 -3
- package/src/transaction/builders/SharedInteractionTransaction.ts +3 -3
- package/src/transaction/builders/TransactionBuilder.ts +2 -2
- package/src/transaction/builders/UnwrapSegwitTransaction.ts +2 -2
- package/src/transaction/builders/UnwrapTransaction.ts +3 -3
- package/src/transaction/builders/WrapTransaction.ts +2 -2
- package/src/transaction/interfaces/ITransactionParameters.ts +1 -1
- package/src/transaction/interfaces/Tap.ts +1 -1
- package/src/transaction/processor/PsbtTransaction.ts +1 -1
- package/src/transaction/shared/P2TR_MS.ts +1 -1
- package/src/transaction/shared/TweakedTransaction.ts +3 -3
- package/src/utxo/OPNetLimitedProvider.ts +1 -1
- package/src/verification/TapscriptVerificator.ts +3 -3
- package/webpack.config.js +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BIP32API, BIP32Interface } from 'bip32';
|
|
2
|
-
import { Network, Signer } from '
|
|
2
|
+
import { Network, Signer } from '@btc-vision/bitcoin';
|
|
3
3
|
import { ECPairAPI, ECPairInterface } from 'ecpair';
|
|
4
4
|
import { IWallet } from './interfaces/IWallet.js';
|
|
5
5
|
export declare class EcKeyPair {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IWallet } from './interfaces/IWallet.js';
|
|
2
2
|
import { ECPairInterface } from 'ecpair';
|
|
3
|
-
import { Network } from '
|
|
3
|
+
import { Network } from '@btc-vision/bitcoin';
|
|
4
4
|
import { Address } from './Address.js';
|
|
5
5
|
export declare class Wallet {
|
|
6
6
|
readonly network: Network;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Transaction } from '
|
|
1
|
+
import { Transaction } from '@btc-vision/bitcoin';
|
|
2
2
|
import { UTXO } from '../utxo/interfaces/IUTXO.js';
|
|
3
3
|
import { ICustomTransactionParameters } from './builders/CustomScriptTransaction.js';
|
|
4
4
|
import { FundingTransaction } from './builders/FundingTransaction.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TransactionType } from '../enums/TransactionType.js';
|
|
2
2
|
import { TapLeafScript } from '../interfaces/Tap.js';
|
|
3
3
|
import { SharedInteractionParameters } from '../interfaces/ITransactionParameters.js';
|
|
4
|
-
import { Payment, Psbt, Stack } from '
|
|
4
|
+
import { Payment, Psbt, Stack } from '@btc-vision/bitcoin';
|
|
5
5
|
import { TransactionBuilder } from './TransactionBuilder.js';
|
|
6
6
|
export interface ICustomTransactionParameters extends SharedInteractionParameters {
|
|
7
7
|
readonly script: (Buffer | Stack)[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TransactionType } from '../enums/TransactionType.js';
|
|
2
2
|
import { IDeploymentParameters } from '../interfaces/ITransactionParameters.js';
|
|
3
|
-
import { Payment, Psbt } from '
|
|
3
|
+
import { Payment, Psbt } from '@btc-vision/bitcoin';
|
|
4
4
|
import { TransactionBuilder } from './TransactionBuilder.js';
|
|
5
5
|
import { TapLeafScript } from '../interfaces/Tap.js';
|
|
6
6
|
import { Address } from '../../keypair/Address.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TransactionType } from '../enums/TransactionType.js';
|
|
2
2
|
import { IFundingTransactionParameters } from '../interfaces/ITransactionParameters.js';
|
|
3
|
-
import { Signer } from '
|
|
3
|
+
import { Signer } from '@btc-vision/bitcoin';
|
|
4
4
|
import { TransactionBuilder } from './TransactionBuilder.js';
|
|
5
5
|
import { ECPairInterface } from 'ecpair';
|
|
6
6
|
export declare class FundingTransaction extends TransactionBuilder<TransactionType.FUNDING> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Taptree } from '
|
|
1
|
+
import { Taptree } from '@btc-vision/bitcoin/src/types.js';
|
|
2
2
|
import { TransactionType } from '../enums/TransactionType.js';
|
|
3
3
|
import { TapLeafScript } from '../interfaces/Tap.js';
|
|
4
4
|
import { IInteractionParameters } from '../interfaces/ITransactionParameters.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Payment, Psbt, PsbtInput, Signer, TapScriptSig } from '
|
|
2
|
-
import { Taptree } from '
|
|
1
|
+
import { Payment, Psbt, PsbtInput, Signer, TapScriptSig } from '@btc-vision/bitcoin';
|
|
2
|
+
import { Taptree } from '@btc-vision/bitcoin/src/types.js';
|
|
3
3
|
import { TransactionBuilder } from './TransactionBuilder.js';
|
|
4
4
|
import { TransactionType } from '../enums/TransactionType.js';
|
|
5
5
|
import { ITransactionParameters } from '../interfaces/ITransactionParameters.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Payment, Psbt, PsbtInput, Signer } from '
|
|
2
|
-
import { Taptree } from '
|
|
1
|
+
import { Payment, Psbt, PsbtInput, Signer } from '@btc-vision/bitcoin';
|
|
2
|
+
import { Taptree } from '@btc-vision/bitcoin/src/types.js';
|
|
3
3
|
import { ECPairInterface } from 'ecpair';
|
|
4
4
|
import { TransactionBuilder } from './TransactionBuilder.js';
|
|
5
5
|
import { TransactionType } from '../enums/TransactionType.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Network, Psbt, PsbtInputExtended, PsbtOutputExtended, Signer, Transaction } from '
|
|
1
|
+
import { Network, Psbt, PsbtInputExtended, PsbtOutputExtended, Signer, Transaction } from '@btc-vision/bitcoin';
|
|
2
2
|
import { UpdateInput } from '../interfaces/Tap.js';
|
|
3
3
|
import { TransactionType } from '../enums/TransactionType.js';
|
|
4
4
|
import { IFundingTransactionParameters, ITransactionParameters } from '../interfaces/ITransactionParameters.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Taptree } from '
|
|
1
|
+
import { Taptree } from '@btc-vision/bitcoin/src/types.js';
|
|
2
2
|
import { TransactionType } from '../enums/TransactionType.js';
|
|
3
3
|
import { IUnwrapParameters } from '../interfaces/ITransactionParameters.js';
|
|
4
4
|
import { SharedInteractionTransaction } from './SharedInteractionTransaction.js';
|
|
5
|
-
import { Psbt } from '
|
|
5
|
+
import { Psbt } from '@btc-vision/bitcoin';
|
|
6
6
|
import { VaultUTXOs } from '../processor/PsbtTransaction.js';
|
|
7
7
|
export declare class UnwrapSegwitTransaction extends SharedInteractionTransaction<TransactionType.WBTC_UNWRAP> {
|
|
8
8
|
private static readonly UNWRAP_SELECTOR;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Taptree } from '
|
|
1
|
+
import { Taptree } from '@btc-vision/bitcoin/src/types.js';
|
|
2
2
|
import { TransactionType } from '../enums/TransactionType.js';
|
|
3
3
|
import { IUnwrapParameters } from '../interfaces/ITransactionParameters.js';
|
|
4
4
|
import { SharedInteractionTransaction } from './SharedInteractionTransaction.js';
|
|
5
|
-
import { Network, Payment, Psbt, PsbtInput } from '
|
|
5
|
+
import { Network, Payment, Psbt, PsbtInput } from '@btc-vision/bitcoin';
|
|
6
6
|
import { VaultUTXOs } from '../processor/PsbtTransaction.js';
|
|
7
7
|
export declare class UnwrapTransaction extends SharedInteractionTransaction<TransactionType.WBTC_UNWRAP> {
|
|
8
8
|
private static readonly UNWRAP_SELECTOR;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Taptree } from '
|
|
1
|
+
import { Taptree } from '@btc-vision/bitcoin/src/types.js';
|
|
2
2
|
import { TransactionType } from '../enums/TransactionType.js';
|
|
3
3
|
import { TapLeafScript } from '../interfaces/Tap.js';
|
|
4
4
|
import { IWrapParameters } from '../interfaces/ITransactionParameters.js';
|
|
@@ -4,7 +4,7 @@ import { ITweakedTransactionData } from '../shared/TweakedTransaction.js';
|
|
|
4
4
|
import { VaultUTXOs } from '../processor/PsbtTransaction.js';
|
|
5
5
|
import { ChainId } from '../../network/ChainId.js';
|
|
6
6
|
import { Address } from '../../keypair/Address.js';
|
|
7
|
-
import { PsbtOutputExtended } from '
|
|
7
|
+
import { PsbtOutputExtended } from '@btc-vision/bitcoin';
|
|
8
8
|
export interface ITransactionParameters extends ITweakedTransactionData {
|
|
9
9
|
readonly from?: string;
|
|
10
10
|
readonly to?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PsbtInput as _PsbtInput, PsbtInputUpdate as _PsbtInputUpdate, PsbtOutput as _PsbtOutput, TapBip32Derivation as _TapBip32Derivation, TapInternalKey as _TapInternalKey, TapKeySig as _TapKeySig, TapLeaf as _TapLeaf, TapLeafScript as _TapLeafScript, TapMerkleRoot as _TapMerkleRoot, TapScriptSig as _TapScriptSig, TapTree as _TapTree } from '
|
|
1
|
+
import { PsbtInput as _PsbtInput, PsbtInputUpdate as _PsbtInputUpdate, PsbtOutput as _PsbtOutput, TapBip32Derivation as _TapBip32Derivation, TapInternalKey as _TapInternalKey, TapKeySig as _TapKeySig, TapLeaf as _TapLeaf, TapLeafScript as _TapLeafScript, TapMerkleRoot as _TapMerkleRoot, TapScriptSig as _TapScriptSig, TapTree as _TapTree } from '@btc-vision/bitcoin';
|
|
2
2
|
export interface TapLeafScript {
|
|
3
3
|
readonly leafVersion: number;
|
|
4
4
|
readonly controlBlock: Buffer;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Network, Psbt, PsbtInputExtended, PsbtOutputExtended, Signer, Transaction } from '
|
|
1
|
+
import { Network, Psbt, PsbtInputExtended, PsbtOutputExtended, Signer, Transaction } from '@btc-vision/bitcoin';
|
|
2
2
|
import { ITweakedTransactionData, TweakedTransaction } from '../shared/TweakedTransaction.js';
|
|
3
3
|
export interface PsbtTransactionData extends ITweakedTransactionData {
|
|
4
4
|
readonly psbt: Psbt;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Logger } from '@btc-vision/logger';
|
|
2
|
-
import { Network, Payment, Psbt, PsbtInput, PsbtInputExtended, Signer, Transaction } from '
|
|
2
|
+
import { Network, Payment, Psbt, PsbtInput, PsbtInputExtended, Signer, Transaction } from '@btc-vision/bitcoin';
|
|
3
3
|
import { ECPairInterface } from 'ecpair';
|
|
4
4
|
import { UTXO } from '../../utxo/interfaces/IUTXO.js';
|
|
5
5
|
import { TapLeafScript } from '../interfaces/Tap.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Network } from '
|
|
1
|
+
import { Network } from '@btc-vision/bitcoin';
|
|
2
2
|
import { Address, Wallet } from '../opnet.js';
|
|
3
3
|
import { UnwrapGeneration } from '../wbtc/UnwrapGeneration.js';
|
|
4
4
|
import { WrappedGeneration } from '../wbtc/WrappedGenerationParameters.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Network } from '
|
|
2
|
-
import { Taptree } from '
|
|
1
|
+
import { Network } from '@btc-vision/bitcoin';
|
|
2
|
+
import { Taptree } from '@btc-vision/bitcoin/src/types.js';
|
|
3
3
|
export interface ContractAddressVerificationParams {
|
|
4
4
|
readonly deployerPubKey: Buffer;
|
|
5
5
|
readonly contractSaltPubKey: Buffer;
|
package/build/_version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "1.0.
|
|
1
|
+
export declare const version = "1.0.120";
|
package/build/_version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '1.0.
|
|
1
|
+
export const version = '1.0.120';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { bech32, bech32m } from 'bech32';
|
|
2
|
-
import { initEccLib } from '
|
|
2
|
+
import { initEccLib } from '@btc-vision/bitcoin';
|
|
3
3
|
import * as ecc from '@bitcoinerlab/secp256k1';
|
|
4
|
-
import { ripemd160 } from '
|
|
4
|
+
import { ripemd160 } from '@btc-vision/bitcoin/src/crypto.js';
|
|
5
5
|
initEccLib(ecc);
|
|
6
6
|
export class AddressGenerator {
|
|
7
7
|
static generatePKSH(sha256Hash, network) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { networks } from '
|
|
2
|
-
import { toXOnly } from '
|
|
1
|
+
import { networks } from '@btc-vision/bitcoin';
|
|
2
|
+
import { toXOnly } from '@btc-vision/bitcoin/src/psbt/bip371.js';
|
|
3
3
|
export class Generator {
|
|
4
4
|
constructor(senderPubKey, contractSaltPubKey, network = networks.bitcoin) {
|
|
5
5
|
this.network = networks.bitcoin;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { crypto, networks, opcodes, script } from '
|
|
1
|
+
import { crypto, networks, opcodes, script } from '@btc-vision/bitcoin';
|
|
2
2
|
import { Compressor } from '../../bytecode/Compressor.js';
|
|
3
3
|
import { EcKeyPair } from '../../keypair/EcKeyPair.js';
|
|
4
4
|
import { FeatureOpCodes } from '../Features.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Network } from '
|
|
1
|
+
import { Network } from '@btc-vision/bitcoin';
|
|
2
2
|
import { Generator } from '../Generator.js';
|
|
3
3
|
export declare class DeploymentGenerator extends Generator {
|
|
4
4
|
constructor(senderPubKey: Buffer, contractSaltPubKey: Buffer, network?: Network);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { crypto, networks, opcodes, script } from '
|
|
1
|
+
import { crypto, networks, opcodes, script } from '@btc-vision/bitcoin';
|
|
2
2
|
import { Generator } from '../Generator.js';
|
|
3
3
|
export class DeploymentGenerator extends Generator {
|
|
4
4
|
constructor(senderPubKey, contractSaltPubKey, network = networks.bitcoin) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { networks, opcodes, script } from '
|
|
1
|
+
import { networks, opcodes, script } from '@btc-vision/bitcoin';
|
|
2
2
|
import { Compressor } from '../../bytecode/Compressor.js';
|
|
3
3
|
import { EcKeyPair } from '../../keypair/EcKeyPair.js';
|
|
4
4
|
import { FeatureOpCodes } from '../Features.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { opcodes, script } from '
|
|
2
|
-
import { toXOnly } from '
|
|
1
|
+
import { opcodes, script } from '@btc-vision/bitcoin';
|
|
2
|
+
import { toXOnly } from '@btc-vision/bitcoin/src/psbt/bip371.js';
|
|
3
3
|
export class MultiSignGenerator {
|
|
4
4
|
static compile(vaultPublicKeys, minimumSignatures = 0, internal) {
|
|
5
5
|
if (minimumSignatures < 2) {
|
package/build/keypair/Address.js
CHANGED
|
@@ -13,7 +13,7 @@ var _Address_p2tr, _Address_network, _Address_tweakedBytes;
|
|
|
13
13
|
import { EcKeyPair } from './EcKeyPair.js';
|
|
14
14
|
import { ADDRESS_BYTE_LENGTH } from '../utils/types.js';
|
|
15
15
|
import { AddressVerificator } from './AddressVerificator.js';
|
|
16
|
-
import { toXOnly } from '
|
|
16
|
+
import { toXOnly } from '@btc-vision/bitcoin/src/psbt/bip371.js';
|
|
17
17
|
export class Address extends Uint8Array {
|
|
18
18
|
constructor(bytes) {
|
|
19
19
|
super(bytes?.length || ADDRESS_BYTE_LENGTH);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BIP32API, BIP32Interface } from 'bip32';
|
|
2
|
-
import { Network, Signer } from '
|
|
2
|
+
import { Network, Signer } from '@btc-vision/bitcoin';
|
|
3
3
|
import { ECPairAPI, ECPairInterface } from 'ecpair';
|
|
4
4
|
import { IWallet } from './interfaces/IWallet.js';
|
|
5
5
|
export declare class EcKeyPair {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as ecc from '@bitcoinerlab/secp256k1';
|
|
2
2
|
import bip32, { BIP32Factory } from 'bip32';
|
|
3
|
-
import { address, initEccLib, networks, payments } from '
|
|
4
|
-
import { toXOnly } from '
|
|
3
|
+
import { address, initEccLib, networks, payments } from '@btc-vision/bitcoin';
|
|
4
|
+
import { toXOnly } from '@btc-vision/bitcoin/src/psbt/bip371.js';
|
|
5
5
|
import { ECPairFactory } from 'ecpair';
|
|
6
6
|
import { CURVE, Point, utils } from '@noble/secp256k1';
|
|
7
|
-
import { taggedHash } from '
|
|
7
|
+
import { taggedHash } from '@btc-vision/bitcoin/src/crypto.js';
|
|
8
8
|
initEccLib(ecc);
|
|
9
9
|
const BIP32factory = typeof bip32 === 'function' ? bip32 : BIP32Factory;
|
|
10
10
|
if (!BIP32factory) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IWallet } from './interfaces/IWallet.js';
|
|
2
2
|
import { ECPairInterface } from 'ecpair';
|
|
3
|
-
import { Network } from '
|
|
3
|
+
import { Network } from '@btc-vision/bitcoin';
|
|
4
4
|
import { Address } from './Address.js';
|
|
5
5
|
export declare class Wallet {
|
|
6
6
|
readonly network: Network;
|
package/build/keypair/Wallet.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EcKeyPair } from './EcKeyPair.js';
|
|
2
|
-
import { networks } from '
|
|
3
|
-
import { toXOnly } from '
|
|
2
|
+
import { networks } from '@btc-vision/bitcoin';
|
|
3
|
+
import { toXOnly } from '@btc-vision/bitcoin/src/psbt/bip371.js';
|
|
4
4
|
import { Address } from './Address.js';
|
|
5
5
|
export class Wallet {
|
|
6
6
|
constructor(wallet, network = networks.bitcoin) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { networks } from '
|
|
1
|
+
import { networks } from '@btc-vision/bitcoin';
|
|
2
2
|
import { ChainId } from '../../network/ChainId.js';
|
|
3
3
|
import { ContractBaseMetadata } from '../ContractBaseMetadata.js';
|
|
4
4
|
import { WBTC_ADDRESS_FRACTAL, WBTC_ADDRESS_REGTEST, WBTC_ADDRESS_TESTNET } from '../tokens.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as ecc from '@bitcoinerlab/secp256k1';
|
|
2
|
-
import { initEccLib } from '
|
|
3
|
-
import { tapTweakHash } from '
|
|
4
|
-
import { toXOnly } from '
|
|
2
|
+
import { initEccLib } from '@btc-vision/bitcoin';
|
|
3
|
+
import { tapTweakHash } from '@btc-vision/bitcoin/src/payments/bip341.js';
|
|
4
|
+
import { toXOnly } from '@btc-vision/bitcoin/src/psbt/bip371.js';
|
|
5
5
|
import { EcKeyPair } from '../keypair/EcKeyPair.js';
|
|
6
6
|
initEccLib(ecc);
|
|
7
7
|
export class TweakedSigner {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Transaction } from '
|
|
1
|
+
import { Transaction } from '@btc-vision/bitcoin';
|
|
2
2
|
import { UTXO } from '../utxo/interfaces/IUTXO.js';
|
|
3
3
|
import { ICustomTransactionParameters } from './builders/CustomScriptTransaction.js';
|
|
4
4
|
import { FundingTransaction } from './builders/FundingTransaction.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { networks, Psbt } from '
|
|
1
|
+
import { networks, Psbt } from '@btc-vision/bitcoin';
|
|
2
2
|
import { EcKeyPair } from '../../../keypair/EcKeyPair.js';
|
|
3
3
|
import { CustomKeypair } from '../BrowserSignerBase.js';
|
|
4
4
|
import { UnisatNetwork } from '../types/Unisat.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TransactionType } from '../enums/TransactionType.js';
|
|
2
2
|
import { TapLeafScript } from '../interfaces/Tap.js';
|
|
3
3
|
import { SharedInteractionParameters } from '../interfaces/ITransactionParameters.js';
|
|
4
|
-
import { Payment, Psbt, Stack } from '
|
|
4
|
+
import { Payment, Psbt, Stack } from '@btc-vision/bitcoin';
|
|
5
5
|
import { TransactionBuilder } from './TransactionBuilder.js';
|
|
6
6
|
export interface ICustomTransactionParameters extends SharedInteractionParameters {
|
|
7
7
|
readonly script: (Buffer | Stack)[];
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { TransactionType } from '../enums/TransactionType.js';
|
|
2
|
-
import { crypto as bitCrypto } from '
|
|
2
|
+
import { crypto as bitCrypto } from '@btc-vision/bitcoin';
|
|
3
3
|
import { TransactionBuilder } from './TransactionBuilder.js';
|
|
4
4
|
import { CustomGenerator } from '../../generators/builders/CustomGenerator.js';
|
|
5
5
|
import { BitcoinUtils } from '../../utils/BitcoinUtils.js';
|
|
6
6
|
import { EcKeyPair } from '../../keypair/EcKeyPair.js';
|
|
7
7
|
import { AddressGenerator } from '../../generators/AddressGenerator.js';
|
|
8
|
-
import { toXOnly } from '
|
|
8
|
+
import { toXOnly } from '@btc-vision/bitcoin/src/psbt/bip371.js';
|
|
9
9
|
export class CustomScriptTransaction extends TransactionBuilder {
|
|
10
10
|
constructor(parameters) {
|
|
11
11
|
super(parameters);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TransactionType } from '../enums/TransactionType.js';
|
|
2
2
|
import { IDeploymentParameters } from '../interfaces/ITransactionParameters.js';
|
|
3
|
-
import { Payment, Psbt } from '
|
|
3
|
+
import { Payment, Psbt } from '@btc-vision/bitcoin';
|
|
4
4
|
import { TransactionBuilder } from './TransactionBuilder.js';
|
|
5
5
|
import { TapLeafScript } from '../interfaces/Tap.js';
|
|
6
6
|
import { Address } from '../../keypair/Address.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { TransactionType } from '../enums/TransactionType.js';
|
|
2
|
-
import { crypto as bitCrypto } from '
|
|
2
|
+
import { crypto as bitCrypto } from '@btc-vision/bitcoin';
|
|
3
3
|
import { TransactionBuilder } from './TransactionBuilder.js';
|
|
4
4
|
import { DeploymentGenerator } from '../../generators/builders/DeploymentGenerator.js';
|
|
5
|
-
import { toXOnly } from '
|
|
5
|
+
import { toXOnly } from '@btc-vision/bitcoin/src/psbt/bip371.js';
|
|
6
6
|
import { EcKeyPair } from '../../keypair/EcKeyPair.js';
|
|
7
7
|
import { BitcoinUtils } from '../../utils/BitcoinUtils.js';
|
|
8
8
|
import { Compressor } from '../../bytecode/Compressor.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TransactionType } from '../enums/TransactionType.js';
|
|
2
2
|
import { IFundingTransactionParameters } from '../interfaces/ITransactionParameters.js';
|
|
3
|
-
import { Signer } from '
|
|
3
|
+
import { Signer } from '@btc-vision/bitcoin';
|
|
4
4
|
import { TransactionBuilder } from './TransactionBuilder.js';
|
|
5
5
|
import { ECPairInterface } from 'ecpair';
|
|
6
6
|
export declare class FundingTransaction extends TransactionBuilder<TransactionType.FUNDING> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Taptree } from '
|
|
1
|
+
import { Taptree } from '@btc-vision/bitcoin/src/types.js';
|
|
2
2
|
import { TransactionType } from '../enums/TransactionType.js';
|
|
3
3
|
import { TapLeafScript } from '../interfaces/Tap.js';
|
|
4
4
|
import { IInteractionParameters } from '../interfaces/ITransactionParameters.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Payment, Psbt, PsbtInput, Signer, TapScriptSig } from '
|
|
2
|
-
import { Taptree } from '
|
|
1
|
+
import { Payment, Psbt, PsbtInput, Signer, TapScriptSig } from '@btc-vision/bitcoin';
|
|
2
|
+
import { Taptree } from '@btc-vision/bitcoin/src/types.js';
|
|
3
3
|
import { TransactionBuilder } from './TransactionBuilder.js';
|
|
4
4
|
import { TransactionType } from '../enums/TransactionType.js';
|
|
5
5
|
import { ITransactionParameters } from '../interfaces/ITransactionParameters.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { crypto as bitcoinCrypto, opcodes, Psbt, script, } from '
|
|
1
|
+
import { crypto as bitcoinCrypto, opcodes, Psbt, script, } from '@btc-vision/bitcoin';
|
|
2
2
|
import { TransactionBuilder } from './TransactionBuilder.js';
|
|
3
3
|
import { TransactionType } from '../enums/TransactionType.js';
|
|
4
4
|
import { MultiSignGenerator } from '../../generators/builders/MultiSignGenerator.js';
|
|
5
|
-
import { toXOnly } from '
|
|
5
|
+
import { toXOnly } from '@btc-vision/bitcoin/src/psbt/bip371.js';
|
|
6
6
|
import { EcKeyPair } from '../../keypair/EcKeyPair.js';
|
|
7
7
|
export class MultiSignTransaction extends TransactionBuilder {
|
|
8
8
|
constructor(parameters) {
|