@btc-vision/transaction 1.0.99 → 1.0.101
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/Generator.d.ts +2 -2
- package/browser/generators/builders/CustomGenerator.d.ts +6 -0
- package/browser/index.js +1 -1
- package/browser/opnet.d.ts +5 -3
- package/browser/transaction/TransactionFactory.d.ts +2 -0
- package/browser/transaction/builders/CustomScriptTransaction.d.ts +40 -0
- package/browser/transaction/enums/TransactionType.d.ts +2 -1
- package/build/_version.d.ts +1 -1
- package/build/_version.js +1 -1
- package/build/generators/Generator.d.ts +2 -2
- package/build/generators/builders/CalldataGenerator.js +2 -0
- package/build/generators/builders/CustomGenerator.d.ts +6 -0
- package/build/generators/builders/CustomGenerator.js +16 -0
- package/build/generators/builders/DeploymentGenerator.js +2 -0
- package/build/metadata/tokens.js +5 -5
- package/build/opnet.d.ts +5 -3
- package/build/opnet.js +5 -3
- package/build/transaction/TransactionFactory.d.ts +2 -0
- package/build/transaction/TransactionFactory.js +42 -3
- package/build/transaction/builders/CustomScriptTransaction.d.ts +40 -0
- package/build/transaction/builders/CustomScriptTransaction.js +165 -0
- package/build/transaction/enums/TransactionType.d.ts +2 -1
- package/build/transaction/enums/TransactionType.js +1 -0
- package/eslint.config.js +30 -0
- package/package.json +10 -9
- package/src/_version.ts +1 -1
- package/src/generators/Generator.ts +2 -2
- package/src/generators/builders/CalldataGenerator.ts +2 -0
- package/src/generators/builders/CustomGenerator.ts +30 -0
- package/src/generators/builders/DeploymentGenerator.ts +2 -0
- package/src/metadata/tokens.ts +5 -5
- package/src/opnet.ts +5 -5
- package/src/transaction/TransactionFactory.ts +72 -14
- package/src/transaction/builders/CustomScriptTransaction.ts +337 -0
- package/src/transaction/enums/TransactionType.ts +1 -0
- package/docs/.nojekyll +0 -1
- package/docs/assets/highlight.css +0 -43
- package/docs/assets/icons.js +0 -15
- package/docs/assets/icons.svg +0 -1
- package/docs/assets/main.js +0 -59
- package/docs/assets/material-style.css +0 -247
- package/docs/assets/navigation.js +0 -1
- package/docs/assets/search.js +0 -1
- package/docs/assets/style.css +0 -1412
- package/docs/classes/AddressGenerator.html +0 -177
- package/docs/classes/AddressVerificator.html +0 -177
- package/docs/classes/BitcoinUtils.html +0 -196
- package/docs/classes/CalldataGenerator.html +0 -213
- package/docs/classes/Compressor.html +0 -185
- package/docs/classes/ContractBaseMetadata.html +0 -182
- package/docs/classes/CustomKeypair.html +0 -189
- package/docs/classes/DeploymentGenerator.html +0 -201
- package/docs/classes/DeploymentTransaction.html +0 -465
- package/docs/classes/EcKeyPair.html +0 -280
- package/docs/classes/FundingTransaction.html +0 -425
- package/docs/classes/Generator.html +0 -199
- package/docs/classes/InteractionTransaction.html +0 -467
- package/docs/classes/MultiSignGenerator.html +0 -178
- package/docs/classes/MultiSignTransaction.html +0 -490
- package/docs/classes/OPNetLimitedProvider.html +0 -225
- package/docs/classes/OPNetTokenAddressManager.html +0 -182
- package/docs/classes/P2TR_MS.html +0 -186
- package/docs/classes/PsbtTransaction.html +0 -320
- package/docs/classes/SharedInteractionTransaction.html +0 -477
- package/docs/classes/TapscriptVerificator.html +0 -180
- package/docs/classes/TransactionBuilder.html +0 -423
- package/docs/classes/TransactionFactory.html +0 -230
- package/docs/classes/TweakedSigner.html +0 -181
- package/docs/classes/TweakedTransaction.html +0 -301
- package/docs/classes/UnisatSigner.html +0 -199
- package/docs/classes/UnwrapGeneration.html +0 -177
- package/docs/classes/UnwrapTransaction.html +0 -518
- package/docs/classes/Wallet.html +0 -204
- package/docs/classes/WrapTransaction.html +0 -509
- package/docs/classes/WrappedGeneration.html +0 -187
- package/docs/classes/wBTC.html +0 -190
- package/docs/enums/ChainId.html +0 -176
- package/docs/enums/Consensus.html +0 -204
- package/docs/enums/Features.html +0 -175
- package/docs/enums/MessageType.html +0 -176
- package/docs/enums/OPNetNetwork.html +0 -177
- package/docs/enums/PSBTTypes.html +0 -175
- package/docs/enums/TransactionSequence.html +0 -177
- package/docs/enums/TransactionType.html +0 -181
- package/docs/enums/UnisatChainType.html +0 -181
- package/docs/enums/UnisatNetwork.html +0 -177
- package/docs/hierarchy.html +0 -174
- package/docs/index.html +0 -215
- package/docs/interfaces/Balance.html +0 -177
- package/docs/interfaces/BitcoinTransferResponse.html +0 -178
- package/docs/interfaces/BroadcastResponse.html +0 -181
- package/docs/interfaces/BroadcastTransactionOptions.html +0 -176
- package/docs/interfaces/BroadcastedTransaction.html +0 -184
- package/docs/interfaces/ConsensusConfig.html +0 -182
- package/docs/interfaces/ContractAddressVerificationParams.html +0 -179
- package/docs/interfaces/DeploymentResult.html +0 -178
- package/docs/interfaces/FetchUTXOParams.html +0 -178
- package/docs/interfaces/FetchUTXOParamsMultiAddress.html +0 -178
- package/docs/interfaces/FundingTransactionResponse.html +0 -178
- package/docs/interfaces/GenerationConstraints.html +0 -182
- package/docs/interfaces/IDeploymentParameters.html +0 -186
- package/docs/interfaces/IFundingTransactionParameters.html +0 -186
- package/docs/interfaces/IInteractionParameters.html +0 -187
- package/docs/interfaces/ITransactionParameters.html +0 -184
- package/docs/interfaces/ITweakedTransactionData.html +0 -178
- package/docs/interfaces/IUnwrapParameters.html +0 -189
- package/docs/interfaces/IWBTCUTXODocument.html +0 -180
- package/docs/interfaces/IWallet.html +0 -181
- package/docs/interfaces/IWrapParameters.html +0 -190
- package/docs/interfaces/MultiSignFromBase64Params.html +0 -188
- package/docs/interfaces/MultiSignParameters.html +0 -188
- package/docs/interfaces/OPNetTokenMetadata.html +0 -179
- package/docs/interfaces/PsbtInputExtended.html +0 -194
- package/docs/interfaces/PsbtOutputExtendedAddress.html +0 -183
- package/docs/interfaces/PsbtOutputExtendedScript.html +0 -183
- package/docs/interfaces/PsbtSignatureOptions.html +0 -176
- package/docs/interfaces/PsbtTransactionData.html +0 -179
- package/docs/interfaces/RawUTXOResponse.html +0 -178
- package/docs/interfaces/SharedInteractionParameters.html +0 -187
- package/docs/interfaces/TapLeafScript.html +0 -177
- package/docs/interfaces/ToSignInputAddress.html +0 -178
- package/docs/interfaces/ToSignInputPublicKey.html +0 -178
- package/docs/interfaces/TweakSettings.html +0 -179
- package/docs/interfaces/UTXO.html +0 -178
- package/docs/interfaces/Unisat.html +0 -190
- package/docs/interfaces/UnisatChainInfo.html +0 -177
- package/docs/interfaces/UnwrapResult.html +0 -181
- package/docs/interfaces/UnwrappedGenerationParameters.html +0 -178
- package/docs/interfaces/UpdateInput.html +0 -175
- package/docs/interfaces/VaultUTXOs.html +0 -178
- package/docs/interfaces/Web3Provider.html +0 -180
- package/docs/interfaces/WrapResult.html +0 -179
- package/docs/interfaces/WrappedGenerationParameters.html +0 -184
- package/docs/modules.html +0 -289
- package/docs/types/FromBase64Params.html +0 -174
- package/docs/types/IDeploymentParametersWithoutSigner.html +0 -174
- package/docs/types/IUnwrapParametersWithoutSigner.html +0 -174
- package/docs/types/IWrapParametersWithoutSigner.html +0 -174
- package/docs/types/InteractionParametersWithoutSigner.html +0 -174
- package/docs/types/PsbtOutputExtended.html +0 -174
- package/docs/types/ToSignInput.html +0 -174
- package/docs/variables/FACTORY_ADDRESS_FRACTAL.html +0 -174
- package/docs/variables/FACTORY_ADDRESS_REGTEST.html +0 -174
- package/docs/variables/FACTORY_ADDRESS_TESTNET.html +0 -174
- package/docs/variables/MOTO_ADDRESS_FRACTAL.html +0 -174
- package/docs/variables/MOTO_ADDRESS_REGTEST.html +0 -174
- package/docs/variables/MOTO_ADDRESS_TESTNET.html +0 -174
- package/docs/variables/OPNetConsensusConfig.html +0 -174
- package/docs/variables/OPNetMetadata.html +0 -174
- package/docs/variables/POOL_ADDRESS_FRACTAL.html +0 -174
- package/docs/variables/POOL_ADDRESS_REGTEST.html +0 -174
- package/docs/variables/POOL_ADDRESS_TESTNET.html +0 -174
- package/docs/variables/ROUTER_ADDRESS_FRACTAL.html +0 -174
- package/docs/variables/ROUTER_ADDRESS_REGTEST.html +0 -174
- package/docs/variables/ROUTER_ADDRESS_TESTNET.html +0 -174
- package/docs/variables/RoswellConsensus.html +0 -174
- package/docs/variables/WBTC_ADDRESS_FRACTAL.html +0 -174
- package/docs/variables/WBTC_ADDRESS_REGTEST.html +0 -174
- package/docs/variables/WBTC_ADDRESS_TESTNET.html +0 -174
- package/docs/variables/currentConsensus.html +0 -174
- package/docs/variables/currentConsensusConfig.html +0 -174
- package/docs/variables/version.html +0 -174
package/browser/opnet.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ export * from './bytecode/Compressor.js';
|
|
|
3
3
|
export * from './generators/Generator.js';
|
|
4
4
|
export * from './generators/builders/CalldataGenerator.js';
|
|
5
5
|
export * from './generators/builders/DeploymentGenerator.js';
|
|
6
|
+
export * from './generators/builders/CustomGenerator.js';
|
|
7
|
+
export * from './generators/builders/MultiSignGenerator.js';
|
|
6
8
|
export * from './generators/Features.js';
|
|
7
9
|
export * from './generators/AddressGenerator.js';
|
|
8
10
|
export * from './verification/TapscriptVerificator.js';
|
|
@@ -23,6 +25,9 @@ export * from './transaction/builders/TransactionBuilder.js';
|
|
|
23
25
|
export * from './transaction/builders/WrapTransaction.js';
|
|
24
26
|
export * from './transaction/builders/SharedInteractionTransaction.js';
|
|
25
27
|
export * from './transaction/builders/DeploymentTransaction.js';
|
|
28
|
+
export * from './transaction/builders/UnwrapTransaction.js';
|
|
29
|
+
export * from './transaction/builders/CustomScriptTransaction.js';
|
|
30
|
+
export * from './transaction/builders/MultiSignTransaction.js';
|
|
26
31
|
export * from './wbtc/WrappedGenerationParameters.js';
|
|
27
32
|
export * from './wbtc/Generate.js';
|
|
28
33
|
export * from './network/ChainId.js';
|
|
@@ -33,10 +38,7 @@ export * from './transaction/processor/PsbtTransaction.js';
|
|
|
33
38
|
export * from './transaction/shared/TweakedTransaction.js';
|
|
34
39
|
export * from './utxo/interfaces/BroadcastResponse.js';
|
|
35
40
|
export * from './transaction/psbt/PSBTTypes.js';
|
|
36
|
-
export * from './transaction/builders/MultiSignTransaction.js';
|
|
37
|
-
export * from './generators/builders/MultiSignGenerator.js';
|
|
38
41
|
export * from './transaction/shared/P2TR_MS.js';
|
|
39
|
-
export * from './transaction/builders/UnwrapTransaction.js';
|
|
40
42
|
export * from './wbtc/UnwrapGeneration.js';
|
|
41
43
|
export * from './consensus/ConsensusConfig.js';
|
|
42
44
|
export * from './consensus/Consensus.js';
|
|
@@ -5,6 +5,7 @@ import { UTXO } from '../utxo/interfaces/IUTXO.js';
|
|
|
5
5
|
import { Address } from '@btc-vision/bsi-binary';
|
|
6
6
|
import { TransactionBuilder } from './builders/TransactionBuilder.js';
|
|
7
7
|
import { TransactionType } from './enums/TransactionType.js';
|
|
8
|
+
import { ICustomTransactionParameters } from './builders/CustomScriptTransaction.js';
|
|
8
9
|
export interface DeploymentResult {
|
|
9
10
|
readonly transaction: [string, string];
|
|
10
11
|
readonly contractAddress: Address;
|
|
@@ -38,6 +39,7 @@ export interface UnwrapResult {
|
|
|
38
39
|
}
|
|
39
40
|
export declare class TransactionFactory {
|
|
40
41
|
constructor();
|
|
42
|
+
createCustomScriptTransaction(interactionParameters: ICustomTransactionParameters): Promise<[string, string, UTXO[]]>;
|
|
41
43
|
signInteraction(interactionParameters: IInteractionParameters): Promise<[string, string, UTXO[]]>;
|
|
42
44
|
signDeployment(deploymentParameters: IDeploymentParameters): Promise<DeploymentResult>;
|
|
43
45
|
wrap(wrapParameters: Omit<IWrapParameters, 'calldata'>): Promise<WrapResult>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { TransactionType } from '../enums/TransactionType.js';
|
|
2
|
+
import { TapLeafScript } from '../interfaces/Tap.js';
|
|
3
|
+
import { SharedInteractionParameters } from '../interfaces/ITransactionParameters.js';
|
|
4
|
+
import { Address } from '@btc-vision/bsi-binary';
|
|
5
|
+
import { Payment, Psbt, Stack } from 'bitcoinjs-lib';
|
|
6
|
+
import { TransactionBuilder } from './TransactionBuilder.js';
|
|
7
|
+
export interface ICustomTransactionParameters extends SharedInteractionParameters {
|
|
8
|
+
readonly script: (Buffer | Stack)[];
|
|
9
|
+
readonly witnesses: Buffer[];
|
|
10
|
+
readonly to: Address;
|
|
11
|
+
}
|
|
12
|
+
export declare class CustomScriptTransaction extends TransactionBuilder<TransactionType.CUSTOM_CODE> {
|
|
13
|
+
type: TransactionType.CUSTOM_CODE;
|
|
14
|
+
protected readonly _scriptAddress: Address;
|
|
15
|
+
protected tapLeafScript: TapLeafScript | null;
|
|
16
|
+
private targetScriptRedeem;
|
|
17
|
+
private leftOverFundsScriptRedeem;
|
|
18
|
+
private readonly compiledTargetScript;
|
|
19
|
+
private readonly scriptTree;
|
|
20
|
+
private generator;
|
|
21
|
+
private readonly scriptSeed;
|
|
22
|
+
private readonly contractSigner;
|
|
23
|
+
private readonly randomBytes;
|
|
24
|
+
private readonly witnesses;
|
|
25
|
+
constructor(parameters: ICustomTransactionParameters);
|
|
26
|
+
get scriptAddress(): Address;
|
|
27
|
+
get p2trAddress(): Address;
|
|
28
|
+
getRndBytes(): Buffer;
|
|
29
|
+
protected contractSignerXOnlyPubKey(): Buffer;
|
|
30
|
+
protected buildTransaction(): Promise<void>;
|
|
31
|
+
protected signInputs(transaction: Psbt): Promise<void>;
|
|
32
|
+
protected generateScriptAddress(): Payment;
|
|
33
|
+
protected generateTapData(): Payment;
|
|
34
|
+
private getContractSeed;
|
|
35
|
+
private customFinalizer;
|
|
36
|
+
private getPubKeys;
|
|
37
|
+
private generateRedeemScripts;
|
|
38
|
+
private getLeafScript;
|
|
39
|
+
private getScriptTree;
|
|
40
|
+
}
|
package/build/_version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "1.0.
|
|
1
|
+
export declare const version = "1.0.101";
|
package/build/_version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '1.0.
|
|
1
|
+
export const version = '1.0.101';
|
|
@@ -3,9 +3,9 @@ export declare abstract class Generator {
|
|
|
3
3
|
static readonly DATA_CHUNK_SIZE: number;
|
|
4
4
|
static readonly MAGIC: Buffer;
|
|
5
5
|
protected readonly senderPubKey: Buffer;
|
|
6
|
-
protected readonly contractSaltPubKey
|
|
6
|
+
protected readonly contractSaltPubKey?: Buffer;
|
|
7
7
|
protected readonly network: Network;
|
|
8
|
-
protected constructor(senderPubKey: Buffer, contractSaltPubKey
|
|
8
|
+
protected constructor(senderPubKey: Buffer, contractSaltPubKey?: Buffer, network?: Network);
|
|
9
9
|
abstract compile(...args: unknown[]): Buffer;
|
|
10
10
|
protected splitBufferIntoChunks(buffer: Buffer, chunkSize?: number): Array<Buffer[]>;
|
|
11
11
|
}
|
|
@@ -25,6 +25,8 @@ export class CalldataGenerator extends Generator {
|
|
|
25
25
|
return compressed;
|
|
26
26
|
}
|
|
27
27
|
compile(calldata, contractSecret, features = [], vaultPublicKeys = [], minimumSignatures = 0) {
|
|
28
|
+
if (!this.contractSaltPubKey)
|
|
29
|
+
throw new Error('Contract salt public key not set');
|
|
28
30
|
const dataChunks = this.splitBufferIntoChunks(calldata);
|
|
29
31
|
if (!dataChunks.length)
|
|
30
32
|
throw new Error('No data chunks found');
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { networks, script } from 'bitcoinjs-lib';
|
|
2
|
+
import { Generator } from '../Generator.js';
|
|
3
|
+
export class CustomGenerator extends Generator {
|
|
4
|
+
constructor(senderPubKey, network = networks.bitcoin) {
|
|
5
|
+
super(senderPubKey, undefined, network);
|
|
6
|
+
}
|
|
7
|
+
compile(compiledData) {
|
|
8
|
+
const asm = compiledData.flat();
|
|
9
|
+
const compiled = script.compile(asm);
|
|
10
|
+
const decompiled = script.decompile(compiled);
|
|
11
|
+
if (!decompiled) {
|
|
12
|
+
throw new Error('Failed to decompile script??');
|
|
13
|
+
}
|
|
14
|
+
return compiled;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -14,6 +14,8 @@ export class DeploymentGenerator extends Generator {
|
|
|
14
14
|
return compiled;
|
|
15
15
|
}
|
|
16
16
|
getAsm(contractBytecode, contractSalt) {
|
|
17
|
+
if (!this.contractSaltPubKey)
|
|
18
|
+
throw new Error('Contract salt public key not set');
|
|
17
19
|
const dataChunks = this.splitBufferIntoChunks(contractBytecode);
|
|
18
20
|
return [
|
|
19
21
|
this.senderPubKey,
|
package/build/metadata/tokens.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ChainId } from '../network/ChainId.js';
|
|
2
|
-
export const FACTORY_ADDRESS_REGTEST = '
|
|
3
|
-
export const POOL_ADDRESS_REGTEST = '
|
|
4
|
-
export const WBTC_ADDRESS_REGTEST = '
|
|
5
|
-
export const MOTO_ADDRESS_REGTEST = '
|
|
6
|
-
export const ROUTER_ADDRESS_REGTEST = '
|
|
2
|
+
export const FACTORY_ADDRESS_REGTEST = 'bcrt1q9pf9fnpch9z2qrp5e3dgr2avzu3mypq3km2k40';
|
|
3
|
+
export const POOL_ADDRESS_REGTEST = 'bcrt1qg87nx9v9ln3qyadcn0llekzjn0hx8js46ztwky';
|
|
4
|
+
export const WBTC_ADDRESS_REGTEST = 'bcrt1qy44f5630m4ap4mvmgqc44qh4vndaees9y30t0m';
|
|
5
|
+
export const MOTO_ADDRESS_REGTEST = 'bcrt1q5txqpm5sy0s2xsprvce4ddj0088nlq8lazkd6n';
|
|
6
|
+
export const ROUTER_ADDRESS_REGTEST = 'bcrt1q9yd6mk324k0q4krmlxjky0pk65ul6hkf4u35e6';
|
|
7
7
|
export const FACTORY_ADDRESS_TESTNET = 'tb1qgev5kldhp5zvg6j8t9vl6x4phkrwn8nk9felxh';
|
|
8
8
|
export const POOL_ADDRESS_TESTNET = 'tb1q6a7yw353hjmresphupytw5vczpqxtg4yrupayk';
|
|
9
9
|
export const WBTC_ADDRESS_TESTNET = 'tb1qp28xna6pv47x6wflcplhu0a9hkld5shtvjx6xv';
|
package/build/opnet.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ export * from './bytecode/Compressor.js';
|
|
|
3
3
|
export * from './generators/Generator.js';
|
|
4
4
|
export * from './generators/builders/CalldataGenerator.js';
|
|
5
5
|
export * from './generators/builders/DeploymentGenerator.js';
|
|
6
|
+
export * from './generators/builders/CustomGenerator.js';
|
|
7
|
+
export * from './generators/builders/MultiSignGenerator.js';
|
|
6
8
|
export * from './generators/Features.js';
|
|
7
9
|
export * from './generators/AddressGenerator.js';
|
|
8
10
|
export * from './verification/TapscriptVerificator.js';
|
|
@@ -23,6 +25,9 @@ export * from './transaction/builders/TransactionBuilder.js';
|
|
|
23
25
|
export * from './transaction/builders/WrapTransaction.js';
|
|
24
26
|
export * from './transaction/builders/SharedInteractionTransaction.js';
|
|
25
27
|
export * from './transaction/builders/DeploymentTransaction.js';
|
|
28
|
+
export * from './transaction/builders/UnwrapTransaction.js';
|
|
29
|
+
export * from './transaction/builders/CustomScriptTransaction.js';
|
|
30
|
+
export * from './transaction/builders/MultiSignTransaction.js';
|
|
26
31
|
export * from './wbtc/WrappedGenerationParameters.js';
|
|
27
32
|
export * from './wbtc/Generate.js';
|
|
28
33
|
export * from './network/ChainId.js';
|
|
@@ -33,10 +38,7 @@ export * from './transaction/processor/PsbtTransaction.js';
|
|
|
33
38
|
export * from './transaction/shared/TweakedTransaction.js';
|
|
34
39
|
export * from './utxo/interfaces/BroadcastResponse.js';
|
|
35
40
|
export * from './transaction/psbt/PSBTTypes.js';
|
|
36
|
-
export * from './transaction/builders/MultiSignTransaction.js';
|
|
37
|
-
export * from './generators/builders/MultiSignGenerator.js';
|
|
38
41
|
export * from './transaction/shared/P2TR_MS.js';
|
|
39
|
-
export * from './transaction/builders/UnwrapTransaction.js';
|
|
40
42
|
export * from './wbtc/UnwrapGeneration.js';
|
|
41
43
|
export * from './consensus/ConsensusConfig.js';
|
|
42
44
|
export * from './consensus/Consensus.js';
|
package/build/opnet.js
CHANGED
|
@@ -3,6 +3,8 @@ export * from './bytecode/Compressor.js';
|
|
|
3
3
|
export * from './generators/Generator.js';
|
|
4
4
|
export * from './generators/builders/CalldataGenerator.js';
|
|
5
5
|
export * from './generators/builders/DeploymentGenerator.js';
|
|
6
|
+
export * from './generators/builders/CustomGenerator.js';
|
|
7
|
+
export * from './generators/builders/MultiSignGenerator.js';
|
|
6
8
|
export * from './generators/Features.js';
|
|
7
9
|
export * from './generators/AddressGenerator.js';
|
|
8
10
|
export * from './verification/TapscriptVerificator.js';
|
|
@@ -23,6 +25,9 @@ export * from './transaction/builders/TransactionBuilder.js';
|
|
|
23
25
|
export * from './transaction/builders/WrapTransaction.js';
|
|
24
26
|
export * from './transaction/builders/SharedInteractionTransaction.js';
|
|
25
27
|
export * from './transaction/builders/DeploymentTransaction.js';
|
|
28
|
+
export * from './transaction/builders/UnwrapTransaction.js';
|
|
29
|
+
export * from './transaction/builders/CustomScriptTransaction.js';
|
|
30
|
+
export * from './transaction/builders/MultiSignTransaction.js';
|
|
26
31
|
export * from './wbtc/WrappedGenerationParameters.js';
|
|
27
32
|
export * from './wbtc/Generate.js';
|
|
28
33
|
export * from './network/ChainId.js';
|
|
@@ -33,10 +38,7 @@ export * from './transaction/processor/PsbtTransaction.js';
|
|
|
33
38
|
export * from './transaction/shared/TweakedTransaction.js';
|
|
34
39
|
export * from './utxo/interfaces/BroadcastResponse.js';
|
|
35
40
|
export * from './transaction/psbt/PSBTTypes.js';
|
|
36
|
-
export * from './transaction/builders/MultiSignTransaction.js';
|
|
37
|
-
export * from './generators/builders/MultiSignGenerator.js';
|
|
38
41
|
export * from './transaction/shared/P2TR_MS.js';
|
|
39
|
-
export * from './transaction/builders/UnwrapTransaction.js';
|
|
40
42
|
export * from './wbtc/UnwrapGeneration.js';
|
|
41
43
|
export * from './consensus/ConsensusConfig.js';
|
|
42
44
|
export * from './consensus/Consensus.js';
|
|
@@ -5,6 +5,7 @@ import { UTXO } from '../utxo/interfaces/IUTXO.js';
|
|
|
5
5
|
import { Address } from '@btc-vision/bsi-binary';
|
|
6
6
|
import { TransactionBuilder } from './builders/TransactionBuilder.js';
|
|
7
7
|
import { TransactionType } from './enums/TransactionType.js';
|
|
8
|
+
import { ICustomTransactionParameters } from './builders/CustomScriptTransaction.js';
|
|
8
9
|
export interface DeploymentResult {
|
|
9
10
|
readonly transaction: [string, string];
|
|
10
11
|
readonly contractAddress: Address;
|
|
@@ -38,6 +39,7 @@ export interface UnwrapResult {
|
|
|
38
39
|
}
|
|
39
40
|
export declare class TransactionFactory {
|
|
40
41
|
constructor();
|
|
42
|
+
createCustomScriptTransaction(interactionParameters: ICustomTransactionParameters): Promise<[string, string, UTXO[]]>;
|
|
41
43
|
signInteraction(interactionParameters: IInteractionParameters): Promise<[string, string, UTXO[]]>;
|
|
42
44
|
signDeployment(deploymentParameters: IDeploymentParameters): Promise<DeploymentResult>;
|
|
43
45
|
wrap(wrapParameters: Omit<IWrapParameters, 'calldata'>): Promise<WrapResult>;
|
|
@@ -7,8 +7,50 @@ import { PSBTTypes } from './psbt/PSBTTypes.js';
|
|
|
7
7
|
import { UnwrapSegwitTransaction } from './builders/UnwrapSegwitTransaction.js';
|
|
8
8
|
import { UnwrapTransaction } from './builders/UnwrapTransaction.js';
|
|
9
9
|
import { currentConsensus, currentConsensusConfig } from '../consensus/ConsensusConfig.js';
|
|
10
|
+
import { CustomScriptTransaction, } from './builders/CustomScriptTransaction.js';
|
|
10
11
|
export class TransactionFactory {
|
|
11
12
|
constructor() { }
|
|
13
|
+
async createCustomScriptTransaction(interactionParameters) {
|
|
14
|
+
if (!interactionParameters.to) {
|
|
15
|
+
throw new Error('Field "to" not provided.');
|
|
16
|
+
}
|
|
17
|
+
if (!interactionParameters.from) {
|
|
18
|
+
throw new Error('Field "from" not provided.');
|
|
19
|
+
}
|
|
20
|
+
const preTransaction = new CustomScriptTransaction({
|
|
21
|
+
...interactionParameters,
|
|
22
|
+
utxos: [interactionParameters.utxos[0]],
|
|
23
|
+
});
|
|
24
|
+
await preTransaction.generateTransactionMinimalSignatures();
|
|
25
|
+
const parameters = await preTransaction.getFundingTransactionParameters();
|
|
26
|
+
parameters.utxos = interactionParameters.utxos;
|
|
27
|
+
parameters.amount =
|
|
28
|
+
(await preTransaction.estimateTransactionFees()) + interactionParameters.priorityFee;
|
|
29
|
+
const feeEstimationFundingTransaction = await this.createFundTransaction({ ...parameters });
|
|
30
|
+
if (!feeEstimationFundingTransaction) {
|
|
31
|
+
throw new Error('Could not sign funding transaction.');
|
|
32
|
+
}
|
|
33
|
+
parameters.estimatedFees = feeEstimationFundingTransaction.estimatedFees;
|
|
34
|
+
const signedTransaction = await this.createFundTransaction(parameters);
|
|
35
|
+
if (!signedTransaction) {
|
|
36
|
+
throw new Error('Could not sign funding transaction.');
|
|
37
|
+
}
|
|
38
|
+
interactionParameters.utxos = this.getUTXOAsTransaction(signedTransaction.tx, interactionParameters.to, 0);
|
|
39
|
+
const newParams = {
|
|
40
|
+
...interactionParameters,
|
|
41
|
+
utxos: this.getUTXOAsTransaction(signedTransaction.tx, interactionParameters.to, 0),
|
|
42
|
+
randomBytes: preTransaction.getRndBytes(),
|
|
43
|
+
nonWitnessUtxo: signedTransaction.tx.toBuffer(),
|
|
44
|
+
estimatedFees: preTransaction.estimatedFees,
|
|
45
|
+
};
|
|
46
|
+
const finalTransaction = new CustomScriptTransaction(newParams);
|
|
47
|
+
const outTx = await finalTransaction.signTransaction();
|
|
48
|
+
return [
|
|
49
|
+
signedTransaction.tx.toHex(),
|
|
50
|
+
outTx.toHex(),
|
|
51
|
+
this.getUTXOAsTransaction(signedTransaction.tx, interactionParameters.from, 1),
|
|
52
|
+
];
|
|
53
|
+
}
|
|
12
54
|
async signInteraction(interactionParameters) {
|
|
13
55
|
if (!interactionParameters.to) {
|
|
14
56
|
throw new Error('Field "to" not provided.');
|
|
@@ -113,7 +155,6 @@ export class TransactionFactory {
|
|
|
113
155
|
const preTransaction = new WrapTransaction(wrapParameters);
|
|
114
156
|
await preTransaction.signTransaction();
|
|
115
157
|
const parameters = await preTransaction.getFundingTransactionParameters();
|
|
116
|
-
console.log('wrap parameters', parameters);
|
|
117
158
|
parameters.amount += childTransactionRequiredValue;
|
|
118
159
|
parameters.utxos = fundingParameters.utxos;
|
|
119
160
|
const signedTransaction = await this.createFundTransaction(parameters);
|
|
@@ -145,7 +186,6 @@ export class TransactionFactory {
|
|
|
145
186
|
throw new Error('To address is required');
|
|
146
187
|
const estimatedGas = await transaction.estimateTransactionFees();
|
|
147
188
|
const estimatedFees = transaction.preEstimateTransactionFees(BigInt(unwrapParameters.feeRate), this.calculateNumInputs(unwrapParameters.unwrapUTXOs), 2n, this.calculateNumSignatures(unwrapParameters.unwrapUTXOs), this.maxPubKeySize(unwrapParameters.unwrapUTXOs));
|
|
148
|
-
console.log('estimatedFees', estimatedFees, 'estimatedGas', estimatedGas, 'priority', unwrapParameters.priorityFee);
|
|
149
189
|
const fundingParameters = {
|
|
150
190
|
...unwrapParameters,
|
|
151
191
|
amount: estimatedGas + estimatedFees,
|
|
@@ -208,7 +248,6 @@ export class TransactionFactory {
|
|
|
208
248
|
parameters.utxos = fundingParameters.utxos;
|
|
209
249
|
parameters.amount =
|
|
210
250
|
(await preTransaction.estimateTransactionFees()) + unwrapParameters.priorityFee;
|
|
211
|
-
console.log('parameters', parameters);
|
|
212
251
|
const signedTransaction = await this.createFundTransaction(parameters);
|
|
213
252
|
if (!signedTransaction) {
|
|
214
253
|
throw new Error('Could not sign funding transaction.');
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { TransactionType } from '../enums/TransactionType.js';
|
|
2
|
+
import { TapLeafScript } from '../interfaces/Tap.js';
|
|
3
|
+
import { SharedInteractionParameters } from '../interfaces/ITransactionParameters.js';
|
|
4
|
+
import { Address } from '@btc-vision/bsi-binary';
|
|
5
|
+
import { Payment, Psbt, Stack } from 'bitcoinjs-lib';
|
|
6
|
+
import { TransactionBuilder } from './TransactionBuilder.js';
|
|
7
|
+
export interface ICustomTransactionParameters extends SharedInteractionParameters {
|
|
8
|
+
readonly script: (Buffer | Stack)[];
|
|
9
|
+
readonly witnesses: Buffer[];
|
|
10
|
+
readonly to: Address;
|
|
11
|
+
}
|
|
12
|
+
export declare class CustomScriptTransaction extends TransactionBuilder<TransactionType.CUSTOM_CODE> {
|
|
13
|
+
type: TransactionType.CUSTOM_CODE;
|
|
14
|
+
protected readonly _scriptAddress: Address;
|
|
15
|
+
protected tapLeafScript: TapLeafScript | null;
|
|
16
|
+
private targetScriptRedeem;
|
|
17
|
+
private leftOverFundsScriptRedeem;
|
|
18
|
+
private readonly compiledTargetScript;
|
|
19
|
+
private readonly scriptTree;
|
|
20
|
+
private generator;
|
|
21
|
+
private readonly scriptSeed;
|
|
22
|
+
private readonly contractSigner;
|
|
23
|
+
private readonly randomBytes;
|
|
24
|
+
private readonly witnesses;
|
|
25
|
+
constructor(parameters: ICustomTransactionParameters);
|
|
26
|
+
get scriptAddress(): Address;
|
|
27
|
+
get p2trAddress(): Address;
|
|
28
|
+
getRndBytes(): Buffer;
|
|
29
|
+
protected contractSignerXOnlyPubKey(): Buffer;
|
|
30
|
+
protected buildTransaction(): Promise<void>;
|
|
31
|
+
protected signInputs(transaction: Psbt): Promise<void>;
|
|
32
|
+
protected generateScriptAddress(): Payment;
|
|
33
|
+
protected generateTapData(): Payment;
|
|
34
|
+
private getContractSeed;
|
|
35
|
+
private customFinalizer;
|
|
36
|
+
private getPubKeys;
|
|
37
|
+
private generateRedeemScripts;
|
|
38
|
+
private getLeafScript;
|
|
39
|
+
private getScriptTree;
|
|
40
|
+
}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { TransactionType } from '../enums/TransactionType.js';
|
|
2
|
+
import { crypto as bitCrypto } from 'bitcoinjs-lib';
|
|
3
|
+
import { TransactionBuilder } from './TransactionBuilder.js';
|
|
4
|
+
import { CustomGenerator } from '../../generators/builders/CustomGenerator.js';
|
|
5
|
+
import { BitcoinUtils } from '../../utils/BitcoinUtils.js';
|
|
6
|
+
import { EcKeyPair } from '../../keypair/EcKeyPair.js';
|
|
7
|
+
import { AddressGenerator } from '../../generators/AddressGenerator.js';
|
|
8
|
+
import { toXOnly } from 'bitcoinjs-lib/src/psbt/bip371.js';
|
|
9
|
+
export class CustomScriptTransaction extends TransactionBuilder {
|
|
10
|
+
constructor(parameters) {
|
|
11
|
+
super(parameters);
|
|
12
|
+
this.type = TransactionType.CUSTOM_CODE;
|
|
13
|
+
this.tapLeafScript = null;
|
|
14
|
+
this.targetScriptRedeem = null;
|
|
15
|
+
this.leftOverFundsScriptRedeem = null;
|
|
16
|
+
this.customFinalizer = (_inputIndex, input) => {
|
|
17
|
+
if (!this.tapLeafScript) {
|
|
18
|
+
throw new Error('Tap leaf script is required');
|
|
19
|
+
}
|
|
20
|
+
if (!input.tapScriptSig) {
|
|
21
|
+
throw new Error('Tap script signature is required');
|
|
22
|
+
}
|
|
23
|
+
const scriptSolution = this.witnesses;
|
|
24
|
+
const witness = scriptSolution
|
|
25
|
+
.concat(this.tapLeafScript.script)
|
|
26
|
+
.concat(this.tapLeafScript.controlBlock);
|
|
27
|
+
return {
|
|
28
|
+
finalScriptWitness: TransactionBuilder.witnessStackToScriptWitness(witness),
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
if (!parameters.script)
|
|
32
|
+
throw new Error('Bitcoin script is required');
|
|
33
|
+
if (!parameters.witnesses)
|
|
34
|
+
throw new Error('Witness(es) are required');
|
|
35
|
+
this.witnesses = parameters.witnesses;
|
|
36
|
+
this.randomBytes = parameters.randomBytes || BitcoinUtils.rndBytes();
|
|
37
|
+
this.scriptSeed = this.getContractSeed();
|
|
38
|
+
this.contractSigner = EcKeyPair.fromSeedKeyPair(this.scriptSeed, this.network);
|
|
39
|
+
this.generator = new CustomGenerator(this.internalPubKeyToXOnly(), this.network);
|
|
40
|
+
this.compiledTargetScript = this.generator.compile(parameters.script);
|
|
41
|
+
this.scriptTree = this.getScriptTree();
|
|
42
|
+
this.internalInit();
|
|
43
|
+
this._scriptAddress = AddressGenerator.generatePKSH(this.scriptSeed, this.network);
|
|
44
|
+
}
|
|
45
|
+
get scriptAddress() {
|
|
46
|
+
return this._scriptAddress;
|
|
47
|
+
}
|
|
48
|
+
get p2trAddress() {
|
|
49
|
+
return this.to || this.getScriptAddress();
|
|
50
|
+
}
|
|
51
|
+
getRndBytes() {
|
|
52
|
+
return this.randomBytes;
|
|
53
|
+
}
|
|
54
|
+
contractSignerXOnlyPubKey() {
|
|
55
|
+
return toXOnly(this.contractSigner.publicKey);
|
|
56
|
+
}
|
|
57
|
+
async buildTransaction() {
|
|
58
|
+
if (!this.to) {
|
|
59
|
+
this.to = this.getScriptAddress();
|
|
60
|
+
}
|
|
61
|
+
const selectedRedeem = !!this.contractSigner
|
|
62
|
+
? this.targetScriptRedeem
|
|
63
|
+
: this.leftOverFundsScriptRedeem;
|
|
64
|
+
if (!selectedRedeem) {
|
|
65
|
+
throw new Error('Left over funds script redeem is required');
|
|
66
|
+
}
|
|
67
|
+
if (!selectedRedeem.redeemVersion) {
|
|
68
|
+
throw new Error('Left over funds script redeem version is required');
|
|
69
|
+
}
|
|
70
|
+
if (!selectedRedeem.output) {
|
|
71
|
+
throw new Error('Left over funds script redeem output is required');
|
|
72
|
+
}
|
|
73
|
+
this.tapLeafScript = {
|
|
74
|
+
leafVersion: selectedRedeem.redeemVersion,
|
|
75
|
+
script: selectedRedeem.output,
|
|
76
|
+
controlBlock: this.getWitness(),
|
|
77
|
+
};
|
|
78
|
+
this.addInputsFromUTXO();
|
|
79
|
+
const amountSpent = this.getTransactionOPNetFee();
|
|
80
|
+
this.addOutput({
|
|
81
|
+
value: Number(amountSpent),
|
|
82
|
+
address: this.to,
|
|
83
|
+
});
|
|
84
|
+
await this.addRefundOutput(amountSpent);
|
|
85
|
+
}
|
|
86
|
+
async signInputs(transaction) {
|
|
87
|
+
if (!this.contractSigner) {
|
|
88
|
+
await super.signInputs(transaction);
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
for (let i = 0; i < transaction.data.inputs.length; i++) {
|
|
92
|
+
if (i === 0) {
|
|
93
|
+
transaction.signInput(0, this.contractSigner);
|
|
94
|
+
transaction.signInput(0, this.getSignerKey());
|
|
95
|
+
transaction.finalizeInput(0, this.customFinalizer);
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
transaction.signInput(i, this.getSignerKey());
|
|
99
|
+
transaction.finalizeInput(i);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
generateScriptAddress() {
|
|
104
|
+
return {
|
|
105
|
+
internalPubkey: this.internalPubKeyToXOnly(),
|
|
106
|
+
network: this.network,
|
|
107
|
+
scriptTree: this.scriptTree,
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
generateTapData() {
|
|
111
|
+
const selectedRedeem = !!this.contractSigner
|
|
112
|
+
? this.targetScriptRedeem
|
|
113
|
+
: this.leftOverFundsScriptRedeem;
|
|
114
|
+
if (!selectedRedeem) {
|
|
115
|
+
throw new Error('Left over funds script redeem is required');
|
|
116
|
+
}
|
|
117
|
+
if (!this.scriptTree) {
|
|
118
|
+
throw new Error('Script tree is required');
|
|
119
|
+
}
|
|
120
|
+
return {
|
|
121
|
+
internalPubkey: this.internalPubKeyToXOnly(),
|
|
122
|
+
network: this.network,
|
|
123
|
+
scriptTree: this.scriptTree,
|
|
124
|
+
redeem: selectedRedeem,
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
getContractSeed() {
|
|
128
|
+
return bitCrypto.hash256(this.randomBytes);
|
|
129
|
+
}
|
|
130
|
+
getPubKeys() {
|
|
131
|
+
const pubkeys = [this.signer.publicKey];
|
|
132
|
+
if (this.contractSigner) {
|
|
133
|
+
pubkeys.push(this.contractSigner.publicKey);
|
|
134
|
+
}
|
|
135
|
+
return pubkeys;
|
|
136
|
+
}
|
|
137
|
+
generateRedeemScripts() {
|
|
138
|
+
this.targetScriptRedeem = {
|
|
139
|
+
pubkeys: this.getPubKeys(),
|
|
140
|
+
output: this.compiledTargetScript,
|
|
141
|
+
redeemVersion: 192,
|
|
142
|
+
};
|
|
143
|
+
this.leftOverFundsScriptRedeem = {
|
|
144
|
+
pubkeys: this.getPubKeys(),
|
|
145
|
+
output: this.getLeafScript(),
|
|
146
|
+
redeemVersion: 192,
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
getLeafScript() {
|
|
150
|
+
return TransactionBuilder.LOCK_LEAF_SCRIPT;
|
|
151
|
+
}
|
|
152
|
+
getScriptTree() {
|
|
153
|
+
this.generateRedeemScripts();
|
|
154
|
+
return [
|
|
155
|
+
{
|
|
156
|
+
output: this.compiledTargetScript,
|
|
157
|
+
version: 192,
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
output: this.getLeafScript(),
|
|
161
|
+
version: 192,
|
|
162
|
+
},
|
|
163
|
+
];
|
|
164
|
+
}
|
|
165
|
+
}
|
|
@@ -7,4 +7,5 @@ export var TransactionType;
|
|
|
7
7
|
TransactionType[TransactionType["WBTC_WRAP"] = 4] = "WBTC_WRAP";
|
|
8
8
|
TransactionType[TransactionType["WBTC_UNWRAP"] = 5] = "WBTC_UNWRAP";
|
|
9
9
|
TransactionType[TransactionType["MULTI_SIG"] = 6] = "MULTI_SIG";
|
|
10
|
+
TransactionType[TransactionType["CUSTOM_CODE"] = 7] = "CUSTOM_CODE";
|
|
10
11
|
})(TransactionType || (TransactionType = {}));
|
package/eslint.config.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
|
|
3
|
+
import tseslint from 'typescript-eslint';
|
|
4
|
+
import eslint from '@eslint/js';
|
|
5
|
+
|
|
6
|
+
export default tseslint.config(
|
|
7
|
+
eslint.configs.recommended,
|
|
8
|
+
...tseslint.configs.strictTypeChecked,
|
|
9
|
+
{
|
|
10
|
+
languageOptions: {
|
|
11
|
+
parserOptions: {
|
|
12
|
+
projectService: true,
|
|
13
|
+
tsconfigDirName: import.meta.dirname,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
rules: {
|
|
17
|
+
'no-undef': 'off',
|
|
18
|
+
'@typescript-eslint/no-unused-vars': 'warn',
|
|
19
|
+
'no-empty': 'off',
|
|
20
|
+
'@typescript-eslint/restrict-template-expressions': 'off',
|
|
21
|
+
'@typescript-eslint/only-throw-error': 'off',
|
|
22
|
+
'@typescript-eslint/no-unnecessary-condition': 'off',
|
|
23
|
+
'@typescript-eslint/unbound-method': 'warn',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
files: ['**/*.js'],
|
|
28
|
+
...tseslint.configs.disableTypeChecked,
|
|
29
|
+
},
|
|
30
|
+
);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@btc-vision/transaction",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.101",
|
|
5
5
|
"author": "BlobMaster41",
|
|
6
6
|
"description": "OPNet transaction library allows you to create and sign transactions for the OPNet network.",
|
|
7
7
|
"engines": {
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
"@babel/preset-flow": "^7.24.1",
|
|
69
69
|
"@babel/preset-react": "^7.24.1",
|
|
70
70
|
"@babel/preset-typescript": "^7.24.1",
|
|
71
|
-
"@types/node": "^
|
|
72
|
-
"eslint": "^
|
|
71
|
+
"@types/node": "^22.5.5",
|
|
72
|
+
"eslint": "^9.10.0",
|
|
73
73
|
"gulp": "^5.0.0",
|
|
74
74
|
"gulp-cached": "^1.1.1",
|
|
75
75
|
"gulp-logger": "^0.0.2",
|
|
@@ -79,18 +79,19 @@
|
|
|
79
79
|
"prettier": "^3.3.1",
|
|
80
80
|
"stream-browserify": "^3.0.0",
|
|
81
81
|
"stream-http": "^3.2.0",
|
|
82
|
-
"typedoc": "^0.
|
|
83
|
-
"typedoc-material-theme": "^1.0
|
|
84
|
-
"typescript-eslint": "^
|
|
85
|
-
"webpack": "^5.
|
|
82
|
+
"typedoc": "^0.26.7",
|
|
83
|
+
"typedoc-material-theme": "^1.1.0",
|
|
84
|
+
"typescript-eslint": "^8.5.0",
|
|
85
|
+
"webpack": "^5.94.0",
|
|
86
86
|
"webpack-cli": "^5.1.4"
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {
|
|
89
89
|
"@babel/plugin-proposal-object-rest-spread": "^7.20.7",
|
|
90
90
|
"@bitcoinerlab/secp256k1": "^1.1.1",
|
|
91
|
-
"@btc-vision/bsi-binary": "^1.0.
|
|
91
|
+
"@btc-vision/bsi-binary": "^1.0.39",
|
|
92
92
|
"@btc-vision/bsi-bitcoin-rpc": "^1.0.26",
|
|
93
93
|
"@btc-vision/logger": "^1.0.4",
|
|
94
|
+
"@eslint/js": "^9.10.0",
|
|
94
95
|
"assert": "^2.1.0",
|
|
95
96
|
"babel-loader": "^9.1.3",
|
|
96
97
|
"babel-plugin-transform-import-meta": "^2.2.1",
|
|
@@ -107,6 +108,6 @@
|
|
|
107
108
|
"process": "^0.11.10",
|
|
108
109
|
"ts-loader": "^9.5.1",
|
|
109
110
|
"ts-node": "^10.9.2",
|
|
110
|
-
"typescript": "^5.
|
|
111
|
+
"typescript": "^5.6.2"
|
|
111
112
|
}
|
|
112
113
|
}
|
package/src/_version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '1.0.
|
|
1
|
+
export const version = '1.0.101';
|