opnet 1.7.31 → 1.7.33
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/abi/shared/interfaces/motoswap/IMoto.d.ts +2 -1
- package/browser/abi/shared/interfaces/motoswap/IMotoChef.d.ts +3 -2
- package/browser/contracts/CallResult.d.ts +3 -6
- package/browser/contracts/Contract.d.ts +1 -8
- package/browser/contracts/OPNetEvent.d.ts +1 -1
- package/browser/contracts/interfaces/IProviderForCallResult.d.ts +17 -0
- package/browser/contracts/types/ContractTypes.d.ts +8 -0
- package/browser/index.js +1287 -1283
- package/browser/noble-hashes.js +3 -3
- package/browser/opnet.d.ts +5 -0
- package/browser/transactions/Transaction.d.ts +1 -1
- package/browser/transactions/interfaces/ITransaction.d.ts +1 -20
- package/browser/transactions/interfaces/ITransactionBase.d.ts +21 -0
- package/browser/transactions/interfaces/transactions/ICommonTransaction.d.ts +1 -1
- package/browser/utils/RevertDecoder.d.ts +1 -0
- package/browser/utxos/UTXOsManager.d.ts +2 -2
- package/browser/utxos/interfaces/IProviderForUTXO.d.ts +7 -0
- package/browser/vendors.js +4687 -4747
- package/build/_version.d.ts +1 -1
- package/build/_version.js +1 -1
- package/build/abi/shared/interfaces/motoswap/IMoto.d.ts +2 -1
- package/build/abi/shared/interfaces/motoswap/IMotoChef.d.ts +3 -2
- package/build/contracts/CallResult.d.ts +3 -6
- package/build/contracts/CallResult.js +2 -28
- package/build/contracts/Contract.d.ts +1 -8
- package/build/contracts/OPNetEvent.d.ts +1 -1
- package/build/contracts/interfaces/IProviderForCallResult.d.ts +17 -0
- package/build/contracts/interfaces/IProviderForCallResult.js +1 -0
- package/build/contracts/types/ContractTypes.d.ts +8 -0
- package/build/contracts/types/ContractTypes.js +1 -0
- package/build/opnet.d.ts +5 -0
- package/build/opnet.js +5 -0
- package/build/providers/AbstractRpcProvider.js +2 -1
- package/build/transactions/Transaction.d.ts +1 -1
- package/build/transactions/interfaces/ITransaction.d.ts +1 -20
- package/build/transactions/interfaces/ITransactionBase.d.ts +21 -0
- package/build/transactions/interfaces/ITransactionBase.js +1 -0
- package/build/transactions/interfaces/transactions/ICommonTransaction.d.ts +1 -1
- package/build/transactions/metadata/TransactionReceipt.js +2 -2
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/utils/RevertDecoder.d.ts +1 -0
- package/build/utils/RevertDecoder.js +30 -0
- package/build/utxos/UTXOsManager.d.ts +2 -2
- package/build/utxos/interfaces/IProviderForUTXO.d.ts +7 -0
- package/build/utxos/interfaces/IProviderForUTXO.js +1 -0
- package/package.json +6 -4
- package/src/_version.ts +1 -1
- package/src/abi/shared/interfaces/motoswap/IMoto.ts +2 -1
- package/src/abi/shared/interfaces/motoswap/IMotoChef.ts +3 -2
- package/src/contracts/CallResult.ts +6 -39
- package/src/contracts/Contract.ts +1 -3
- package/src/contracts/OPNetEvent.ts +1 -1
- package/src/contracts/interfaces/IProviderForCallResult.ts +24 -0
- package/src/contracts/types/ContractTypes.ts +4 -0
- package/src/opnet.ts +5 -0
- package/src/providers/AbstractRpcProvider.ts +2 -1
- package/src/transactions/Transaction.ts +1 -1
- package/src/transactions/interfaces/ITransaction.ts +1 -78
- package/src/transactions/interfaces/ITransactionBase.ts +79 -0
- package/src/transactions/interfaces/transactions/ICommonTransaction.ts +1 -1
- package/src/transactions/metadata/TransactionReceipt.ts +2 -2
- package/src/utils/RevertDecoder.ts +46 -0
- package/src/utxos/UTXOsManager.ts +2 -2
- package/src/utxos/interfaces/IProviderForUTXO.ts +12 -0
package/browser/_version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "1.7.
|
|
1
|
+
export declare const version = "1.7.33";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Address } from '../../../../../node_modules/@btc-vision/transaction/build/index.js';
|
|
2
|
-
import {
|
|
2
|
+
import { CallResult } from '../../../../contracts/CallResult.js';
|
|
3
3
|
import { IOP20Contract } from '../opnet/IOP20Contract.js';
|
|
4
|
+
import { Admin, ChangeAdmin } from './IMotoswapStakingContract.js';
|
|
4
5
|
export type AdminMint = CallResult;
|
|
5
6
|
export type AdminBurn = CallResult;
|
|
6
7
|
export interface IMoto extends IOP20Contract {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Address } from '../../../../../node_modules/@btc-vision/transaction/build/index.js';
|
|
2
|
-
import { CallResult
|
|
3
|
-
import {
|
|
2
|
+
import { CallResult } from '../../../../contracts/CallResult.js';
|
|
3
|
+
import { OPNetEvent } from '../../../../contracts/OPNetEvent.js';
|
|
4
|
+
import { IOP_NETContract } from '../opnet/IOP_NETContract.js';
|
|
4
5
|
export type OwnershipTransferredEvent = {
|
|
5
6
|
readonly previousOwner: Address;
|
|
6
7
|
readonly newOwner: Address;
|
|
@@ -4,11 +4,11 @@ import { Address, BinaryReader, IP2WSHAddress, LoadedStorage, RawChallenge, Supp
|
|
|
4
4
|
import { ECPairInterface } from 'ecpair';
|
|
5
5
|
import { UTXO } from '../bitcoin/UTXOs.js';
|
|
6
6
|
import { BitcoinFees } from '../block/BlockGasParameters.js';
|
|
7
|
-
import { AbstractRpcProvider } from '../providers/AbstractRpcProvider.js';
|
|
8
|
-
import { ContractDecodedObjectResult, DecodedOutput } from './Contract.js';
|
|
9
7
|
import { IAccessList } from './interfaces/IAccessList.js';
|
|
10
8
|
import { EventList, ICallResultData } from './interfaces/ICallResult.js';
|
|
9
|
+
import { IProviderForCallResult } from './interfaces/IProviderForCallResult.js';
|
|
11
10
|
import { OPNetEvent } from './OPNetEvent.js';
|
|
11
|
+
import { ContractDecodedObjectResult, DecodedOutput } from './types/ContractTypes.js';
|
|
12
12
|
export interface TransactionParameters {
|
|
13
13
|
readonly signer: Signer | ECPairInterface | null;
|
|
14
14
|
readonly mldsaSigner: QuantumBIP32Interface | null;
|
|
@@ -87,12 +87,9 @@ export declare class CallResult<T extends ContractDecodedObjectResult = {}, U ex
|
|
|
87
87
|
address: Address | undefined;
|
|
88
88
|
fromAddress: Address | undefined;
|
|
89
89
|
csvAddress: IP2WSHAddress | undefined;
|
|
90
|
-
constructor(callResult: ICallResultData, provider:
|
|
90
|
+
constructor(callResult: ICallResultData, provider: IProviderForCallResult);
|
|
91
91
|
get rawEvents(): EventList;
|
|
92
92
|
static decodeRevertData(revertDataBytes: Uint8Array | Buffer): string;
|
|
93
|
-
private static startsWithErrorSelector;
|
|
94
|
-
private static areBytesEqual;
|
|
95
|
-
private static bytesToHexString;
|
|
96
93
|
setTo(to: string, address: Address): void;
|
|
97
94
|
setFromAddress(from?: Address): void;
|
|
98
95
|
signTransaction(interactionParams: TransactionParameters, amountAddition?: bigint): Promise<SignedInteractionTransactionReceipt>;
|
|
@@ -4,7 +4,6 @@ import { BitcoinInterface } from '../abi/BitcoinInterface.js';
|
|
|
4
4
|
import { BaseContractProperties } from '../abi/interfaces/BaseContractProperties.js';
|
|
5
5
|
import { BitcoinInterfaceAbi } from '../abi/interfaces/BitcoinInterfaceAbi.js';
|
|
6
6
|
import { BlockGasParameters } from '../block/BlockGasParameters.js';
|
|
7
|
-
import { DecodedCallResult } from '../common/CommonTypes.js';
|
|
8
7
|
import { AbstractRpcProvider } from '../providers/AbstractRpcProvider.js';
|
|
9
8
|
import { ContractEvents } from '../transactions/interfaces/ITransactionReceipt.js';
|
|
10
9
|
import { CallResult } from './CallResult.js';
|
|
@@ -12,14 +11,8 @@ import { IAccessList } from './interfaces/IAccessList.js';
|
|
|
12
11
|
import { IContract } from './interfaces/IContract.js';
|
|
13
12
|
import { ParsedSimulatedTransaction } from './interfaces/SimulatedTransaction.js';
|
|
14
13
|
import { OPNetEvent } from './OPNetEvent.js';
|
|
14
|
+
import { ContractDecodedObjectResult } from './types/ContractTypes.js';
|
|
15
15
|
declare const internal: unique symbol;
|
|
16
|
-
export type ContractDecodedObjectResult = {
|
|
17
|
-
[key: string]: DecodedCallResult;
|
|
18
|
-
};
|
|
19
|
-
export type DecodedOutput = {
|
|
20
|
-
values: Array<DecodedCallResult>;
|
|
21
|
-
obj: ContractDecodedObjectResult;
|
|
22
|
-
};
|
|
23
16
|
export declare abstract class IBaseContract<T extends BaseContractProperties> implements IContract {
|
|
24
17
|
readonly address: string | Address;
|
|
25
18
|
readonly network: Network;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NetEvent } from '../../node_modules/@btc-vision/transaction/build/index.js';
|
|
2
2
|
import { DecodedCallResult } from '../common/CommonTypes.js';
|
|
3
|
-
import { ContractDecodedObjectResult, DecodedOutput } from './
|
|
3
|
+
import { ContractDecodedObjectResult, DecodedOutput } from './types/ContractTypes.js';
|
|
4
4
|
export interface IDecodedEvent extends NetEvent {
|
|
5
5
|
readonly values: Array<DecodedCallResult>;
|
|
6
6
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Network } from '../../../node_modules/@btc-vision/bitcoin/build/index.js';
|
|
2
|
+
import { ChallengeSolution, IP2WSHAddress, Address } from '../../../node_modules/@btc-vision/transaction/build/index.js';
|
|
3
|
+
import { UTXO, UTXOs } from '../../bitcoin/UTXOs.js';
|
|
4
|
+
import { BroadcastedTransaction } from '../../transactions/interfaces/BroadcastedTransaction.js';
|
|
5
|
+
import { RequestUTXOsParamsWithAmount } from '../../utxos/interfaces/IUTXOsManager.js';
|
|
6
|
+
export interface IUTXOManagerForCallResult {
|
|
7
|
+
getUTXOsForAmount(params: RequestUTXOsParamsWithAmount): Promise<UTXO[]>;
|
|
8
|
+
spentUTXO(address: string, spent: UTXOs, newUTXOs: UTXOs): void;
|
|
9
|
+
clean(): void;
|
|
10
|
+
}
|
|
11
|
+
export interface IProviderForCallResult {
|
|
12
|
+
readonly network: Network;
|
|
13
|
+
readonly utxoManager: IUTXOManagerForCallResult;
|
|
14
|
+
getChallenge(): Promise<ChallengeSolution>;
|
|
15
|
+
sendRawTransaction(tx: string, psbt: boolean): Promise<BroadcastedTransaction>;
|
|
16
|
+
getCSV1ForAddress(address: Address): IP2WSHAddress;
|
|
17
|
+
}
|