@btc-vision/transaction 1.0.93 → 1.0.94
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/index.js +1 -1
- package/browser/transaction/browser/Web3Provider.d.ts +8 -1
- package/browser/transaction/browser/extensions/UnisatSigner.d.ts +1 -0
- package/build/_version.d.ts +1 -1
- package/build/_version.js +1 -1
- package/build/generators/builders/DeploymentGeneratorV2.d.ts +13 -0
- package/build/generators/builders/DeploymentGeneratorV2.js +57 -0
- package/build/transaction/browser/Web3Provider.d.ts +8 -1
- package/build/transaction/browser/extensions/UnisatSigner.d.ts +1 -0
- package/build/transaction/browser/extensions/UnisatSigner.js +1 -1
- package/build/transaction/builders/DeploymentTransactionV2.d.ts +36 -0
- package/build/transaction/builders/DeploymentTransactionV2.js +192 -0
- package/package.json +1 -1
- package/src/_version.ts +1 -1
- package/src/generators/Generator.ts +75 -75
- package/src/transaction/TransactionFactory.ts +544 -544
- package/src/transaction/browser/Web3Provider.ts +17 -2
- package/src/transaction/browser/extensions/UnisatSigner.ts +2 -1
|
@@ -1,7 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
IDeploymentParameters,
|
|
3
|
+
IInteractionParameters,
|
|
4
|
+
IUnwrapParameters,
|
|
5
|
+
IWrapParameters,
|
|
6
|
+
} from '../interfaces/ITransactionParameters.js';
|
|
2
7
|
import { UTXO } from '../../utxo/interfaces/IUTXO.js';
|
|
8
|
+
import { DeploymentResult, UnwrapResult, WrapResult } from '../TransactionFactory';
|
|
3
9
|
|
|
4
|
-
export type InteractionParametersWithoutSigner = Omit<IInteractionParameters, 'signer'>;
|
|
10
|
+
export type InteractionParametersWithoutSigner = Omit<IInteractionParameters, 'signer'>;
|
|
11
|
+
export type IWrapParametersWithoutSigner = Omit<IWrapParameters, 'signer'>;
|
|
12
|
+
export type IUnwrapParametersSigner = Omit<IUnwrapParameters, 'signer'>;
|
|
13
|
+
export type IDeploymentParametersWithoutSigner = Omit<IDeploymentParameters, 'signer' | 'network'>;
|
|
5
14
|
|
|
6
15
|
export interface BroadcastTransactionOptions {
|
|
7
16
|
raw: string;
|
|
@@ -42,5 +51,11 @@ export interface Web3Provider {
|
|
|
42
51
|
interactionParameters: InteractionParametersWithoutSigner,
|
|
43
52
|
): Promise<[BroadcastedTransaction, BroadcastedTransaction, UTXO[]]>;
|
|
44
53
|
|
|
54
|
+
deployContract(params: IDeploymentParametersWithoutSigner): Promise<DeploymentResult>;
|
|
55
|
+
|
|
45
56
|
broadcast(transactions: BroadcastTransactionOptions[]): Promise<BroadcastedTransaction[]>;
|
|
57
|
+
|
|
58
|
+
wrap(wrapParameters: IWrapParametersWithoutSigner): Promise<WrapResult>;
|
|
59
|
+
|
|
60
|
+
unwrap(unwrapParameters: IUnwrapParametersSigner): Promise<UnwrapResult>;
|
|
46
61
|
}
|
|
@@ -9,6 +9,7 @@ import { TapScriptSig } from 'bip174/src/lib/interfaces.js';
|
|
|
9
9
|
declare global {
|
|
10
10
|
interface Window {
|
|
11
11
|
unisat?: Unisat;
|
|
12
|
+
opnet?: Unisat;
|
|
12
13
|
}
|
|
13
14
|
}
|
|
14
15
|
|
|
@@ -98,7 +99,7 @@ export class UnisatSigner extends CustomKeypair {
|
|
|
98
99
|
this._network = networks.regtest;
|
|
99
100
|
break;
|
|
100
101
|
default:
|
|
101
|
-
throw new Error(
|
|
102
|
+
throw new Error(`Invalid network: ${network}`);
|
|
102
103
|
}
|
|
103
104
|
|
|
104
105
|
const publicKey = await this.unisat.getPublicKey();
|