opnet 1.0.33 → 1.0.34
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/IMotoContract.d.ts +6 -0
- package/browser/abi/shared/interfaces/IMotoswapFactoryContract.d.ts +7 -0
- package/browser/abi/shared/interfaces/IMotoswapPoolContract.d.ts +12 -0
- package/browser/abi/shared/interfaces/IOP_20Contract.d.ts +16 -0
- package/browser/abi/shared/interfaces/IOP_NETContract.d.ts +7 -0
- package/browser/abi/shared/interfaces/IStackingContract.d.ts +11 -0
- package/browser/abi/shared/interfaces/IWBTCContract.d.ts +8 -0
- package/browser/abi/shared/json/MOTOSWAP_FACTORY_ABI.d.ts +2 -0
- package/browser/abi/shared/json/MOTOSWAP_POOL_ABI.d.ts +2 -0
- package/browser/abi/shared/json/MOTO_TOKEN_ABI.d.ts +2 -0
- package/browser/abi/shared/json/OP_20_ABI.d.ts +2 -0
- package/browser/abi/shared/json/OP_NET_ABI.d.ts +2 -0
- package/browser/abi/shared/json/STAKING_ABI.d.ts +2 -0
- package/browser/abi/shared/json/WBTC_ABI.d.ts +2 -0
- package/browser/common/CommonTypes.d.ts +2 -1
- package/browser/index.js +1 -1
- package/browser/opnet.d.ts +16 -0
- package/browser/scripts/ITestContract.d.ts +2 -0
- package/browser/scripts/testWBTCContract.d.ts +1 -0
- package/build/_version.d.ts +1 -1
- package/build/_version.js +1 -1
- package/build/abi/shared/MOTOSWAP_FACTORY_ABI.d.ts +2 -0
- package/build/abi/shared/MOTOSWAP_FACTORY_ABI.js +68 -0
- package/build/abi/shared/OP_20_ABI.d.ts +2 -0
- package/build/abi/shared/OP_20_ABI.js +235 -0
- package/build/abi/shared/OP_NET_ABI.d.ts +2 -0
- package/build/abi/shared/OP_NET_ABI.js +31 -0
- package/build/abi/shared/STAKING_ABI.d.ts +2 -0
- package/build/abi/shared/STAKING_ABI.js +96 -0
- package/build/abi/shared/WBTC_ABI.d.ts +2 -0
- package/build/abi/shared/WBTC_ABI.js +40 -0
- package/build/abi/shared/interfaces/IMotoContract.d.ts +6 -0
- package/build/abi/shared/interfaces/IMotoContract.js +1 -0
- package/build/abi/shared/interfaces/IMotoswapFactoryContract.d.ts +7 -0
- package/build/abi/shared/interfaces/IMotoswapFactoryContract.js +1 -0
- package/build/abi/shared/interfaces/IMotoswapPoolContract.d.ts +12 -0
- package/build/abi/shared/interfaces/IMotoswapPoolContract.js +1 -0
- package/build/abi/shared/interfaces/IOP_20Contract.d.ts +16 -0
- package/build/abi/shared/interfaces/IOP_20Contract.js +1 -0
- package/build/abi/shared/interfaces/IOP_NETContract.d.ts +7 -0
- package/build/abi/shared/interfaces/IOP_NETContract.js +1 -0
- package/build/abi/shared/interfaces/IStackingContract.d.ts +11 -0
- package/build/abi/shared/interfaces/IStackingContract.js +1 -0
- package/build/abi/shared/interfaces/IWBTCContract.d.ts +8 -0
- package/build/abi/shared/interfaces/IWBTCContract.js +1 -0
- package/build/abi/shared/json/MOTOSWAP_FACTORY_ABI.d.ts +2 -0
- package/build/abi/shared/json/MOTOSWAP_FACTORY_ABI.js +68 -0
- package/build/abi/shared/json/MOTOSWAP_POOL_ABI.d.ts +2 -0
- package/build/abi/shared/json/MOTOSWAP_POOL_ABI.js +272 -0
- package/build/abi/shared/json/MOTO_TOKEN_ABI.d.ts +2 -0
- package/build/abi/shared/json/MOTO_TOKEN_ABI.js +22 -0
- package/build/abi/shared/json/OP_20_ABI.d.ts +2 -0
- package/build/abi/shared/json/OP_20_ABI.js +253 -0
- package/build/abi/shared/json/OP_NET_ABI.d.ts +2 -0
- package/build/abi/shared/json/OP_NET_ABI.js +31 -0
- package/build/abi/shared/json/STAKING_ABI.d.ts +2 -0
- package/build/abi/shared/json/STAKING_ABI.js +126 -0
- package/build/abi/shared/json/WBTC_ABI.d.ts +2 -0
- package/build/abi/shared/json/WBTC_ABI.js +54 -0
- package/build/common/CommonTypes.d.ts +2 -1
- package/build/contracts/Contract.js +52 -10
- package/build/opnet.d.ts +16 -0
- package/build/opnet.js +16 -0
- package/build/scripts/ITestContract.d.ts +0 -2
- package/build/scripts/ITestContract.js +1 -260
- package/build/scripts/testMethods.js +2 -2
- package/build/scripts/testMethodsReg.js +2 -2
- package/build/scripts/testWBTCContract.d.ts +1 -0
- package/build/scripts/testWBTCContract.js +11 -0
- package/docs/assets/highlight.css +14 -0
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/AbstractRpcProvider.html +22 -22
- package/docs/classes/BaseContract.html +7 -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 +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 +7 -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 +225 -0
- package/docs/classes/WebSocketRpcProvider.html +22 -22
- package/docs/classes/WrapTransaction.html +28 -28
- package/docs/enums/ABIDataTypes.html +4 -1
- 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 -1
- 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 +2 -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 +194 -0
- package/docs/interfaces/IMotoswapFactoryContract.html +191 -0
- package/docs/interfaces/IMotoswapPoolContract.html +206 -0
- package/docs/interfaces/IOP_20Contract.html +194 -0
- package/docs/interfaces/IOP_NETContract.html +181 -0
- package/docs/interfaces/IRawContract.html +2 -2
- package/docs/interfaces/IRawContractEvents.html +1 -1
- package/docs/interfaces/IStackingContract.html +183 -0
- 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 +224 -0
- package/docs/interfaces/IWBTCContract.html +207 -0
- 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 +199 -0
- package/docs/interfaces/NetEventDocument.html +5 -5
- package/docs/interfaces/ParsedPartialWBTCUTXODocument.html +179 -0
- package/docs/interfaces/PartialWBTCUTXODocument.html +179 -0
- package/docs/interfaces/ReorgInformation.html +2 -2
- package/docs/interfaces/UsedUTXO.html +176 -0
- package/docs/modules.html +20 -0
- 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/MOTO_TOKEN_ABI.html +174 -0
- package/docs/variables/MotoSwapFactoryAbi.html +174 -0
- package/docs/variables/MotoswapPoolAbi.html +174 -0
- package/docs/variables/OP_20_ABI.html +174 -0
- package/docs/variables/OP_NET_ABI.html +174 -0
- package/docs/variables/STAKING_ABI.html +174 -0
- package/docs/variables/WBTC_ABI.html +174 -0
- package/docs/variables/version.html +1 -1
- package/package.json +3 -3
- package/src/_version.ts +1 -1
- package/src/abi/shared/interfaces/IMotoContract.ts +16 -0
- package/src/abi/shared/interfaces/IMotoswapFactoryContract.ts +26 -0
- package/src/abi/shared/interfaces/IMotoswapPoolContract.ts +70 -0
- package/src/abi/shared/interfaces/IOP_20Contract.ts +59 -0
- package/src/abi/shared/interfaces/IOP_NETContract.ts +14 -0
- package/src/abi/shared/interfaces/IStackingContract.ts +23 -0
- package/src/abi/shared/interfaces/IWBTCContract.ts +32 -0
- package/src/abi/shared/json/MOTOSWAP_FACTORY_ABI.ts +72 -0
- package/src/abi/shared/json/MOTOSWAP_POOL_ABI.ts +289 -0
- package/src/abi/shared/json/MOTO_TOKEN_ABI.ts +26 -0
- package/src/{scripts/ITestContract.ts → abi/shared/json/OP_20_ABI.ts} +13 -58
- package/src/abi/shared/json/OP_NET_ABI.ts +34 -0
- package/src/abi/shared/json/STAKING_ABI.ts +130 -0
- package/src/abi/shared/json/WBTC_ABI.ts +63 -0
- package/src/common/CommonTypes.ts +3 -1
- package/src/contracts/Contract.ts +71 -10
- package/src/opnet.ts +21 -0
- package/src/scripts/testMethods.ts +5 -83
- package/src/scripts/testMethodsReg.ts +5 -23
- package/src/scripts/testWBTCContract.ts +22 -0
- package/src/scripts/testContract.ts +0 -23
- package/src/scripts/test_abi.json +0 -31
package/browser/_version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "1.0.
|
|
1
|
+
export declare const version = "1.0.34";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Address } from '@btc-vision/bsi-binary';
|
|
2
|
+
import { BaseContractProperty } from '../../BaseContractProperty.js';
|
|
3
|
+
import { IOP_20Contract } from './IOP_20Contract.js';
|
|
4
|
+
export interface IMotoContract extends IOP_20Contract {
|
|
5
|
+
airdrop(list: Map<Address, bigint>): Promise<BaseContractProperty>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Address } from '@btc-vision/bsi-binary';
|
|
2
|
+
import { BaseContractProperty } from '../../BaseContractProperty.js';
|
|
3
|
+
import { IOP_NETContract } from './IOP_NETContract.js';
|
|
4
|
+
export interface IMotoswapFactoryContract extends IOP_NETContract {
|
|
5
|
+
getPool(token0: Address, token1: Address): Promise<BaseContractProperty>;
|
|
6
|
+
createPool(token0: Address, token1: Address): Promise<BaseContractProperty>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseContractProperty } from '../../BaseContractProperty.js';
|
|
2
|
+
import { IOP_20Contract } from './IOP_20Contract.js';
|
|
3
|
+
export interface IMotoswapPoolContract extends Omit<IOP_20Contract, 'burn' | 'mint'> {
|
|
4
|
+
token0(): Promise<BaseContractProperty>;
|
|
5
|
+
token1(): Promise<BaseContractProperty>;
|
|
6
|
+
getReserves(): Promise<BaseContractProperty>;
|
|
7
|
+
swap(amount0Out: bigint, amount1Out: bigint, to: string, data: Uint8Array): Promise<BaseContractProperty>;
|
|
8
|
+
burn(amount0: bigint, amount1: bigint): Promise<BaseContractProperty>;
|
|
9
|
+
sync(): Promise<BaseContractProperty>;
|
|
10
|
+
price0CumulativeLast(): Promise<BaseContractProperty>;
|
|
11
|
+
price1CumulativeLast(): Promise<BaseContractProperty>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BitcoinAddressLike } from '../../../common/CommonTypes.js';
|
|
2
|
+
import { BaseContractProperty } from '../../BaseContractProperty.js';
|
|
3
|
+
import { IOP_NETContract } from './IOP_NETContract.js';
|
|
4
|
+
export interface IOP_20Contract extends IOP_NETContract {
|
|
5
|
+
balanceOf(address: BitcoinAddressLike): Promise<BaseContractProperty>;
|
|
6
|
+
name(): Promise<BaseContractProperty>;
|
|
7
|
+
symbol(): Promise<BaseContractProperty>;
|
|
8
|
+
totalSupply(): Promise<BaseContractProperty>;
|
|
9
|
+
decimals(): Promise<BaseContractProperty>;
|
|
10
|
+
transfer(to: BitcoinAddressLike, value: bigint): Promise<BaseContractProperty>;
|
|
11
|
+
transferFrom(from: BitcoinAddressLike, to: BitcoinAddressLike, value: bigint): Promise<BaseContractProperty>;
|
|
12
|
+
approve(spender: BitcoinAddressLike, value: bigint): Promise<BaseContractProperty>;
|
|
13
|
+
allowance(owner: BitcoinAddressLike, spender: BitcoinAddressLike): Promise<BaseContractProperty>;
|
|
14
|
+
mint(to: BitcoinAddressLike, value: bigint): Promise<BaseContractProperty>;
|
|
15
|
+
burn(to: BitcoinAddressLike, value: bigint): Promise<BaseContractProperty>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BitcoinAddressLike } from '../../../common/CommonTypes.js';
|
|
2
|
+
import { BaseContractProperty } from '../../BaseContractProperty.js';
|
|
3
|
+
import { BaseContractProperties } from '../../interfaces/BaseContractProperties.js';
|
|
4
|
+
export interface IOP_NETContract extends BaseContractProperties {
|
|
5
|
+
owner(): Promise<BaseContractProperty>;
|
|
6
|
+
isAddressOwner(address: BitcoinAddressLike): Promise<BaseContractProperty>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Address } from '@btc-vision/bsi-binary';
|
|
2
|
+
import { BaseContractProperties } from '../../interfaces/BaseContractProperties.js';
|
|
3
|
+
export interface IStackingContract {
|
|
4
|
+
stake(amount: bigint): Promise<BaseContractProperties>;
|
|
5
|
+
unstake(): Promise<BaseContractProperties>;
|
|
6
|
+
stakedAmount(address: Address): Promise<BaseContractProperties>;
|
|
7
|
+
stakedReward(address: Address): Promise<BaseContractProperties>;
|
|
8
|
+
claim(): Promise<BaseContractProperties>;
|
|
9
|
+
rewardPool(): Promise<BaseContractProperties>;
|
|
10
|
+
totalStaked(): Promise<BaseContractProperties>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BaseContractProperty } from '../../BaseContractProperty.js';
|
|
2
|
+
import { IOP_20Contract } from './IOP_20Contract.js';
|
|
3
|
+
import { IStackingContract } from './IStackingContract.js';
|
|
4
|
+
export type MergedOP_20AndStackingContract = IOP_20Contract & IStackingContract;
|
|
5
|
+
export interface IWBTCContract extends MergedOP_20AndStackingContract {
|
|
6
|
+
requestWithdrawal(amount: bigint): Promise<BaseContractProperty>;
|
|
7
|
+
withdrawableBalanceOf(address: string): Promise<BaseContractProperty>;
|
|
8
|
+
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { Address } from '@btc-vision/bsi-binary';
|
|
1
2
|
import { BitcoinAddress } from '../bitcoin/BitcoinAddress.js';
|
|
2
3
|
export type BitcoinAddressLike = string | BitcoinAddress;
|
|
3
4
|
export type PointerLike = bigint | string;
|
|
4
|
-
export type DecodedCallResult = bigint | string | boolean | number | Uint8Array | Array<bigint> | Array<string> | Array<boolean> | Array<number> | Array<Uint8Array>;
|
|
5
|
+
export type DecodedCallResult = bigint | string | boolean | number | Uint8Array | Array<bigint> | Array<string> | Array<boolean> | Array<number> | Array<Uint8Array> | Map<Address, bigint>;
|
|
5
6
|
export type Numeric = number | bigint;
|
|
6
7
|
export type BigNumberish = Numeric | string;
|
|
7
8
|
export type BlockTag = BigNumberish | 'latest' | 'pending' | 'earliest';
|