opnet 1.2.4 → 1.2.6
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/INativeSwapContract.d.ts +5 -9
- package/browser/abi/shared/interfaces/opnet/IOP_20Contract.d.ts +1 -0
- package/browser/abi/shared/interfaces/opnet/IOP_NETContract.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/motoswap/INativeSwapContract.d.ts +5 -9
- package/build/abi/shared/interfaces/opnet/IOP_20Contract.d.ts +1 -0
- package/build/abi/shared/interfaces/opnet/IOP_NETContract.d.ts +3 -0
- package/build/abi/shared/json/motoswap/NATIVE_SWAP_ABI.js +52 -20
- package/build/abi/shared/json/opnet/OP_20_ABI.js +24 -0
- package/build/abi/shared/json/opnet/OP_NET_ABI.js +11 -0
- package/package.json +1 -1
- package/src/_version.ts +1 -1
- package/src/abi/shared/interfaces/motoswap/INativeSwapContract.ts +18 -21
- package/src/abi/shared/interfaces/opnet/IOP_20Contract.ts +2 -0
- package/src/abi/shared/interfaces/opnet/IOP_NETContract.ts +2 -0
- package/src/abi/shared/json/motoswap/NATIVE_SWAP_ABI.ts +53 -21
- package/src/abi/shared/json/opnet/OP_20_ABI.ts +24 -0
- package/src/abi/shared/json/opnet/OP_NET_ABI.ts +12 -0
package/browser/_version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "1.2.
|
|
1
|
+
export declare const version = "1.2.6";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Address } from '@btc-vision/transaction';
|
|
2
2
|
import { CallResult } from '../../../../contracts/CallResult.js';
|
|
3
3
|
import { IOP_NETContract } from '../opnet/IOP_NETContract.js';
|
|
4
|
-
export type
|
|
4
|
+
export type ReserveNativeSwap = CallResult<{
|
|
5
5
|
reserved: bigint;
|
|
6
6
|
}>;
|
|
7
7
|
export type AddLiquidity = CallResult<{
|
|
@@ -49,23 +49,19 @@ export type GetProviderDetails = CallResult<{
|
|
|
49
49
|
export type GetPriorityQueueCost = CallResult<{
|
|
50
50
|
cost: bigint;
|
|
51
51
|
}>;
|
|
52
|
-
export type VirtualReserves = CallResult<{
|
|
53
|
-
virtualBTCReserve: bigint;
|
|
54
|
-
virtualTokenReserve: bigint;
|
|
55
|
-
}>;
|
|
56
52
|
export interface INativeSwapContract extends IOP_NETContract {
|
|
57
|
-
reserve(token: Address, maximumAmountIn: bigint, minimumAmountOut: bigint, forLP: boolean): Promise<
|
|
53
|
+
reserve(token: Address, maximumAmountIn: bigint, minimumAmountOut: bigint, forLP: boolean): Promise<ReserveNativeSwap>;
|
|
58
54
|
listLiquidity(token: Address, receiver: string, amountIn: bigint, priority: boolean): Promise<ListLiquidity>;
|
|
59
55
|
cancelListing(token: Address): Promise<CancelListing>;
|
|
60
56
|
createPool(token: Address, floorPrice: bigint, initialLiquidity: bigint, receiver: string, antiBotEnabledFor: number, antiBotMaximumTokensPerReservation: bigint, maxReservesIn5BlocksPercent: number): Promise<CreatePool>;
|
|
57
|
+
createPoolWithSignature(signature: Buffer, approveAmount: bigint, token: Address, floorPrice: bigint, initialLiquidity: bigint, receiver: string, antiBotEnabledFor: number, antiBotMaximumTokensPerReservation: bigint, maxReservesIn5BlocksPercent: number): Promise<CreatePool>;
|
|
61
58
|
setFees(reservationBaseFee: bigint, priorityQueueBaseFee: bigint, pricePerUserInPriorityQueueBTC: bigint): Promise<SetFees>;
|
|
62
59
|
getFees(): Promise<GetFees>;
|
|
63
60
|
addLiquidity(token: Address, receiver: string, amountIn: bigint, priority: boolean): Promise<AddLiquidity>;
|
|
64
|
-
removeLiquidity(token: Address): Promise<RemoveLiquidity>;
|
|
65
|
-
swap(token: Address
|
|
61
|
+
removeLiquidity(token: Address, amount: bigint): Promise<RemoveLiquidity>;
|
|
62
|
+
swap(token: Address): Promise<Swap>;
|
|
66
63
|
getReserve(token: Address): Promise<GetReserve>;
|
|
67
64
|
getQuote(token: Address, satoshisIn: bigint): Promise<GetQuote>;
|
|
68
65
|
getProviderDetails(token: Address): Promise<GetProviderDetails>;
|
|
69
|
-
getVirtualReserves(token: Address): Promise<VirtualReserves>;
|
|
70
66
|
getPriorityQueueCost(token: Address): Promise<GetPriorityQueueCost>;
|
|
71
67
|
}
|
|
@@ -53,6 +53,7 @@ export interface IOP_20Contract extends IOP_NETContract {
|
|
|
53
53
|
transfer(recipient: Address, amount: bigint): Promise<Transfer>;
|
|
54
54
|
transferFrom(sender: Address, recipient: Address, amount: bigint): Promise<TransferFrom>;
|
|
55
55
|
approve(spender: Address, amount: bigint): Promise<Approve>;
|
|
56
|
+
approveFrom(spender: Address, amount: bigint, signature: Uint8Array): Promise<Approve>;
|
|
56
57
|
allowance(owner: Address, spender: Address): Promise<Allowance>;
|
|
57
58
|
burn(value: bigint): Promise<Burn>;
|
|
58
59
|
mint(address: Address, value: bigint): Promise<Mint>;
|