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.
Files changed (145) hide show
  1. package/browser/_version.d.ts +1 -1
  2. package/browser/abi/shared/interfaces/IMotoswapRouterContract.d.ts +10 -10
  3. package/browser/contracts/Contract.d.ts +4 -1
  4. package/browser/contracts/interfaces/IContract.d.ts +3 -0
  5. package/browser/index.js +1 -1
  6. package/build/_version.d.ts +1 -1
  7. package/build/_version.js +1 -1
  8. package/build/abi/shared/interfaces/IMotoswapRouterContract.d.ts +10 -10
  9. package/build/contracts/Contract.d.ts +4 -1
  10. package/build/contracts/Contract.js +12 -0
  11. package/build/contracts/interfaces/IContract.d.ts +3 -0
  12. package/build/providers/AbstractRpcProvider.js +4 -0
  13. package/build/scripts/testMethods.js +0 -4
  14. package/build/scripts/testMethodsReg.js +11 -8
  15. package/docs/assets/search.js +1 -1
  16. package/docs/classes/AbstractRpcProvider.html +22 -22
  17. package/docs/classes/BaseContract.html +16 -8
  18. package/docs/classes/BitcoinAddress.html +2 -2
  19. package/docs/classes/BitcoinInterface.html +2 -2
  20. package/docs/classes/BitcoinUtils.html +2 -2
  21. package/docs/classes/Block.html +3 -3
  22. package/docs/classes/CallResult.html +2 -2
  23. package/docs/classes/ContractData.html +2 -2
  24. package/docs/classes/DeploymentTransaction.html +24 -24
  25. package/docs/classes/GenericTransaction.html +14 -14
  26. package/docs/classes/IBaseContract.html +16 -8
  27. package/docs/classes/InteractionTransaction.html +21 -21
  28. package/docs/classes/JSONRpcProvider.html +22 -22
  29. package/docs/classes/OPNetEvent.html +2 -2
  30. package/docs/classes/StoredValue.html +2 -2
  31. package/docs/classes/TransactionBase.html +14 -14
  32. package/docs/classes/TransactionInput.html +2 -2
  33. package/docs/classes/TransactionOutput.html +2 -2
  34. package/docs/classes/TransactionParser.html +2 -2
  35. package/docs/classes/TransactionReceipt.html +7 -7
  36. package/docs/classes/UTXO.html +2 -2
  37. package/docs/classes/UnwrapTransaction.html +26 -26
  38. package/docs/classes/WebSocketRpcProvider.html +22 -22
  39. package/docs/classes/WrapTransaction.html +28 -28
  40. package/docs/enums/BitcoinAbiTypes.html +2 -2
  41. package/docs/enums/GenerateTarget.html +2 -2
  42. package/docs/enums/JSONRPCErrorCode.html +2 -2
  43. package/docs/enums/JSONRPCErrorHttpCodes.html +2 -2
  44. package/docs/enums/JSONRpcMethods.html +9 -9
  45. package/docs/enums/OPNetTransactionTypes.html +2 -2
  46. package/docs/functions/getContract.html +1 -1
  47. package/docs/interfaces/BaseContractProperties.html +4 -2
  48. package/docs/interfaces/BitcoinAbiValue.html +3 -3
  49. package/docs/interfaces/BitcoinInterfaceAbiBase.html +2 -2
  50. package/docs/interfaces/BroadcastedTransaction.html +6 -6
  51. package/docs/interfaces/ContractEvents.html +1 -1
  52. package/docs/interfaces/EventBaseData.html +2 -2
  53. package/docs/interfaces/FunctionBaseData.html +2 -2
  54. package/docs/interfaces/IAccessList.html +1 -1
  55. package/docs/interfaces/IAccessListItem.html +1 -1
  56. package/docs/interfaces/IBlock.html +3 -3
  57. package/docs/interfaces/IBlockCommon.html +3 -3
  58. package/docs/interfaces/IBlockWitness.html +2 -2
  59. package/docs/interfaces/IBlockWitnessAPI.html +2 -2
  60. package/docs/interfaces/ICallRequestError.html +2 -2
  61. package/docs/interfaces/ICallResultData.html +2 -2
  62. package/docs/interfaces/ICommonTransaction.html +16 -16
  63. package/docs/interfaces/IContract.html +4 -2
  64. package/docs/interfaces/IDecodedEvent.html +2 -2
  65. package/docs/interfaces/IDeploymentTransaction.html +23 -23
  66. package/docs/interfaces/IGenericTransaction.html +13 -13
  67. package/docs/interfaces/IInteractionTransaction.html +20 -20
  68. package/docs/interfaces/IMotoContract.html +5 -3
  69. package/docs/interfaces/IMotoswapFactoryContract.html +6 -4
  70. package/docs/interfaces/IMotoswapPoolContract.html +12 -10
  71. package/docs/interfaces/IMotoswapRouterContract.html +14 -12
  72. package/docs/interfaces/IOP_20Contract.html +4 -2
  73. package/docs/interfaces/IOP_NETContract.html +4 -2
  74. package/docs/interfaces/IRawContract.html +2 -2
  75. package/docs/interfaces/IRawContractEvents.html +1 -1
  76. package/docs/interfaces/IStackingContract.html +2 -2
  77. package/docs/interfaces/IStorageValue.html +2 -2
  78. package/docs/interfaces/ITransactionBase.html +13 -13
  79. package/docs/interfaces/ITransactionInput.html +2 -2
  80. package/docs/interfaces/ITransactionOutput.html +2 -2
  81. package/docs/interfaces/ITransactionReceipt.html +5 -5
  82. package/docs/interfaces/IUTXO.html +2 -2
  83. package/docs/interfaces/IUnwrapTransaction.html +25 -25
  84. package/docs/interfaces/IWBTCContract.html +6 -4
  85. package/docs/interfaces/IWrapTransaction.html +27 -27
  86. package/docs/interfaces/JSONRpc2Request.html +2 -2
  87. package/docs/interfaces/JSONRpc2ResponseError.html +2 -2
  88. package/docs/interfaces/JSONRpc2ResponseResult.html +2 -2
  89. package/docs/interfaces/JSONRpc2ResultData.html +1 -1
  90. package/docs/interfaces/JSONRpcErrorData.html +1 -1
  91. package/docs/interfaces/JSONRpcParams.html +1 -1
  92. package/docs/interfaces/JSONRpcResultError.html +2 -2
  93. package/docs/interfaces/MergedOP_20AndStackingContract.html +4 -2
  94. package/docs/interfaces/NetEventDocument.html +5 -5
  95. package/docs/interfaces/ParsedPartialWBTCUTXODocument.html +2 -2
  96. package/docs/interfaces/PartialWBTCUTXODocument.html +2 -2
  97. package/docs/interfaces/ReorgInformation.html +2 -2
  98. package/docs/interfaces/UsedUTXO.html +2 -2
  99. package/docs/types/BaseContractProperty.html +1 -1
  100. package/docs/types/BigNumberish.html +1 -1
  101. package/docs/types/BitcoinAddressLike.html +1 -1
  102. package/docs/types/BitcoinInterfaceAbi.html +1 -1
  103. package/docs/types/BlockHeaderChecksumProof.html +1 -1
  104. package/docs/types/BlockTag.html +1 -1
  105. package/docs/types/BlockWitnesses.html +1 -1
  106. package/docs/types/ContractDecodedObjectResult.html +1 -1
  107. package/docs/types/DecodedCallResult.html +1 -1
  108. package/docs/types/DecodedOutput.html +1 -1
  109. package/docs/types/GenerationParameters.html +1 -1
  110. package/docs/types/ICallResult.html +1 -1
  111. package/docs/types/ITransaction.html +1 -1
  112. package/docs/types/InteractionType.html +1 -1
  113. package/docs/types/JSONRpc2RequestParams.html +1 -1
  114. package/docs/types/JSONRpc2Result.html +1 -1
  115. package/docs/types/JSONRpcId.html +1 -1
  116. package/docs/types/JsonRpcCallResult.html +1 -1
  117. package/docs/types/JsonRpcError.html +1 -1
  118. package/docs/types/JsonRpcPayload.html +1 -1
  119. package/docs/types/JsonRpcResult.html +1 -1
  120. package/docs/types/Numeric.html +1 -1
  121. package/docs/types/PointerLike.html +1 -1
  122. package/docs/types/RawContractEvents.html +1 -1
  123. package/docs/types/UTXOs.html +1 -1
  124. package/docs/variables/MOTOSWAP_ROUTER_ABI.html +1 -1
  125. package/docs/variables/MOTO_TOKEN_ABI.html +1 -1
  126. package/docs/variables/MotoSwapFactoryAbi.html +1 -1
  127. package/docs/variables/MotoSwapFactoryEvents.html +1 -1
  128. package/docs/variables/MotoSwapPoolEvents.html +1 -1
  129. package/docs/variables/MotoswapPoolAbi.html +1 -1
  130. package/docs/variables/OP20Events.html +1 -1
  131. package/docs/variables/OP_20_ABI.html +1 -1
  132. package/docs/variables/OP_NET_ABI.html +1 -1
  133. package/docs/variables/STAKING_ABI.html +1 -1
  134. package/docs/variables/StackingEvents.html +1 -1
  135. package/docs/variables/WBTCEvents.html +1 -1
  136. package/docs/variables/WBTC_ABI.html +1 -1
  137. package/docs/variables/version.html +1 -1
  138. package/package.json +4 -4
  139. package/src/_version.ts +1 -1
  140. package/src/abi/shared/interfaces/IMotoswapRouterContract.ts +26 -18
  141. package/src/contracts/Contract.ts +26 -1
  142. package/src/contracts/interfaces/IContract.ts +4 -0
  143. package/src/providers/AbstractRpcProvider.ts +7 -0
  144. package/src/scripts/testMethods.ts +0 -6
  145. package/src/scripts/testMethodsReg.ts +20 -4
@@ -1 +1 @@
1
- export declare const version = "1.0.37";
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
- readonly from?: Address;
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
  }