@allbridge/bridge-core-sdk 3.27.0-beta.7 → 3.27.0
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/dist/browser/index.js +1 -6
- package/dist/browser/index.js.map +4 -4
- package/dist/cjs/index.js +1 -6
- package/dist/cjs/index.js.map +4 -4
- package/dist/esm/index.js +1 -6
- package/dist/esm/index.js.map +4 -4
- package/dist/src/chains/chain.enums.d.ts +2 -12
- package/dist/src/chains/chain.enums.js +0 -10
- package/dist/src/chains/chain.enums.js.map +1 -1
- package/dist/src/chains/index.js +0 -12
- package/dist/src/chains/index.js.map +1 -1
- package/dist/src/client/core-api/api-client.js +0 -1
- package/dist/src/client/core-api/api-client.js.map +1 -1
- package/dist/src/client/core-api/core-api-mapper.js +0 -33
- package/dist/src/client/core-api/core-api-mapper.js.map +1 -1
- package/dist/src/client/core-api/core-api.model.d.ts +2 -14
- package/dist/src/client/core-api/core-api.model.js.map +1 -1
- package/dist/src/configs/mainnet.js +0 -1
- package/dist/src/configs/mainnet.js.map +1 -1
- package/dist/src/index.d.ts +4 -12
- package/dist/src/index.js +11 -11
- package/dist/src/index.js.map +1 -1
- package/dist/src/models/index.d.ts +4 -12
- package/dist/src/models/index.js +0 -4
- package/dist/src/models/index.js.map +1 -1
- package/dist/src/services/bridge/evm/index.d.ts +0 -1
- package/dist/src/services/bridge/evm/index.js +33 -103
- package/dist/src/services/bridge/evm/index.js.map +1 -1
- package/dist/src/services/bridge/index.d.ts +2 -2
- package/dist/src/services/bridge/index.js +4 -31
- package/dist/src/services/bridge/index.js.map +1 -1
- package/dist/src/services/bridge/models/bridge.model.d.ts +4 -13
- package/dist/src/services/bridge/models/bridge.model.js.map +1 -1
- package/dist/src/services/bridge/raw-bridge-transaction-builder.js +1 -1
- package/dist/src/services/bridge/raw-bridge-transaction-builder.js.map +1 -1
- package/dist/src/services/bridge/srb/index.js +28 -36
- package/dist/src/services/bridge/srb/index.js.map +1 -1
- package/dist/src/services/bridge/sui/index.js +138 -166
- package/dist/src/services/bridge/sui/index.js.map +1 -1
- package/dist/src/services/bridge/trx/index.js +70 -98
- package/dist/src/services/bridge/trx/index.js.map +1 -1
- package/dist/src/services/bridge/utils.d.ts +1 -5
- package/dist/src/services/bridge/utils.js +23 -164
- package/dist/src/services/bridge/utils.js.map +1 -1
- package/dist/src/services/liquidity-pool/index.js +0 -21
- package/dist/src/services/liquidity-pool/index.js.map +1 -1
- package/dist/src/services/liquidity-pool/sui/index.js.map +1 -1
- package/dist/src/services/liquidity-pool/trx/index.js.map +1 -1
- package/dist/src/services/models/index.d.ts +5 -7
- package/dist/src/services/models/index.js.map +1 -1
- package/dist/src/services/token/index.js +2 -23
- package/dist/src/services/token/index.js.map +1 -1
- package/dist/src/services/token/models/token.model.d.ts +4 -4
- package/dist/src/services/token/models/token.model.js.map +1 -1
- package/dist/src/services/token/sui/index.js.map +1 -1
- package/dist/src/services/utils/trx/index.js.map +1 -1
- package/dist/src/services/yield/index.js +0 -8
- package/dist/src/services/yield/index.js.map +1 -1
- package/dist/src/tokens-info/tokens-info.model.d.ts +0 -25
- package/dist/src/tokens-info/tokens-info.model.js.map +1 -1
- package/dist/src/utils/index.d.ts +0 -3
- package/dist/src/utils/index.js +0 -3
- package/dist/src/utils/index.js.map +1 -1
- package/dist/src/utils/utils.d.ts +0 -2
- package/dist/src/utils/utils.js +0 -11
- package/dist/src/utils/utils.js.map +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/version.js.map +1 -1
- package/package.json +2 -9
- package/dist/src/services/bridge/alg/index.d.ts +0 -16
- package/dist/src/services/bridge/alg/index.js +0 -191
- package/dist/src/services/bridge/alg/index.js.map +0 -1
- package/dist/src/services/bridge/stx/index.d.ts +0 -16
- package/dist/src/services/bridge/stx/index.js +0 -136
- package/dist/src/services/bridge/stx/index.js.map +0 -1
- package/dist/src/services/liquidity-pool/alg/index.d.ts +0 -19
- package/dist/src/services/liquidity-pool/alg/index.js +0 -135
- package/dist/src/services/liquidity-pool/alg/index.js.map +0 -1
- package/dist/src/services/liquidity-pool/stx/index.d.ts +0 -21
- package/dist/src/services/liquidity-pool/stx/index.js +0 -141
- package/dist/src/services/liquidity-pool/stx/index.js.map +0 -1
- package/dist/src/services/models/abi/PayerWithAbr.d.ts +0 -203
- package/dist/src/services/models/abi/PayerWithAbr.js +0 -266
- package/dist/src/services/models/abi/PayerWithAbr.js.map +0 -1
- package/dist/src/services/models/alg/BridgeClient.d.ts +0 -2751
- package/dist/src/services/models/alg/BridgeClient.js +0 -2685
- package/dist/src/services/models/alg/BridgeClient.js.map +0 -1
- package/dist/src/services/models/alg/PaddingUtilClient.d.ts +0 -654
- package/dist/src/services/models/alg/PaddingUtilClient.js +0 -425
- package/dist/src/services/models/alg/PaddingUtilClient.js.map +0 -1
- package/dist/src/services/models/alg/PoolClient.d.ts +0 -2276
- package/dist/src/services/models/alg/PoolClient.js +0 -2195
- package/dist/src/services/models/alg/PoolClient.js.map +0 -1
- package/dist/src/services/models/stx/clarigen-types.d.ts +0 -657
- package/dist/src/services/models/stx/clarigen-types.js +0 -2296
- package/dist/src/services/models/stx/clarigen-types.js.map +0 -1
- package/dist/src/services/token/alg/index.d.ts +0 -17
- package/dist/src/services/token/alg/index.js +0 -47
- package/dist/src/services/token/alg/index.js.map +0 -1
- package/dist/src/services/token/stx/index.d.ts +0 -20
- package/dist/src/services/token/stx/index.js +0 -59
- package/dist/src/services/token/stx/index.js.map +0 -1
- package/dist/src/services/utils/alg/index.d.ts +0 -9
- package/dist/src/services/utils/alg/index.js +0 -74
- package/dist/src/services/utils/alg/index.js.map +0 -1
- package/dist/src/services/utils/stx/get-token-name.d.ts +0 -2
- package/dist/src/services/utils/stx/get-token-name.js +0 -15
- package/dist/src/services/utils/stx/get-token-name.js.map +0 -1
- package/dist/src/services/utils/stx/post-conditions.d.ts +0 -3
- package/dist/src/services/utils/stx/post-conditions.js +0 -27
- package/dist/src/services/utils/stx/post-conditions.js.map +0 -1
- package/dist/src/utils/alg/index.d.ts +0 -21
- package/dist/src/utils/alg/index.js +0 -71
- package/dist/src/utils/alg/index.js.map +0 -1
|
@@ -1,2276 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was automatically generated by @algorandfoundation/algokit-client-generator.
|
|
3
|
-
* DO NOT MODIFY IT BY HAND.
|
|
4
|
-
* requires: @algorandfoundation/algokit-utils: ^7
|
|
5
|
-
*/
|
|
6
|
-
import { type AlgorandClient } from "@algorandfoundation/algokit-utils/types/algorand-client";
|
|
7
|
-
import { ABIReturn } from "@algorandfoundation/algokit-utils/types/app";
|
|
8
|
-
import { Arc56Contract } from "@algorandfoundation/algokit-utils/types/app-arc56";
|
|
9
|
-
import { AppClient as _AppClient, AppClientMethodCallParams, AppClientParams, AppClientBareCallParams, CallOnComplete, AppClientCompilationParams, ResolveAppClientByCreatorAndName, ResolveAppClientByNetwork, CloneAppClientParams } from "@algorandfoundation/algokit-utils/types/app-client";
|
|
10
|
-
import { AppFactory as _AppFactory, AppFactoryAppClientParams, AppFactoryResolveAppClientByCreatorAndNameParams, AppFactoryDeployParams, AppFactoryParams, CreateSchema } from "@algorandfoundation/algokit-utils/types/app-factory";
|
|
11
|
-
import { TransactionComposer, AppCallMethodCall, AppMethodCallTransactionArgument, RawSimulateOptions, SkipSignaturesSimulateOptions } from "@algorandfoundation/algokit-utils/types/composer";
|
|
12
|
-
import { SendParams, SendAtomicTransactionComposerResults } from "@algorandfoundation/algokit-utils/types/transaction";
|
|
13
|
-
import { Address, modelsv2, OnApplicationComplete, Transaction, TransactionSigner } from "algosdk";
|
|
14
|
-
export declare const APP_SPEC: Arc56Contract;
|
|
15
|
-
/**
|
|
16
|
-
* A state record containing binary data
|
|
17
|
-
*/
|
|
18
|
-
export interface BinaryState {
|
|
19
|
-
/**
|
|
20
|
-
* Gets the state value as a Uint8Array
|
|
21
|
-
*/
|
|
22
|
-
asByteArray(): Uint8Array | undefined;
|
|
23
|
-
/**
|
|
24
|
-
* Gets the state value as a string
|
|
25
|
-
*/
|
|
26
|
-
asString(): string | undefined;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Expands types for IntelliSense so they are more human readable
|
|
30
|
-
* See https://stackoverflow.com/a/69288824
|
|
31
|
-
*/
|
|
32
|
-
export type Expand<T> = T extends (...args: infer A) => infer R ? (...args: Expand<A>) => Expand<R> : T extends infer O ? {
|
|
33
|
-
[K in keyof O]: O[K];
|
|
34
|
-
} : never;
|
|
35
|
-
/**
|
|
36
|
-
* The argument types for the Pool contract
|
|
37
|
-
*/
|
|
38
|
-
export type PoolArgs = {
|
|
39
|
-
/**
|
|
40
|
-
* The object representation of the arguments for each method
|
|
41
|
-
*/
|
|
42
|
-
obj: {
|
|
43
|
-
"createApplication(address,address,uint64,uint64,uint64,uint64)void": {
|
|
44
|
-
owner: string;
|
|
45
|
-
router: string;
|
|
46
|
-
a: bigint | number;
|
|
47
|
-
asset: bigint | number;
|
|
48
|
-
feeShareBp: bigint | number;
|
|
49
|
-
balanceRatioMinBp: bigint | number;
|
|
50
|
-
};
|
|
51
|
-
"optInToApplication()void": Record<string, never>;
|
|
52
|
-
"closeOutOfApplication(uint64)void": {
|
|
53
|
-
budget?: bigint | number;
|
|
54
|
-
};
|
|
55
|
-
"optInAsset()void": Record<string, never>;
|
|
56
|
-
"deposit(axfer,uint64)void": {
|
|
57
|
-
assetTransferRef: AppMethodCallTransactionArgument;
|
|
58
|
-
budget?: bigint | number;
|
|
59
|
-
};
|
|
60
|
-
"withdraw(uint64,uint64)void": {
|
|
61
|
-
/**
|
|
62
|
-
* The Withdrawn amount
|
|
63
|
-
*/
|
|
64
|
-
amountLp: bigint | number;
|
|
65
|
-
budget?: bigint | number;
|
|
66
|
-
};
|
|
67
|
-
"swapToVUsd(address,uint64,bool)uint64": {
|
|
68
|
-
/**
|
|
69
|
-
* The address of the sender.
|
|
70
|
-
*/
|
|
71
|
-
user: string;
|
|
72
|
-
/**
|
|
73
|
-
* The amount of tokens to swap.
|
|
74
|
-
*/
|
|
75
|
-
amount: bigint | number;
|
|
76
|
-
/**
|
|
77
|
-
* When true it allows to swap without incurring any fees. It is intended for use with service
|
|
78
|
-
accounts.
|
|
79
|
-
|
|
80
|
-
*/
|
|
81
|
-
zeroFee: boolean;
|
|
82
|
-
};
|
|
83
|
-
"swapFromVUsd(address,uint64,uint64,bool)uint64": {
|
|
84
|
-
/**
|
|
85
|
-
* The address of the recipient.
|
|
86
|
-
*/
|
|
87
|
-
user: string;
|
|
88
|
-
/**
|
|
89
|
-
* The amount of vUSD to swap.
|
|
90
|
-
*/
|
|
91
|
-
amount: bigint | number;
|
|
92
|
-
/**
|
|
93
|
-
* The minimum amount of tokens required to be received during the swap, otherwise the
|
|
94
|
-
transaction reverts.
|
|
95
|
-
|
|
96
|
-
*/
|
|
97
|
-
receiveAmountMin: bigint | number;
|
|
98
|
-
/**
|
|
99
|
-
* When true it allows to swap without incurring any fees. It is intended for use with service
|
|
100
|
-
accounts.
|
|
101
|
-
|
|
102
|
-
*/
|
|
103
|
-
zeroFee: boolean;
|
|
104
|
-
};
|
|
105
|
-
"setFeeShare(uint64)void": {
|
|
106
|
-
feeShareBp: bigint | number;
|
|
107
|
-
};
|
|
108
|
-
"adjustTotalLpAmount()void": Record<string, never>;
|
|
109
|
-
"setBalanceRatioMinBP(uint64)void": {
|
|
110
|
-
balanceRatioMinBp: bigint | number;
|
|
111
|
-
};
|
|
112
|
-
"stopDeposit()void": Record<string, never>;
|
|
113
|
-
"startDeposit()void": Record<string, never>;
|
|
114
|
-
"stopWithdraw()void": Record<string, never>;
|
|
115
|
-
"startWithdraw()void": Record<string, never>;
|
|
116
|
-
"setStopAuthority(address)void": {
|
|
117
|
-
stopAuthority: string;
|
|
118
|
-
};
|
|
119
|
-
"setRouter(address)void": {
|
|
120
|
-
router: string;
|
|
121
|
-
};
|
|
122
|
-
"claimRewards()void": Record<string, never>;
|
|
123
|
-
"setAdminFeeShare(uint64)void": {
|
|
124
|
-
adminFeeShareBp: bigint | number;
|
|
125
|
-
};
|
|
126
|
-
"claimAdminFee()void": Record<string, never>;
|
|
127
|
-
"pendingReward(address)uint64": {
|
|
128
|
-
user: string;
|
|
129
|
-
};
|
|
130
|
-
"transferOwnership(address)void": {
|
|
131
|
-
newOwner: string;
|
|
132
|
-
};
|
|
133
|
-
};
|
|
134
|
-
/**
|
|
135
|
-
* The tuple representation of the arguments for each method
|
|
136
|
-
*/
|
|
137
|
-
tuple: {
|
|
138
|
-
"createApplication(address,address,uint64,uint64,uint64,uint64)void": [
|
|
139
|
-
owner: string,
|
|
140
|
-
router: string,
|
|
141
|
-
a: bigint | number,
|
|
142
|
-
asset: bigint | number,
|
|
143
|
-
feeShareBp: bigint | number,
|
|
144
|
-
balanceRatioMinBp: bigint | number
|
|
145
|
-
];
|
|
146
|
-
"optInToApplication()void": [];
|
|
147
|
-
"closeOutOfApplication(uint64)void": [budget: bigint | number | undefined];
|
|
148
|
-
"optInAsset()void": [];
|
|
149
|
-
"deposit(axfer,uint64)void": [
|
|
150
|
-
assetTransferRef: AppMethodCallTransactionArgument,
|
|
151
|
-
budget: bigint | number | undefined
|
|
152
|
-
];
|
|
153
|
-
"withdraw(uint64,uint64)void": [amountLp: bigint | number, budget: bigint | number | undefined];
|
|
154
|
-
"swapToVUsd(address,uint64,bool)uint64": [user: string, amount: bigint | number, zeroFee: boolean];
|
|
155
|
-
"swapFromVUsd(address,uint64,uint64,bool)uint64": [
|
|
156
|
-
user: string,
|
|
157
|
-
amount: bigint | number,
|
|
158
|
-
receiveAmountMin: bigint | number,
|
|
159
|
-
zeroFee: boolean
|
|
160
|
-
];
|
|
161
|
-
"setFeeShare(uint64)void": [feeShareBp: bigint | number];
|
|
162
|
-
"adjustTotalLpAmount()void": [];
|
|
163
|
-
"setBalanceRatioMinBP(uint64)void": [balanceRatioMinBp: bigint | number];
|
|
164
|
-
"stopDeposit()void": [];
|
|
165
|
-
"startDeposit()void": [];
|
|
166
|
-
"stopWithdraw()void": [];
|
|
167
|
-
"startWithdraw()void": [];
|
|
168
|
-
"setStopAuthority(address)void": [stopAuthority: string];
|
|
169
|
-
"setRouter(address)void": [router: string];
|
|
170
|
-
"claimRewards()void": [];
|
|
171
|
-
"setAdminFeeShare(uint64)void": [adminFeeShareBp: bigint | number];
|
|
172
|
-
"claimAdminFee()void": [];
|
|
173
|
-
"pendingReward(address)uint64": [user: string];
|
|
174
|
-
"transferOwnership(address)void": [newOwner: string];
|
|
175
|
-
};
|
|
176
|
-
};
|
|
177
|
-
/**
|
|
178
|
-
* The return type for each method
|
|
179
|
-
*/
|
|
180
|
-
export type PoolReturns = {
|
|
181
|
-
"createApplication(address,address,uint64,uint64,uint64,uint64)void": void;
|
|
182
|
-
"optInToApplication()void": void;
|
|
183
|
-
"closeOutOfApplication(uint64)void": void;
|
|
184
|
-
"optInAsset()void": void;
|
|
185
|
-
"deposit(axfer,uint64)void": void;
|
|
186
|
-
"withdraw(uint64,uint64)void": void;
|
|
187
|
-
"swapToVUsd(address,uint64,bool)uint64": bigint;
|
|
188
|
-
"swapFromVUsd(address,uint64,uint64,bool)uint64": bigint;
|
|
189
|
-
"setFeeShare(uint64)void": void;
|
|
190
|
-
"adjustTotalLpAmount()void": void;
|
|
191
|
-
"setBalanceRatioMinBP(uint64)void": void;
|
|
192
|
-
"stopDeposit()void": void;
|
|
193
|
-
"startDeposit()void": void;
|
|
194
|
-
"stopWithdraw()void": void;
|
|
195
|
-
"startWithdraw()void": void;
|
|
196
|
-
"setStopAuthority(address)void": void;
|
|
197
|
-
"setRouter(address)void": void;
|
|
198
|
-
"claimRewards()void": void;
|
|
199
|
-
"setAdminFeeShare(uint64)void": void;
|
|
200
|
-
"claimAdminFee()void": void;
|
|
201
|
-
"pendingReward(address)uint64": bigint;
|
|
202
|
-
"transferOwnership(address)void": void;
|
|
203
|
-
};
|
|
204
|
-
/**
|
|
205
|
-
* Defines the types of available calls and state of the Pool smart contract.
|
|
206
|
-
*/
|
|
207
|
-
export type PoolTypes = {
|
|
208
|
-
/**
|
|
209
|
-
* Maps method signatures / names to their argument and return types.
|
|
210
|
-
*/
|
|
211
|
-
methods: Record<"createApplication(address,address,uint64,uint64,uint64,uint64)void" | "createApplication", {
|
|
212
|
-
argsObj: PoolArgs["obj"]["createApplication(address,address,uint64,uint64,uint64,uint64)void"];
|
|
213
|
-
argsTuple: PoolArgs["tuple"]["createApplication(address,address,uint64,uint64,uint64,uint64)void"];
|
|
214
|
-
returns: PoolReturns["createApplication(address,address,uint64,uint64,uint64,uint64)void"];
|
|
215
|
-
}> & Record<"optInToApplication()void" | "optInToApplication", {
|
|
216
|
-
argsObj: PoolArgs["obj"]["optInToApplication()void"];
|
|
217
|
-
argsTuple: PoolArgs["tuple"]["optInToApplication()void"];
|
|
218
|
-
returns: PoolReturns["optInToApplication()void"];
|
|
219
|
-
}> & Record<"closeOutOfApplication(uint64)void" | "closeOutOfApplication", {
|
|
220
|
-
argsObj: PoolArgs["obj"]["closeOutOfApplication(uint64)void"];
|
|
221
|
-
argsTuple: PoolArgs["tuple"]["closeOutOfApplication(uint64)void"];
|
|
222
|
-
returns: PoolReturns["closeOutOfApplication(uint64)void"];
|
|
223
|
-
}> & Record<"optInAsset()void" | "optInAsset", {
|
|
224
|
-
argsObj: PoolArgs["obj"]["optInAsset()void"];
|
|
225
|
-
argsTuple: PoolArgs["tuple"]["optInAsset()void"];
|
|
226
|
-
returns: PoolReturns["optInAsset()void"];
|
|
227
|
-
}> & Record<"deposit(axfer,uint64)void" | "deposit", {
|
|
228
|
-
argsObj: PoolArgs["obj"]["deposit(axfer,uint64)void"];
|
|
229
|
-
argsTuple: PoolArgs["tuple"]["deposit(axfer,uint64)void"];
|
|
230
|
-
returns: PoolReturns["deposit(axfer,uint64)void"];
|
|
231
|
-
}> & Record<"withdraw(uint64,uint64)void" | "withdraw", {
|
|
232
|
-
argsObj: PoolArgs["obj"]["withdraw(uint64,uint64)void"];
|
|
233
|
-
argsTuple: PoolArgs["tuple"]["withdraw(uint64,uint64)void"];
|
|
234
|
-
returns: PoolReturns["withdraw(uint64,uint64)void"];
|
|
235
|
-
}> & Record<"swapToVUsd(address,uint64,bool)uint64" | "swapToVUsd", {
|
|
236
|
-
argsObj: PoolArgs["obj"]["swapToVUsd(address,uint64,bool)uint64"];
|
|
237
|
-
argsTuple: PoolArgs["tuple"]["swapToVUsd(address,uint64,bool)uint64"];
|
|
238
|
-
/**
|
|
239
|
-
* returns the difference between the old and the new value of vUsdBalance
|
|
240
|
-
*/
|
|
241
|
-
returns: PoolReturns["swapToVUsd(address,uint64,bool)uint64"];
|
|
242
|
-
}> & Record<"swapFromVUsd(address,uint64,uint64,bool)uint64" | "swapFromVUsd", {
|
|
243
|
-
argsObj: PoolArgs["obj"]["swapFromVUsd(address,uint64,uint64,bool)uint64"];
|
|
244
|
-
argsTuple: PoolArgs["tuple"]["swapFromVUsd(address,uint64,uint64,bool)uint64"];
|
|
245
|
-
/**
|
|
246
|
-
* returns the difference between the old and the new value of vUsdBalance
|
|
247
|
-
*/
|
|
248
|
-
returns: PoolReturns["swapFromVUsd(address,uint64,uint64,bool)uint64"];
|
|
249
|
-
}> & Record<"setFeeShare(uint64)void" | "setFeeShare", {
|
|
250
|
-
argsObj: PoolArgs["obj"]["setFeeShare(uint64)void"];
|
|
251
|
-
argsTuple: PoolArgs["tuple"]["setFeeShare(uint64)void"];
|
|
252
|
-
returns: PoolReturns["setFeeShare(uint64)void"];
|
|
253
|
-
}> & Record<"adjustTotalLpAmount()void" | "adjustTotalLpAmount", {
|
|
254
|
-
argsObj: PoolArgs["obj"]["adjustTotalLpAmount()void"];
|
|
255
|
-
argsTuple: PoolArgs["tuple"]["adjustTotalLpAmount()void"];
|
|
256
|
-
returns: PoolReturns["adjustTotalLpAmount()void"];
|
|
257
|
-
}> & Record<"setBalanceRatioMinBP(uint64)void" | "setBalanceRatioMinBP", {
|
|
258
|
-
argsObj: PoolArgs["obj"]["setBalanceRatioMinBP(uint64)void"];
|
|
259
|
-
argsTuple: PoolArgs["tuple"]["setBalanceRatioMinBP(uint64)void"];
|
|
260
|
-
returns: PoolReturns["setBalanceRatioMinBP(uint64)void"];
|
|
261
|
-
}> & Record<"stopDeposit()void" | "stopDeposit", {
|
|
262
|
-
argsObj: PoolArgs["obj"]["stopDeposit()void"];
|
|
263
|
-
argsTuple: PoolArgs["tuple"]["stopDeposit()void"];
|
|
264
|
-
returns: PoolReturns["stopDeposit()void"];
|
|
265
|
-
}> & Record<"startDeposit()void" | "startDeposit", {
|
|
266
|
-
argsObj: PoolArgs["obj"]["startDeposit()void"];
|
|
267
|
-
argsTuple: PoolArgs["tuple"]["startDeposit()void"];
|
|
268
|
-
returns: PoolReturns["startDeposit()void"];
|
|
269
|
-
}> & Record<"stopWithdraw()void" | "stopWithdraw", {
|
|
270
|
-
argsObj: PoolArgs["obj"]["stopWithdraw()void"];
|
|
271
|
-
argsTuple: PoolArgs["tuple"]["stopWithdraw()void"];
|
|
272
|
-
returns: PoolReturns["stopWithdraw()void"];
|
|
273
|
-
}> & Record<"startWithdraw()void" | "startWithdraw", {
|
|
274
|
-
argsObj: PoolArgs["obj"]["startWithdraw()void"];
|
|
275
|
-
argsTuple: PoolArgs["tuple"]["startWithdraw()void"];
|
|
276
|
-
returns: PoolReturns["startWithdraw()void"];
|
|
277
|
-
}> & Record<"setStopAuthority(address)void" | "setStopAuthority", {
|
|
278
|
-
argsObj: PoolArgs["obj"]["setStopAuthority(address)void"];
|
|
279
|
-
argsTuple: PoolArgs["tuple"]["setStopAuthority(address)void"];
|
|
280
|
-
returns: PoolReturns["setStopAuthority(address)void"];
|
|
281
|
-
}> & Record<"setRouter(address)void" | "setRouter", {
|
|
282
|
-
argsObj: PoolArgs["obj"]["setRouter(address)void"];
|
|
283
|
-
argsTuple: PoolArgs["tuple"]["setRouter(address)void"];
|
|
284
|
-
returns: PoolReturns["setRouter(address)void"];
|
|
285
|
-
}> & Record<"claimRewards()void" | "claimRewards", {
|
|
286
|
-
argsObj: PoolArgs["obj"]["claimRewards()void"];
|
|
287
|
-
argsTuple: PoolArgs["tuple"]["claimRewards()void"];
|
|
288
|
-
returns: PoolReturns["claimRewards()void"];
|
|
289
|
-
}> & Record<"setAdminFeeShare(uint64)void" | "setAdminFeeShare", {
|
|
290
|
-
argsObj: PoolArgs["obj"]["setAdminFeeShare(uint64)void"];
|
|
291
|
-
argsTuple: PoolArgs["tuple"]["setAdminFeeShare(uint64)void"];
|
|
292
|
-
returns: PoolReturns["setAdminFeeShare(uint64)void"];
|
|
293
|
-
}> & Record<"claimAdminFee()void" | "claimAdminFee", {
|
|
294
|
-
argsObj: PoolArgs["obj"]["claimAdminFee()void"];
|
|
295
|
-
argsTuple: PoolArgs["tuple"]["claimAdminFee()void"];
|
|
296
|
-
returns: PoolReturns["claimAdminFee()void"];
|
|
297
|
-
}> & Record<"pendingReward(address)uint64" | "pendingReward", {
|
|
298
|
-
argsObj: PoolArgs["obj"]["pendingReward(address)uint64"];
|
|
299
|
-
argsTuple: PoolArgs["tuple"]["pendingReward(address)uint64"];
|
|
300
|
-
returns: PoolReturns["pendingReward(address)uint64"];
|
|
301
|
-
}> & Record<"transferOwnership(address)void" | "transferOwnership", {
|
|
302
|
-
argsObj: PoolArgs["obj"]["transferOwnership(address)void"];
|
|
303
|
-
argsTuple: PoolArgs["tuple"]["transferOwnership(address)void"];
|
|
304
|
-
returns: PoolReturns["transferOwnership(address)void"];
|
|
305
|
-
}>;
|
|
306
|
-
/**
|
|
307
|
-
* Defines the shape of the state of the application.
|
|
308
|
-
*/
|
|
309
|
-
state: {
|
|
310
|
-
global: {
|
|
311
|
-
keys: {
|
|
312
|
-
feeShareBp: bigint;
|
|
313
|
-
router: string;
|
|
314
|
-
tokenBalance: bigint;
|
|
315
|
-
vUsdBalance: bigint;
|
|
316
|
-
balanceRatioMinBp: bigint;
|
|
317
|
-
reserves: bigint;
|
|
318
|
-
a: bigint;
|
|
319
|
-
d: bigint;
|
|
320
|
-
tokenAmountReduce: bigint;
|
|
321
|
-
tokenAmountIncrease: bigint;
|
|
322
|
-
stopAuthority: string;
|
|
323
|
-
canDeposit: bigint;
|
|
324
|
-
canWithdraw: bigint;
|
|
325
|
-
asset: bigint;
|
|
326
|
-
adminFeeShareBp: bigint;
|
|
327
|
-
totalSupply: bigint;
|
|
328
|
-
accRewardPerShareP: BinaryState;
|
|
329
|
-
adminFeeAmount: bigint;
|
|
330
|
-
owner: string;
|
|
331
|
-
};
|
|
332
|
-
maps: {};
|
|
333
|
-
};
|
|
334
|
-
local: {
|
|
335
|
-
keys: {
|
|
336
|
-
balance: bigint;
|
|
337
|
-
userRewardDebt: bigint;
|
|
338
|
-
};
|
|
339
|
-
maps: {};
|
|
340
|
-
};
|
|
341
|
-
};
|
|
342
|
-
};
|
|
343
|
-
/**
|
|
344
|
-
* Defines the possible abi call signatures.
|
|
345
|
-
*/
|
|
346
|
-
export type PoolSignatures = keyof PoolTypes["methods"];
|
|
347
|
-
/**
|
|
348
|
-
* Defines the possible abi call signatures for methods that return a non-void value.
|
|
349
|
-
*/
|
|
350
|
-
export type PoolNonVoidMethodSignatures = keyof PoolTypes["methods"] extends infer T ? T extends keyof PoolTypes["methods"] ? MethodReturn<T> extends void ? never : T : never : never;
|
|
351
|
-
/**
|
|
352
|
-
* Defines an object containing all relevant parameters for a single call to the contract.
|
|
353
|
-
*/
|
|
354
|
-
export type CallParams<TArgs> = Expand<Omit<AppClientMethodCallParams, "method" | "args" | "onComplete"> & {
|
|
355
|
-
/** The args for the ABI method call, either as an ordered array or an object */
|
|
356
|
-
args: Expand<TArgs>;
|
|
357
|
-
}>;
|
|
358
|
-
/**
|
|
359
|
-
* Maps a method signature from the Pool smart contract to the method's arguments in either tuple or struct form
|
|
360
|
-
*/
|
|
361
|
-
export type MethodArgs<TSignature extends PoolSignatures> = PoolTypes["methods"][TSignature]["argsObj" | "argsTuple"];
|
|
362
|
-
/**
|
|
363
|
-
* Maps a method signature from the Pool smart contract to the method's return type
|
|
364
|
-
*/
|
|
365
|
-
export type MethodReturn<TSignature extends PoolSignatures> = PoolTypes["methods"][TSignature]["returns"];
|
|
366
|
-
/**
|
|
367
|
-
* Defines the shape of the keyed global state of the application.
|
|
368
|
-
*/
|
|
369
|
-
export type GlobalKeysState = PoolTypes["state"]["global"]["keys"];
|
|
370
|
-
/**
|
|
371
|
-
* Defines the shape of the keyed local state of the application.
|
|
372
|
-
*/
|
|
373
|
-
export type LocalKeysState = PoolTypes["state"]["local"]["keys"];
|
|
374
|
-
/**
|
|
375
|
-
* Defines supported create method params for this smart contract
|
|
376
|
-
*/
|
|
377
|
-
export type PoolCreateCallParams = Expand<CallParams<PoolArgs["obj"]["createApplication(address,address,uint64,uint64,uint64,uint64)void"] | PoolArgs["tuple"]["createApplication(address,address,uint64,uint64,uint64,uint64)void"]> & {
|
|
378
|
-
method: "createApplication";
|
|
379
|
-
} & {
|
|
380
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
381
|
-
} & CreateSchema> | Expand<CallParams<PoolArgs["obj"]["createApplication(address,address,uint64,uint64,uint64,uint64)void"] | PoolArgs["tuple"]["createApplication(address,address,uint64,uint64,uint64,uint64)void"]> & {
|
|
382
|
-
method: "createApplication(address,address,uint64,uint64,uint64,uint64)void";
|
|
383
|
-
} & {
|
|
384
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
385
|
-
} & CreateSchema>;
|
|
386
|
-
/**
|
|
387
|
-
* Defines arguments required for the deploy method.
|
|
388
|
-
*/
|
|
389
|
-
export type PoolDeployParams = Expand<Omit<AppFactoryDeployParams, "createParams" | "updateParams" | "deleteParams"> & {
|
|
390
|
-
/**
|
|
391
|
-
* Create transaction parameters to use if a create needs to be issued as part of deployment; use `method` to define ABI call (if available) or leave out for a bare call (if available)
|
|
392
|
-
*/
|
|
393
|
-
createParams?: PoolCreateCallParams;
|
|
394
|
-
}>;
|
|
395
|
-
/**
|
|
396
|
-
* Exposes methods for constructing `AppClient` params objects for ABI calls to the Pool smart contract
|
|
397
|
-
*/
|
|
398
|
-
export declare abstract class PoolParamsFactory {
|
|
399
|
-
/**
|
|
400
|
-
* Gets available create ABI call param factories
|
|
401
|
-
*/
|
|
402
|
-
static get create(): {
|
|
403
|
-
_resolveByMethod<TParams extends PoolCreateCallParams & {
|
|
404
|
-
method: string;
|
|
405
|
-
}>(params: TParams): {
|
|
406
|
-
signer?: (TransactionSigner | import("@algorandfoundation/algokit-utils/types/account").TransactionSignerAccount) | undefined;
|
|
407
|
-
rekeyTo?: (string | Address) | undefined;
|
|
408
|
-
note?: (Uint8Array | string) | undefined;
|
|
409
|
-
lease?: (Uint8Array | string) | undefined;
|
|
410
|
-
staticFee?: import("@algorandfoundation/algokit-utils/types/amount").AlgoAmount | undefined;
|
|
411
|
-
extraFee?: import("@algorandfoundation/algokit-utils/types/amount").AlgoAmount | undefined;
|
|
412
|
-
maxFee?: import("@algorandfoundation/algokit-utils/types/amount").AlgoAmount | undefined;
|
|
413
|
-
validityWindow?: (number | bigint) | undefined;
|
|
414
|
-
firstValidRound?: bigint | undefined;
|
|
415
|
-
lastValidRound?: bigint | undefined;
|
|
416
|
-
onComplete?: OnApplicationComplete | undefined;
|
|
417
|
-
accountReferences?: (string | Address)[] | undefined;
|
|
418
|
-
appReferences?: bigint[] | undefined;
|
|
419
|
-
assetReferences?: bigint[] | undefined;
|
|
420
|
-
boxReferences?: (import("@algorandfoundation/algokit-utils/types/app-manager").BoxReference | import("@algorandfoundation/algokit-utils/types/app-manager").BoxIdentifier)[] | undefined;
|
|
421
|
-
accessReferences?: import("@algorandfoundation/algokit-utils/types/app-manager").ResourceReference[] | undefined;
|
|
422
|
-
rejectVersion?: number | undefined;
|
|
423
|
-
sender?: (Address | string) | undefined;
|
|
424
|
-
method: string;
|
|
425
|
-
args?: (import("algosdk").ABIValue | import("@algorandfoundation/algokit-utils/types/app-arc56").ABIStruct | AppMethodCallTransactionArgument | undefined)[] | undefined;
|
|
426
|
-
} & AppClientCompilationParams & {
|
|
427
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
428
|
-
};
|
|
429
|
-
/**
|
|
430
|
-
* Constructs create ABI call params for the Pool smart contract using the createApplication(address,address,uint64,uint64,uint64,uint64)void ABI method
|
|
431
|
-
*
|
|
432
|
-
* @param params Parameters for the call
|
|
433
|
-
* @returns An `AppClientMethodCallParams` object for the call
|
|
434
|
-
*/
|
|
435
|
-
createApplication(params: CallParams<PoolArgs["obj"]["createApplication(address,address,uint64,uint64,uint64,uint64)void"] | PoolArgs["tuple"]["createApplication(address,address,uint64,uint64,uint64,uint64)void"]> & AppClientCompilationParams & {
|
|
436
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
437
|
-
}): AppClientMethodCallParams & AppClientCompilationParams & {
|
|
438
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
439
|
-
};
|
|
440
|
-
};
|
|
441
|
-
/**
|
|
442
|
-
* Gets available optIn ABI call param factories
|
|
443
|
-
*/
|
|
444
|
-
static get optIn(): {
|
|
445
|
-
/**
|
|
446
|
-
* Constructs opt-in ABI call params for the Pool smart contract using the optInToApplication()void ABI method
|
|
447
|
-
*
|
|
448
|
-
* @param params Parameters for the call
|
|
449
|
-
* @returns An `AppClientMethodCallParams` object for the call
|
|
450
|
-
*/
|
|
451
|
-
optInToApplication(params: CallParams<PoolArgs["obj"]["optInToApplication()void"] | PoolArgs["tuple"]["optInToApplication()void"]>): AppClientMethodCallParams;
|
|
452
|
-
/**
|
|
453
|
-
* Constructs opt-in ABI call params for the Pool smart contract using the deposit(axfer,uint64)void ABI method
|
|
454
|
-
*
|
|
455
|
-
* @param params Parameters for the call
|
|
456
|
-
* @returns An `AppClientMethodCallParams` object for the call
|
|
457
|
-
*/
|
|
458
|
-
deposit(params: CallParams<PoolArgs["obj"]["deposit(axfer,uint64)void"] | PoolArgs["tuple"]["deposit(axfer,uint64)void"]>): AppClientMethodCallParams;
|
|
459
|
-
};
|
|
460
|
-
/**
|
|
461
|
-
* Gets available closeOut ABI call param factories
|
|
462
|
-
*/
|
|
463
|
-
static get closeOut(): {
|
|
464
|
-
/**
|
|
465
|
-
* Constructs close out ABI call params for the Pool smart contract using the closeOutOfApplication(uint64)void ABI method
|
|
466
|
-
*
|
|
467
|
-
* @param params Parameters for the call
|
|
468
|
-
* @returns An `AppClientMethodCallParams` object for the call
|
|
469
|
-
*/
|
|
470
|
-
closeOutOfApplication(params: CallParams<PoolArgs["obj"]["closeOutOfApplication(uint64)void"] | PoolArgs["tuple"]["closeOutOfApplication(uint64)void"]>): AppClientMethodCallParams;
|
|
471
|
-
};
|
|
472
|
-
/**
|
|
473
|
-
* Constructs a no op call for the optInAsset()void ABI method
|
|
474
|
-
*
|
|
475
|
-
* Opt-in the application account to the ASA stored in `this.asset`.
|
|
476
|
-
This performs an inner axfer of 0 to the app's own address.
|
|
477
|
-
Call once after deploy (or whenever you change the asset).
|
|
478
|
-
|
|
479
|
-
*
|
|
480
|
-
* @param params Parameters for the call
|
|
481
|
-
* @returns An `AppClientMethodCallParams` object for the call
|
|
482
|
-
*/
|
|
483
|
-
static optInAsset(params: CallParams<PoolArgs["obj"]["optInAsset()void"] | PoolArgs["tuple"]["optInAsset()void"]> & CallOnComplete): AppClientMethodCallParams & CallOnComplete;
|
|
484
|
-
/**
|
|
485
|
-
* Constructs a no op call for the deposit(axfer,uint64)void ABI method
|
|
486
|
-
*
|
|
487
|
-
* @param params Parameters for the call
|
|
488
|
-
* @returns An `AppClientMethodCallParams` object for the call
|
|
489
|
-
*/
|
|
490
|
-
static deposit(params: CallParams<PoolArgs["obj"]["deposit(axfer,uint64)void"] | PoolArgs["tuple"]["deposit(axfer,uint64)void"]> & CallOnComplete): AppClientMethodCallParams & CallOnComplete;
|
|
491
|
-
/**
|
|
492
|
-
* Constructs a no op call for the withdraw(uint64,uint64)void ABI method
|
|
493
|
-
*
|
|
494
|
-
* @param params Parameters for the call
|
|
495
|
-
* @returns An `AppClientMethodCallParams` object for the call
|
|
496
|
-
*/
|
|
497
|
-
static withdraw(params: CallParams<PoolArgs["obj"]["withdraw(uint64,uint64)void"] | PoolArgs["tuple"]["withdraw(uint64,uint64)void"]> & CallOnComplete): AppClientMethodCallParams & CallOnComplete;
|
|
498
|
-
/**
|
|
499
|
-
* Constructs a no op call for the swapToVUsd(address,uint64,bool)uint64 ABI method
|
|
500
|
-
*
|
|
501
|
-
* @param params Parameters for the call
|
|
502
|
-
* @returns An `AppClientMethodCallParams` object for the call
|
|
503
|
-
*/
|
|
504
|
-
static swapToVUsd(params: CallParams<PoolArgs["obj"]["swapToVUsd(address,uint64,bool)uint64"] | PoolArgs["tuple"]["swapToVUsd(address,uint64,bool)uint64"]> & CallOnComplete): AppClientMethodCallParams & CallOnComplete;
|
|
505
|
-
/**
|
|
506
|
-
* Constructs a no op call for the swapFromVUsd(address,uint64,uint64,bool)uint64 ABI method
|
|
507
|
-
*
|
|
508
|
-
* @param params Parameters for the call
|
|
509
|
-
* @returns An `AppClientMethodCallParams` object for the call
|
|
510
|
-
*/
|
|
511
|
-
static swapFromVUsd(params: CallParams<PoolArgs["obj"]["swapFromVUsd(address,uint64,uint64,bool)uint64"] | PoolArgs["tuple"]["swapFromVUsd(address,uint64,uint64,bool)uint64"]> & CallOnComplete): AppClientMethodCallParams & CallOnComplete;
|
|
512
|
-
/**
|
|
513
|
-
* Constructs a no op call for the setFeeShare(uint64)void ABI method
|
|
514
|
-
*
|
|
515
|
-
* @param params Parameters for the call
|
|
516
|
-
* @returns An `AppClientMethodCallParams` object for the call
|
|
517
|
-
*/
|
|
518
|
-
static setFeeShare(params: CallParams<PoolArgs["obj"]["setFeeShare(uint64)void"] | PoolArgs["tuple"]["setFeeShare(uint64)void"]> & CallOnComplete): AppClientMethodCallParams & CallOnComplete;
|
|
519
|
-
/**
|
|
520
|
-
* Constructs a no op call for the adjustTotalLpAmount()void ABI method
|
|
521
|
-
*
|
|
522
|
-
* @param params Parameters for the call
|
|
523
|
-
* @returns An `AppClientMethodCallParams` object for the call
|
|
524
|
-
*/
|
|
525
|
-
static adjustTotalLpAmount(params: CallParams<PoolArgs["obj"]["adjustTotalLpAmount()void"] | PoolArgs["tuple"]["adjustTotalLpAmount()void"]> & CallOnComplete): AppClientMethodCallParams & CallOnComplete;
|
|
526
|
-
/**
|
|
527
|
-
* Constructs a no op call for the setBalanceRatioMinBP(uint64)void ABI method
|
|
528
|
-
*
|
|
529
|
-
* @param params Parameters for the call
|
|
530
|
-
* @returns An `AppClientMethodCallParams` object for the call
|
|
531
|
-
*/
|
|
532
|
-
static setBalanceRatioMinBp(params: CallParams<PoolArgs["obj"]["setBalanceRatioMinBP(uint64)void"] | PoolArgs["tuple"]["setBalanceRatioMinBP(uint64)void"]> & CallOnComplete): AppClientMethodCallParams & CallOnComplete;
|
|
533
|
-
/**
|
|
534
|
-
* Constructs a no op call for the stopDeposit()void ABI method
|
|
535
|
-
*
|
|
536
|
-
* @param params Parameters for the call
|
|
537
|
-
* @returns An `AppClientMethodCallParams` object for the call
|
|
538
|
-
*/
|
|
539
|
-
static stopDeposit(params: CallParams<PoolArgs["obj"]["stopDeposit()void"] | PoolArgs["tuple"]["stopDeposit()void"]> & CallOnComplete): AppClientMethodCallParams & CallOnComplete;
|
|
540
|
-
/**
|
|
541
|
-
* Constructs a no op call for the startDeposit()void ABI method
|
|
542
|
-
*
|
|
543
|
-
* @param params Parameters for the call
|
|
544
|
-
* @returns An `AppClientMethodCallParams` object for the call
|
|
545
|
-
*/
|
|
546
|
-
static startDeposit(params: CallParams<PoolArgs["obj"]["startDeposit()void"] | PoolArgs["tuple"]["startDeposit()void"]> & CallOnComplete): AppClientMethodCallParams & CallOnComplete;
|
|
547
|
-
/**
|
|
548
|
-
* Constructs a no op call for the stopWithdraw()void ABI method
|
|
549
|
-
*
|
|
550
|
-
* @param params Parameters for the call
|
|
551
|
-
* @returns An `AppClientMethodCallParams` object for the call
|
|
552
|
-
*/
|
|
553
|
-
static stopWithdraw(params: CallParams<PoolArgs["obj"]["stopWithdraw()void"] | PoolArgs["tuple"]["stopWithdraw()void"]> & CallOnComplete): AppClientMethodCallParams & CallOnComplete;
|
|
554
|
-
/**
|
|
555
|
-
* Constructs a no op call for the startWithdraw()void ABI method
|
|
556
|
-
*
|
|
557
|
-
* @param params Parameters for the call
|
|
558
|
-
* @returns An `AppClientMethodCallParams` object for the call
|
|
559
|
-
*/
|
|
560
|
-
static startWithdraw(params: CallParams<PoolArgs["obj"]["startWithdraw()void"] | PoolArgs["tuple"]["startWithdraw()void"]> & CallOnComplete): AppClientMethodCallParams & CallOnComplete;
|
|
561
|
-
/**
|
|
562
|
-
* Constructs a no op call for the setStopAuthority(address)void ABI method
|
|
563
|
-
*
|
|
564
|
-
* @param params Parameters for the call
|
|
565
|
-
* @returns An `AppClientMethodCallParams` object for the call
|
|
566
|
-
*/
|
|
567
|
-
static setStopAuthority(params: CallParams<PoolArgs["obj"]["setStopAuthority(address)void"] | PoolArgs["tuple"]["setStopAuthority(address)void"]> & CallOnComplete): AppClientMethodCallParams & CallOnComplete;
|
|
568
|
-
/**
|
|
569
|
-
* Constructs a no op call for the setRouter(address)void ABI method
|
|
570
|
-
*
|
|
571
|
-
* @param params Parameters for the call
|
|
572
|
-
* @returns An `AppClientMethodCallParams` object for the call
|
|
573
|
-
*/
|
|
574
|
-
static setRouter(params: CallParams<PoolArgs["obj"]["setRouter(address)void"] | PoolArgs["tuple"]["setRouter(address)void"]> & CallOnComplete): AppClientMethodCallParams & CallOnComplete;
|
|
575
|
-
/**
|
|
576
|
-
* Constructs a no op call for the claimRewards()void ABI method
|
|
577
|
-
*
|
|
578
|
-
* @param params Parameters for the call
|
|
579
|
-
* @returns An `AppClientMethodCallParams` object for the call
|
|
580
|
-
*/
|
|
581
|
-
static claimRewards(params: CallParams<PoolArgs["obj"]["claimRewards()void"] | PoolArgs["tuple"]["claimRewards()void"]> & CallOnComplete): AppClientMethodCallParams & CallOnComplete;
|
|
582
|
-
/**
|
|
583
|
-
* Constructs a no op call for the setAdminFeeShare(uint64)void ABI method
|
|
584
|
-
*
|
|
585
|
-
* @param params Parameters for the call
|
|
586
|
-
* @returns An `AppClientMethodCallParams` object for the call
|
|
587
|
-
*/
|
|
588
|
-
static setAdminFeeShare(params: CallParams<PoolArgs["obj"]["setAdminFeeShare(uint64)void"] | PoolArgs["tuple"]["setAdminFeeShare(uint64)void"]> & CallOnComplete): AppClientMethodCallParams & CallOnComplete;
|
|
589
|
-
/**
|
|
590
|
-
* Constructs a no op call for the claimAdminFee()void ABI method
|
|
591
|
-
*
|
|
592
|
-
* @param params Parameters for the call
|
|
593
|
-
* @returns An `AppClientMethodCallParams` object for the call
|
|
594
|
-
*/
|
|
595
|
-
static claimAdminFee(params: CallParams<PoolArgs["obj"]["claimAdminFee()void"] | PoolArgs["tuple"]["claimAdminFee()void"]> & CallOnComplete): AppClientMethodCallParams & CallOnComplete;
|
|
596
|
-
/**
|
|
597
|
-
* Constructs a no op call for the pendingReward(address)uint64 ABI method
|
|
598
|
-
*
|
|
599
|
-
* @param params Parameters for the call
|
|
600
|
-
* @returns An `AppClientMethodCallParams` object for the call
|
|
601
|
-
*/
|
|
602
|
-
static pendingReward(params: CallParams<PoolArgs["obj"]["pendingReward(address)uint64"] | PoolArgs["tuple"]["pendingReward(address)uint64"]> & CallOnComplete): AppClientMethodCallParams & CallOnComplete;
|
|
603
|
-
/**
|
|
604
|
-
* Constructs a no op call for the transferOwnership(address)void ABI method
|
|
605
|
-
*
|
|
606
|
-
* @param params Parameters for the call
|
|
607
|
-
* @returns An `AppClientMethodCallParams` object for the call
|
|
608
|
-
*/
|
|
609
|
-
static transferOwnership(params: CallParams<PoolArgs["obj"]["transferOwnership(address)void"] | PoolArgs["tuple"]["transferOwnership(address)void"]> & CallOnComplete): AppClientMethodCallParams & CallOnComplete;
|
|
610
|
-
}
|
|
611
|
-
/**
|
|
612
|
-
* A factory to create and deploy one or more instance of the Pool smart contract and to create one or more app clients to interact with those (or other) app instances
|
|
613
|
-
*/
|
|
614
|
-
export declare class PoolFactory {
|
|
615
|
-
/**
|
|
616
|
-
* The underlying `AppFactory` for when you want to have more flexibility
|
|
617
|
-
*/
|
|
618
|
-
readonly appFactory: _AppFactory;
|
|
619
|
-
/**
|
|
620
|
-
* Creates a new instance of `PoolFactory`
|
|
621
|
-
*
|
|
622
|
-
* @param params The parameters to initialise the app factory with
|
|
623
|
-
*/
|
|
624
|
-
constructor(params: Omit<AppFactoryParams, "appSpec">);
|
|
625
|
-
/** The name of the app (from the ARC-32 / ARC-56 app spec or override). */
|
|
626
|
-
get appName(): string;
|
|
627
|
-
/** The ARC-56 app spec being used */
|
|
628
|
-
get appSpec(): Arc56Contract;
|
|
629
|
-
/** A reference to the underlying `AlgorandClient` this app factory is using. */
|
|
630
|
-
get algorand(): AlgorandClient;
|
|
631
|
-
/**
|
|
632
|
-
* Returns a new `AppClient` client for an app instance of the given ID.
|
|
633
|
-
*
|
|
634
|
-
* Automatically populates appName, defaultSender and source maps from the factory
|
|
635
|
-
* if not specified in the params.
|
|
636
|
-
* @param params The parameters to create the app client
|
|
637
|
-
* @returns The `AppClient`
|
|
638
|
-
*/
|
|
639
|
-
getAppClientById(params: AppFactoryAppClientParams): PoolClient;
|
|
640
|
-
/**
|
|
641
|
-
* Returns a new `AppClient` client, resolving the app by creator address and name
|
|
642
|
-
* using AlgoKit app deployment semantics (i.e. looking for the app creation transaction note).
|
|
643
|
-
*
|
|
644
|
-
* Automatically populates appName, defaultSender and source maps from the factory
|
|
645
|
-
* if not specified in the params.
|
|
646
|
-
* @param params The parameters to create the app client
|
|
647
|
-
* @returns The `AppClient`
|
|
648
|
-
*/
|
|
649
|
-
getAppClientByCreatorAndName(params: AppFactoryResolveAppClientByCreatorAndNameParams): Promise<PoolClient>;
|
|
650
|
-
/**
|
|
651
|
-
* Idempotently deploys the Pool smart contract.
|
|
652
|
-
*
|
|
653
|
-
* @param params The arguments for the contract calls and any additional parameters for the call
|
|
654
|
-
* @returns The deployment result
|
|
655
|
-
*/
|
|
656
|
-
deploy(params?: PoolDeployParams): Promise<{
|
|
657
|
-
result: {
|
|
658
|
-
return: import("algosdk").ABIValue | import("@algorandfoundation/algokit-utils/types/app-arc56").ABIStruct | undefined;
|
|
659
|
-
deleteReturn: import("algosdk").ABIValue | import("@algorandfoundation/algokit-utils/types/app-arc56").ABIStruct | undefined;
|
|
660
|
-
compiledApproval?: import("@algorandfoundation/algokit-utils/types/app").CompiledTeal | undefined;
|
|
661
|
-
compiledClear?: import("@algorandfoundation/algokit-utils/types/app").CompiledTeal | undefined;
|
|
662
|
-
operationPerformed: "create";
|
|
663
|
-
version: string;
|
|
664
|
-
name: string;
|
|
665
|
-
createdRound: bigint;
|
|
666
|
-
updatedRound: bigint;
|
|
667
|
-
createdMetadata: import("@algorandfoundation/algokit-utils/types/app").AppDeployMetadata;
|
|
668
|
-
deleted: boolean;
|
|
669
|
-
deletable?: boolean | undefined;
|
|
670
|
-
updatable?: boolean | undefined;
|
|
671
|
-
groupId: string;
|
|
672
|
-
txIds: string[];
|
|
673
|
-
returns?: import("@algorandfoundation/algokit-utils/types/app").ABIReturn[] | undefined;
|
|
674
|
-
confirmations: modelsv2.PendingTransactionResponse[];
|
|
675
|
-
transactions: Transaction[];
|
|
676
|
-
confirmation: modelsv2.PendingTransactionResponse;
|
|
677
|
-
transaction: Transaction;
|
|
678
|
-
appId: bigint;
|
|
679
|
-
appAddress: Address;
|
|
680
|
-
} | {
|
|
681
|
-
return: import("algosdk").ABIValue | import("@algorandfoundation/algokit-utils/types/app-arc56").ABIStruct | undefined;
|
|
682
|
-
deleteReturn: import("algosdk").ABIValue | import("@algorandfoundation/algokit-utils/types/app-arc56").ABIStruct | undefined;
|
|
683
|
-
compiledApproval?: import("@algorandfoundation/algokit-utils/types/app").CompiledTeal | undefined;
|
|
684
|
-
compiledClear?: import("@algorandfoundation/algokit-utils/types/app").CompiledTeal | undefined;
|
|
685
|
-
operationPerformed: "update";
|
|
686
|
-
appId: bigint;
|
|
687
|
-
appAddress: Address;
|
|
688
|
-
createdRound: bigint;
|
|
689
|
-
updatedRound: bigint;
|
|
690
|
-
createdMetadata: import("@algorandfoundation/algokit-utils/types/app").AppDeployMetadata;
|
|
691
|
-
deleted: boolean;
|
|
692
|
-
name: string;
|
|
693
|
-
version: string;
|
|
694
|
-
deletable?: boolean | undefined;
|
|
695
|
-
updatable?: boolean | undefined;
|
|
696
|
-
groupId: string;
|
|
697
|
-
txIds: string[];
|
|
698
|
-
returns?: import("@algorandfoundation/algokit-utils/types/app").ABIReturn[] | undefined;
|
|
699
|
-
confirmations: modelsv2.PendingTransactionResponse[];
|
|
700
|
-
transactions: Transaction[];
|
|
701
|
-
confirmation: modelsv2.PendingTransactionResponse;
|
|
702
|
-
transaction: Transaction;
|
|
703
|
-
} | {
|
|
704
|
-
return: import("algosdk").ABIValue | import("@algorandfoundation/algokit-utils/types/app-arc56").ABIStruct | undefined;
|
|
705
|
-
deleteReturn: import("algosdk").ABIValue | import("@algorandfoundation/algokit-utils/types/app-arc56").ABIStruct | undefined;
|
|
706
|
-
compiledApproval?: import("@algorandfoundation/algokit-utils/types/app").CompiledTeal | undefined;
|
|
707
|
-
compiledClear?: import("@algorandfoundation/algokit-utils/types/app").CompiledTeal | undefined;
|
|
708
|
-
operationPerformed: "replace";
|
|
709
|
-
version: string;
|
|
710
|
-
name: string;
|
|
711
|
-
createdRound: bigint;
|
|
712
|
-
updatedRound: bigint;
|
|
713
|
-
createdMetadata: import("@algorandfoundation/algokit-utils/types/app").AppDeployMetadata;
|
|
714
|
-
deleted: boolean;
|
|
715
|
-
deletable?: boolean | undefined;
|
|
716
|
-
updatable?: boolean | undefined;
|
|
717
|
-
groupId: string;
|
|
718
|
-
txIds: string[];
|
|
719
|
-
returns?: import("@algorandfoundation/algokit-utils/types/app").ABIReturn[] | undefined;
|
|
720
|
-
confirmations: modelsv2.PendingTransactionResponse[];
|
|
721
|
-
transactions: Transaction[];
|
|
722
|
-
confirmation: modelsv2.PendingTransactionResponse;
|
|
723
|
-
transaction: Transaction;
|
|
724
|
-
appId: bigint;
|
|
725
|
-
appAddress: Address;
|
|
726
|
-
deleteResult: import("@algorandfoundation/algokit-utils/types/transaction").ConfirmedTransactionResult;
|
|
727
|
-
} | {
|
|
728
|
-
return: import("algosdk").ABIValue | import("@algorandfoundation/algokit-utils/types/app-arc56").ABIStruct | undefined;
|
|
729
|
-
deleteReturn: import("algosdk").ABIValue | import("@algorandfoundation/algokit-utils/types/app-arc56").ABIStruct | undefined;
|
|
730
|
-
compiledApproval?: import("@algorandfoundation/algokit-utils/types/app").CompiledTeal | undefined;
|
|
731
|
-
compiledClear?: import("@algorandfoundation/algokit-utils/types/app").CompiledTeal | undefined;
|
|
732
|
-
operationPerformed: "nothing";
|
|
733
|
-
appId: bigint;
|
|
734
|
-
appAddress: Address;
|
|
735
|
-
createdRound: bigint;
|
|
736
|
-
updatedRound: bigint;
|
|
737
|
-
createdMetadata: import("@algorandfoundation/algokit-utils/types/app").AppDeployMetadata;
|
|
738
|
-
deleted: boolean;
|
|
739
|
-
name: string;
|
|
740
|
-
version: string;
|
|
741
|
-
deletable?: boolean | undefined;
|
|
742
|
-
updatable?: boolean | undefined;
|
|
743
|
-
};
|
|
744
|
-
appClient: PoolClient;
|
|
745
|
-
}>;
|
|
746
|
-
/**
|
|
747
|
-
* Get parameters to create transactions (create and deploy related calls) for the current app. A good mental model for this is that these parameters represent a deferred transaction creation.
|
|
748
|
-
*/
|
|
749
|
-
readonly params: {
|
|
750
|
-
/**
|
|
751
|
-
* Gets available create methods
|
|
752
|
-
*/
|
|
753
|
-
create: {
|
|
754
|
-
/**
|
|
755
|
-
* Creates a new instance of the Pool smart contract using the createApplication(address,address,uint64,uint64,uint64,uint64)void ABI method.
|
|
756
|
-
*
|
|
757
|
-
* @param params The params for the smart contract call
|
|
758
|
-
* @returns The create params
|
|
759
|
-
*/
|
|
760
|
-
createApplication: (params: CallParams<PoolArgs["obj"]["createApplication(address,address,uint64,uint64,uint64,uint64)void"] | PoolArgs["tuple"]["createApplication(address,address,uint64,uint64,uint64,uint64)void"]> & AppClientCompilationParams & CreateSchema & {
|
|
761
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
762
|
-
}) => Promise<{
|
|
763
|
-
deployTimeParams: import("@algorandfoundation/algokit-utils/types/app").TealTemplateParams | undefined;
|
|
764
|
-
schema: {
|
|
765
|
-
globalInts: number;
|
|
766
|
-
globalByteSlices: number;
|
|
767
|
-
localInts: number;
|
|
768
|
-
localByteSlices: number;
|
|
769
|
-
};
|
|
770
|
-
approvalProgram: Uint8Array;
|
|
771
|
-
clearStateProgram: Uint8Array;
|
|
772
|
-
maxFee?: import("@algorandfoundation/algokit-utils/types/amount").AlgoAmount | undefined;
|
|
773
|
-
note?: string | Uint8Array | undefined;
|
|
774
|
-
signer?: TransactionSigner | import("@algorandfoundation/algokit-utils/types/account").TransactionSignerAccount | undefined;
|
|
775
|
-
onComplete?: OnApplicationComplete.NoOpOC | OnApplicationComplete.OptInOC | OnApplicationComplete.CloseOutOC | OnApplicationComplete.UpdateApplicationOC | OnApplicationComplete.DeleteApplicationOC | undefined;
|
|
776
|
-
rejectVersion?: number | undefined;
|
|
777
|
-
lease?: string | Uint8Array | undefined;
|
|
778
|
-
rekeyTo?: string | Address | undefined;
|
|
779
|
-
staticFee?: import("@algorandfoundation/algokit-utils/types/amount").AlgoAmount | undefined;
|
|
780
|
-
extraFee?: import("@algorandfoundation/algokit-utils/types/amount").AlgoAmount | undefined;
|
|
781
|
-
validityWindow?: number | bigint | undefined;
|
|
782
|
-
firstValidRound?: bigint | undefined;
|
|
783
|
-
lastValidRound?: bigint | undefined;
|
|
784
|
-
accountReferences?: (string | Address)[] | undefined;
|
|
785
|
-
appReferences?: bigint[] | undefined;
|
|
786
|
-
assetReferences?: bigint[] | undefined;
|
|
787
|
-
boxReferences?: (import("@algorandfoundation/algokit-utils/types/app-manager").BoxIdentifier | import("@algorandfoundation/algokit-utils/types/app-manager").BoxReference)[] | undefined;
|
|
788
|
-
accessReferences?: import("@algorandfoundation/algokit-utils/types/app-manager").ResourceReference[] | undefined;
|
|
789
|
-
sender?: string | Address | undefined;
|
|
790
|
-
method: string;
|
|
791
|
-
args?: (import("algosdk").ABIValue | AppMethodCallTransactionArgument | import("@algorandfoundation/algokit-utils/types/app-arc56").ABIStruct | undefined)[] | undefined;
|
|
792
|
-
updatable?: boolean | undefined;
|
|
793
|
-
deletable?: boolean | undefined;
|
|
794
|
-
extraProgramPages?: number | undefined;
|
|
795
|
-
} & {
|
|
796
|
-
sender: Address;
|
|
797
|
-
signer: TransactionSigner | import("@algorandfoundation/algokit-utils/types/account").TransactionSignerAccount | undefined;
|
|
798
|
-
method: import("@algorandfoundation/algokit-utils/types/app-arc56").Arc56Method;
|
|
799
|
-
args: (Transaction | import("algosdk").ABIValue | import("algosdk").TransactionWithSigner | Promise<Transaction> | import("@algorandfoundation/algokit-utils/types/composer").AppMethodCall<{
|
|
800
|
-
sender: string | Address;
|
|
801
|
-
maxFee?: import("@algorandfoundation/algokit-utils/types/amount").AlgoAmount | undefined;
|
|
802
|
-
note?: string | Uint8Array | undefined;
|
|
803
|
-
args?: Uint8Array[] | undefined;
|
|
804
|
-
signer?: TransactionSigner | import("@algorandfoundation/algokit-utils/types/account").TransactionSignerAccount | undefined;
|
|
805
|
-
onComplete?: OnApplicationComplete.NoOpOC | OnApplicationComplete.OptInOC | OnApplicationComplete.CloseOutOC | OnApplicationComplete.UpdateApplicationOC | OnApplicationComplete.DeleteApplicationOC | undefined;
|
|
806
|
-
rejectVersion?: number | undefined;
|
|
807
|
-
lease?: string | Uint8Array | undefined;
|
|
808
|
-
rekeyTo?: string | Address | undefined;
|
|
809
|
-
staticFee?: import("@algorandfoundation/algokit-utils/types/amount").AlgoAmount | undefined;
|
|
810
|
-
extraFee?: import("@algorandfoundation/algokit-utils/types/amount").AlgoAmount | undefined;
|
|
811
|
-
validityWindow?: number | bigint | undefined;
|
|
812
|
-
firstValidRound?: bigint | undefined;
|
|
813
|
-
lastValidRound?: bigint | undefined;
|
|
814
|
-
accountReferences?: (string | Address)[] | undefined;
|
|
815
|
-
appReferences?: bigint[] | undefined;
|
|
816
|
-
assetReferences?: bigint[] | undefined;
|
|
817
|
-
boxReferences?: (import("@algorandfoundation/algokit-utils/types/app-manager").BoxIdentifier | import("@algorandfoundation/algokit-utils/types/app-manager").BoxReference)[] | undefined;
|
|
818
|
-
accessReferences?: import("@algorandfoundation/algokit-utils/types/app-manager").ResourceReference[] | undefined;
|
|
819
|
-
approvalProgram: string | Uint8Array;
|
|
820
|
-
clearStateProgram: string | Uint8Array;
|
|
821
|
-
schema?: {
|
|
822
|
-
globalInts: number;
|
|
823
|
-
globalByteSlices: number;
|
|
824
|
-
localInts: number;
|
|
825
|
-
localByteSlices: number;
|
|
826
|
-
} | undefined;
|
|
827
|
-
extraProgramPages?: number | undefined;
|
|
828
|
-
}> | import("@algorandfoundation/algokit-utils/types/composer").AppMethodCall<{
|
|
829
|
-
sender: string | Address;
|
|
830
|
-
signer?: TransactionSigner | import("@algorandfoundation/algokit-utils/types/account").TransactionSignerAccount | undefined;
|
|
831
|
-
rekeyTo?: string | Address | undefined;
|
|
832
|
-
note?: string | Uint8Array | undefined;
|
|
833
|
-
lease?: string | Uint8Array | undefined;
|
|
834
|
-
staticFee?: import("@algorandfoundation/algokit-utils/types/amount").AlgoAmount | undefined;
|
|
835
|
-
extraFee?: import("@algorandfoundation/algokit-utils/types/amount").AlgoAmount | undefined;
|
|
836
|
-
maxFee?: import("@algorandfoundation/algokit-utils/types/amount").AlgoAmount | undefined;
|
|
837
|
-
validityWindow?: number | bigint | undefined;
|
|
838
|
-
firstValidRound?: bigint | undefined;
|
|
839
|
-
lastValidRound?: bigint | undefined;
|
|
840
|
-
appId: bigint;
|
|
841
|
-
onComplete?: OnApplicationComplete.UpdateApplicationOC | undefined;
|
|
842
|
-
args?: Uint8Array[] | undefined;
|
|
843
|
-
accountReferences?: (string | Address)[] | undefined;
|
|
844
|
-
appReferences?: bigint[] | undefined;
|
|
845
|
-
assetReferences?: bigint[] | undefined;
|
|
846
|
-
boxReferences?: (import("@algorandfoundation/algokit-utils/types/app-manager").BoxIdentifier | import("@algorandfoundation/algokit-utils/types/app-manager").BoxReference)[] | undefined;
|
|
847
|
-
accessReferences?: import("@algorandfoundation/algokit-utils/types/app-manager").ResourceReference[] | undefined;
|
|
848
|
-
rejectVersion?: number | undefined;
|
|
849
|
-
approvalProgram: string | Uint8Array;
|
|
850
|
-
clearStateProgram: string | Uint8Array;
|
|
851
|
-
}> | import("@algorandfoundation/algokit-utils/types/composer").AppMethodCall<import("@algorandfoundation/algokit-utils/types/composer").AppMethodCallParams> | undefined)[] | undefined;
|
|
852
|
-
onComplete: OnApplicationComplete.NoOpOC | OnApplicationComplete.OptInOC | OnApplicationComplete.CloseOutOC | OnApplicationComplete.UpdateApplicationOC | OnApplicationComplete.DeleteApplicationOC;
|
|
853
|
-
}>;
|
|
854
|
-
};
|
|
855
|
-
};
|
|
856
|
-
/**
|
|
857
|
-
* Create transactions for the current app
|
|
858
|
-
*/
|
|
859
|
-
readonly createTransaction: {
|
|
860
|
-
/**
|
|
861
|
-
* Gets available create methods
|
|
862
|
-
*/
|
|
863
|
-
create: {
|
|
864
|
-
/**
|
|
865
|
-
* Creates a new instance of the Pool smart contract using the createApplication(address,address,uint64,uint64,uint64,uint64)void ABI method.
|
|
866
|
-
*
|
|
867
|
-
* @param params The params for the smart contract call
|
|
868
|
-
* @returns The create transaction
|
|
869
|
-
*/
|
|
870
|
-
createApplication: (params: CallParams<PoolArgs["obj"]["createApplication(address,address,uint64,uint64,uint64,uint64)void"] | PoolArgs["tuple"]["createApplication(address,address,uint64,uint64,uint64,uint64)void"]> & AppClientCompilationParams & CreateSchema & {
|
|
871
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
872
|
-
}) => Promise<{
|
|
873
|
-
transactions: Transaction[];
|
|
874
|
-
methodCalls: Map<number, import("algosdk").ABIMethod>;
|
|
875
|
-
signers: Map<number, TransactionSigner>;
|
|
876
|
-
}>;
|
|
877
|
-
};
|
|
878
|
-
};
|
|
879
|
-
/**
|
|
880
|
-
* Send calls to the current app
|
|
881
|
-
*/
|
|
882
|
-
readonly send: {
|
|
883
|
-
/**
|
|
884
|
-
* Gets available create methods
|
|
885
|
-
*/
|
|
886
|
-
create: {
|
|
887
|
-
/**
|
|
888
|
-
* Creates a new instance of the Pool smart contract using an ABI method call using the createApplication(address,address,uint64,uint64,uint64,uint64)void ABI method.
|
|
889
|
-
*
|
|
890
|
-
* @param params The params for the smart contract call
|
|
891
|
-
* @returns The create result
|
|
892
|
-
*/
|
|
893
|
-
createApplication: (params: CallParams<PoolArgs["obj"]["createApplication(address,address,uint64,uint64,uint64,uint64)void"] | PoolArgs["tuple"]["createApplication(address,address,uint64,uint64,uint64,uint64)void"]> & AppClientCompilationParams & CreateSchema & SendParams & {
|
|
894
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
895
|
-
}) => Promise<{
|
|
896
|
-
result: {
|
|
897
|
-
return: undefined | PoolReturns["createApplication(address,address,uint64,uint64,uint64,uint64)void"];
|
|
898
|
-
compiledApproval?: import("@algorandfoundation/algokit-utils/types/app").CompiledTeal | undefined;
|
|
899
|
-
compiledClear?: import("@algorandfoundation/algokit-utils/types/app").CompiledTeal | undefined;
|
|
900
|
-
appId: bigint;
|
|
901
|
-
groupId: string;
|
|
902
|
-
txIds: string[];
|
|
903
|
-
returns?: import("@algorandfoundation/algokit-utils/types/app").ABIReturn[] | undefined;
|
|
904
|
-
confirmations: modelsv2.PendingTransactionResponse[];
|
|
905
|
-
transactions: Transaction[];
|
|
906
|
-
confirmation: modelsv2.PendingTransactionResponse;
|
|
907
|
-
transaction: Transaction;
|
|
908
|
-
appAddress: Address;
|
|
909
|
-
};
|
|
910
|
-
appClient: PoolClient;
|
|
911
|
-
}>;
|
|
912
|
-
};
|
|
913
|
-
};
|
|
914
|
-
}
|
|
915
|
-
/**
|
|
916
|
-
* A client to make calls to the Pool smart contract
|
|
917
|
-
*/
|
|
918
|
-
export declare class PoolClient {
|
|
919
|
-
/**
|
|
920
|
-
* The underlying `AppClient` for when you want to have more flexibility
|
|
921
|
-
*/
|
|
922
|
-
readonly appClient: _AppClient;
|
|
923
|
-
/**
|
|
924
|
-
* Creates a new instance of `PoolClient`
|
|
925
|
-
*
|
|
926
|
-
* @param appClient An `AppClient` instance which has been created with the Pool app spec
|
|
927
|
-
*/
|
|
928
|
-
constructor(appClient: _AppClient);
|
|
929
|
-
/**
|
|
930
|
-
* Creates a new instance of `PoolClient`
|
|
931
|
-
*
|
|
932
|
-
* @param params The parameters to initialise the app client with
|
|
933
|
-
*/
|
|
934
|
-
constructor(params: Omit<AppClientParams, "appSpec">);
|
|
935
|
-
/**
|
|
936
|
-
* Checks for decode errors on the given return value and maps the return value to the return type for the given method
|
|
937
|
-
* @returns The typed return value or undefined if there was no value
|
|
938
|
-
*/
|
|
939
|
-
decodeReturnValue<TSignature extends PoolNonVoidMethodSignatures>(method: TSignature, returnValue: ABIReturn | undefined): MethodReturn<TSignature> | undefined;
|
|
940
|
-
/**
|
|
941
|
-
* Returns a new `PoolClient` client, resolving the app by creator address and name
|
|
942
|
-
* using AlgoKit app deployment semantics (i.e. looking for the app creation transaction note).
|
|
943
|
-
* @param params The parameters to create the app client
|
|
944
|
-
*/
|
|
945
|
-
static fromCreatorAndName(params: Omit<ResolveAppClientByCreatorAndName, "appSpec">): Promise<PoolClient>;
|
|
946
|
-
/**
|
|
947
|
-
* Returns an `PoolClient` instance for the current network based on
|
|
948
|
-
* pre-determined network-specific app IDs specified in the ARC-56 app spec.
|
|
949
|
-
*
|
|
950
|
-
* If no IDs are in the app spec or the network isn't recognised, an error is thrown.
|
|
951
|
-
* @param params The parameters to create the app client
|
|
952
|
-
*/
|
|
953
|
-
static fromNetwork(params: Omit<ResolveAppClientByNetwork, "appSpec">): Promise<PoolClient>;
|
|
954
|
-
/** The ID of the app instance this client is linked to. */
|
|
955
|
-
get appId(): bigint;
|
|
956
|
-
/** The app address of the app instance this client is linked to. */
|
|
957
|
-
get appAddress(): Address;
|
|
958
|
-
/** The name of the app. */
|
|
959
|
-
get appName(): string;
|
|
960
|
-
/** The ARC-56 app spec being used */
|
|
961
|
-
get appSpec(): Arc56Contract;
|
|
962
|
-
/** A reference to the underlying `AlgorandClient` this app client is using. */
|
|
963
|
-
get algorand(): AlgorandClient;
|
|
964
|
-
/**
|
|
965
|
-
* Get parameters to create transactions for the current app. A good mental model for this is that these parameters represent a deferred transaction creation.
|
|
966
|
-
*/
|
|
967
|
-
readonly params: {
|
|
968
|
-
/**
|
|
969
|
-
* Gets available optIn methods
|
|
970
|
-
*/
|
|
971
|
-
optIn: {
|
|
972
|
-
/**
|
|
973
|
-
* Opts the user into an existing instance of the Pool smart contract using the `optInToApplication()void` ABI method.
|
|
974
|
-
*
|
|
975
|
-
* @param params The params for the smart contract call
|
|
976
|
-
* @returns The optIn params
|
|
977
|
-
*/
|
|
978
|
-
optInToApplication: (params?: CallParams<PoolArgs["obj"]["optInToApplication()void"] | PoolArgs["tuple"]["optInToApplication()void"]>) => Promise<AppCallMethodCall>;
|
|
979
|
-
/**
|
|
980
|
-
* Opts the user into an existing instance of the Pool smart contract using the `deposit(axfer,uint64)void` ABI method.
|
|
981
|
-
*
|
|
982
|
-
* @param params The params for the smart contract call
|
|
983
|
-
* @returns The optIn params
|
|
984
|
-
*/
|
|
985
|
-
deposit: (params: CallParams<PoolArgs["obj"]["deposit(axfer,uint64)void"] | PoolArgs["tuple"]["deposit(axfer,uint64)void"]>) => Promise<AppCallMethodCall>;
|
|
986
|
-
};
|
|
987
|
-
/**
|
|
988
|
-
* Gets available closeOut methods
|
|
989
|
-
*/
|
|
990
|
-
closeOut: {
|
|
991
|
-
/**
|
|
992
|
-
* Makes a close out call to an existing instance of the Pool smart contract using the `closeOutOfApplication(uint64)void` ABI method.
|
|
993
|
-
*
|
|
994
|
-
* @param params The params for the smart contract call
|
|
995
|
-
* @returns The closeOut params
|
|
996
|
-
*/
|
|
997
|
-
closeOutOfApplication: (params?: CallParams<PoolArgs["obj"]["closeOutOfApplication(uint64)void"] | PoolArgs["tuple"]["closeOutOfApplication(uint64)void"]>) => Promise<AppCallMethodCall>;
|
|
998
|
-
};
|
|
999
|
-
/**
|
|
1000
|
-
* Makes a clear_state call to an existing instance of the Pool smart contract.
|
|
1001
|
-
*
|
|
1002
|
-
* @param params The params for the bare (raw) call
|
|
1003
|
-
* @returns The clearState result
|
|
1004
|
-
*/
|
|
1005
|
-
clearState: (params?: Expand<AppClientBareCallParams>) => import("@algorandfoundation/algokit-utils/types/composer").AppCallParams;
|
|
1006
|
-
/**
|
|
1007
|
-
* Makes a call to the Pool smart contract using the `optInAsset()void` ABI method.
|
|
1008
|
-
*
|
|
1009
|
-
* Opt-in the application account to the ASA stored in `this.asset`.
|
|
1010
|
-
This performs an inner axfer of 0 to the app's own address.
|
|
1011
|
-
Call once after deploy (or whenever you change the asset).
|
|
1012
|
-
|
|
1013
|
-
*
|
|
1014
|
-
* @param params The params for the smart contract call
|
|
1015
|
-
* @returns The call params
|
|
1016
|
-
*/
|
|
1017
|
-
optInAsset: (params?: CallParams<PoolArgs["obj"]["optInAsset()void"] | PoolArgs["tuple"]["optInAsset()void"]> & {
|
|
1018
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1019
|
-
}) => Promise<AppCallMethodCall>;
|
|
1020
|
-
/**
|
|
1021
|
-
* Makes a call to the Pool smart contract using the `deposit(axfer,uint64)void` ABI method.
|
|
1022
|
-
*
|
|
1023
|
-
* @param params The params for the smart contract call
|
|
1024
|
-
* @returns The call params
|
|
1025
|
-
*/
|
|
1026
|
-
deposit: (params: CallParams<PoolArgs["obj"]["deposit(axfer,uint64)void"] | PoolArgs["tuple"]["deposit(axfer,uint64)void"]> & {
|
|
1027
|
-
onComplete?: OnApplicationComplete.NoOpOC | OnApplicationComplete.OptInOC;
|
|
1028
|
-
}) => Promise<AppCallMethodCall>;
|
|
1029
|
-
/**
|
|
1030
|
-
* Makes a call to the Pool smart contract using the `withdraw(uint64,uint64)void` ABI method.
|
|
1031
|
-
*
|
|
1032
|
-
* @param params The params for the smart contract call
|
|
1033
|
-
* @returns The call params
|
|
1034
|
-
*/
|
|
1035
|
-
withdraw: (params: CallParams<PoolArgs["obj"]["withdraw(uint64,uint64)void"] | PoolArgs["tuple"]["withdraw(uint64,uint64)void"]> & {
|
|
1036
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1037
|
-
}) => Promise<AppCallMethodCall>;
|
|
1038
|
-
/**
|
|
1039
|
-
* Makes a call to the Pool smart contract using the `swapToVUsd(address,uint64,bool)uint64` ABI method.
|
|
1040
|
-
*
|
|
1041
|
-
* @param params The params for the smart contract call
|
|
1042
|
-
* @returns The call params: returns the difference between the old and the new value of vUsdBalance
|
|
1043
|
-
*/
|
|
1044
|
-
swapToVUsd: (params: CallParams<PoolArgs["obj"]["swapToVUsd(address,uint64,bool)uint64"] | PoolArgs["tuple"]["swapToVUsd(address,uint64,bool)uint64"]> & {
|
|
1045
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1046
|
-
}) => Promise<AppCallMethodCall>;
|
|
1047
|
-
/**
|
|
1048
|
-
* Makes a call to the Pool smart contract using the `swapFromVUsd(address,uint64,uint64,bool)uint64` ABI method.
|
|
1049
|
-
*
|
|
1050
|
-
* @param params The params for the smart contract call
|
|
1051
|
-
* @returns The call params: returns the difference between the old and the new value of vUsdBalance
|
|
1052
|
-
*/
|
|
1053
|
-
swapFromVUsd: (params: CallParams<PoolArgs["obj"]["swapFromVUsd(address,uint64,uint64,bool)uint64"] | PoolArgs["tuple"]["swapFromVUsd(address,uint64,uint64,bool)uint64"]> & {
|
|
1054
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1055
|
-
}) => Promise<AppCallMethodCall>;
|
|
1056
|
-
/**
|
|
1057
|
-
* Makes a call to the Pool smart contract using the `setFeeShare(uint64)void` ABI method.
|
|
1058
|
-
*
|
|
1059
|
-
* @param params The params for the smart contract call
|
|
1060
|
-
* @returns The call params
|
|
1061
|
-
*/
|
|
1062
|
-
setFeeShare: (params: CallParams<PoolArgs["obj"]["setFeeShare(uint64)void"] | PoolArgs["tuple"]["setFeeShare(uint64)void"]> & {
|
|
1063
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1064
|
-
}) => Promise<AppCallMethodCall>;
|
|
1065
|
-
/**
|
|
1066
|
-
* Makes a call to the Pool smart contract using the `adjustTotalLpAmount()void` ABI method.
|
|
1067
|
-
*
|
|
1068
|
-
* @param params The params for the smart contract call
|
|
1069
|
-
* @returns The call params
|
|
1070
|
-
*/
|
|
1071
|
-
adjustTotalLpAmount: (params?: CallParams<PoolArgs["obj"]["adjustTotalLpAmount()void"] | PoolArgs["tuple"]["adjustTotalLpAmount()void"]> & {
|
|
1072
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1073
|
-
}) => Promise<AppCallMethodCall>;
|
|
1074
|
-
/**
|
|
1075
|
-
* Makes a call to the Pool smart contract using the `setBalanceRatioMinBP(uint64)void` ABI method.
|
|
1076
|
-
*
|
|
1077
|
-
* @param params The params for the smart contract call
|
|
1078
|
-
* @returns The call params
|
|
1079
|
-
*/
|
|
1080
|
-
setBalanceRatioMinBp: (params: CallParams<PoolArgs["obj"]["setBalanceRatioMinBP(uint64)void"] | PoolArgs["tuple"]["setBalanceRatioMinBP(uint64)void"]> & {
|
|
1081
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1082
|
-
}) => Promise<AppCallMethodCall>;
|
|
1083
|
-
/**
|
|
1084
|
-
* Makes a call to the Pool smart contract using the `stopDeposit()void` ABI method.
|
|
1085
|
-
*
|
|
1086
|
-
* @param params The params for the smart contract call
|
|
1087
|
-
* @returns The call params
|
|
1088
|
-
*/
|
|
1089
|
-
stopDeposit: (params?: CallParams<PoolArgs["obj"]["stopDeposit()void"] | PoolArgs["tuple"]["stopDeposit()void"]> & {
|
|
1090
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1091
|
-
}) => Promise<AppCallMethodCall>;
|
|
1092
|
-
/**
|
|
1093
|
-
* Makes a call to the Pool smart contract using the `startDeposit()void` ABI method.
|
|
1094
|
-
*
|
|
1095
|
-
* @param params The params for the smart contract call
|
|
1096
|
-
* @returns The call params
|
|
1097
|
-
*/
|
|
1098
|
-
startDeposit: (params?: CallParams<PoolArgs["obj"]["startDeposit()void"] | PoolArgs["tuple"]["startDeposit()void"]> & {
|
|
1099
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1100
|
-
}) => Promise<AppCallMethodCall>;
|
|
1101
|
-
/**
|
|
1102
|
-
* Makes a call to the Pool smart contract using the `stopWithdraw()void` ABI method.
|
|
1103
|
-
*
|
|
1104
|
-
* @param params The params for the smart contract call
|
|
1105
|
-
* @returns The call params
|
|
1106
|
-
*/
|
|
1107
|
-
stopWithdraw: (params?: CallParams<PoolArgs["obj"]["stopWithdraw()void"] | PoolArgs["tuple"]["stopWithdraw()void"]> & {
|
|
1108
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1109
|
-
}) => Promise<AppCallMethodCall>;
|
|
1110
|
-
/**
|
|
1111
|
-
* Makes a call to the Pool smart contract using the `startWithdraw()void` ABI method.
|
|
1112
|
-
*
|
|
1113
|
-
* @param params The params for the smart contract call
|
|
1114
|
-
* @returns The call params
|
|
1115
|
-
*/
|
|
1116
|
-
startWithdraw: (params?: CallParams<PoolArgs["obj"]["startWithdraw()void"] | PoolArgs["tuple"]["startWithdraw()void"]> & {
|
|
1117
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1118
|
-
}) => Promise<AppCallMethodCall>;
|
|
1119
|
-
/**
|
|
1120
|
-
* Makes a call to the Pool smart contract using the `setStopAuthority(address)void` ABI method.
|
|
1121
|
-
*
|
|
1122
|
-
* @param params The params for the smart contract call
|
|
1123
|
-
* @returns The call params
|
|
1124
|
-
*/
|
|
1125
|
-
setStopAuthority: (params: CallParams<PoolArgs["obj"]["setStopAuthority(address)void"] | PoolArgs["tuple"]["setStopAuthority(address)void"]> & {
|
|
1126
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1127
|
-
}) => Promise<AppCallMethodCall>;
|
|
1128
|
-
/**
|
|
1129
|
-
* Makes a call to the Pool smart contract using the `setRouter(address)void` ABI method.
|
|
1130
|
-
*
|
|
1131
|
-
* @param params The params for the smart contract call
|
|
1132
|
-
* @returns The call params
|
|
1133
|
-
*/
|
|
1134
|
-
setRouter: (params: CallParams<PoolArgs["obj"]["setRouter(address)void"] | PoolArgs["tuple"]["setRouter(address)void"]> & {
|
|
1135
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1136
|
-
}) => Promise<AppCallMethodCall>;
|
|
1137
|
-
/**
|
|
1138
|
-
* Makes a call to the Pool smart contract using the `claimRewards()void` ABI method.
|
|
1139
|
-
*
|
|
1140
|
-
* @param params The params for the smart contract call
|
|
1141
|
-
* @returns The call params
|
|
1142
|
-
*/
|
|
1143
|
-
claimRewards: (params?: CallParams<PoolArgs["obj"]["claimRewards()void"] | PoolArgs["tuple"]["claimRewards()void"]> & {
|
|
1144
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1145
|
-
}) => Promise<AppCallMethodCall>;
|
|
1146
|
-
/**
|
|
1147
|
-
* Makes a call to the Pool smart contract using the `setAdminFeeShare(uint64)void` ABI method.
|
|
1148
|
-
*
|
|
1149
|
-
* @param params The params for the smart contract call
|
|
1150
|
-
* @returns The call params
|
|
1151
|
-
*/
|
|
1152
|
-
setAdminFeeShare: (params: CallParams<PoolArgs["obj"]["setAdminFeeShare(uint64)void"] | PoolArgs["tuple"]["setAdminFeeShare(uint64)void"]> & {
|
|
1153
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1154
|
-
}) => Promise<AppCallMethodCall>;
|
|
1155
|
-
/**
|
|
1156
|
-
* Makes a call to the Pool smart contract using the `claimAdminFee()void` ABI method.
|
|
1157
|
-
*
|
|
1158
|
-
* @param params The params for the smart contract call
|
|
1159
|
-
* @returns The call params
|
|
1160
|
-
*/
|
|
1161
|
-
claimAdminFee: (params?: CallParams<PoolArgs["obj"]["claimAdminFee()void"] | PoolArgs["tuple"]["claimAdminFee()void"]> & {
|
|
1162
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1163
|
-
}) => Promise<AppCallMethodCall>;
|
|
1164
|
-
/**
|
|
1165
|
-
* Makes a call to the Pool smart contract using the `pendingReward(address)uint64` ABI method.
|
|
1166
|
-
*
|
|
1167
|
-
* This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.
|
|
1168
|
-
*
|
|
1169
|
-
* @param params The params for the smart contract call
|
|
1170
|
-
* @returns The call params
|
|
1171
|
-
*/
|
|
1172
|
-
pendingReward: (params: CallParams<PoolArgs["obj"]["pendingReward(address)uint64"] | PoolArgs["tuple"]["pendingReward(address)uint64"]> & {
|
|
1173
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1174
|
-
}) => Promise<AppCallMethodCall>;
|
|
1175
|
-
/**
|
|
1176
|
-
* Makes a call to the Pool smart contract using the `transferOwnership(address)void` ABI method.
|
|
1177
|
-
*
|
|
1178
|
-
* @param params The params for the smart contract call
|
|
1179
|
-
* @returns The call params
|
|
1180
|
-
*/
|
|
1181
|
-
transferOwnership: (params: CallParams<PoolArgs["obj"]["transferOwnership(address)void"] | PoolArgs["tuple"]["transferOwnership(address)void"]> & {
|
|
1182
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1183
|
-
}) => Promise<AppCallMethodCall>;
|
|
1184
|
-
};
|
|
1185
|
-
/**
|
|
1186
|
-
* Create transactions for the current app
|
|
1187
|
-
*/
|
|
1188
|
-
readonly createTransaction: {
|
|
1189
|
-
/**
|
|
1190
|
-
* Gets available optIn methods
|
|
1191
|
-
*/
|
|
1192
|
-
optIn: {
|
|
1193
|
-
/**
|
|
1194
|
-
* Opts the user into an existing instance of the Pool smart contract using the `optInToApplication()void` ABI method.
|
|
1195
|
-
*
|
|
1196
|
-
* @param params The params for the smart contract call
|
|
1197
|
-
* @returns The optIn transaction
|
|
1198
|
-
*/
|
|
1199
|
-
optInToApplication: (params?: CallParams<PoolArgs["obj"]["optInToApplication()void"] | PoolArgs["tuple"]["optInToApplication()void"]>) => Promise<{
|
|
1200
|
-
transactions: Transaction[];
|
|
1201
|
-
methodCalls: Map<number, import("algosdk").ABIMethod>;
|
|
1202
|
-
signers: Map<number, TransactionSigner>;
|
|
1203
|
-
}>;
|
|
1204
|
-
/**
|
|
1205
|
-
* Opts the user into an existing instance of the Pool smart contract using the `deposit(axfer,uint64)void` ABI method.
|
|
1206
|
-
*
|
|
1207
|
-
* @param params The params for the smart contract call
|
|
1208
|
-
* @returns The optIn transaction
|
|
1209
|
-
*/
|
|
1210
|
-
deposit: (params: CallParams<PoolArgs["obj"]["deposit(axfer,uint64)void"] | PoolArgs["tuple"]["deposit(axfer,uint64)void"]>) => Promise<{
|
|
1211
|
-
transactions: Transaction[];
|
|
1212
|
-
methodCalls: Map<number, import("algosdk").ABIMethod>;
|
|
1213
|
-
signers: Map<number, TransactionSigner>;
|
|
1214
|
-
}>;
|
|
1215
|
-
};
|
|
1216
|
-
/**
|
|
1217
|
-
* Gets available closeOut methods
|
|
1218
|
-
*/
|
|
1219
|
-
closeOut: {
|
|
1220
|
-
/**
|
|
1221
|
-
* Makes a close out call to an existing instance of the Pool smart contract using the `closeOutOfApplication(uint64)void` ABI method.
|
|
1222
|
-
*
|
|
1223
|
-
* @param params The params for the smart contract call
|
|
1224
|
-
* @returns The closeOut transaction
|
|
1225
|
-
*/
|
|
1226
|
-
closeOutOfApplication: (params?: CallParams<PoolArgs["obj"]["closeOutOfApplication(uint64)void"] | PoolArgs["tuple"]["closeOutOfApplication(uint64)void"]>) => Promise<{
|
|
1227
|
-
transactions: Transaction[];
|
|
1228
|
-
methodCalls: Map<number, import("algosdk").ABIMethod>;
|
|
1229
|
-
signers: Map<number, TransactionSigner>;
|
|
1230
|
-
}>;
|
|
1231
|
-
};
|
|
1232
|
-
/**
|
|
1233
|
-
* Makes a clear_state call to an existing instance of the Pool smart contract.
|
|
1234
|
-
*
|
|
1235
|
-
* @param params The params for the bare (raw) call
|
|
1236
|
-
* @returns The clearState result
|
|
1237
|
-
*/
|
|
1238
|
-
clearState: (params?: Expand<AppClientBareCallParams>) => Promise<Transaction>;
|
|
1239
|
-
/**
|
|
1240
|
-
* Makes a call to the Pool smart contract using the `optInAsset()void` ABI method.
|
|
1241
|
-
*
|
|
1242
|
-
* Opt-in the application account to the ASA stored in `this.asset`.
|
|
1243
|
-
This performs an inner axfer of 0 to the app's own address.
|
|
1244
|
-
Call once after deploy (or whenever you change the asset).
|
|
1245
|
-
|
|
1246
|
-
*
|
|
1247
|
-
* @param params The params for the smart contract call
|
|
1248
|
-
* @returns The call transaction
|
|
1249
|
-
*/
|
|
1250
|
-
optInAsset: (params?: CallParams<PoolArgs["obj"]["optInAsset()void"] | PoolArgs["tuple"]["optInAsset()void"]> & {
|
|
1251
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1252
|
-
}) => Promise<{
|
|
1253
|
-
transactions: Transaction[];
|
|
1254
|
-
methodCalls: Map<number, import("algosdk").ABIMethod>;
|
|
1255
|
-
signers: Map<number, TransactionSigner>;
|
|
1256
|
-
}>;
|
|
1257
|
-
/**
|
|
1258
|
-
* Makes a call to the Pool smart contract using the `deposit(axfer,uint64)void` ABI method.
|
|
1259
|
-
*
|
|
1260
|
-
* @param params The params for the smart contract call
|
|
1261
|
-
* @returns The call transaction
|
|
1262
|
-
*/
|
|
1263
|
-
deposit: (params: CallParams<PoolArgs["obj"]["deposit(axfer,uint64)void"] | PoolArgs["tuple"]["deposit(axfer,uint64)void"]> & {
|
|
1264
|
-
onComplete?: OnApplicationComplete.NoOpOC | OnApplicationComplete.OptInOC;
|
|
1265
|
-
}) => Promise<{
|
|
1266
|
-
transactions: Transaction[];
|
|
1267
|
-
methodCalls: Map<number, import("algosdk").ABIMethod>;
|
|
1268
|
-
signers: Map<number, TransactionSigner>;
|
|
1269
|
-
}>;
|
|
1270
|
-
/**
|
|
1271
|
-
* Makes a call to the Pool smart contract using the `withdraw(uint64,uint64)void` ABI method.
|
|
1272
|
-
*
|
|
1273
|
-
* @param params The params for the smart contract call
|
|
1274
|
-
* @returns The call transaction
|
|
1275
|
-
*/
|
|
1276
|
-
withdraw: (params: CallParams<PoolArgs["obj"]["withdraw(uint64,uint64)void"] | PoolArgs["tuple"]["withdraw(uint64,uint64)void"]> & {
|
|
1277
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1278
|
-
}) => Promise<{
|
|
1279
|
-
transactions: Transaction[];
|
|
1280
|
-
methodCalls: Map<number, import("algosdk").ABIMethod>;
|
|
1281
|
-
signers: Map<number, TransactionSigner>;
|
|
1282
|
-
}>;
|
|
1283
|
-
/**
|
|
1284
|
-
* Makes a call to the Pool smart contract using the `swapToVUsd(address,uint64,bool)uint64` ABI method.
|
|
1285
|
-
*
|
|
1286
|
-
* @param params The params for the smart contract call
|
|
1287
|
-
* @returns The call transaction: returns the difference between the old and the new value of vUsdBalance
|
|
1288
|
-
*/
|
|
1289
|
-
swapToVUsd: (params: CallParams<PoolArgs["obj"]["swapToVUsd(address,uint64,bool)uint64"] | PoolArgs["tuple"]["swapToVUsd(address,uint64,bool)uint64"]> & {
|
|
1290
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1291
|
-
}) => Promise<{
|
|
1292
|
-
transactions: Transaction[];
|
|
1293
|
-
methodCalls: Map<number, import("algosdk").ABIMethod>;
|
|
1294
|
-
signers: Map<number, TransactionSigner>;
|
|
1295
|
-
}>;
|
|
1296
|
-
/**
|
|
1297
|
-
* Makes a call to the Pool smart contract using the `swapFromVUsd(address,uint64,uint64,bool)uint64` ABI method.
|
|
1298
|
-
*
|
|
1299
|
-
* @param params The params for the smart contract call
|
|
1300
|
-
* @returns The call transaction: returns the difference between the old and the new value of vUsdBalance
|
|
1301
|
-
*/
|
|
1302
|
-
swapFromVUsd: (params: CallParams<PoolArgs["obj"]["swapFromVUsd(address,uint64,uint64,bool)uint64"] | PoolArgs["tuple"]["swapFromVUsd(address,uint64,uint64,bool)uint64"]> & {
|
|
1303
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1304
|
-
}) => Promise<{
|
|
1305
|
-
transactions: Transaction[];
|
|
1306
|
-
methodCalls: Map<number, import("algosdk").ABIMethod>;
|
|
1307
|
-
signers: Map<number, TransactionSigner>;
|
|
1308
|
-
}>;
|
|
1309
|
-
/**
|
|
1310
|
-
* Makes a call to the Pool smart contract using the `setFeeShare(uint64)void` ABI method.
|
|
1311
|
-
*
|
|
1312
|
-
* @param params The params for the smart contract call
|
|
1313
|
-
* @returns The call transaction
|
|
1314
|
-
*/
|
|
1315
|
-
setFeeShare: (params: CallParams<PoolArgs["obj"]["setFeeShare(uint64)void"] | PoolArgs["tuple"]["setFeeShare(uint64)void"]> & {
|
|
1316
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1317
|
-
}) => Promise<{
|
|
1318
|
-
transactions: Transaction[];
|
|
1319
|
-
methodCalls: Map<number, import("algosdk").ABIMethod>;
|
|
1320
|
-
signers: Map<number, TransactionSigner>;
|
|
1321
|
-
}>;
|
|
1322
|
-
/**
|
|
1323
|
-
* Makes a call to the Pool smart contract using the `adjustTotalLpAmount()void` ABI method.
|
|
1324
|
-
*
|
|
1325
|
-
* @param params The params for the smart contract call
|
|
1326
|
-
* @returns The call transaction
|
|
1327
|
-
*/
|
|
1328
|
-
adjustTotalLpAmount: (params?: CallParams<PoolArgs["obj"]["adjustTotalLpAmount()void"] | PoolArgs["tuple"]["adjustTotalLpAmount()void"]> & {
|
|
1329
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1330
|
-
}) => Promise<{
|
|
1331
|
-
transactions: Transaction[];
|
|
1332
|
-
methodCalls: Map<number, import("algosdk").ABIMethod>;
|
|
1333
|
-
signers: Map<number, TransactionSigner>;
|
|
1334
|
-
}>;
|
|
1335
|
-
/**
|
|
1336
|
-
* Makes a call to the Pool smart contract using the `setBalanceRatioMinBP(uint64)void` ABI method.
|
|
1337
|
-
*
|
|
1338
|
-
* @param params The params for the smart contract call
|
|
1339
|
-
* @returns The call transaction
|
|
1340
|
-
*/
|
|
1341
|
-
setBalanceRatioMinBp: (params: CallParams<PoolArgs["obj"]["setBalanceRatioMinBP(uint64)void"] | PoolArgs["tuple"]["setBalanceRatioMinBP(uint64)void"]> & {
|
|
1342
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1343
|
-
}) => Promise<{
|
|
1344
|
-
transactions: Transaction[];
|
|
1345
|
-
methodCalls: Map<number, import("algosdk").ABIMethod>;
|
|
1346
|
-
signers: Map<number, TransactionSigner>;
|
|
1347
|
-
}>;
|
|
1348
|
-
/**
|
|
1349
|
-
* Makes a call to the Pool smart contract using the `stopDeposit()void` ABI method.
|
|
1350
|
-
*
|
|
1351
|
-
* @param params The params for the smart contract call
|
|
1352
|
-
* @returns The call transaction
|
|
1353
|
-
*/
|
|
1354
|
-
stopDeposit: (params?: CallParams<PoolArgs["obj"]["stopDeposit()void"] | PoolArgs["tuple"]["stopDeposit()void"]> & {
|
|
1355
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1356
|
-
}) => Promise<{
|
|
1357
|
-
transactions: Transaction[];
|
|
1358
|
-
methodCalls: Map<number, import("algosdk").ABIMethod>;
|
|
1359
|
-
signers: Map<number, TransactionSigner>;
|
|
1360
|
-
}>;
|
|
1361
|
-
/**
|
|
1362
|
-
* Makes a call to the Pool smart contract using the `startDeposit()void` ABI method.
|
|
1363
|
-
*
|
|
1364
|
-
* @param params The params for the smart contract call
|
|
1365
|
-
* @returns The call transaction
|
|
1366
|
-
*/
|
|
1367
|
-
startDeposit: (params?: CallParams<PoolArgs["obj"]["startDeposit()void"] | PoolArgs["tuple"]["startDeposit()void"]> & {
|
|
1368
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1369
|
-
}) => Promise<{
|
|
1370
|
-
transactions: Transaction[];
|
|
1371
|
-
methodCalls: Map<number, import("algosdk").ABIMethod>;
|
|
1372
|
-
signers: Map<number, TransactionSigner>;
|
|
1373
|
-
}>;
|
|
1374
|
-
/**
|
|
1375
|
-
* Makes a call to the Pool smart contract using the `stopWithdraw()void` ABI method.
|
|
1376
|
-
*
|
|
1377
|
-
* @param params The params for the smart contract call
|
|
1378
|
-
* @returns The call transaction
|
|
1379
|
-
*/
|
|
1380
|
-
stopWithdraw: (params?: CallParams<PoolArgs["obj"]["stopWithdraw()void"] | PoolArgs["tuple"]["stopWithdraw()void"]> & {
|
|
1381
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1382
|
-
}) => Promise<{
|
|
1383
|
-
transactions: Transaction[];
|
|
1384
|
-
methodCalls: Map<number, import("algosdk").ABIMethod>;
|
|
1385
|
-
signers: Map<number, TransactionSigner>;
|
|
1386
|
-
}>;
|
|
1387
|
-
/**
|
|
1388
|
-
* Makes a call to the Pool smart contract using the `startWithdraw()void` ABI method.
|
|
1389
|
-
*
|
|
1390
|
-
* @param params The params for the smart contract call
|
|
1391
|
-
* @returns The call transaction
|
|
1392
|
-
*/
|
|
1393
|
-
startWithdraw: (params?: CallParams<PoolArgs["obj"]["startWithdraw()void"] | PoolArgs["tuple"]["startWithdraw()void"]> & {
|
|
1394
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1395
|
-
}) => Promise<{
|
|
1396
|
-
transactions: Transaction[];
|
|
1397
|
-
methodCalls: Map<number, import("algosdk").ABIMethod>;
|
|
1398
|
-
signers: Map<number, TransactionSigner>;
|
|
1399
|
-
}>;
|
|
1400
|
-
/**
|
|
1401
|
-
* Makes a call to the Pool smart contract using the `setStopAuthority(address)void` ABI method.
|
|
1402
|
-
*
|
|
1403
|
-
* @param params The params for the smart contract call
|
|
1404
|
-
* @returns The call transaction
|
|
1405
|
-
*/
|
|
1406
|
-
setStopAuthority: (params: CallParams<PoolArgs["obj"]["setStopAuthority(address)void"] | PoolArgs["tuple"]["setStopAuthority(address)void"]> & {
|
|
1407
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1408
|
-
}) => Promise<{
|
|
1409
|
-
transactions: Transaction[];
|
|
1410
|
-
methodCalls: Map<number, import("algosdk").ABIMethod>;
|
|
1411
|
-
signers: Map<number, TransactionSigner>;
|
|
1412
|
-
}>;
|
|
1413
|
-
/**
|
|
1414
|
-
* Makes a call to the Pool smart contract using the `setRouter(address)void` ABI method.
|
|
1415
|
-
*
|
|
1416
|
-
* @param params The params for the smart contract call
|
|
1417
|
-
* @returns The call transaction
|
|
1418
|
-
*/
|
|
1419
|
-
setRouter: (params: CallParams<PoolArgs["obj"]["setRouter(address)void"] | PoolArgs["tuple"]["setRouter(address)void"]> & {
|
|
1420
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1421
|
-
}) => Promise<{
|
|
1422
|
-
transactions: Transaction[];
|
|
1423
|
-
methodCalls: Map<number, import("algosdk").ABIMethod>;
|
|
1424
|
-
signers: Map<number, TransactionSigner>;
|
|
1425
|
-
}>;
|
|
1426
|
-
/**
|
|
1427
|
-
* Makes a call to the Pool smart contract using the `claimRewards()void` ABI method.
|
|
1428
|
-
*
|
|
1429
|
-
* @param params The params for the smart contract call
|
|
1430
|
-
* @returns The call transaction
|
|
1431
|
-
*/
|
|
1432
|
-
claimRewards: (params?: CallParams<PoolArgs["obj"]["claimRewards()void"] | PoolArgs["tuple"]["claimRewards()void"]> & {
|
|
1433
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1434
|
-
}) => Promise<{
|
|
1435
|
-
transactions: Transaction[];
|
|
1436
|
-
methodCalls: Map<number, import("algosdk").ABIMethod>;
|
|
1437
|
-
signers: Map<number, TransactionSigner>;
|
|
1438
|
-
}>;
|
|
1439
|
-
/**
|
|
1440
|
-
* Makes a call to the Pool smart contract using the `setAdminFeeShare(uint64)void` ABI method.
|
|
1441
|
-
*
|
|
1442
|
-
* @param params The params for the smart contract call
|
|
1443
|
-
* @returns The call transaction
|
|
1444
|
-
*/
|
|
1445
|
-
setAdminFeeShare: (params: CallParams<PoolArgs["obj"]["setAdminFeeShare(uint64)void"] | PoolArgs["tuple"]["setAdminFeeShare(uint64)void"]> & {
|
|
1446
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1447
|
-
}) => Promise<{
|
|
1448
|
-
transactions: Transaction[];
|
|
1449
|
-
methodCalls: Map<number, import("algosdk").ABIMethod>;
|
|
1450
|
-
signers: Map<number, TransactionSigner>;
|
|
1451
|
-
}>;
|
|
1452
|
-
/**
|
|
1453
|
-
* Makes a call to the Pool smart contract using the `claimAdminFee()void` ABI method.
|
|
1454
|
-
*
|
|
1455
|
-
* @param params The params for the smart contract call
|
|
1456
|
-
* @returns The call transaction
|
|
1457
|
-
*/
|
|
1458
|
-
claimAdminFee: (params?: CallParams<PoolArgs["obj"]["claimAdminFee()void"] | PoolArgs["tuple"]["claimAdminFee()void"]> & {
|
|
1459
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1460
|
-
}) => Promise<{
|
|
1461
|
-
transactions: Transaction[];
|
|
1462
|
-
methodCalls: Map<number, import("algosdk").ABIMethod>;
|
|
1463
|
-
signers: Map<number, TransactionSigner>;
|
|
1464
|
-
}>;
|
|
1465
|
-
/**
|
|
1466
|
-
* Makes a call to the Pool smart contract using the `pendingReward(address)uint64` ABI method.
|
|
1467
|
-
*
|
|
1468
|
-
* This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.
|
|
1469
|
-
*
|
|
1470
|
-
* @param params The params for the smart contract call
|
|
1471
|
-
* @returns The call transaction
|
|
1472
|
-
*/
|
|
1473
|
-
pendingReward: (params: CallParams<PoolArgs["obj"]["pendingReward(address)uint64"] | PoolArgs["tuple"]["pendingReward(address)uint64"]> & {
|
|
1474
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1475
|
-
}) => Promise<{
|
|
1476
|
-
transactions: Transaction[];
|
|
1477
|
-
methodCalls: Map<number, import("algosdk").ABIMethod>;
|
|
1478
|
-
signers: Map<number, TransactionSigner>;
|
|
1479
|
-
}>;
|
|
1480
|
-
/**
|
|
1481
|
-
* Makes a call to the Pool smart contract using the `transferOwnership(address)void` ABI method.
|
|
1482
|
-
*
|
|
1483
|
-
* @param params The params for the smart contract call
|
|
1484
|
-
* @returns The call transaction
|
|
1485
|
-
*/
|
|
1486
|
-
transferOwnership: (params: CallParams<PoolArgs["obj"]["transferOwnership(address)void"] | PoolArgs["tuple"]["transferOwnership(address)void"]> & {
|
|
1487
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1488
|
-
}) => Promise<{
|
|
1489
|
-
transactions: Transaction[];
|
|
1490
|
-
methodCalls: Map<number, import("algosdk").ABIMethod>;
|
|
1491
|
-
signers: Map<number, TransactionSigner>;
|
|
1492
|
-
}>;
|
|
1493
|
-
};
|
|
1494
|
-
/**
|
|
1495
|
-
* Send calls to the current app
|
|
1496
|
-
*/
|
|
1497
|
-
readonly send: {
|
|
1498
|
-
/**
|
|
1499
|
-
* Gets available optIn methods
|
|
1500
|
-
*/
|
|
1501
|
-
optIn: {
|
|
1502
|
-
/**
|
|
1503
|
-
* Opts the user into an existing instance of the Pool smart contract using the `optInToApplication()void` ABI method.
|
|
1504
|
-
*
|
|
1505
|
-
* @param params The params for the smart contract call
|
|
1506
|
-
* @returns The optIn result
|
|
1507
|
-
*/
|
|
1508
|
-
optInToApplication: (params?: CallParams<PoolArgs["obj"]["optInToApplication()void"] | PoolArgs["tuple"]["optInToApplication()void"]> & SendParams) => Promise<{
|
|
1509
|
-
return: undefined | PoolReturns["optInToApplication()void"];
|
|
1510
|
-
confirmations: modelsv2.PendingTransactionResponse[];
|
|
1511
|
-
returns?: ABIReturn[] | undefined;
|
|
1512
|
-
groupId: string;
|
|
1513
|
-
txIds: string[];
|
|
1514
|
-
transactions: Transaction[];
|
|
1515
|
-
confirmation: modelsv2.PendingTransactionResponse;
|
|
1516
|
-
transaction: Transaction;
|
|
1517
|
-
}>;
|
|
1518
|
-
/**
|
|
1519
|
-
* Opts the user into an existing instance of the Pool smart contract using the `deposit(axfer,uint64)void` ABI method.
|
|
1520
|
-
*
|
|
1521
|
-
* @param params The params for the smart contract call
|
|
1522
|
-
* @returns The optIn result
|
|
1523
|
-
*/
|
|
1524
|
-
deposit: (params: CallParams<PoolArgs["obj"]["deposit(axfer,uint64)void"] | PoolArgs["tuple"]["deposit(axfer,uint64)void"]> & SendParams) => Promise<{
|
|
1525
|
-
return: undefined | PoolReturns["deposit(axfer,uint64)void"];
|
|
1526
|
-
confirmations: modelsv2.PendingTransactionResponse[];
|
|
1527
|
-
returns?: ABIReturn[] | undefined;
|
|
1528
|
-
groupId: string;
|
|
1529
|
-
txIds: string[];
|
|
1530
|
-
transactions: Transaction[];
|
|
1531
|
-
confirmation: modelsv2.PendingTransactionResponse;
|
|
1532
|
-
transaction: Transaction;
|
|
1533
|
-
}>;
|
|
1534
|
-
};
|
|
1535
|
-
/**
|
|
1536
|
-
* Gets available closeOut methods
|
|
1537
|
-
*/
|
|
1538
|
-
closeOut: {
|
|
1539
|
-
/**
|
|
1540
|
-
* Makes a close out call to an existing instance of the Pool smart contract using the `closeOutOfApplication(uint64)void` ABI method.
|
|
1541
|
-
*
|
|
1542
|
-
* @param params The params for the smart contract call
|
|
1543
|
-
* @returns The closeOut result
|
|
1544
|
-
*/
|
|
1545
|
-
closeOutOfApplication: (params?: CallParams<PoolArgs["obj"]["closeOutOfApplication(uint64)void"] | PoolArgs["tuple"]["closeOutOfApplication(uint64)void"]> & SendParams) => Promise<{
|
|
1546
|
-
return: undefined | PoolReturns["closeOutOfApplication(uint64)void"];
|
|
1547
|
-
confirmations: modelsv2.PendingTransactionResponse[];
|
|
1548
|
-
returns?: ABIReturn[] | undefined;
|
|
1549
|
-
groupId: string;
|
|
1550
|
-
txIds: string[];
|
|
1551
|
-
transactions: Transaction[];
|
|
1552
|
-
confirmation: modelsv2.PendingTransactionResponse;
|
|
1553
|
-
transaction: Transaction;
|
|
1554
|
-
}>;
|
|
1555
|
-
};
|
|
1556
|
-
/**
|
|
1557
|
-
* Makes a clear_state call to an existing instance of the Pool smart contract.
|
|
1558
|
-
*
|
|
1559
|
-
* @param params The params for the bare (raw) call
|
|
1560
|
-
* @returns The clearState result
|
|
1561
|
-
*/
|
|
1562
|
-
clearState: (params?: Expand<AppClientBareCallParams & SendParams>) => Promise<{
|
|
1563
|
-
groupId: string;
|
|
1564
|
-
txIds: string[];
|
|
1565
|
-
returns?: ABIReturn[] | undefined;
|
|
1566
|
-
confirmations: modelsv2.PendingTransactionResponse[];
|
|
1567
|
-
transactions: Transaction[];
|
|
1568
|
-
confirmation: modelsv2.PendingTransactionResponse;
|
|
1569
|
-
transaction: Transaction;
|
|
1570
|
-
return?: ABIReturn | undefined;
|
|
1571
|
-
}>;
|
|
1572
|
-
/**
|
|
1573
|
-
* Makes a call to the Pool smart contract using the `optInAsset()void` ABI method.
|
|
1574
|
-
*
|
|
1575
|
-
* Opt-in the application account to the ASA stored in `this.asset`.
|
|
1576
|
-
This performs an inner axfer of 0 to the app's own address.
|
|
1577
|
-
Call once after deploy (or whenever you change the asset).
|
|
1578
|
-
|
|
1579
|
-
*
|
|
1580
|
-
* @param params The params for the smart contract call
|
|
1581
|
-
* @returns The call result
|
|
1582
|
-
*/
|
|
1583
|
-
optInAsset: (params?: CallParams<PoolArgs["obj"]["optInAsset()void"] | PoolArgs["tuple"]["optInAsset()void"]> & SendParams & {
|
|
1584
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1585
|
-
}) => Promise<{
|
|
1586
|
-
return: undefined | PoolReturns["optInAsset()void"];
|
|
1587
|
-
confirmations: modelsv2.PendingTransactionResponse[];
|
|
1588
|
-
returns?: ABIReturn[] | undefined;
|
|
1589
|
-
groupId: string;
|
|
1590
|
-
txIds: string[];
|
|
1591
|
-
transactions: Transaction[];
|
|
1592
|
-
confirmation: modelsv2.PendingTransactionResponse;
|
|
1593
|
-
transaction: Transaction;
|
|
1594
|
-
}>;
|
|
1595
|
-
/**
|
|
1596
|
-
* Makes a call to the Pool smart contract using the `deposit(axfer,uint64)void` ABI method.
|
|
1597
|
-
*
|
|
1598
|
-
* @param params The params for the smart contract call
|
|
1599
|
-
* @returns The call result
|
|
1600
|
-
*/
|
|
1601
|
-
deposit: (params: CallParams<PoolArgs["obj"]["deposit(axfer,uint64)void"] | PoolArgs["tuple"]["deposit(axfer,uint64)void"]> & SendParams & {
|
|
1602
|
-
onComplete?: OnApplicationComplete.NoOpOC | OnApplicationComplete.OptInOC;
|
|
1603
|
-
}) => Promise<{
|
|
1604
|
-
return: undefined | PoolReturns["deposit(axfer,uint64)void"];
|
|
1605
|
-
confirmations: modelsv2.PendingTransactionResponse[];
|
|
1606
|
-
returns?: ABIReturn[] | undefined;
|
|
1607
|
-
groupId: string;
|
|
1608
|
-
txIds: string[];
|
|
1609
|
-
transactions: Transaction[];
|
|
1610
|
-
confirmation: modelsv2.PendingTransactionResponse;
|
|
1611
|
-
transaction: Transaction;
|
|
1612
|
-
}>;
|
|
1613
|
-
/**
|
|
1614
|
-
* Makes a call to the Pool smart contract using the `withdraw(uint64,uint64)void` ABI method.
|
|
1615
|
-
*
|
|
1616
|
-
* @param params The params for the smart contract call
|
|
1617
|
-
* @returns The call result
|
|
1618
|
-
*/
|
|
1619
|
-
withdraw: (params: CallParams<PoolArgs["obj"]["withdraw(uint64,uint64)void"] | PoolArgs["tuple"]["withdraw(uint64,uint64)void"]> & SendParams & {
|
|
1620
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1621
|
-
}) => Promise<{
|
|
1622
|
-
return: undefined | PoolReturns["withdraw(uint64,uint64)void"];
|
|
1623
|
-
confirmations: modelsv2.PendingTransactionResponse[];
|
|
1624
|
-
returns?: ABIReturn[] | undefined;
|
|
1625
|
-
groupId: string;
|
|
1626
|
-
txIds: string[];
|
|
1627
|
-
transactions: Transaction[];
|
|
1628
|
-
confirmation: modelsv2.PendingTransactionResponse;
|
|
1629
|
-
transaction: Transaction;
|
|
1630
|
-
}>;
|
|
1631
|
-
/**
|
|
1632
|
-
* Makes a call to the Pool smart contract using the `swapToVUsd(address,uint64,bool)uint64` ABI method.
|
|
1633
|
-
*
|
|
1634
|
-
* @param params The params for the smart contract call
|
|
1635
|
-
* @returns The call result: returns the difference between the old and the new value of vUsdBalance
|
|
1636
|
-
*/
|
|
1637
|
-
swapToVUsd: (params: CallParams<PoolArgs["obj"]["swapToVUsd(address,uint64,bool)uint64"] | PoolArgs["tuple"]["swapToVUsd(address,uint64,bool)uint64"]> & SendParams & {
|
|
1638
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1639
|
-
}) => Promise<{
|
|
1640
|
-
return: undefined | PoolReturns["swapToVUsd(address,uint64,bool)uint64"];
|
|
1641
|
-
confirmations: modelsv2.PendingTransactionResponse[];
|
|
1642
|
-
returns?: ABIReturn[] | undefined;
|
|
1643
|
-
groupId: string;
|
|
1644
|
-
txIds: string[];
|
|
1645
|
-
transactions: Transaction[];
|
|
1646
|
-
confirmation: modelsv2.PendingTransactionResponse;
|
|
1647
|
-
transaction: Transaction;
|
|
1648
|
-
}>;
|
|
1649
|
-
/**
|
|
1650
|
-
* Makes a call to the Pool smart contract using the `swapFromVUsd(address,uint64,uint64,bool)uint64` ABI method.
|
|
1651
|
-
*
|
|
1652
|
-
* @param params The params for the smart contract call
|
|
1653
|
-
* @returns The call result: returns the difference between the old and the new value of vUsdBalance
|
|
1654
|
-
*/
|
|
1655
|
-
swapFromVUsd: (params: CallParams<PoolArgs["obj"]["swapFromVUsd(address,uint64,uint64,bool)uint64"] | PoolArgs["tuple"]["swapFromVUsd(address,uint64,uint64,bool)uint64"]> & SendParams & {
|
|
1656
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1657
|
-
}) => Promise<{
|
|
1658
|
-
return: undefined | PoolReturns["swapFromVUsd(address,uint64,uint64,bool)uint64"];
|
|
1659
|
-
confirmations: modelsv2.PendingTransactionResponse[];
|
|
1660
|
-
returns?: ABIReturn[] | undefined;
|
|
1661
|
-
groupId: string;
|
|
1662
|
-
txIds: string[];
|
|
1663
|
-
transactions: Transaction[];
|
|
1664
|
-
confirmation: modelsv2.PendingTransactionResponse;
|
|
1665
|
-
transaction: Transaction;
|
|
1666
|
-
}>;
|
|
1667
|
-
/**
|
|
1668
|
-
* Makes a call to the Pool smart contract using the `setFeeShare(uint64)void` ABI method.
|
|
1669
|
-
*
|
|
1670
|
-
* @param params The params for the smart contract call
|
|
1671
|
-
* @returns The call result
|
|
1672
|
-
*/
|
|
1673
|
-
setFeeShare: (params: CallParams<PoolArgs["obj"]["setFeeShare(uint64)void"] | PoolArgs["tuple"]["setFeeShare(uint64)void"]> & SendParams & {
|
|
1674
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1675
|
-
}) => Promise<{
|
|
1676
|
-
return: undefined | PoolReturns["setFeeShare(uint64)void"];
|
|
1677
|
-
confirmations: modelsv2.PendingTransactionResponse[];
|
|
1678
|
-
returns?: ABIReturn[] | undefined;
|
|
1679
|
-
groupId: string;
|
|
1680
|
-
txIds: string[];
|
|
1681
|
-
transactions: Transaction[];
|
|
1682
|
-
confirmation: modelsv2.PendingTransactionResponse;
|
|
1683
|
-
transaction: Transaction;
|
|
1684
|
-
}>;
|
|
1685
|
-
/**
|
|
1686
|
-
* Makes a call to the Pool smart contract using the `adjustTotalLpAmount()void` ABI method.
|
|
1687
|
-
*
|
|
1688
|
-
* @param params The params for the smart contract call
|
|
1689
|
-
* @returns The call result
|
|
1690
|
-
*/
|
|
1691
|
-
adjustTotalLpAmount: (params?: CallParams<PoolArgs["obj"]["adjustTotalLpAmount()void"] | PoolArgs["tuple"]["adjustTotalLpAmount()void"]> & SendParams & {
|
|
1692
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1693
|
-
}) => Promise<{
|
|
1694
|
-
return: undefined | PoolReturns["adjustTotalLpAmount()void"];
|
|
1695
|
-
confirmations: modelsv2.PendingTransactionResponse[];
|
|
1696
|
-
returns?: ABIReturn[] | undefined;
|
|
1697
|
-
groupId: string;
|
|
1698
|
-
txIds: string[];
|
|
1699
|
-
transactions: Transaction[];
|
|
1700
|
-
confirmation: modelsv2.PendingTransactionResponse;
|
|
1701
|
-
transaction: Transaction;
|
|
1702
|
-
}>;
|
|
1703
|
-
/**
|
|
1704
|
-
* Makes a call to the Pool smart contract using the `setBalanceRatioMinBP(uint64)void` ABI method.
|
|
1705
|
-
*
|
|
1706
|
-
* @param params The params for the smart contract call
|
|
1707
|
-
* @returns The call result
|
|
1708
|
-
*/
|
|
1709
|
-
setBalanceRatioMinBp: (params: CallParams<PoolArgs["obj"]["setBalanceRatioMinBP(uint64)void"] | PoolArgs["tuple"]["setBalanceRatioMinBP(uint64)void"]> & SendParams & {
|
|
1710
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1711
|
-
}) => Promise<{
|
|
1712
|
-
return: undefined | PoolReturns["setBalanceRatioMinBP(uint64)void"];
|
|
1713
|
-
confirmations: modelsv2.PendingTransactionResponse[];
|
|
1714
|
-
returns?: ABIReturn[] | undefined;
|
|
1715
|
-
groupId: string;
|
|
1716
|
-
txIds: string[];
|
|
1717
|
-
transactions: Transaction[];
|
|
1718
|
-
confirmation: modelsv2.PendingTransactionResponse;
|
|
1719
|
-
transaction: Transaction;
|
|
1720
|
-
}>;
|
|
1721
|
-
/**
|
|
1722
|
-
* Makes a call to the Pool smart contract using the `stopDeposit()void` ABI method.
|
|
1723
|
-
*
|
|
1724
|
-
* @param params The params for the smart contract call
|
|
1725
|
-
* @returns The call result
|
|
1726
|
-
*/
|
|
1727
|
-
stopDeposit: (params?: CallParams<PoolArgs["obj"]["stopDeposit()void"] | PoolArgs["tuple"]["stopDeposit()void"]> & SendParams & {
|
|
1728
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1729
|
-
}) => Promise<{
|
|
1730
|
-
return: undefined | PoolReturns["stopDeposit()void"];
|
|
1731
|
-
confirmations: modelsv2.PendingTransactionResponse[];
|
|
1732
|
-
returns?: ABIReturn[] | undefined;
|
|
1733
|
-
groupId: string;
|
|
1734
|
-
txIds: string[];
|
|
1735
|
-
transactions: Transaction[];
|
|
1736
|
-
confirmation: modelsv2.PendingTransactionResponse;
|
|
1737
|
-
transaction: Transaction;
|
|
1738
|
-
}>;
|
|
1739
|
-
/**
|
|
1740
|
-
* Makes a call to the Pool smart contract using the `startDeposit()void` ABI method.
|
|
1741
|
-
*
|
|
1742
|
-
* @param params The params for the smart contract call
|
|
1743
|
-
* @returns The call result
|
|
1744
|
-
*/
|
|
1745
|
-
startDeposit: (params?: CallParams<PoolArgs["obj"]["startDeposit()void"] | PoolArgs["tuple"]["startDeposit()void"]> & SendParams & {
|
|
1746
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1747
|
-
}) => Promise<{
|
|
1748
|
-
return: undefined | PoolReturns["startDeposit()void"];
|
|
1749
|
-
confirmations: modelsv2.PendingTransactionResponse[];
|
|
1750
|
-
returns?: ABIReturn[] | undefined;
|
|
1751
|
-
groupId: string;
|
|
1752
|
-
txIds: string[];
|
|
1753
|
-
transactions: Transaction[];
|
|
1754
|
-
confirmation: modelsv2.PendingTransactionResponse;
|
|
1755
|
-
transaction: Transaction;
|
|
1756
|
-
}>;
|
|
1757
|
-
/**
|
|
1758
|
-
* Makes a call to the Pool smart contract using the `stopWithdraw()void` ABI method.
|
|
1759
|
-
*
|
|
1760
|
-
* @param params The params for the smart contract call
|
|
1761
|
-
* @returns The call result
|
|
1762
|
-
*/
|
|
1763
|
-
stopWithdraw: (params?: CallParams<PoolArgs["obj"]["stopWithdraw()void"] | PoolArgs["tuple"]["stopWithdraw()void"]> & SendParams & {
|
|
1764
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1765
|
-
}) => Promise<{
|
|
1766
|
-
return: undefined | PoolReturns["stopWithdraw()void"];
|
|
1767
|
-
confirmations: modelsv2.PendingTransactionResponse[];
|
|
1768
|
-
returns?: ABIReturn[] | undefined;
|
|
1769
|
-
groupId: string;
|
|
1770
|
-
txIds: string[];
|
|
1771
|
-
transactions: Transaction[];
|
|
1772
|
-
confirmation: modelsv2.PendingTransactionResponse;
|
|
1773
|
-
transaction: Transaction;
|
|
1774
|
-
}>;
|
|
1775
|
-
/**
|
|
1776
|
-
* Makes a call to the Pool smart contract using the `startWithdraw()void` ABI method.
|
|
1777
|
-
*
|
|
1778
|
-
* @param params The params for the smart contract call
|
|
1779
|
-
* @returns The call result
|
|
1780
|
-
*/
|
|
1781
|
-
startWithdraw: (params?: CallParams<PoolArgs["obj"]["startWithdraw()void"] | PoolArgs["tuple"]["startWithdraw()void"]> & SendParams & {
|
|
1782
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1783
|
-
}) => Promise<{
|
|
1784
|
-
return: undefined | PoolReturns["startWithdraw()void"];
|
|
1785
|
-
confirmations: modelsv2.PendingTransactionResponse[];
|
|
1786
|
-
returns?: ABIReturn[] | undefined;
|
|
1787
|
-
groupId: string;
|
|
1788
|
-
txIds: string[];
|
|
1789
|
-
transactions: Transaction[];
|
|
1790
|
-
confirmation: modelsv2.PendingTransactionResponse;
|
|
1791
|
-
transaction: Transaction;
|
|
1792
|
-
}>;
|
|
1793
|
-
/**
|
|
1794
|
-
* Makes a call to the Pool smart contract using the `setStopAuthority(address)void` ABI method.
|
|
1795
|
-
*
|
|
1796
|
-
* @param params The params for the smart contract call
|
|
1797
|
-
* @returns The call result
|
|
1798
|
-
*/
|
|
1799
|
-
setStopAuthority: (params: CallParams<PoolArgs["obj"]["setStopAuthority(address)void"] | PoolArgs["tuple"]["setStopAuthority(address)void"]> & SendParams & {
|
|
1800
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1801
|
-
}) => Promise<{
|
|
1802
|
-
return: undefined | PoolReturns["setStopAuthority(address)void"];
|
|
1803
|
-
confirmations: modelsv2.PendingTransactionResponse[];
|
|
1804
|
-
returns?: ABIReturn[] | undefined;
|
|
1805
|
-
groupId: string;
|
|
1806
|
-
txIds: string[];
|
|
1807
|
-
transactions: Transaction[];
|
|
1808
|
-
confirmation: modelsv2.PendingTransactionResponse;
|
|
1809
|
-
transaction: Transaction;
|
|
1810
|
-
}>;
|
|
1811
|
-
/**
|
|
1812
|
-
* Makes a call to the Pool smart contract using the `setRouter(address)void` ABI method.
|
|
1813
|
-
*
|
|
1814
|
-
* @param params The params for the smart contract call
|
|
1815
|
-
* @returns The call result
|
|
1816
|
-
*/
|
|
1817
|
-
setRouter: (params: CallParams<PoolArgs["obj"]["setRouter(address)void"] | PoolArgs["tuple"]["setRouter(address)void"]> & SendParams & {
|
|
1818
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1819
|
-
}) => Promise<{
|
|
1820
|
-
return: undefined | PoolReturns["setRouter(address)void"];
|
|
1821
|
-
confirmations: modelsv2.PendingTransactionResponse[];
|
|
1822
|
-
returns?: ABIReturn[] | undefined;
|
|
1823
|
-
groupId: string;
|
|
1824
|
-
txIds: string[];
|
|
1825
|
-
transactions: Transaction[];
|
|
1826
|
-
confirmation: modelsv2.PendingTransactionResponse;
|
|
1827
|
-
transaction: Transaction;
|
|
1828
|
-
}>;
|
|
1829
|
-
/**
|
|
1830
|
-
* Makes a call to the Pool smart contract using the `claimRewards()void` ABI method.
|
|
1831
|
-
*
|
|
1832
|
-
* @param params The params for the smart contract call
|
|
1833
|
-
* @returns The call result
|
|
1834
|
-
*/
|
|
1835
|
-
claimRewards: (params?: CallParams<PoolArgs["obj"]["claimRewards()void"] | PoolArgs["tuple"]["claimRewards()void"]> & SendParams & {
|
|
1836
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1837
|
-
}) => Promise<{
|
|
1838
|
-
return: undefined | PoolReturns["claimRewards()void"];
|
|
1839
|
-
confirmations: modelsv2.PendingTransactionResponse[];
|
|
1840
|
-
returns?: ABIReturn[] | undefined;
|
|
1841
|
-
groupId: string;
|
|
1842
|
-
txIds: string[];
|
|
1843
|
-
transactions: Transaction[];
|
|
1844
|
-
confirmation: modelsv2.PendingTransactionResponse;
|
|
1845
|
-
transaction: Transaction;
|
|
1846
|
-
}>;
|
|
1847
|
-
/**
|
|
1848
|
-
* Makes a call to the Pool smart contract using the `setAdminFeeShare(uint64)void` ABI method.
|
|
1849
|
-
*
|
|
1850
|
-
* @param params The params for the smart contract call
|
|
1851
|
-
* @returns The call result
|
|
1852
|
-
*/
|
|
1853
|
-
setAdminFeeShare: (params: CallParams<PoolArgs["obj"]["setAdminFeeShare(uint64)void"] | PoolArgs["tuple"]["setAdminFeeShare(uint64)void"]> & SendParams & {
|
|
1854
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1855
|
-
}) => Promise<{
|
|
1856
|
-
return: undefined | PoolReturns["setAdminFeeShare(uint64)void"];
|
|
1857
|
-
confirmations: modelsv2.PendingTransactionResponse[];
|
|
1858
|
-
returns?: ABIReturn[] | undefined;
|
|
1859
|
-
groupId: string;
|
|
1860
|
-
txIds: string[];
|
|
1861
|
-
transactions: Transaction[];
|
|
1862
|
-
confirmation: modelsv2.PendingTransactionResponse;
|
|
1863
|
-
transaction: Transaction;
|
|
1864
|
-
}>;
|
|
1865
|
-
/**
|
|
1866
|
-
* Makes a call to the Pool smart contract using the `claimAdminFee()void` ABI method.
|
|
1867
|
-
*
|
|
1868
|
-
* @param params The params for the smart contract call
|
|
1869
|
-
* @returns The call result
|
|
1870
|
-
*/
|
|
1871
|
-
claimAdminFee: (params?: CallParams<PoolArgs["obj"]["claimAdminFee()void"] | PoolArgs["tuple"]["claimAdminFee()void"]> & SendParams & {
|
|
1872
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1873
|
-
}) => Promise<{
|
|
1874
|
-
return: undefined | PoolReturns["claimAdminFee()void"];
|
|
1875
|
-
confirmations: modelsv2.PendingTransactionResponse[];
|
|
1876
|
-
returns?: ABIReturn[] | undefined;
|
|
1877
|
-
groupId: string;
|
|
1878
|
-
txIds: string[];
|
|
1879
|
-
transactions: Transaction[];
|
|
1880
|
-
confirmation: modelsv2.PendingTransactionResponse;
|
|
1881
|
-
transaction: Transaction;
|
|
1882
|
-
}>;
|
|
1883
|
-
/**
|
|
1884
|
-
* Makes a call to the Pool smart contract using the `pendingReward(address)uint64` ABI method.
|
|
1885
|
-
*
|
|
1886
|
-
* This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.
|
|
1887
|
-
*
|
|
1888
|
-
* @param params The params for the smart contract call
|
|
1889
|
-
* @returns The call result
|
|
1890
|
-
*/
|
|
1891
|
-
pendingReward: (params: CallParams<PoolArgs["obj"]["pendingReward(address)uint64"] | PoolArgs["tuple"]["pendingReward(address)uint64"]> & SendParams & {
|
|
1892
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1893
|
-
}) => Promise<{
|
|
1894
|
-
return: undefined | PoolReturns["pendingReward(address)uint64"];
|
|
1895
|
-
confirmations: modelsv2.PendingTransactionResponse[];
|
|
1896
|
-
returns?: ABIReturn[] | undefined;
|
|
1897
|
-
groupId: string;
|
|
1898
|
-
txIds: string[];
|
|
1899
|
-
transactions: Transaction[];
|
|
1900
|
-
confirmation: modelsv2.PendingTransactionResponse;
|
|
1901
|
-
transaction: Transaction;
|
|
1902
|
-
}>;
|
|
1903
|
-
/**
|
|
1904
|
-
* Makes a call to the Pool smart contract using the `transferOwnership(address)void` ABI method.
|
|
1905
|
-
*
|
|
1906
|
-
* @param params The params for the smart contract call
|
|
1907
|
-
* @returns The call result
|
|
1908
|
-
*/
|
|
1909
|
-
transferOwnership: (params: CallParams<PoolArgs["obj"]["transferOwnership(address)void"] | PoolArgs["tuple"]["transferOwnership(address)void"]> & SendParams & {
|
|
1910
|
-
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1911
|
-
}) => Promise<{
|
|
1912
|
-
return: undefined | PoolReturns["transferOwnership(address)void"];
|
|
1913
|
-
confirmations: modelsv2.PendingTransactionResponse[];
|
|
1914
|
-
returns?: ABIReturn[] | undefined;
|
|
1915
|
-
groupId: string;
|
|
1916
|
-
txIds: string[];
|
|
1917
|
-
transactions: Transaction[];
|
|
1918
|
-
confirmation: modelsv2.PendingTransactionResponse;
|
|
1919
|
-
transaction: Transaction;
|
|
1920
|
-
}>;
|
|
1921
|
-
};
|
|
1922
|
-
/**
|
|
1923
|
-
* Clone this app client with different params
|
|
1924
|
-
*
|
|
1925
|
-
* @param params The params to use for the the cloned app client. Omit a param to keep the original value. Set a param to override the original value. Setting to undefined will clear the original value.
|
|
1926
|
-
* @returns A new app client with the altered params
|
|
1927
|
-
*/
|
|
1928
|
-
clone(params: CloneAppClientParams): PoolClient;
|
|
1929
|
-
/**
|
|
1930
|
-
* Makes a readonly (simulated) call to the Pool smart contract using the `pendingReward(address)uint64` ABI method.
|
|
1931
|
-
*
|
|
1932
|
-
* This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.
|
|
1933
|
-
*
|
|
1934
|
-
* @param params The params for the smart contract call
|
|
1935
|
-
* @returns The call result
|
|
1936
|
-
*/
|
|
1937
|
-
pendingReward(params: CallParams<PoolArgs["obj"]["pendingReward(address)uint64"] | PoolArgs["tuple"]["pendingReward(address)uint64"]>): Promise<bigint>;
|
|
1938
|
-
/**
|
|
1939
|
-
* Methods to access state for the current Pool app
|
|
1940
|
-
*/
|
|
1941
|
-
state: {
|
|
1942
|
-
/**
|
|
1943
|
-
* Methods to access global state for the current Pool app
|
|
1944
|
-
*/
|
|
1945
|
-
global: {
|
|
1946
|
-
/**
|
|
1947
|
-
* Get all current keyed values from global state
|
|
1948
|
-
*/
|
|
1949
|
-
getAll: () => Promise<Partial<Expand<GlobalKeysState>>>;
|
|
1950
|
-
/**
|
|
1951
|
-
* Get the current value of the feeShareBP key in global state
|
|
1952
|
-
*/
|
|
1953
|
-
feeShareBp: () => Promise<bigint | undefined>;
|
|
1954
|
-
/**
|
|
1955
|
-
* Get the current value of the router key in global state
|
|
1956
|
-
*/
|
|
1957
|
-
router: () => Promise<string | undefined>;
|
|
1958
|
-
/**
|
|
1959
|
-
* Get the current value of the tokenBalance key in global state
|
|
1960
|
-
*/
|
|
1961
|
-
tokenBalance: () => Promise<bigint | undefined>;
|
|
1962
|
-
/**
|
|
1963
|
-
* Get the current value of the vUsdBalance key in global state
|
|
1964
|
-
*/
|
|
1965
|
-
vUsdBalance: () => Promise<bigint | undefined>;
|
|
1966
|
-
/**
|
|
1967
|
-
* Get the current value of the balanceRatioMinBP key in global state
|
|
1968
|
-
*/
|
|
1969
|
-
balanceRatioMinBp: () => Promise<bigint | undefined>;
|
|
1970
|
-
/**
|
|
1971
|
-
* Get the current value of the reserves key in global state
|
|
1972
|
-
*/
|
|
1973
|
-
reserves: () => Promise<bigint | undefined>;
|
|
1974
|
-
/**
|
|
1975
|
-
* Get the current value of the a key in global state
|
|
1976
|
-
*/
|
|
1977
|
-
a: () => Promise<bigint | undefined>;
|
|
1978
|
-
/**
|
|
1979
|
-
* Get the current value of the d key in global state
|
|
1980
|
-
*/
|
|
1981
|
-
d: () => Promise<bigint | undefined>;
|
|
1982
|
-
/**
|
|
1983
|
-
* Get the current value of the tokenAmountReduce key in global state
|
|
1984
|
-
*/
|
|
1985
|
-
tokenAmountReduce: () => Promise<bigint | undefined>;
|
|
1986
|
-
/**
|
|
1987
|
-
* Get the current value of the tokenAmountIncrease key in global state
|
|
1988
|
-
*/
|
|
1989
|
-
tokenAmountIncrease: () => Promise<bigint | undefined>;
|
|
1990
|
-
/**
|
|
1991
|
-
* Get the current value of the stopAuthority key in global state
|
|
1992
|
-
*/
|
|
1993
|
-
stopAuthority: () => Promise<string | undefined>;
|
|
1994
|
-
/**
|
|
1995
|
-
* Get the current value of the canDeposit key in global state
|
|
1996
|
-
*/
|
|
1997
|
-
canDeposit: () => Promise<bigint | undefined>;
|
|
1998
|
-
/**
|
|
1999
|
-
* Get the current value of the canWithdraw key in global state
|
|
2000
|
-
*/
|
|
2001
|
-
canWithdraw: () => Promise<bigint | undefined>;
|
|
2002
|
-
/**
|
|
2003
|
-
* Get the current value of the asset key in global state
|
|
2004
|
-
*/
|
|
2005
|
-
asset: () => Promise<bigint | undefined>;
|
|
2006
|
-
/**
|
|
2007
|
-
* Get the current value of the adminFeeShareBP key in global state
|
|
2008
|
-
*/
|
|
2009
|
-
adminFeeShareBp: () => Promise<bigint | undefined>;
|
|
2010
|
-
/**
|
|
2011
|
-
* Get the current value of the totalSupply key in global state
|
|
2012
|
-
*/
|
|
2013
|
-
totalSupply: () => Promise<bigint | undefined>;
|
|
2014
|
-
/**
|
|
2015
|
-
* Get the current value of the accRewardPerShareP key in global state
|
|
2016
|
-
*/
|
|
2017
|
-
accRewardPerShareP: () => Promise<BinaryState>;
|
|
2018
|
-
/**
|
|
2019
|
-
* Get the current value of the adminFeeAmount key in global state
|
|
2020
|
-
*/
|
|
2021
|
-
adminFeeAmount: () => Promise<bigint | undefined>;
|
|
2022
|
-
/**
|
|
2023
|
-
* Get the current value of the owner key in global state
|
|
2024
|
-
*/
|
|
2025
|
-
owner: () => Promise<string | undefined>;
|
|
2026
|
-
};
|
|
2027
|
-
/**
|
|
2028
|
-
* Methods to access local state for the current Pool app
|
|
2029
|
-
*/
|
|
2030
|
-
local: (address: string | Address) => {
|
|
2031
|
-
/**
|
|
2032
|
-
* Get all current keyed values from local state
|
|
2033
|
-
*/
|
|
2034
|
-
getAll: () => Promise<Partial<Expand<LocalKeysState>>>;
|
|
2035
|
-
/**
|
|
2036
|
-
* Get the current value of the balance key in local state
|
|
2037
|
-
*/
|
|
2038
|
-
balance: () => Promise<bigint | undefined>;
|
|
2039
|
-
/**
|
|
2040
|
-
* Get the current value of the userRewardDebt key in local state
|
|
2041
|
-
*/
|
|
2042
|
-
userRewardDebt: () => Promise<bigint | undefined>;
|
|
2043
|
-
};
|
|
2044
|
-
};
|
|
2045
|
-
newGroup(): PoolComposer;
|
|
2046
|
-
}
|
|
2047
|
-
export type PoolComposer<TReturns extends [...any[]] = []> = {
|
|
2048
|
-
/**
|
|
2049
|
-
* Calls the optInAsset()void ABI method.
|
|
2050
|
-
*
|
|
2051
|
-
* Opt-in the application account to the ASA stored in `this.asset`.
|
|
2052
|
-
This performs an inner axfer of 0 to the app's own address.
|
|
2053
|
-
Call once after deploy (or whenever you change the asset).
|
|
2054
|
-
|
|
2055
|
-
*
|
|
2056
|
-
* @param args The arguments for the contract call
|
|
2057
|
-
* @param params Any additional parameters for the call
|
|
2058
|
-
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
|
|
2059
|
-
*/
|
|
2060
|
-
optInAsset(params?: CallParams<PoolArgs["obj"]["optInAsset()void"] | PoolArgs["tuple"]["optInAsset()void"]>): PoolComposer<[...TReturns, PoolReturns["optInAsset()void"] | undefined]>;
|
|
2061
|
-
/**
|
|
2062
|
-
* Calls the deposit(axfer,uint64)void ABI method.
|
|
2063
|
-
*
|
|
2064
|
-
* @param args The arguments for the contract call
|
|
2065
|
-
* @param params Any additional parameters for the call
|
|
2066
|
-
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
|
|
2067
|
-
*/
|
|
2068
|
-
deposit(params?: CallParams<PoolArgs["obj"]["deposit(axfer,uint64)void"] | PoolArgs["tuple"]["deposit(axfer,uint64)void"]>): PoolComposer<[...TReturns, PoolReturns["deposit(axfer,uint64)void"] | undefined]>;
|
|
2069
|
-
/**
|
|
2070
|
-
* Calls the withdraw(uint64,uint64)void ABI method.
|
|
2071
|
-
*
|
|
2072
|
-
* @param args The arguments for the contract call
|
|
2073
|
-
* @param params Any additional parameters for the call
|
|
2074
|
-
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
|
|
2075
|
-
*/
|
|
2076
|
-
withdraw(params?: CallParams<PoolArgs["obj"]["withdraw(uint64,uint64)void"] | PoolArgs["tuple"]["withdraw(uint64,uint64)void"]>): PoolComposer<[...TReturns, PoolReturns["withdraw(uint64,uint64)void"] | undefined]>;
|
|
2077
|
-
/**
|
|
2078
|
-
* Calls the swapToVUsd(address,uint64,bool)uint64 ABI method.
|
|
2079
|
-
*
|
|
2080
|
-
* @param args The arguments for the contract call
|
|
2081
|
-
* @param params Any additional parameters for the call
|
|
2082
|
-
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
|
|
2083
|
-
*/
|
|
2084
|
-
swapToVUsd(params?: CallParams<PoolArgs["obj"]["swapToVUsd(address,uint64,bool)uint64"] | PoolArgs["tuple"]["swapToVUsd(address,uint64,bool)uint64"]>): PoolComposer<[...TReturns, PoolReturns["swapToVUsd(address,uint64,bool)uint64"] | undefined]>;
|
|
2085
|
-
/**
|
|
2086
|
-
* Calls the swapFromVUsd(address,uint64,uint64,bool)uint64 ABI method.
|
|
2087
|
-
*
|
|
2088
|
-
* @param args The arguments for the contract call
|
|
2089
|
-
* @param params Any additional parameters for the call
|
|
2090
|
-
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
|
|
2091
|
-
*/
|
|
2092
|
-
swapFromVUsd(params?: CallParams<PoolArgs["obj"]["swapFromVUsd(address,uint64,uint64,bool)uint64"] | PoolArgs["tuple"]["swapFromVUsd(address,uint64,uint64,bool)uint64"]>): PoolComposer<[...TReturns, PoolReturns["swapFromVUsd(address,uint64,uint64,bool)uint64"] | undefined]>;
|
|
2093
|
-
/**
|
|
2094
|
-
* Calls the setFeeShare(uint64)void ABI method.
|
|
2095
|
-
*
|
|
2096
|
-
* @param args The arguments for the contract call
|
|
2097
|
-
* @param params Any additional parameters for the call
|
|
2098
|
-
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
|
|
2099
|
-
*/
|
|
2100
|
-
setFeeShare(params?: CallParams<PoolArgs["obj"]["setFeeShare(uint64)void"] | PoolArgs["tuple"]["setFeeShare(uint64)void"]>): PoolComposer<[...TReturns, PoolReturns["setFeeShare(uint64)void"] | undefined]>;
|
|
2101
|
-
/**
|
|
2102
|
-
* Calls the adjustTotalLpAmount()void ABI method.
|
|
2103
|
-
*
|
|
2104
|
-
* @param args The arguments for the contract call
|
|
2105
|
-
* @param params Any additional parameters for the call
|
|
2106
|
-
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
|
|
2107
|
-
*/
|
|
2108
|
-
adjustTotalLpAmount(params?: CallParams<PoolArgs["obj"]["adjustTotalLpAmount()void"] | PoolArgs["tuple"]["adjustTotalLpAmount()void"]>): PoolComposer<[...TReturns, PoolReturns["adjustTotalLpAmount()void"] | undefined]>;
|
|
2109
|
-
/**
|
|
2110
|
-
* Calls the setBalanceRatioMinBP(uint64)void ABI method.
|
|
2111
|
-
*
|
|
2112
|
-
* @param args The arguments for the contract call
|
|
2113
|
-
* @param params Any additional parameters for the call
|
|
2114
|
-
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
|
|
2115
|
-
*/
|
|
2116
|
-
setBalanceRatioMinBp(params?: CallParams<PoolArgs["obj"]["setBalanceRatioMinBP(uint64)void"] | PoolArgs["tuple"]["setBalanceRatioMinBP(uint64)void"]>): PoolComposer<[...TReturns, PoolReturns["setBalanceRatioMinBP(uint64)void"] | undefined]>;
|
|
2117
|
-
/**
|
|
2118
|
-
* Calls the stopDeposit()void ABI method.
|
|
2119
|
-
*
|
|
2120
|
-
* @param args The arguments for the contract call
|
|
2121
|
-
* @param params Any additional parameters for the call
|
|
2122
|
-
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
|
|
2123
|
-
*/
|
|
2124
|
-
stopDeposit(params?: CallParams<PoolArgs["obj"]["stopDeposit()void"] | PoolArgs["tuple"]["stopDeposit()void"]>): PoolComposer<[...TReturns, PoolReturns["stopDeposit()void"] | undefined]>;
|
|
2125
|
-
/**
|
|
2126
|
-
* Calls the startDeposit()void ABI method.
|
|
2127
|
-
*
|
|
2128
|
-
* @param args The arguments for the contract call
|
|
2129
|
-
* @param params Any additional parameters for the call
|
|
2130
|
-
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
|
|
2131
|
-
*/
|
|
2132
|
-
startDeposit(params?: CallParams<PoolArgs["obj"]["startDeposit()void"] | PoolArgs["tuple"]["startDeposit()void"]>): PoolComposer<[...TReturns, PoolReturns["startDeposit()void"] | undefined]>;
|
|
2133
|
-
/**
|
|
2134
|
-
* Calls the stopWithdraw()void ABI method.
|
|
2135
|
-
*
|
|
2136
|
-
* @param args The arguments for the contract call
|
|
2137
|
-
* @param params Any additional parameters for the call
|
|
2138
|
-
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
|
|
2139
|
-
*/
|
|
2140
|
-
stopWithdraw(params?: CallParams<PoolArgs["obj"]["stopWithdraw()void"] | PoolArgs["tuple"]["stopWithdraw()void"]>): PoolComposer<[...TReturns, PoolReturns["stopWithdraw()void"] | undefined]>;
|
|
2141
|
-
/**
|
|
2142
|
-
* Calls the startWithdraw()void ABI method.
|
|
2143
|
-
*
|
|
2144
|
-
* @param args The arguments for the contract call
|
|
2145
|
-
* @param params Any additional parameters for the call
|
|
2146
|
-
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
|
|
2147
|
-
*/
|
|
2148
|
-
startWithdraw(params?: CallParams<PoolArgs["obj"]["startWithdraw()void"] | PoolArgs["tuple"]["startWithdraw()void"]>): PoolComposer<[...TReturns, PoolReturns["startWithdraw()void"] | undefined]>;
|
|
2149
|
-
/**
|
|
2150
|
-
* Calls the setStopAuthority(address)void ABI method.
|
|
2151
|
-
*
|
|
2152
|
-
* @param args The arguments for the contract call
|
|
2153
|
-
* @param params Any additional parameters for the call
|
|
2154
|
-
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
|
|
2155
|
-
*/
|
|
2156
|
-
setStopAuthority(params?: CallParams<PoolArgs["obj"]["setStopAuthority(address)void"] | PoolArgs["tuple"]["setStopAuthority(address)void"]>): PoolComposer<[...TReturns, PoolReturns["setStopAuthority(address)void"] | undefined]>;
|
|
2157
|
-
/**
|
|
2158
|
-
* Calls the setRouter(address)void ABI method.
|
|
2159
|
-
*
|
|
2160
|
-
* @param args The arguments for the contract call
|
|
2161
|
-
* @param params Any additional parameters for the call
|
|
2162
|
-
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
|
|
2163
|
-
*/
|
|
2164
|
-
setRouter(params?: CallParams<PoolArgs["obj"]["setRouter(address)void"] | PoolArgs["tuple"]["setRouter(address)void"]>): PoolComposer<[...TReturns, PoolReturns["setRouter(address)void"] | undefined]>;
|
|
2165
|
-
/**
|
|
2166
|
-
* Calls the claimRewards()void ABI method.
|
|
2167
|
-
*
|
|
2168
|
-
* @param args The arguments for the contract call
|
|
2169
|
-
* @param params Any additional parameters for the call
|
|
2170
|
-
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
|
|
2171
|
-
*/
|
|
2172
|
-
claimRewards(params?: CallParams<PoolArgs["obj"]["claimRewards()void"] | PoolArgs["tuple"]["claimRewards()void"]>): PoolComposer<[...TReturns, PoolReturns["claimRewards()void"] | undefined]>;
|
|
2173
|
-
/**
|
|
2174
|
-
* Calls the setAdminFeeShare(uint64)void ABI method.
|
|
2175
|
-
*
|
|
2176
|
-
* @param args The arguments for the contract call
|
|
2177
|
-
* @param params Any additional parameters for the call
|
|
2178
|
-
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
|
|
2179
|
-
*/
|
|
2180
|
-
setAdminFeeShare(params?: CallParams<PoolArgs["obj"]["setAdminFeeShare(uint64)void"] | PoolArgs["tuple"]["setAdminFeeShare(uint64)void"]>): PoolComposer<[...TReturns, PoolReturns["setAdminFeeShare(uint64)void"] | undefined]>;
|
|
2181
|
-
/**
|
|
2182
|
-
* Calls the claimAdminFee()void ABI method.
|
|
2183
|
-
*
|
|
2184
|
-
* @param args The arguments for the contract call
|
|
2185
|
-
* @param params Any additional parameters for the call
|
|
2186
|
-
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
|
|
2187
|
-
*/
|
|
2188
|
-
claimAdminFee(params?: CallParams<PoolArgs["obj"]["claimAdminFee()void"] | PoolArgs["tuple"]["claimAdminFee()void"]>): PoolComposer<[...TReturns, PoolReturns["claimAdminFee()void"] | undefined]>;
|
|
2189
|
-
/**
|
|
2190
|
-
* Calls the pendingReward(address)uint64 ABI method.
|
|
2191
|
-
*
|
|
2192
|
-
* @param args The arguments for the contract call
|
|
2193
|
-
* @param params Any additional parameters for the call
|
|
2194
|
-
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
|
|
2195
|
-
*/
|
|
2196
|
-
pendingReward(params?: CallParams<PoolArgs["obj"]["pendingReward(address)uint64"] | PoolArgs["tuple"]["pendingReward(address)uint64"]>): PoolComposer<[...TReturns, PoolReturns["pendingReward(address)uint64"] | undefined]>;
|
|
2197
|
-
/**
|
|
2198
|
-
* Calls the transferOwnership(address)void ABI method.
|
|
2199
|
-
*
|
|
2200
|
-
* @param args The arguments for the contract call
|
|
2201
|
-
* @param params Any additional parameters for the call
|
|
2202
|
-
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
|
|
2203
|
-
*/
|
|
2204
|
-
transferOwnership(params?: CallParams<PoolArgs["obj"]["transferOwnership(address)void"] | PoolArgs["tuple"]["transferOwnership(address)void"]>): PoolComposer<[...TReturns, PoolReturns["transferOwnership(address)void"] | undefined]>;
|
|
2205
|
-
/**
|
|
2206
|
-
* Gets available optIn methods
|
|
2207
|
-
*/
|
|
2208
|
-
readonly optIn: {
|
|
2209
|
-
/**
|
|
2210
|
-
* Opts the user into an existing instance of the Pool smart contract using the optInToApplication()void ABI method.
|
|
2211
|
-
*
|
|
2212
|
-
* @param args The arguments for the smart contract call
|
|
2213
|
-
* @param params Any additional parameters for the call
|
|
2214
|
-
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
|
|
2215
|
-
*/
|
|
2216
|
-
optInToApplication(params?: CallParams<PoolArgs["obj"]["optInToApplication()void"] | PoolArgs["tuple"]["optInToApplication()void"]>): PoolComposer<[...TReturns, PoolReturns["optInToApplication()void"] | undefined]>;
|
|
2217
|
-
/**
|
|
2218
|
-
* Opts the user into an existing instance of the Pool smart contract using the deposit(axfer,uint64)void ABI method.
|
|
2219
|
-
*
|
|
2220
|
-
* @param args The arguments for the smart contract call
|
|
2221
|
-
* @param params Any additional parameters for the call
|
|
2222
|
-
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
|
|
2223
|
-
*/
|
|
2224
|
-
deposit(params?: CallParams<PoolArgs["obj"]["deposit(axfer,uint64)void"] | PoolArgs["tuple"]["deposit(axfer,uint64)void"]>): PoolComposer<[...TReturns, PoolReturns["deposit(axfer,uint64)void"] | undefined]>;
|
|
2225
|
-
};
|
|
2226
|
-
/**
|
|
2227
|
-
* Gets available closeOut methods
|
|
2228
|
-
*/
|
|
2229
|
-
readonly closeOut: {
|
|
2230
|
-
/**
|
|
2231
|
-
* Makes a close out call to an existing instance of the Pool smart contract using the closeOutOfApplication(uint64)void ABI method.
|
|
2232
|
-
*
|
|
2233
|
-
* @param args The arguments for the smart contract call
|
|
2234
|
-
* @param params Any additional parameters for the call
|
|
2235
|
-
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
|
|
2236
|
-
*/
|
|
2237
|
-
closeOutOfApplication(params?: CallParams<PoolArgs["obj"]["closeOutOfApplication(uint64)void"] | PoolArgs["tuple"]["closeOutOfApplication(uint64)void"]>): PoolComposer<[...TReturns, PoolReturns["closeOutOfApplication(uint64)void"] | undefined]>;
|
|
2238
|
-
};
|
|
2239
|
-
/**
|
|
2240
|
-
* Makes a clear_state call to an existing instance of the Pool smart contract.
|
|
2241
|
-
*
|
|
2242
|
-
* @param args The arguments for the bare call
|
|
2243
|
-
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
|
|
2244
|
-
*/
|
|
2245
|
-
clearState(params?: AppClientBareCallParams): PoolComposer<[...TReturns, undefined]>;
|
|
2246
|
-
/**
|
|
2247
|
-
* Adds a transaction to the composer
|
|
2248
|
-
*
|
|
2249
|
-
* @param txn A transaction to add to the transaction group
|
|
2250
|
-
* @param signer The optional signer to use when signing this transaction.
|
|
2251
|
-
*/
|
|
2252
|
-
addTransaction(txn: Transaction, signer?: TransactionSigner): PoolComposer<TReturns>;
|
|
2253
|
-
/**
|
|
2254
|
-
* Returns the underlying AtomicTransactionComposer instance
|
|
2255
|
-
*/
|
|
2256
|
-
composer(): Promise<TransactionComposer>;
|
|
2257
|
-
/**
|
|
2258
|
-
* Simulates the transaction group and returns the result
|
|
2259
|
-
*/
|
|
2260
|
-
simulate(): Promise<PoolComposerResults<TReturns> & {
|
|
2261
|
-
simulateResponse: modelsv2.SimulateResponse;
|
|
2262
|
-
}>;
|
|
2263
|
-
simulate(options: SkipSignaturesSimulateOptions): Promise<PoolComposerResults<TReturns> & {
|
|
2264
|
-
simulateResponse: modelsv2.SimulateResponse;
|
|
2265
|
-
}>;
|
|
2266
|
-
simulate(options: RawSimulateOptions): Promise<PoolComposerResults<TReturns> & {
|
|
2267
|
-
simulateResponse: modelsv2.SimulateResponse;
|
|
2268
|
-
}>;
|
|
2269
|
-
/**
|
|
2270
|
-
* Sends the transaction group to the network and returns the results
|
|
2271
|
-
*/
|
|
2272
|
-
send(params?: SendParams): Promise<PoolComposerResults<TReturns>>;
|
|
2273
|
-
};
|
|
2274
|
-
export type PoolComposerResults<TReturns extends [...any[]]> = Expand<SendAtomicTransactionComposerResults & {
|
|
2275
|
-
returns: TReturns;
|
|
2276
|
-
}>;
|