opnet 1.0.35 → 1.0.37
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/contracts/CallResult.d.ts +6 -2
- package/browser/contracts/Contract.d.ts +5 -4
- package/browser/contracts/interfaces/ICallResult.d.ts +1 -0
- package/browser/index.js +1 -1
- package/build/_version.d.ts +1 -1
- package/build/_version.js +1 -1
- package/build/contracts/CallResult.d.ts +6 -2
- package/build/contracts/CallResult.js +14 -6
- package/build/contracts/Contract.d.ts +5 -4
- package/build/contracts/Contract.js +9 -6
- package/build/contracts/interfaces/ICallResult.d.ts +1 -0
- package/build/providers/AbstractRpcProvider.js +1 -1
- package/build/scripts/testMethodsReg.js +5 -3
- package/docs/assets/search.js +1 -1
- package/docs/classes/AbstractRpcProvider.html +22 -22
- package/docs/classes/BaseContract.html +9 -7
- package/docs/classes/BitcoinAddress.html +2 -2
- package/docs/classes/BitcoinInterface.html +2 -2
- package/docs/classes/BitcoinUtils.html +2 -2
- package/docs/classes/Block.html +3 -3
- package/docs/classes/CallResult.html +5 -2
- package/docs/classes/ContractData.html +2 -2
- package/docs/classes/DeploymentTransaction.html +24 -24
- package/docs/classes/GenericTransaction.html +14 -14
- package/docs/classes/IBaseContract.html +9 -7
- package/docs/classes/InteractionTransaction.html +21 -21
- package/docs/classes/JSONRpcProvider.html +22 -22
- package/docs/classes/OPNetEvent.html +2 -2
- package/docs/classes/StoredValue.html +2 -2
- package/docs/classes/TransactionBase.html +14 -14
- package/docs/classes/TransactionInput.html +2 -2
- package/docs/classes/TransactionOutput.html +2 -2
- package/docs/classes/TransactionParser.html +2 -2
- package/docs/classes/TransactionReceipt.html +7 -7
- package/docs/classes/UTXO.html +2 -2
- package/docs/classes/UnwrapTransaction.html +26 -26
- package/docs/classes/WebSocketRpcProvider.html +22 -22
- package/docs/classes/WrapTransaction.html +28 -28
- package/docs/enums/BitcoinAbiTypes.html +2 -2
- package/docs/enums/GenerateTarget.html +2 -2
- package/docs/enums/JSONRPCErrorCode.html +2 -2
- package/docs/enums/JSONRPCErrorHttpCodes.html +2 -2
- package/docs/enums/JSONRpcMethods.html +9 -9
- package/docs/enums/OPNetTransactionTypes.html +2 -2
- package/docs/functions/getContract.html +3 -2
- package/docs/hierarchy.html +1 -1
- package/docs/interfaces/BaseContractProperties.html +2 -2
- package/docs/interfaces/BitcoinAbiValue.html +3 -3
- package/docs/interfaces/BitcoinInterfaceAbiBase.html +2 -2
- package/docs/interfaces/BroadcastedTransaction.html +6 -6
- package/docs/interfaces/ContractEvents.html +1 -1
- package/docs/interfaces/EventBaseData.html +2 -2
- package/docs/interfaces/FunctionBaseData.html +2 -2
- package/docs/interfaces/IAccessList.html +1 -1
- package/docs/interfaces/IAccessListItem.html +1 -1
- package/docs/interfaces/IBlock.html +3 -3
- package/docs/interfaces/IBlockCommon.html +3 -3
- package/docs/interfaces/IBlockWitness.html +2 -2
- package/docs/interfaces/IBlockWitnessAPI.html +2 -2
- package/docs/interfaces/ICallRequestError.html +2 -2
- package/docs/interfaces/ICallResultData.html +3 -2
- package/docs/interfaces/ICommonTransaction.html +16 -16
- package/docs/interfaces/IContract.html +2 -2
- package/docs/interfaces/IDecodedEvent.html +2 -2
- package/docs/interfaces/IDeploymentTransaction.html +23 -23
- package/docs/interfaces/IGenericTransaction.html +13 -13
- package/docs/interfaces/IInteractionTransaction.html +20 -20
- package/docs/interfaces/IMotoContract.html +3 -3
- package/docs/interfaces/IMotoswapFactoryContract.html +4 -4
- package/docs/interfaces/IMotoswapPoolContract.html +10 -10
- package/docs/interfaces/IMotoswapRouterContract.html +12 -12
- package/docs/interfaces/IOP_20Contract.html +2 -2
- package/docs/interfaces/IOP_NETContract.html +2 -2
- package/docs/interfaces/IRawContract.html +2 -2
- package/docs/interfaces/IRawContractEvents.html +1 -1
- package/docs/interfaces/IStackingContract.html +2 -2
- package/docs/interfaces/IStorageValue.html +2 -2
- package/docs/interfaces/ITransactionBase.html +13 -13
- package/docs/interfaces/ITransactionInput.html +2 -2
- package/docs/interfaces/ITransactionOutput.html +2 -2
- package/docs/interfaces/ITransactionReceipt.html +5 -5
- package/docs/interfaces/IUTXO.html +2 -2
- package/docs/interfaces/IUnwrapTransaction.html +25 -25
- package/docs/interfaces/IWBTCContract.html +4 -4
- package/docs/interfaces/IWrapTransaction.html +27 -27
- package/docs/interfaces/JSONRpc2Request.html +2 -2
- package/docs/interfaces/JSONRpc2ResponseError.html +2 -2
- package/docs/interfaces/JSONRpc2ResponseResult.html +2 -2
- package/docs/interfaces/JSONRpc2ResultData.html +1 -1
- package/docs/interfaces/JSONRpcErrorData.html +1 -1
- package/docs/interfaces/JSONRpcParams.html +1 -1
- package/docs/interfaces/JSONRpcResultError.html +2 -2
- package/docs/interfaces/MergedOP_20AndStackingContract.html +2 -2
- package/docs/interfaces/NetEventDocument.html +5 -5
- package/docs/interfaces/ParsedPartialWBTCUTXODocument.html +2 -2
- package/docs/interfaces/PartialWBTCUTXODocument.html +2 -2
- package/docs/interfaces/ReorgInformation.html +2 -2
- package/docs/interfaces/UsedUTXO.html +2 -2
- package/docs/types/BaseContractProperty.html +1 -1
- package/docs/types/BigNumberish.html +1 -1
- package/docs/types/BitcoinAddressLike.html +1 -1
- package/docs/types/BitcoinInterfaceAbi.html +1 -1
- package/docs/types/BlockHeaderChecksumProof.html +1 -1
- package/docs/types/BlockTag.html +1 -1
- package/docs/types/BlockWitnesses.html +1 -1
- package/docs/types/ContractDecodedObjectResult.html +1 -1
- package/docs/types/DecodedCallResult.html +1 -1
- package/docs/types/DecodedOutput.html +1 -1
- package/docs/types/GenerationParameters.html +1 -1
- package/docs/types/ICallResult.html +1 -1
- package/docs/types/ITransaction.html +1 -1
- package/docs/types/InteractionType.html +1 -1
- package/docs/types/JSONRpc2RequestParams.html +1 -1
- package/docs/types/JSONRpc2Result.html +1 -1
- package/docs/types/JSONRpcId.html +1 -1
- package/docs/types/JsonRpcCallResult.html +1 -1
- package/docs/types/JsonRpcError.html +1 -1
- package/docs/types/JsonRpcPayload.html +1 -1
- package/docs/types/JsonRpcResult.html +1 -1
- package/docs/types/Numeric.html +1 -1
- package/docs/types/PointerLike.html +1 -1
- package/docs/types/RawContractEvents.html +1 -1
- package/docs/types/UTXOs.html +1 -1
- package/docs/variables/MOTOSWAP_ROUTER_ABI.html +1 -1
- package/docs/variables/MOTO_TOKEN_ABI.html +1 -1
- package/docs/variables/MotoSwapFactoryAbi.html +1 -1
- package/docs/variables/MotoSwapFactoryEvents.html +1 -1
- package/docs/variables/MotoSwapPoolEvents.html +1 -1
- package/docs/variables/MotoswapPoolAbi.html +1 -1
- package/docs/variables/OP20Events.html +1 -1
- package/docs/variables/OP_20_ABI.html +1 -1
- package/docs/variables/OP_NET_ABI.html +1 -1
- package/docs/variables/STAKING_ABI.html +1 -1
- package/docs/variables/StackingEvents.html +1 -1
- package/docs/variables/WBTCEvents.html +1 -1
- package/docs/variables/WBTC_ABI.html +1 -1
- package/docs/variables/version.html +1 -1
- package/package.json +1 -1
- package/src/_version.ts +1 -1
- package/src/contracts/CallResult.ts +20 -7
- package/src/contracts/Contract.ts +16 -3
- package/src/contracts/interfaces/ICallResult.ts +1 -0
- package/src/providers/AbstractRpcProvider.ts +6 -2
- package/src/scripts/testMethodsReg.ts +9 -3
package/browser/_version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "1.0.
|
|
1
|
+
export declare const version = "1.0.37";
|
|
@@ -1,15 +1,19 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import { BinaryReader, NetEvent } from '@btc-vision/bsi-binary';
|
|
2
3
|
import { DecodedCallResult } from '../common/CommonTypes.js';
|
|
3
4
|
import { ContractDecodedObjectResult, DecodedOutput } from './Contract.js';
|
|
4
5
|
import { IAccessList } from './interfaces/IAccessList.js';
|
|
5
6
|
import { ICallResultData } from './interfaces/ICallResult.js';
|
|
6
|
-
export declare class CallResult<T extends ContractDecodedObjectResult = {}> implements ICallResultData {
|
|
7
|
+
export declare class CallResult<T extends ContractDecodedObjectResult = {}> implements Omit<ICallResultData, 'estimatedGas'> {
|
|
7
8
|
readonly result: BinaryReader;
|
|
8
9
|
readonly events: NetEvent[];
|
|
9
10
|
readonly accessList: IAccessList;
|
|
11
|
+
calldata: Buffer | undefined;
|
|
12
|
+
readonly estimatedGas: bigint | undefined;
|
|
10
13
|
readonly decoded: Array<DecodedCallResult>;
|
|
11
14
|
properties: T;
|
|
12
|
-
constructor(
|
|
15
|
+
constructor(callResult: ICallResultData);
|
|
13
16
|
setDecoded(decoded: DecodedOutput): void;
|
|
17
|
+
setCalldata(calldata: Buffer): void;
|
|
14
18
|
private base64ToUint8Array;
|
|
15
19
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NetEvent } from '@btc-vision/bsi-binary';
|
|
1
|
+
import { Address, NetEvent } from '@btc-vision/bsi-binary';
|
|
2
2
|
import { BaseContractProperty } from '../abi/BaseContractProperty.js';
|
|
3
3
|
import { BitcoinInterface } from '../abi/BitcoinInterface.js';
|
|
4
4
|
import { BaseContractProperties } from '../abi/interfaces/BaseContractProperties.js';
|
|
@@ -20,9 +20,10 @@ export declare abstract class IBaseContract<T extends BaseContractProperties> im
|
|
|
20
20
|
readonly address: BitcoinAddressLike;
|
|
21
21
|
readonly interface: BitcoinInterface;
|
|
22
22
|
readonly provider: AbstractRpcProvider;
|
|
23
|
+
readonly from?: Address;
|
|
23
24
|
readonly [internal]: keyof T | undefined;
|
|
24
25
|
private events;
|
|
25
|
-
protected constructor(address: BitcoinAddressLike, abi: BitcoinInterface | BitcoinInterfaceAbi, provider: AbstractRpcProvider);
|
|
26
|
+
protected constructor(address: BitcoinAddressLike, abi: BitcoinInterface | BitcoinInterfaceAbi, provider: AbstractRpcProvider, from?: Address);
|
|
26
27
|
decodeEvents(events: NetEvent[] | ContractEvents): OPNetEvent[];
|
|
27
28
|
decodeEvent(event: NetEvent): OPNetEvent;
|
|
28
29
|
protected getFunction(name: symbol): BaseContractProperty | undefined | string | number | symbol;
|
|
@@ -33,8 +34,8 @@ export declare abstract class IBaseContract<T extends BaseContractProperties> im
|
|
|
33
34
|
private callFunction;
|
|
34
35
|
}
|
|
35
36
|
export declare class BaseContract<T extends BaseContractProperties> extends IBaseContract<T> {
|
|
36
|
-
constructor(address: BitcoinAddressLike, abi: BitcoinInterface | BitcoinInterfaceAbi, provider: AbstractRpcProvider);
|
|
37
|
+
constructor(address: BitcoinAddressLike, abi: BitcoinInterface | BitcoinInterfaceAbi, provider: AbstractRpcProvider, sender?: Address);
|
|
37
38
|
private proxify;
|
|
38
39
|
}
|
|
39
|
-
export declare function getContract<T extends BaseContractProperties>(address: BitcoinAddressLike, abi: BitcoinInterface | BitcoinInterfaceAbi, provider: AbstractRpcProvider): BaseContract<T> & Omit<T, keyof BaseContract<T>>;
|
|
40
|
+
export declare function getContract<T extends BaseContractProperties>(address: BitcoinAddressLike, abi: BitcoinInterface | BitcoinInterfaceAbi, provider: AbstractRpcProvider, sender?: Address): BaseContract<T> & Omit<T, keyof BaseContract<T>>;
|
|
40
41
|
export {};
|