@btc-vision/transaction 1.0.61 → 1.0.62
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/.gitattributes +2 -2
- package/browser/_version.d.ts +1 -1
- package/browser/index.js +1 -1
- package/browser/transaction/TransactionFactory.d.ts +1 -0
- package/browser/transaction/builders/TapUnwarpTransaction.d.ts +40 -40
- package/browser/transaction/builders/UnwarpTransaction.d.ts +34 -34
- package/browser/utxo/UTXOManager.d.ts +7 -7
- package/build/_version.d.ts +1 -1
- package/build/_version.js +1 -1
- package/build/transaction/TransactionFactory.d.ts +1 -0
- package/build/transaction/TransactionFactory.js +4 -0
- package/gulpfile.js +152 -152
- package/package.json +1 -1
- package/src/_version.ts +1 -1
- package/src/consensus/Consensus.ts +36 -36
- package/src/consensus/ConsensusConfig.ts +39 -39
- package/src/crypto/crypto-browser.js +75 -75
- package/src/generators/AddressGenerator.ts +24 -24
- package/src/generators/Features.ts +5 -5
- package/src/generators/Generator.ts +75 -75
- package/src/generators/builders/CalldataGenerator.ts +148 -148
- package/src/generators/builders/DeploymentGenerator.ts +66 -66
- package/src/index.ts +4 -4
- package/src/keypair/AddressVerificator.ts +40 -40
- package/src/keypair/EcKeyPair.ts +282 -282
- package/src/keypair/Wallet.ts +97 -97
- package/src/keypair/interfaces/IWallet.ts +19 -19
- package/src/metadata/ContractBaseMetadata.ts +23 -23
- package/src/network/NetworkInformation.ts +7 -7
- package/src/opnet.ts +84 -84
- package/src/transaction/TransactionFactory.ts +6 -0
- package/src/transaction/browser/BrowserSignerBase.ts +37 -37
- package/src/transaction/browser/Web3Provider.ts +46 -46
- package/src/transaction/browser/extensions/UnisatSigner.ts +218 -218
- package/src/transaction/browser/types/Unisat.ts +80 -80
- package/src/transaction/builders/FundingTransaction.ts +40 -40
- package/src/transaction/builders/InteractionTransaction.ts +38 -38
- package/src/transaction/builders/SharedInteractionTransaction.ts +368 -368
- package/src/transaction/builders/TransactionBuilder.ts +665 -665
- package/src/transaction/interfaces/Tap.ts +26 -26
- package/src/transaction/psbt/PSBTTypes.ts +3 -3
- package/src/transaction/shared/TweakedTransaction.ts +537 -537
- package/src/utxo/OPNetLimitedProvider.ts +244 -244
- package/src/utxo/interfaces/BroadcastResponse.ts +10 -10
- package/src/utxo/interfaces/IUTXO.ts +29 -29
- package/src/verification/TapscriptVerificator.ts +89 -89
- package/src/wbtc/Generate.ts +40 -40
- package/src/wbtc/UnwrapGeneration.ts +13 -13
- package/src/wbtc/WrappedGenerationParameters.ts +33 -33
- package/webpack.config.js +78 -78
- package/build/Utils.d.ts +0 -0
- package/build/Utils.js +0 -1
- package/build/consensus/metadata/RoswsellConsensus.d.ts +0 -2
- package/build/consensus/metadata/RoswsellConsensus.js +0 -4
- package/build/contracts/ContractMetadataManager.d.ts +0 -0
- package/build/contracts/ContractMetadataManager.js +0 -1
- package/build/generators/OPNetAddressGenerator.d.ts +0 -0
- package/build/generators/OPNetAddressGenerator.js +0 -1
- package/build/generators/builders/UnwrapGenerator.d.ts +0 -8
- package/build/generators/builders/UnwrapGenerator.js +0 -79
- package/build/keypair/interfaces/GeneratedWallet.d.ts +0 -5
- package/build/keypair/interfaces/GeneratedWallet.js +0 -1
- package/build/metadata/CommonContracts.d.ts +0 -6
- package/build/metadata/CommonContracts.js +0 -5
- package/build/metadata/ContractMetadataManager.d.ts +0 -1
- package/build/metadata/ContractMetadataManager.js +0 -9
- package/build/metadata/contracts/ContractBase.d.ts +0 -9
- package/build/metadata/contracts/ContractBase.js +0 -13
- package/build/metadata/contracts/ContractBaseMetadata.d.ts +0 -9
- package/build/metadata/contracts/ContractBaseMetadata.js +0 -13
- package/build/metadata/contracts/ContractMetadataManager.d.ts +0 -0
- package/build/metadata/contracts/ContractMetadataManager.js +0 -1
- package/build/network/NetworkConverter.d.ts +0 -0
- package/build/network/NetworkConverter.js +0 -14
- package/build/scripts/Regtest.d.ts +0 -2
- package/build/scripts/Regtest.js +0 -15
- package/build/scripts/test.d.ts +0 -1
- package/build/scripts/test.js +0 -74
- package/build/signer/Regtest.d.ts +0 -2
- package/build/signer/Regtest.js +0 -15
- package/build/tests/Regtest.d.ts +0 -3
- package/build/tests/Regtest.js +0 -29
- package/build/tests/adaptPSBT.d.ts +0 -1
- package/build/tests/adaptPSBT.js +0 -44
- package/build/tests/btc/send.d.ts +0 -1
- package/build/tests/btc/send.js +0 -35
- package/build/tests/btc/transfer.d.ts +0 -1
- package/build/tests/btc/transfer.js +0 -35
- package/build/tests/createPairReg.d.ts +0 -1
- package/build/tests/createPairReg.js +0 -73
- package/build/tests/deploy/deployMoto.d.ts +0 -4
- package/build/tests/deploy/deployMoto.js +0 -89
- package/build/tests/deploy/deployPool.d.ts +0 -1
- package/build/tests/deploy/deployPool.js +0 -5
- package/build/tests/deploy/deployStep1.d.ts +0 -1
- package/build/tests/deploy/deployStep1.js +0 -5
- package/build/tests/deploy/deployStep2.d.ts +0 -1
- package/build/tests/deploy/deployStep2.js +0 -5
- package/build/tests/deploy/deployStep3.d.ts +0 -1
- package/build/tests/deploy/deployStep3.js +0 -5
- package/build/tests/deploy.d.ts +0 -1
- package/build/tests/deploy.js +0 -41
- package/build/tests/deployMotoRegStep1.d.ts +0 -1
- package/build/tests/deployMotoRegStep1.js +0 -85
- package/build/tests/deployReg.d.ts +0 -1
- package/build/tests/deployReg.js +0 -85
- package/build/tests/factory/createPairReg.d.ts +0 -1
- package/build/tests/factory/createPairReg.js +0 -13
- package/build/tests/gen.d.ts +0 -1
- package/build/tests/gen.js +0 -19
- package/build/tests/interaction.d.ts +0 -5
- package/build/tests/interaction.js +0 -62
- package/build/tests/massWrapReg.d.ts +0 -1
- package/build/tests/massWrapReg.js +0 -105
- package/build/tests/mineReg.d.ts +0 -1
- package/build/tests/mineReg.js +0 -19
- package/build/tests/moto/airdropToken.d.ts +0 -1
- package/build/tests/moto/airdropToken.js +0 -21
- package/build/tests/moto/airdropTokens.d.ts +0 -1
- package/build/tests/moto/airdropTokens.js +0 -60
- package/build/tests/moto/allowance.d.ts +0 -1
- package/build/tests/moto/allowance.js +0 -6
- package/build/tests/moto/approve.d.ts +0 -1
- package/build/tests/moto/approve.js +0 -10
- package/build/tests/moto/approveWBTC.d.ts +0 -1
- package/build/tests/moto/approveWBTC.js +0 -12
- package/build/tests/moto/balanceOf.d.ts +0 -1
- package/build/tests/moto/balanceOf.js +0 -12
- package/build/tests/moto/transfer.d.ts +0 -1
- package/build/tests/moto/transfer.js +0 -16
- package/build/tests/motoswap/airdropToken.d.ts +0 -11
- package/build/tests/motoswap/airdropToken.js +0 -36
- package/build/tests/motoswap/deployMoto.d.ts +0 -4
- package/build/tests/motoswap/deployMoto.js +0 -89
- package/build/tests/motoswap/deployMotoRegStep1.d.ts +0 -1
- package/build/tests/motoswap/deployMotoRegStep1.js +0 -91
- package/build/tests/motoswap/deployMotoRegStep2.d.ts +0 -1
- package/build/tests/motoswap/deployMotoRegStep2.js +0 -91
- package/build/tests/motoswap/deployPool.d.ts +0 -1
- package/build/tests/motoswap/deployPool.js +0 -5
- package/build/tests/motoswap/deployStep1.d.ts +0 -1
- package/build/tests/motoswap/deployStep1.js +0 -5
- package/build/tests/motoswap/deployStep2.d.ts +0 -1
- package/build/tests/motoswap/deployStep2.js +0 -5
- package/build/tests/motoswap/deployStep3.d.ts +0 -1
- package/build/tests/motoswap/deployStep3.js +0 -5
- package/build/tests/motoswap/interaction.d.ts +0 -3
- package/build/tests/motoswap/interaction.js +0 -63
- package/build/tests/motoswap/routerAddLiquidity.d.ts +0 -11
- package/build/tests/motoswap/routerAddLiquidity.js +0 -35
- package/build/tests/motoswap-router/addLiquidity.d.ts +0 -11
- package/build/tests/motoswap-router/addLiquidity.js +0 -36
- package/build/tests/motoswap-router/deployMoto.d.ts +0 -4
- package/build/tests/motoswap-router/deployMoto.js +0 -89
- package/build/tests/motoswap-router/deployPool.d.ts +0 -1
- package/build/tests/motoswap-router/deployPool.js +0 -5
- package/build/tests/motoswap-router/deployStep1.d.ts +0 -1
- package/build/tests/motoswap-router/deployStep1.js +0 -5
- package/build/tests/motoswap-router/deployStep2.d.ts +0 -1
- package/build/tests/motoswap-router/deployStep2.js +0 -5
- package/build/tests/motoswap-router/deployStep3.d.ts +0 -1
- package/build/tests/motoswap-router/deployStep3.js +0 -5
- package/build/tests/motoswap-router/getAmountsOut.d.ts +0 -5
- package/build/tests/motoswap-router/getAmountsOut.js +0 -34
- package/build/tests/motoswap-router/routerAddLiquidity.d.ts +0 -11
- package/build/tests/motoswap-router/routerAddLiquidity.js +0 -35
- package/build/tests/motoswap-router/swap.d.ts +0 -8
- package/build/tests/motoswap-router/swap.js +0 -24
- package/build/tests/multisign.d.ts +0 -1
- package/build/tests/multisign.js +0 -47
- package/build/tests/multisign2.d.ts +0 -1
- package/build/tests/multisign2.js +0 -27
- package/build/tests/pool/DecodePoolAddress.d.ts +0 -6
- package/build/tests/pool/DecodePoolAddress.js +0 -12
- package/build/tests/pool/decodeReserves.d.ts +0 -5
- package/build/tests/pool/decodeReserves.js +0 -13
- package/build/tests/pool/reserves.d.ts +0 -1
- package/build/tests/pool/reserves.js +0 -18
- package/build/tests/shared/Utils.d.ts +0 -2
- package/build/tests/shared/Utils.js +0 -14
- package/build/tests/shared/interaction.d.ts +0 -7
- package/build/tests/shared/interaction.js +0 -85
- package/build/tests/shared/tokens.d.ts +0 -6
- package/build/tests/shared/tokens.js +0 -5
- package/build/tests/stakeReg.d.ts +0 -1
- package/build/tests/stakeReg.js +0 -73
- package/build/tests/stakedReg.d.ts +0 -1
- package/build/tests/stakedReg.js +0 -28
- package/build/tests/test.d.ts +0 -1
- package/build/tests/test.js +0 -51
- package/build/tests/test2.d.ts +0 -1
- package/build/tests/test2.js +0 -73
- package/build/tests/testReg.d.ts +0 -1
- package/build/tests/testReg.js +0 -91
- package/build/tests/tokens.d.ts +0 -6
- package/build/tests/tokens.js +0 -5
- package/build/tests/totalRewardReg.d.ts +0 -1
- package/build/tests/totalRewardReg.js +0 -28
- package/build/tests/transfer.d.ts +0 -1
- package/build/tests/transfer.js +0 -74
- package/build/tests/transferReg.d.ts +0 -1
- package/build/tests/transferReg.js +0 -74
- package/build/tests/unStakeReg.d.ts +0 -1
- package/build/tests/unStakeReg.js +0 -72
- package/build/tests/unwrapReg.d.ts +0 -1
- package/build/tests/unwrapReg.js +0 -61
- package/build/tests/unwrapReg2.d.ts +0 -1
- package/build/tests/unwrapReg2.js +0 -56
- package/build/tests/unwrapRegSegwit.d.ts +0 -1
- package/build/tests/unwrapRegSegwit.js +0 -83
- package/build/tests/wbtc/approve.d.ts +0 -1
- package/build/tests/wbtc/approve.js +0 -6
- package/build/tests/wbtc/approveWBTC.d.ts +0 -1
- package/build/tests/wbtc/approveWBTC.js +0 -12
- package/build/tests/wbtc/massWrapReg.d.ts +0 -1
- package/build/tests/wbtc/massWrapReg.js +0 -105
- package/build/tests/wbtc/transfer.d.ts +0 -1
- package/build/tests/wbtc/transfer.js +0 -16
- package/build/tests/wbtc/transferReg.d.ts +0 -1
- package/build/tests/wbtc/transferReg.js +0 -16
- package/build/tests/wbtc/unStakeReg.d.ts +0 -1
- package/build/tests/wbtc/unStakeReg.js +0 -72
- package/build/tests/wbtc/unwrapReg.d.ts +0 -1
- package/build/tests/wbtc/unwrapReg.js +0 -60
- package/build/tests/wbtc/unwrapRegSegwit.d.ts +0 -1
- package/build/tests/wbtc/unwrapRegSegwit.js +0 -83
- package/build/tests/wbtc/withdrawalRequestReg.d.ts +0 -1
- package/build/tests/wbtc/withdrawalRequestReg.js +0 -71
- package/build/tests/wbtc/wrapReg.d.ts +0 -1
- package/build/tests/wbtc/wrapReg.js +0 -65
- package/build/tests/wbtc/wrapTest.d.ts +0 -1
- package/build/tests/wbtc/wrapTest.js +0 -66
- package/build/tests/withdrawalRequestReg.d.ts +0 -1
- package/build/tests/withdrawalRequestReg.js +0 -71
- package/build/tests/wrap.d.ts +0 -1
- package/build/tests/wrap.js +0 -65
- package/build/tests/wrapReg.d.ts +0 -1
- package/build/tests/wrapReg.js +0 -68
- package/build/tests/wrapTest.d.ts +0 -1
- package/build/tests/wrapTest.js +0 -66
- package/build/tests/wrapTestg.d.ts +0 -1
- package/build/tests/wrapTestg.js +0 -66
- package/build/tests/writers/allowance.d.ts +0 -3
- package/build/tests/writers/allowance.js +0 -10
- package/build/tests/writers/approve.d.ts +0 -4
- package/build/tests/writers/approve.js +0 -11
- package/build/transaction/TransactionBuilder.d.ts +0 -60
- package/build/transaction/TransactionBuilder.js +0 -244
- package/build/transaction/browser/BrowserSigner.d.ts +0 -11
- package/build/transaction/browser/BrowserSigner.js +0 -10
- package/build/transaction/browser/extensions/Unisat.d.ts +0 -54
- package/build/transaction/browser/extensions/Unisat.js +0 -11
- package/build/transaction/builders/GenericTransaction.d.ts +0 -11
- package/build/transaction/builders/GenericTransaction.js +0 -23
- package/build/transaction/builders/TapUnwarpTransaction.d.ts +0 -37
- package/build/transaction/builders/TapUnwarpTransaction.js +0 -201
- package/build/transaction/builders/UnwarpSegwitTransaction.d.ts +0 -34
- package/build/transaction/builders/UnwarpSegwitTransaction.js +0 -184
- package/build/transaction/builders/UnwarpTransaction.d.ts +0 -35
- package/build/transaction/builders/UnwarpTransaction.js +0 -199
- package/build/transaction/interfaces/ITransactions.d.ts +0 -32
- package/build/transaction/interfaces/ITransactions.js +0 -1
- package/build/utxo/IUTXO.d.ts +0 -0
- package/build/utxo/IUTXO.js +0 -1
- package/build/utxo/OPNetUtils.d.ts +0 -7
- package/build/utxo/OPNetUtils.js +0 -47
- package/build/utxo/UTXOManager.d.ts +0 -7
- package/build/utxo/UTXOManager.js +0 -47
- package/build/wbtc/BroadcastResponse.d.ts +0 -0
- package/build/wbtc/BroadcastResponse.js +0 -1
- /package/build/generators/{features.d.ts → Features.d.ts} +0 -0
- /package/build/generators/{features.js → Features.js} +0 -0
- /package/build/generators/builders/{MultisignGenerator.d.ts → MultiSignGenerator.d.ts} +0 -0
- /package/build/generators/builders/{MultisignGenerator.js → MultiSignGenerator.js} +0 -0
|
@@ -1,89 +1,89 @@
|
|
|
1
|
-
import { crypto as bitCrypto, Network, networks, Payment, payments } from 'bitcoinjs-lib';
|
|
2
|
-
import { toXOnly } from 'bitcoinjs-lib/src/psbt/bip371.js';
|
|
3
|
-
import { Taptree } from 'bitcoinjs-lib/src/types.js';
|
|
4
|
-
import { DeploymentGenerator } from '../generators/builders/DeploymentGenerator.js';
|
|
5
|
-
import { TransactionBuilder } from '../transaction/builders/TransactionBuilder.js';
|
|
6
|
-
import { AddressGenerator } from '../generators/AddressGenerator.js';
|
|
7
|
-
|
|
8
|
-
export interface ContractAddressVerificationParams {
|
|
9
|
-
readonly deployerPubKeyXOnly: Buffer;
|
|
10
|
-
readonly contractSaltPubKey: Buffer;
|
|
11
|
-
readonly originalSalt: Buffer;
|
|
12
|
-
readonly bytecode: Buffer;
|
|
13
|
-
readonly network?: Network;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export class TapscriptVerificator {
|
|
17
|
-
private static readonly TAP_SCRIPT_VERSION: number = 192;
|
|
18
|
-
|
|
19
|
-
public static getContractAddress(
|
|
20
|
-
params: ContractAddressVerificationParams,
|
|
21
|
-
): string | undefined {
|
|
22
|
-
const network = params.network || networks.bitcoin;
|
|
23
|
-
const scriptBuilder: DeploymentGenerator = new DeploymentGenerator(
|
|
24
|
-
params.deployerPubKeyXOnly,
|
|
25
|
-
toXOnly(params.contractSaltPubKey),
|
|
26
|
-
network,
|
|
27
|
-
);
|
|
28
|
-
|
|
29
|
-
const compiledTargetScript: Buffer = scriptBuilder.compile(
|
|
30
|
-
params.bytecode,
|
|
31
|
-
params.originalSalt,
|
|
32
|
-
);
|
|
33
|
-
|
|
34
|
-
const scriptTree: Taptree = [
|
|
35
|
-
{
|
|
36
|
-
output: compiledTargetScript,
|
|
37
|
-
version: TapscriptVerificator.TAP_SCRIPT_VERSION,
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
output: TransactionBuilder.LOCK_LEAF_SCRIPT,
|
|
41
|
-
version: TapscriptVerificator.TAP_SCRIPT_VERSION,
|
|
42
|
-
},
|
|
43
|
-
];
|
|
44
|
-
|
|
45
|
-
return TapscriptVerificator.generateAddressFromScript(params, scriptTree);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
public static getContractSeed(
|
|
49
|
-
deployerPubKey: Buffer,
|
|
50
|
-
bytecode: Buffer,
|
|
51
|
-
saltHash: Buffer,
|
|
52
|
-
): Buffer {
|
|
53
|
-
const sha256OfBytecode: Buffer = bitCrypto.hash256(bytecode);
|
|
54
|
-
const buf: Buffer = Buffer.concat([deployerPubKey, saltHash, sha256OfBytecode]);
|
|
55
|
-
|
|
56
|
-
return bitCrypto.hash256(buf);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
public static generateContractVirtualAddress(
|
|
60
|
-
deployerPubKey: Buffer,
|
|
61
|
-
bytecode: Buffer,
|
|
62
|
-
saltHash: Buffer,
|
|
63
|
-
network: Network = networks.bitcoin,
|
|
64
|
-
): string {
|
|
65
|
-
const virtualAddress: Buffer = TapscriptVerificator.getContractSeed(
|
|
66
|
-
deployerPubKey,
|
|
67
|
-
bytecode,
|
|
68
|
-
saltHash,
|
|
69
|
-
);
|
|
70
|
-
|
|
71
|
-
return AddressGenerator.generatePKSH(virtualAddress, network);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
public static generateAddressFromScript(
|
|
75
|
-
params: ContractAddressVerificationParams,
|
|
76
|
-
scriptTree: Taptree,
|
|
77
|
-
): string | undefined {
|
|
78
|
-
const network = params.network || networks.bitcoin;
|
|
79
|
-
|
|
80
|
-
const transactionData: Payment = {
|
|
81
|
-
internalPubkey: params.deployerPubKeyXOnly,
|
|
82
|
-
network: network,
|
|
83
|
-
scriptTree: scriptTree,
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
const tx: Payment = payments.p2tr(transactionData);
|
|
87
|
-
return tx.address;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
1
|
+
import { crypto as bitCrypto, Network, networks, Payment, payments } from 'bitcoinjs-lib';
|
|
2
|
+
import { toXOnly } from 'bitcoinjs-lib/src/psbt/bip371.js';
|
|
3
|
+
import { Taptree } from 'bitcoinjs-lib/src/types.js';
|
|
4
|
+
import { DeploymentGenerator } from '../generators/builders/DeploymentGenerator.js';
|
|
5
|
+
import { TransactionBuilder } from '../transaction/builders/TransactionBuilder.js';
|
|
6
|
+
import { AddressGenerator } from '../generators/AddressGenerator.js';
|
|
7
|
+
|
|
8
|
+
export interface ContractAddressVerificationParams {
|
|
9
|
+
readonly deployerPubKeyXOnly: Buffer;
|
|
10
|
+
readonly contractSaltPubKey: Buffer;
|
|
11
|
+
readonly originalSalt: Buffer;
|
|
12
|
+
readonly bytecode: Buffer;
|
|
13
|
+
readonly network?: Network;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export class TapscriptVerificator {
|
|
17
|
+
private static readonly TAP_SCRIPT_VERSION: number = 192;
|
|
18
|
+
|
|
19
|
+
public static getContractAddress(
|
|
20
|
+
params: ContractAddressVerificationParams,
|
|
21
|
+
): string | undefined {
|
|
22
|
+
const network = params.network || networks.bitcoin;
|
|
23
|
+
const scriptBuilder: DeploymentGenerator = new DeploymentGenerator(
|
|
24
|
+
params.deployerPubKeyXOnly,
|
|
25
|
+
toXOnly(params.contractSaltPubKey),
|
|
26
|
+
network,
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
const compiledTargetScript: Buffer = scriptBuilder.compile(
|
|
30
|
+
params.bytecode,
|
|
31
|
+
params.originalSalt,
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
const scriptTree: Taptree = [
|
|
35
|
+
{
|
|
36
|
+
output: compiledTargetScript,
|
|
37
|
+
version: TapscriptVerificator.TAP_SCRIPT_VERSION,
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
output: TransactionBuilder.LOCK_LEAF_SCRIPT,
|
|
41
|
+
version: TapscriptVerificator.TAP_SCRIPT_VERSION,
|
|
42
|
+
},
|
|
43
|
+
];
|
|
44
|
+
|
|
45
|
+
return TapscriptVerificator.generateAddressFromScript(params, scriptTree);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
public static getContractSeed(
|
|
49
|
+
deployerPubKey: Buffer,
|
|
50
|
+
bytecode: Buffer,
|
|
51
|
+
saltHash: Buffer,
|
|
52
|
+
): Buffer {
|
|
53
|
+
const sha256OfBytecode: Buffer = bitCrypto.hash256(bytecode);
|
|
54
|
+
const buf: Buffer = Buffer.concat([deployerPubKey, saltHash, sha256OfBytecode]);
|
|
55
|
+
|
|
56
|
+
return bitCrypto.hash256(buf);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
public static generateContractVirtualAddress(
|
|
60
|
+
deployerPubKey: Buffer,
|
|
61
|
+
bytecode: Buffer,
|
|
62
|
+
saltHash: Buffer,
|
|
63
|
+
network: Network = networks.bitcoin,
|
|
64
|
+
): string {
|
|
65
|
+
const virtualAddress: Buffer = TapscriptVerificator.getContractSeed(
|
|
66
|
+
deployerPubKey,
|
|
67
|
+
bytecode,
|
|
68
|
+
saltHash,
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
return AddressGenerator.generatePKSH(virtualAddress, network);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
public static generateAddressFromScript(
|
|
75
|
+
params: ContractAddressVerificationParams,
|
|
76
|
+
scriptTree: Taptree,
|
|
77
|
+
): string | undefined {
|
|
78
|
+
const network = params.network || networks.bitcoin;
|
|
79
|
+
|
|
80
|
+
const transactionData: Payment = {
|
|
81
|
+
internalPubkey: params.deployerPubKeyXOnly,
|
|
82
|
+
network: network,
|
|
83
|
+
scriptTree: scriptTree,
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
const tx: Payment = payments.p2tr(transactionData);
|
|
87
|
+
return tx.address;
|
|
88
|
+
}
|
|
89
|
+
}
|
package/src/wbtc/Generate.ts
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { VaultUTXOs } from '../transaction/processor/PsbtTransaction.js';
|
|
2
|
-
|
|
3
|
-
export interface GenerationConstraints {
|
|
4
|
-
/** Timestamp of the generation */
|
|
5
|
-
readonly timestamp: number;
|
|
6
|
-
|
|
7
|
-
/** Protocol version used for generation */
|
|
8
|
-
readonly version: string;
|
|
9
|
-
|
|
10
|
-
/** Minimum different trusted validators */
|
|
11
|
-
readonly minimum: number;
|
|
12
|
-
|
|
13
|
-
/** Minimum different trusted validator in a new generated transaction */
|
|
14
|
-
readonly transactionMinimum: number;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export interface WrappedGenerationParameters {
|
|
18
|
-
/** Public trusted keys */
|
|
19
|
-
readonly keys: string[];
|
|
20
|
-
|
|
21
|
-
/** Vault address (p2ms) */
|
|
22
|
-
readonly vault: string;
|
|
23
|
-
|
|
24
|
-
/** Public trusted entities */
|
|
25
|
-
readonly entities: string[];
|
|
26
|
-
|
|
27
|
-
/** OPNet Signature that verify the trusted keys and entities */
|
|
28
|
-
readonly signature: string;
|
|
29
|
-
|
|
30
|
-
/** Generation constraints */
|
|
31
|
-
readonly constraints: GenerationConstraints;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export interface UnwrappedGenerationParameters {
|
|
35
|
-
/** UTXOs to unwrap from */
|
|
36
|
-
readonly vaultUTXOs: VaultUTXOs[];
|
|
37
|
-
|
|
38
|
-
/** WBTC balance */
|
|
39
|
-
readonly balance: string;
|
|
40
|
-
}
|
|
1
|
+
import { VaultUTXOs } from '../transaction/processor/PsbtTransaction.js';
|
|
2
|
+
|
|
3
|
+
export interface GenerationConstraints {
|
|
4
|
+
/** Timestamp of the generation */
|
|
5
|
+
readonly timestamp: number;
|
|
6
|
+
|
|
7
|
+
/** Protocol version used for generation */
|
|
8
|
+
readonly version: string;
|
|
9
|
+
|
|
10
|
+
/** Minimum different trusted validators */
|
|
11
|
+
readonly minimum: number;
|
|
12
|
+
|
|
13
|
+
/** Minimum different trusted validator in a new generated transaction */
|
|
14
|
+
readonly transactionMinimum: number;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface WrappedGenerationParameters {
|
|
18
|
+
/** Public trusted keys */
|
|
19
|
+
readonly keys: string[];
|
|
20
|
+
|
|
21
|
+
/** Vault address (p2ms) */
|
|
22
|
+
readonly vault: string;
|
|
23
|
+
|
|
24
|
+
/** Public trusted entities */
|
|
25
|
+
readonly entities: string[];
|
|
26
|
+
|
|
27
|
+
/** OPNet Signature that verify the trusted keys and entities */
|
|
28
|
+
readonly signature: string;
|
|
29
|
+
|
|
30
|
+
/** Generation constraints */
|
|
31
|
+
readonly constraints: GenerationConstraints;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface UnwrappedGenerationParameters {
|
|
35
|
+
/** UTXOs to unwrap from */
|
|
36
|
+
readonly vaultUTXOs: VaultUTXOs[];
|
|
37
|
+
|
|
38
|
+
/** WBTC balance */
|
|
39
|
+
readonly balance: string;
|
|
40
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { UnwrappedGenerationParameters } from './Generate.js';
|
|
2
|
-
import { VaultUTXOs } from '../transaction/processor/PsbtTransaction.js';
|
|
3
|
-
|
|
4
|
-
export class UnwrapGeneration implements Omit<UnwrappedGenerationParameters, 'balance'> {
|
|
5
|
-
public readonly vaultUTXOs: VaultUTXOs[];
|
|
6
|
-
|
|
7
|
-
public readonly balance: bigint;
|
|
8
|
-
|
|
9
|
-
constructor(params: UnwrappedGenerationParameters) {
|
|
10
|
-
this.vaultUTXOs = params.vaultUTXOs;
|
|
11
|
-
this.balance = BigInt(params.balance);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
1
|
+
import { UnwrappedGenerationParameters } from './Generate.js';
|
|
2
|
+
import { VaultUTXOs } from '../transaction/processor/PsbtTransaction.js';
|
|
3
|
+
|
|
4
|
+
export class UnwrapGeneration implements Omit<UnwrappedGenerationParameters, 'balance'> {
|
|
5
|
+
public readonly vaultUTXOs: VaultUTXOs[];
|
|
6
|
+
|
|
7
|
+
public readonly balance: bigint;
|
|
8
|
+
|
|
9
|
+
constructor(params: UnwrappedGenerationParameters) {
|
|
10
|
+
this.vaultUTXOs = params.vaultUTXOs;
|
|
11
|
+
this.balance = BigInt(params.balance);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { GenerationConstraints, WrappedGenerationParameters } from './Generate.js';
|
|
2
|
-
|
|
3
|
-
export class WrappedGeneration implements WrappedGenerationParameters {
|
|
4
|
-
/** Generation constraints */
|
|
5
|
-
public readonly constraints: GenerationConstraints;
|
|
6
|
-
|
|
7
|
-
/** Public trusted entities */
|
|
8
|
-
public readonly entities: string[];
|
|
9
|
-
|
|
10
|
-
/** Public trusted keys */
|
|
11
|
-
public readonly keys: string[];
|
|
12
|
-
|
|
13
|
-
/** OPNet Signature that verify the trusted keys and entities */
|
|
14
|
-
public readonly signature: string;
|
|
15
|
-
|
|
16
|
-
/** Vault address (p2ms) */
|
|
17
|
-
public readonly vault: string;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Public keys of the trusted entities
|
|
21
|
-
*/
|
|
22
|
-
public readonly pubKeys: Buffer[];
|
|
23
|
-
|
|
24
|
-
constructor(params: WrappedGenerationParameters) {
|
|
25
|
-
this.constraints = params.constraints;
|
|
26
|
-
this.entities = params.entities;
|
|
27
|
-
this.keys = params.keys;
|
|
28
|
-
this.signature = params.signature;
|
|
29
|
-
this.vault = params.vault;
|
|
30
|
-
|
|
31
|
-
this.pubKeys = this.keys.map((key: string) => Buffer.from(key, 'base64'));
|
|
32
|
-
}
|
|
33
|
-
}
|
|
1
|
+
import { GenerationConstraints, WrappedGenerationParameters } from './Generate.js';
|
|
2
|
+
|
|
3
|
+
export class WrappedGeneration implements WrappedGenerationParameters {
|
|
4
|
+
/** Generation constraints */
|
|
5
|
+
public readonly constraints: GenerationConstraints;
|
|
6
|
+
|
|
7
|
+
/** Public trusted entities */
|
|
8
|
+
public readonly entities: string[];
|
|
9
|
+
|
|
10
|
+
/** Public trusted keys */
|
|
11
|
+
public readonly keys: string[];
|
|
12
|
+
|
|
13
|
+
/** OPNet Signature that verify the trusted keys and entities */
|
|
14
|
+
public readonly signature: string;
|
|
15
|
+
|
|
16
|
+
/** Vault address (p2ms) */
|
|
17
|
+
public readonly vault: string;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Public keys of the trusted entities
|
|
21
|
+
*/
|
|
22
|
+
public readonly pubKeys: Buffer[];
|
|
23
|
+
|
|
24
|
+
constructor(params: WrappedGenerationParameters) {
|
|
25
|
+
this.constraints = params.constraints;
|
|
26
|
+
this.entities = params.entities;
|
|
27
|
+
this.keys = params.keys;
|
|
28
|
+
this.signature = params.signature;
|
|
29
|
+
this.vault = params.vault;
|
|
30
|
+
|
|
31
|
+
this.pubKeys = this.keys.map((key: string) => Buffer.from(key, 'base64'));
|
|
32
|
+
}
|
|
33
|
+
}
|
package/webpack.config.js
CHANGED
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
import webpack from 'webpack';
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
mode: 'production',
|
|
5
|
-
entry: {
|
|
6
|
-
index: {
|
|
7
|
-
import: './src/index.ts',
|
|
8
|
-
},
|
|
9
|
-
},
|
|
10
|
-
watch: false,
|
|
11
|
-
output: {
|
|
12
|
-
filename: 'index.js',
|
|
13
|
-
path: import.meta.dirname + '/browser',
|
|
14
|
-
libraryTarget: 'module',
|
|
15
|
-
},
|
|
16
|
-
node: {
|
|
17
|
-
__dirname: false,
|
|
18
|
-
},
|
|
19
|
-
experiments: {
|
|
20
|
-
outputModule: true,
|
|
21
|
-
asyncWebAssembly: false,
|
|
22
|
-
syncWebAssembly: true,
|
|
23
|
-
},
|
|
24
|
-
resolve: {
|
|
25
|
-
extensionAlias: {
|
|
26
|
-
'.js': ['.js', '.ts'],
|
|
27
|
-
},
|
|
28
|
-
modules: ['.', 'node_modules'],
|
|
29
|
-
extensions: ['.*', '.js', '.jsx', '.tsx', '.ts', '.wasm'],
|
|
30
|
-
fallback: {
|
|
31
|
-
buffer: import.meta.resolve('buffer/'),
|
|
32
|
-
|
|
33
|
-
assert: import.meta.resolve('assert/'),
|
|
34
|
-
crypto: import.meta.resolve('./src/crypto/crypto-browser.js'),
|
|
35
|
-
http: import.meta.resolve('stream-http/'),
|
|
36
|
-
https: import.meta.resolve('https-browserify/'),
|
|
37
|
-
os: import.meta.resolve('os-browserify/browser/'),
|
|
38
|
-
stream: import.meta.resolve('stream-browserify'),
|
|
39
|
-
process: import.meta.resolve('process/browser'),
|
|
40
|
-
zlib: import.meta.resolve('browserify-zlib'),
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
cache: false,
|
|
44
|
-
module: {
|
|
45
|
-
rules: [
|
|
46
|
-
{
|
|
47
|
-
test: /\.(js|jsx|tsx|ts)$/,
|
|
48
|
-
exclude: /node_modules/,
|
|
49
|
-
resolve: {
|
|
50
|
-
fullySpecified: false,
|
|
51
|
-
},
|
|
52
|
-
use: [
|
|
53
|
-
{
|
|
54
|
-
loader: 'babel-loader',
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
loader: 'ts-loader',
|
|
58
|
-
options: {
|
|
59
|
-
configFile: 'tsconfig.webpack.json',
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
],
|
|
63
|
-
},
|
|
64
|
-
],
|
|
65
|
-
},
|
|
66
|
-
optimization: {
|
|
67
|
-
usedExports: true,
|
|
68
|
-
},
|
|
69
|
-
plugins: [
|
|
70
|
-
new webpack.ProvidePlugin({
|
|
71
|
-
Buffer: ['buffer', 'Buffer'],
|
|
72
|
-
process: 'process/browser',
|
|
73
|
-
stream: 'stream-browserify',
|
|
74
|
-
zlib: 'browserify-zlib',
|
|
75
|
-
bitcoin: 'bitcoinjs-lib',
|
|
76
|
-
}),
|
|
77
|
-
],
|
|
78
|
-
};
|
|
1
|
+
import webpack from 'webpack';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
mode: 'production',
|
|
5
|
+
entry: {
|
|
6
|
+
index: {
|
|
7
|
+
import: './src/index.ts',
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
watch: false,
|
|
11
|
+
output: {
|
|
12
|
+
filename: 'index.js',
|
|
13
|
+
path: import.meta.dirname + '/browser',
|
|
14
|
+
libraryTarget: 'module',
|
|
15
|
+
},
|
|
16
|
+
node: {
|
|
17
|
+
__dirname: false,
|
|
18
|
+
},
|
|
19
|
+
experiments: {
|
|
20
|
+
outputModule: true,
|
|
21
|
+
asyncWebAssembly: false,
|
|
22
|
+
syncWebAssembly: true,
|
|
23
|
+
},
|
|
24
|
+
resolve: {
|
|
25
|
+
extensionAlias: {
|
|
26
|
+
'.js': ['.js', '.ts'],
|
|
27
|
+
},
|
|
28
|
+
modules: ['.', 'node_modules'],
|
|
29
|
+
extensions: ['.*', '.js', '.jsx', '.tsx', '.ts', '.wasm'],
|
|
30
|
+
fallback: {
|
|
31
|
+
buffer: import.meta.resolve('buffer/'),
|
|
32
|
+
|
|
33
|
+
assert: import.meta.resolve('assert/'),
|
|
34
|
+
crypto: import.meta.resolve('./src/crypto/crypto-browser.js'),
|
|
35
|
+
http: import.meta.resolve('stream-http/'),
|
|
36
|
+
https: import.meta.resolve('https-browserify/'),
|
|
37
|
+
os: import.meta.resolve('os-browserify/browser/'),
|
|
38
|
+
stream: import.meta.resolve('stream-browserify'),
|
|
39
|
+
process: import.meta.resolve('process/browser'),
|
|
40
|
+
zlib: import.meta.resolve('browserify-zlib'),
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
cache: false,
|
|
44
|
+
module: {
|
|
45
|
+
rules: [
|
|
46
|
+
{
|
|
47
|
+
test: /\.(js|jsx|tsx|ts)$/,
|
|
48
|
+
exclude: /node_modules/,
|
|
49
|
+
resolve: {
|
|
50
|
+
fullySpecified: false,
|
|
51
|
+
},
|
|
52
|
+
use: [
|
|
53
|
+
{
|
|
54
|
+
loader: 'babel-loader',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
loader: 'ts-loader',
|
|
58
|
+
options: {
|
|
59
|
+
configFile: 'tsconfig.webpack.json',
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
optimization: {
|
|
67
|
+
usedExports: true,
|
|
68
|
+
},
|
|
69
|
+
plugins: [
|
|
70
|
+
new webpack.ProvidePlugin({
|
|
71
|
+
Buffer: ['buffer', 'Buffer'],
|
|
72
|
+
process: 'process/browser',
|
|
73
|
+
stream: 'stream-browserify',
|
|
74
|
+
zlib: 'browserify-zlib',
|
|
75
|
+
bitcoin: 'bitcoinjs-lib',
|
|
76
|
+
}),
|
|
77
|
+
],
|
|
78
|
+
};
|
package/build/Utils.d.ts
DELETED
|
File without changes
|
package/build/Utils.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { Network } from 'bitcoinjs-lib';
|
|
3
|
-
import { Generator } from '../Generator.js';
|
|
4
|
-
export declare class CalldataGenerator extends Generator {
|
|
5
|
-
constructor(senderPubKey: Buffer, contractSaltPubKey: Buffer, network?: Network);
|
|
6
|
-
static getPubKeyAsBuffer(witnessKeys: Buffer[], network: Network): Buffer;
|
|
7
|
-
compile(calldata: Buffer, contractSecret: Buffer, vaultPublicKeys?: Buffer[], minimumSignatures?: number): Buffer;
|
|
8
|
-
}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { crypto, networks, opcodes, script } from 'bitcoinjs-lib';
|
|
2
|
-
import { Compressor } from '../../bytecode/Compressor.js';
|
|
3
|
-
import { Generator } from '../Generator.js';
|
|
4
|
-
import { EcKeyPair } from '../../keypair/EcKeyPair.js';
|
|
5
|
-
export class CalldataGenerator extends Generator {
|
|
6
|
-
constructor(senderPubKey, contractSaltPubKey, network = networks.bitcoin) {
|
|
7
|
-
super(senderPubKey, contractSaltPubKey, network);
|
|
8
|
-
}
|
|
9
|
-
static getPubKeyAsBuffer(witnessKeys, network) {
|
|
10
|
-
let finalBuffer = Buffer.alloc(0);
|
|
11
|
-
for (let pubKey of witnessKeys) {
|
|
12
|
-
const key = EcKeyPair.fromPublicKey(pubKey, network);
|
|
13
|
-
if (!key.compressed) {
|
|
14
|
-
throw new Error('Public key must be compressed');
|
|
15
|
-
}
|
|
16
|
-
if (pubKey.byteLength !== 33) {
|
|
17
|
-
throw new Error(`Public key must be 33 bytes, got ${pubKey.byteLength} bytes.`);
|
|
18
|
-
}
|
|
19
|
-
finalBuffer = Buffer.concat([finalBuffer, pubKey]);
|
|
20
|
-
}
|
|
21
|
-
const compressed = Compressor.compress(finalBuffer);
|
|
22
|
-
if (compressed.byteLength >= finalBuffer.byteLength) {
|
|
23
|
-
return finalBuffer;
|
|
24
|
-
}
|
|
25
|
-
return compressed;
|
|
26
|
-
}
|
|
27
|
-
compile(calldata, contractSecret, vaultPublicKeys = [], minimumSignatures = 0) {
|
|
28
|
-
const dataChunks = this.splitBufferIntoChunks(calldata);
|
|
29
|
-
if (!dataChunks.length)
|
|
30
|
-
throw new Error('No data chunks found');
|
|
31
|
-
let compiledData = [
|
|
32
|
-
this.senderPubKey,
|
|
33
|
-
opcodes.OP_CHECKSIGVERIFY,
|
|
34
|
-
this.contractSaltPubKey,
|
|
35
|
-
opcodes.OP_CHECKSIGVERIFY,
|
|
36
|
-
opcodes.OP_HASH160,
|
|
37
|
-
crypto.hash160(this.senderPubKey),
|
|
38
|
-
opcodes.OP_EQUALVERIFY,
|
|
39
|
-
opcodes.OP_HASH160,
|
|
40
|
-
crypto.hash160(contractSecret),
|
|
41
|
-
opcodes.OP_EQUALVERIFY,
|
|
42
|
-
opcodes.OP_DEPTH,
|
|
43
|
-
opcodes.OP_1,
|
|
44
|
-
opcodes.OP_NUMEQUAL,
|
|
45
|
-
opcodes.OP_IF,
|
|
46
|
-
Generator.MAGIC,
|
|
47
|
-
];
|
|
48
|
-
if (vaultPublicKeys.length > 0) {
|
|
49
|
-
const pubKeyBuffer = CalldataGenerator.getPubKeyAsBuffer(vaultPublicKeys, this.network);
|
|
50
|
-
const pubKeyDataChunks = this.splitBufferIntoChunks(pubKeyBuffer);
|
|
51
|
-
compiledData = compiledData.concat(...[
|
|
52
|
-
opcodes.OP_0,
|
|
53
|
-
...pubKeyDataChunks,
|
|
54
|
-
]);
|
|
55
|
-
if (minimumSignatures) {
|
|
56
|
-
if (minimumSignatures > 255) {
|
|
57
|
-
throw new Error('Minimum signatures cannot exceed 255');
|
|
58
|
-
}
|
|
59
|
-
const minSigBuffer = Buffer.alloc(2);
|
|
60
|
-
minSigBuffer.writeUint16LE(minimumSignatures, 0);
|
|
61
|
-
compiledData = compiledData.concat(...[
|
|
62
|
-
opcodes.OP_1,
|
|
63
|
-
minSigBuffer,
|
|
64
|
-
]);
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
throw new Error('Minimum signatures must be provided');
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
compiledData = compiledData.concat(...[opcodes.OP_1NEGATE, ...dataChunks, opcodes.OP_ELSE, opcodes.OP_1, opcodes.OP_ENDIF]);
|
|
71
|
-
const asm = compiledData.flat();
|
|
72
|
-
const compiled = script.compile(asm);
|
|
73
|
-
const decompiled = script.decompile(compiled);
|
|
74
|
-
if (!decompiled) {
|
|
75
|
-
throw new Error('Failed to decompile script??');
|
|
76
|
-
}
|
|
77
|
-
return compiled;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Address } from '@btc-vision/bsi-binary';
|
|
2
|
-
export declare const FACTORY_ADDRESS: Address;
|
|
3
|
-
export declare const POOL_ADDRESS: Address;
|
|
4
|
-
export declare const WBTC_ADDRESS: Address;
|
|
5
|
-
export declare const MOTO_ADDRESS: Address;
|
|
6
|
-
export declare const ROUTER_ADDRESS: Address;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export const FACTORY_ADDRESS = 'bcrt1qz98txrd6csz0ljhp0v2rw8846k0zgn57uul8c9';
|
|
2
|
-
export const POOL_ADDRESS = 'bcrt1qzwth3t3wdgy83tt9xegq7yww5dx0rhy3ezglg9';
|
|
3
|
-
export const WBTC_ADDRESS = 'bcrt1q99qtptumw027cw8w274tqzd564q66u537vn0lh';
|
|
4
|
-
export const MOTO_ADDRESS = 'bcrt1qwx9h2fvqlzx84t6jhxa424y7g2ynayt8p9rs38';
|
|
5
|
-
export const ROUTER_ADDRESS = 'bcrt1qelqwcguvwkgr90w6u5f2q0a7gqlnq4w8rl26ht';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const ContractMetadataManager: {};
|