opnet 1.0.37 → 1.0.39
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/IMotoswapRouterContract.d.ts +10 -10
- package/browser/contracts/Contract.d.ts +4 -1
- package/browser/contracts/interfaces/IContract.d.ts +3 -0
- package/browser/index.js +1 -1
- package/build/_version.d.ts +1 -1
- package/build/_version.js +1 -1
- package/build/abi/shared/interfaces/IMotoswapRouterContract.d.ts +10 -10
- package/build/contracts/Contract.d.ts +4 -1
- package/build/contracts/Contract.js +12 -0
- package/build/contracts/interfaces/IContract.d.ts +3 -0
- package/build/providers/AbstractRpcProvider.js +4 -0
- package/build/scripts/testMethods.js +0 -4
- package/build/scripts/testMethodsReg.js +11 -8
- package/docs/assets/search.js +1 -1
- package/docs/classes/AbstractRpcProvider.html +22 -22
- package/docs/classes/BaseContract.html +16 -8
- 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 +2 -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 +16 -8
- 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 +1 -1
- package/docs/interfaces/BaseContractProperties.html +4 -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 +2 -2
- package/docs/interfaces/ICommonTransaction.html +16 -16
- package/docs/interfaces/IContract.html +4 -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 +5 -3
- package/docs/interfaces/IMotoswapFactoryContract.html +6 -4
- package/docs/interfaces/IMotoswapPoolContract.html +12 -10
- package/docs/interfaces/IMotoswapRouterContract.html +14 -12
- package/docs/interfaces/IOP_20Contract.html +4 -2
- package/docs/interfaces/IOP_NETContract.html +4 -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 +6 -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 +4 -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 +4 -4
- package/src/_version.ts +1 -1
- package/src/abi/shared/interfaces/IMotoswapRouterContract.ts +26 -18
- package/src/contracts/Contract.ts +26 -1
- package/src/contracts/interfaces/IContract.ts +4 -0
- package/src/providers/AbstractRpcProvider.ts +7 -0
- package/src/scripts/testMethods.ts +0 -6
- package/src/scripts/testMethodsReg.ts +20 -4
package/browser/_version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "1.0.
|
|
1
|
+
export declare const version = "1.0.39";
|
|
@@ -2,14 +2,14 @@ import { Address } from '@btc-vision/bsi-binary';
|
|
|
2
2
|
import { BaseContractProperty } from '../../BaseContractProperty.js';
|
|
3
3
|
import { IOP_NETContract } from './IOP_NETContract.js';
|
|
4
4
|
export interface IMotoswapRouterContract extends IOP_NETContract {
|
|
5
|
-
addLiquidity(tokenA: Address, tokenB: Address, amountADesired: bigint, amountBDesired: bigint, amountAMin: bigint, amountBMin: bigint, to: Address, deadline: bigint): BaseContractProperty
|
|
6
|
-
removeLiquidity(tokenA: Address, tokenB: Address, liquidity: bigint, amountAMin: bigint, amountBMin: bigint, to: Address, deadline: bigint): BaseContractProperty
|
|
7
|
-
quote(amountA: bigint, reserveA: bigint, reserveB: bigint): BaseContractProperty
|
|
8
|
-
getAmountOut(amountIn: bigint, reserveIn: bigint, reserveOut: bigint): BaseContractProperty
|
|
9
|
-
getAmountIn(amountOut: bigint, reserveIn: bigint, reserveOut: bigint): BaseContractProperty
|
|
10
|
-
getAmountsOut(amountIn: bigint, path: Address[]): BaseContractProperty
|
|
11
|
-
getAmountsIn(amountOut: bigint, path: Address[]): BaseContractProperty
|
|
12
|
-
swapExactTokensForTokensSupportingFeeOnTransferTokens(amountIn: bigint, amountOutMin: bigint, path: Address[], to: Address, deadline: bigint): BaseContractProperty
|
|
13
|
-
factory(): BaseContractProperty
|
|
14
|
-
WBTC(): BaseContractProperty
|
|
5
|
+
addLiquidity(tokenA: Address, tokenB: Address, amountADesired: bigint, amountBDesired: bigint, amountAMin: bigint, amountBMin: bigint, to: Address, deadline: bigint): Promise<BaseContractProperty>;
|
|
6
|
+
removeLiquidity(tokenA: Address, tokenB: Address, liquidity: bigint, amountAMin: bigint, amountBMin: bigint, to: Address, deadline: bigint): Promise<BaseContractProperty>;
|
|
7
|
+
quote(amountA: bigint, reserveA: bigint, reserveB: bigint): Promise<BaseContractProperty>;
|
|
8
|
+
getAmountOut(amountIn: bigint, reserveIn: bigint, reserveOut: bigint): Promise<BaseContractProperty>;
|
|
9
|
+
getAmountIn(amountOut: bigint, reserveIn: bigint, reserveOut: bigint): Promise<BaseContractProperty>;
|
|
10
|
+
getAmountsOut(amountIn: bigint, path: Address[]): Promise<BaseContractProperty>;
|
|
11
|
+
getAmountsIn(amountOut: bigint, path: Address[]): Promise<BaseContractProperty>;
|
|
12
|
+
swapExactTokensForTokensSupportingFeeOnTransferTokens(amountIn: bigint, amountOutMin: bigint, path: Address[], to: Address, deadline: bigint): Promise<BaseContractProperty>;
|
|
13
|
+
factory(): Promise<BaseContractProperty>;
|
|
14
|
+
WBTC(): Promise<BaseContractProperty>;
|
|
15
15
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import { Address, NetEvent } from '@btc-vision/bsi-binary';
|
|
2
3
|
import { BaseContractProperty } from '../abi/BaseContractProperty.js';
|
|
3
4
|
import { BitcoinInterface } from '../abi/BitcoinInterface.js';
|
|
@@ -20,12 +21,14 @@ export declare abstract class IBaseContract<T extends BaseContractProperties> im
|
|
|
20
21
|
readonly address: BitcoinAddressLike;
|
|
21
22
|
readonly interface: BitcoinInterface;
|
|
22
23
|
readonly provider: AbstractRpcProvider;
|
|
23
|
-
|
|
24
|
+
from?: Address;
|
|
24
25
|
readonly [internal]: keyof T | undefined;
|
|
25
26
|
private events;
|
|
26
27
|
protected constructor(address: BitcoinAddressLike, abi: BitcoinInterface | BitcoinInterfaceAbi, provider: AbstractRpcProvider, from?: Address);
|
|
28
|
+
setSender(sender: Address): void;
|
|
27
29
|
decodeEvents(events: NetEvent[] | ContractEvents): OPNetEvent[];
|
|
28
30
|
decodeEvent(event: NetEvent): OPNetEvent;
|
|
31
|
+
encodeCalldata(functionName: string, args: unknown[]): Buffer;
|
|
29
32
|
protected getFunction(name: symbol): BaseContractProperty | undefined | string | number | symbol;
|
|
30
33
|
private defineInternalFunctions;
|
|
31
34
|
private encodeFunctionData;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import { NetEvent } from '@btc-vision/bsi-binary';
|
|
2
3
|
import { BitcoinAddressLike } from '../../common/CommonTypes.js';
|
|
3
4
|
import { ContractEvents } from '../../transactions/interfaces/ITransactionReceipt.js';
|
|
4
5
|
import { OPNetEvent } from '../OPNetEvent.js';
|
|
5
6
|
export interface IContract {
|
|
6
7
|
readonly address: BitcoinAddressLike;
|
|
8
|
+
setSender(sender: BitcoinAddressLike): void;
|
|
7
9
|
decodeEvents(events: NetEvent[] | ContractEvents): OPNetEvent[];
|
|
8
10
|
decodeEvent(event: NetEvent): OPNetEvent;
|
|
11
|
+
encodeCalldata(method: string, ...args: unknown[]): Buffer;
|
|
9
12
|
}
|