@d13co/escreg-sdk 0.0.1
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/README.md +69 -0
- package/dist/cjs/generated/EscregGenerated.d.ts +1564 -0
- package/dist/cjs/generated/EscregGenerated.js +1182 -0
- package/dist/cjs/generated/EscregGenerated.js.map +1 -0
- package/dist/cjs/generated/errors.d.ts +4 -0
- package/dist/cjs/generated/errors.js +15 -0
- package/dist/cjs/generated/errors.js.map +1 -0
- package/dist/cjs/index.d.ts +122 -0
- package/dist/cjs/index.js +353 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/util.d.ts +12 -0
- package/dist/cjs/util.js +96 -0
- package/dist/cjs/util.js.map +1 -0
- package/dist/cjs/wrapErrors.d.ts +7 -0
- package/dist/cjs/wrapErrors.js +37 -0
- package/dist/cjs/wrapErrors.js.map +1 -0
- package/dist/esm/generated/EscregGenerated.d.ts +1564 -0
- package/dist/esm/generated/EscregGenerated.js +1176 -0
- package/dist/esm/generated/EscregGenerated.js.map +1 -0
- package/dist/esm/generated/errors.d.ts +4 -0
- package/dist/esm/generated/errors.js +12 -0
- package/dist/esm/generated/errors.js.map +1 -0
- package/dist/esm/index.d.ts +122 -0
- package/dist/esm/index.js +346 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/util.d.ts +12 -0
- package/dist/esm/util.js +90 -0
- package/dist/esm/util.js.map +1 -0
- package/dist/esm/wrapErrors.d.ts +7 -0
- package/dist/esm/wrapErrors.js +32 -0
- package/dist/esm/wrapErrors.js.map +1 -0
- package/package.json +58 -0
|
@@ -0,0 +1,1564 @@
|
|
|
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, ResolveAppClientByCreatorAndName, ResolveAppClientByNetwork, CloneAppClientParams } from '@algorandfoundation/algokit-utils/types/app-client';
|
|
10
|
+
import { TransactionComposer, AppCallMethodCall, AppMethodCallTransactionArgument, RawSimulateOptions, SkipSignaturesSimulateOptions } from '@algorandfoundation/algokit-utils/types/composer';
|
|
11
|
+
import { SendParams, SendAtomicTransactionComposerResults } from '@algorandfoundation/algokit-utils/types/transaction';
|
|
12
|
+
import { Address, modelsv2, OnApplicationComplete, Transaction, TransactionSigner } from 'algosdk';
|
|
13
|
+
export declare const APP_SPEC: Arc56Contract;
|
|
14
|
+
/**
|
|
15
|
+
* A state record containing binary data
|
|
16
|
+
*/
|
|
17
|
+
export interface BinaryState {
|
|
18
|
+
/**
|
|
19
|
+
* Gets the state value as a Uint8Array
|
|
20
|
+
*/
|
|
21
|
+
asByteArray(): Uint8Array | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Gets the state value as a string
|
|
24
|
+
*/
|
|
25
|
+
asString(): string | undefined;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Expands types for IntelliSense so they are more human readable
|
|
29
|
+
* See https://stackoverflow.com/a/69288824
|
|
30
|
+
*/
|
|
31
|
+
export type Expand<T> = T extends (...args: infer A) => infer R ? (...args: Expand<A>) => Expand<R> : T extends infer O ? {
|
|
32
|
+
[K in keyof O]: O[K];
|
|
33
|
+
} : never;
|
|
34
|
+
export type AddressWithAuth = {
|
|
35
|
+
appId: bigint;
|
|
36
|
+
authAppId: bigint;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Converts the ABI tuple representation of a AddressWithAuth to the struct representation
|
|
40
|
+
*/
|
|
41
|
+
export declare function AddressWithAuthFromTuple(abiTuple: [bigint, bigint]): AddressWithAuth;
|
|
42
|
+
/**
|
|
43
|
+
* The argument types for the Escreg contract
|
|
44
|
+
*/
|
|
45
|
+
export type EscregArgs = {
|
|
46
|
+
/**
|
|
47
|
+
* The object representation of the arguments for each method
|
|
48
|
+
*/
|
|
49
|
+
obj: {
|
|
50
|
+
'deleteApplication()void': Record<string, never>;
|
|
51
|
+
'updateApplication()void': Record<string, never>;
|
|
52
|
+
'withdraw(uint64)void': {
|
|
53
|
+
/**
|
|
54
|
+
* Amount of microAlgos to withdraw.
|
|
55
|
+
*/
|
|
56
|
+
amount: bigint | number;
|
|
57
|
+
};
|
|
58
|
+
'deleteBoxes(byte[4][])void': {
|
|
59
|
+
/**
|
|
60
|
+
* Array of 4-byte box keys to delete.
|
|
61
|
+
*/
|
|
62
|
+
boxKeys: Uint8Array[];
|
|
63
|
+
};
|
|
64
|
+
'register(uint64)void': {
|
|
65
|
+
/**
|
|
66
|
+
* App ID of the application to register. The app address derived from this ID will be registered in the contract and can be retrieved later.
|
|
67
|
+
*/
|
|
68
|
+
appId: bigint | number;
|
|
69
|
+
};
|
|
70
|
+
'registerList(uint64[])void': {
|
|
71
|
+
/**
|
|
72
|
+
* Array of App IDs to register. The app addresses derived from these IDs will be registered in the contract and can be retrieved later.
|
|
73
|
+
*/
|
|
74
|
+
appIds: bigint[] | number[];
|
|
75
|
+
};
|
|
76
|
+
'exists(address)bool': {
|
|
77
|
+
/**
|
|
78
|
+
* App Escrow to check
|
|
79
|
+
*/
|
|
80
|
+
address: string;
|
|
81
|
+
};
|
|
82
|
+
'get(address)uint64': {
|
|
83
|
+
/**
|
|
84
|
+
* App Escrow to get the app ID for
|
|
85
|
+
*/
|
|
86
|
+
address: string;
|
|
87
|
+
};
|
|
88
|
+
'mustGet(address)uint64': {
|
|
89
|
+
/**
|
|
90
|
+
* App Escrow to get the app ID for
|
|
91
|
+
*/
|
|
92
|
+
address: string;
|
|
93
|
+
};
|
|
94
|
+
'getWithAuth(address)(uint64,uint64)': {
|
|
95
|
+
/**
|
|
96
|
+
* App Escrow to get the app ID for, along with its auth address
|
|
97
|
+
*/
|
|
98
|
+
address: string;
|
|
99
|
+
};
|
|
100
|
+
'getWithAuthList(address[])(uint64,uint64)[]': {
|
|
101
|
+
/**
|
|
102
|
+
* App Escrows to get the app IDs for, along with their auth addresses
|
|
103
|
+
*/
|
|
104
|
+
addresses: string[];
|
|
105
|
+
};
|
|
106
|
+
'getList(address[])uint64[]': {
|
|
107
|
+
/**
|
|
108
|
+
* App Escrows to get the app IDs for
|
|
109
|
+
*/
|
|
110
|
+
addresses: string[];
|
|
111
|
+
};
|
|
112
|
+
'mustGetList(address[])uint64[]': {
|
|
113
|
+
/**
|
|
114
|
+
* App Escrows to get the app IDs for
|
|
115
|
+
*/
|
|
116
|
+
addresses: string[];
|
|
117
|
+
};
|
|
118
|
+
'increaseBudget(uint64)void': {
|
|
119
|
+
/**
|
|
120
|
+
* Number of itxns to perform.
|
|
121
|
+
*/
|
|
122
|
+
itxns: bigint | number;
|
|
123
|
+
};
|
|
124
|
+
'depositCredits(address,pay)void': {
|
|
125
|
+
/**
|
|
126
|
+
* account to credit
|
|
127
|
+
*/
|
|
128
|
+
creditor: string;
|
|
129
|
+
/**
|
|
130
|
+
* payment transaction to contract. amount is the credit received
|
|
131
|
+
*/
|
|
132
|
+
txn: AppMethodCallTransactionArgument;
|
|
133
|
+
};
|
|
134
|
+
'withdrawCredits()void': Record<string, never>;
|
|
135
|
+
};
|
|
136
|
+
/**
|
|
137
|
+
* The tuple representation of the arguments for each method
|
|
138
|
+
*/
|
|
139
|
+
tuple: {
|
|
140
|
+
'deleteApplication()void': [];
|
|
141
|
+
'updateApplication()void': [];
|
|
142
|
+
'withdraw(uint64)void': [amount: bigint | number];
|
|
143
|
+
'deleteBoxes(byte[4][])void': [boxKeys: Uint8Array[]];
|
|
144
|
+
'register(uint64)void': [appId: bigint | number];
|
|
145
|
+
'registerList(uint64[])void': [appIds: bigint[] | number[]];
|
|
146
|
+
'exists(address)bool': [address: string];
|
|
147
|
+
'get(address)uint64': [address: string];
|
|
148
|
+
'mustGet(address)uint64': [address: string];
|
|
149
|
+
'getWithAuth(address)(uint64,uint64)': [address: string];
|
|
150
|
+
'getWithAuthList(address[])(uint64,uint64)[]': [addresses: string[]];
|
|
151
|
+
'getList(address[])uint64[]': [addresses: string[]];
|
|
152
|
+
'mustGetList(address[])uint64[]': [addresses: string[]];
|
|
153
|
+
'increaseBudget(uint64)void': [itxns: bigint | number];
|
|
154
|
+
'depositCredits(address,pay)void': [creditor: string, txn: AppMethodCallTransactionArgument];
|
|
155
|
+
'withdrawCredits()void': [];
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
/**
|
|
159
|
+
* The return type for each method
|
|
160
|
+
*/
|
|
161
|
+
export type EscregReturns = {
|
|
162
|
+
'deleteApplication()void': void;
|
|
163
|
+
'updateApplication()void': void;
|
|
164
|
+
'withdraw(uint64)void': void;
|
|
165
|
+
'deleteBoxes(byte[4][])void': void;
|
|
166
|
+
'register(uint64)void': void;
|
|
167
|
+
'registerList(uint64[])void': void;
|
|
168
|
+
'exists(address)bool': boolean;
|
|
169
|
+
'get(address)uint64': bigint;
|
|
170
|
+
'mustGet(address)uint64': bigint;
|
|
171
|
+
'getWithAuth(address)(uint64,uint64)': AddressWithAuth;
|
|
172
|
+
'getWithAuthList(address[])(uint64,uint64)[]': [bigint, bigint][];
|
|
173
|
+
'getList(address[])uint64[]': bigint[];
|
|
174
|
+
'mustGetList(address[])uint64[]': bigint[];
|
|
175
|
+
'increaseBudget(uint64)void': void;
|
|
176
|
+
'depositCredits(address,pay)void': void;
|
|
177
|
+
'withdrawCredits()void': void;
|
|
178
|
+
};
|
|
179
|
+
/**
|
|
180
|
+
* Defines the types of available calls and state of the Escreg smart contract.
|
|
181
|
+
*/
|
|
182
|
+
export type EscregTypes = {
|
|
183
|
+
/**
|
|
184
|
+
* Maps method signatures / names to their argument and return types.
|
|
185
|
+
*/
|
|
186
|
+
methods: Record<'deleteApplication()void' | 'deleteApplication', {
|
|
187
|
+
argsObj: EscregArgs['obj']['deleteApplication()void'];
|
|
188
|
+
argsTuple: EscregArgs['tuple']['deleteApplication()void'];
|
|
189
|
+
returns: EscregReturns['deleteApplication()void'];
|
|
190
|
+
}> & Record<'updateApplication()void' | 'updateApplication', {
|
|
191
|
+
argsObj: EscregArgs['obj']['updateApplication()void'];
|
|
192
|
+
argsTuple: EscregArgs['tuple']['updateApplication()void'];
|
|
193
|
+
returns: EscregReturns['updateApplication()void'];
|
|
194
|
+
}> & Record<'withdraw(uint64)void' | 'withdraw', {
|
|
195
|
+
argsObj: EscregArgs['obj']['withdraw(uint64)void'];
|
|
196
|
+
argsTuple: EscregArgs['tuple']['withdraw(uint64)void'];
|
|
197
|
+
returns: EscregReturns['withdraw(uint64)void'];
|
|
198
|
+
}> & Record<'deleteBoxes(byte[4][])void' | 'deleteBoxes', {
|
|
199
|
+
argsObj: EscregArgs['obj']['deleteBoxes(byte[4][])void'];
|
|
200
|
+
argsTuple: EscregArgs['tuple']['deleteBoxes(byte[4][])void'];
|
|
201
|
+
returns: EscregReturns['deleteBoxes(byte[4][])void'];
|
|
202
|
+
}> & Record<'register(uint64)void' | 'register', {
|
|
203
|
+
argsObj: EscregArgs['obj']['register(uint64)void'];
|
|
204
|
+
argsTuple: EscregArgs['tuple']['register(uint64)void'];
|
|
205
|
+
returns: EscregReturns['register(uint64)void'];
|
|
206
|
+
}> & Record<'registerList(uint64[])void' | 'registerList', {
|
|
207
|
+
argsObj: EscregArgs['obj']['registerList(uint64[])void'];
|
|
208
|
+
argsTuple: EscregArgs['tuple']['registerList(uint64[])void'];
|
|
209
|
+
returns: EscregReturns['registerList(uint64[])void'];
|
|
210
|
+
}> & Record<'exists(address)bool' | 'exists', {
|
|
211
|
+
argsObj: EscregArgs['obj']['exists(address)bool'];
|
|
212
|
+
argsTuple: EscregArgs['tuple']['exists(address)bool'];
|
|
213
|
+
/**
|
|
214
|
+
* boolean indicating whether the given address is registered in the contract
|
|
215
|
+
*/
|
|
216
|
+
returns: EscregReturns['exists(address)bool'];
|
|
217
|
+
}> & Record<'get(address)uint64' | 'get', {
|
|
218
|
+
argsObj: EscregArgs['obj']['get(address)uint64'];
|
|
219
|
+
argsTuple: EscregArgs['tuple']['get(address)uint64'];
|
|
220
|
+
/**
|
|
221
|
+
* App ID for the given address, or 0 if not registered
|
|
222
|
+
*/
|
|
223
|
+
returns: EscregReturns['get(address)uint64'];
|
|
224
|
+
}> & Record<'mustGet(address)uint64' | 'mustGet', {
|
|
225
|
+
argsObj: EscregArgs['obj']['mustGet(address)uint64'];
|
|
226
|
+
argsTuple: EscregArgs['tuple']['mustGet(address)uint64'];
|
|
227
|
+
/**
|
|
228
|
+
* App ID for the given address
|
|
229
|
+
*/
|
|
230
|
+
returns: EscregReturns['mustGet(address)uint64'];
|
|
231
|
+
}> & Record<'getWithAuth(address)(uint64,uint64)' | 'getWithAuth', {
|
|
232
|
+
argsObj: EscregArgs['obj']['getWithAuth(address)(uint64,uint64)'];
|
|
233
|
+
argsTuple: EscregArgs['tuple']['getWithAuth(address)(uint64,uint64)'];
|
|
234
|
+
/**
|
|
235
|
+
* [app ID for the given address, app ID for the auth address], or 0 for each if not registered
|
|
236
|
+
*/
|
|
237
|
+
returns: EscregReturns['getWithAuth(address)(uint64,uint64)'];
|
|
238
|
+
}> & Record<'getWithAuthList(address[])(uint64,uint64)[]' | 'getWithAuthList', {
|
|
239
|
+
argsObj: EscregArgs['obj']['getWithAuthList(address[])(uint64,uint64)[]'];
|
|
240
|
+
argsTuple: EscregArgs['tuple']['getWithAuthList(address[])(uint64,uint64)[]'];
|
|
241
|
+
/**
|
|
242
|
+
* Array of [app ID for the given address, app ID for the auth address] for each input address, or 0 for each if not registered
|
|
243
|
+
*/
|
|
244
|
+
returns: EscregReturns['getWithAuthList(address[])(uint64,uint64)[]'];
|
|
245
|
+
}> & Record<'getList(address[])uint64[]' | 'getList', {
|
|
246
|
+
argsObj: EscregArgs['obj']['getList(address[])uint64[]'];
|
|
247
|
+
argsTuple: EscregArgs['tuple']['getList(address[])uint64[]'];
|
|
248
|
+
/**
|
|
249
|
+
* Array of app IDs for each input address, or 0 if not registered
|
|
250
|
+
*/
|
|
251
|
+
returns: EscregReturns['getList(address[])uint64[]'];
|
|
252
|
+
}> & Record<'mustGetList(address[])uint64[]' | 'mustGetList', {
|
|
253
|
+
argsObj: EscregArgs['obj']['mustGetList(address[])uint64[]'];
|
|
254
|
+
argsTuple: EscregArgs['tuple']['mustGetList(address[])uint64[]'];
|
|
255
|
+
/**
|
|
256
|
+
* Array of app IDs for each input address
|
|
257
|
+
*/
|
|
258
|
+
returns: EscregReturns['mustGetList(address[])uint64[]'];
|
|
259
|
+
}> & Record<'increaseBudget(uint64)void' | 'increaseBudget', {
|
|
260
|
+
argsObj: EscregArgs['obj']['increaseBudget(uint64)void'];
|
|
261
|
+
argsTuple: EscregArgs['tuple']['increaseBudget(uint64)void'];
|
|
262
|
+
returns: EscregReturns['increaseBudget(uint64)void'];
|
|
263
|
+
}> & Record<'depositCredits(address,pay)void' | 'depositCredits', {
|
|
264
|
+
argsObj: EscregArgs['obj']['depositCredits(address,pay)void'];
|
|
265
|
+
argsTuple: EscregArgs['tuple']['depositCredits(address,pay)void'];
|
|
266
|
+
returns: EscregReturns['depositCredits(address,pay)void'];
|
|
267
|
+
}> & Record<'withdrawCredits()void' | 'withdrawCredits', {
|
|
268
|
+
argsObj: EscregArgs['obj']['withdrawCredits()void'];
|
|
269
|
+
argsTuple: EscregArgs['tuple']['withdrawCredits()void'];
|
|
270
|
+
returns: EscregReturns['withdrawCredits()void'];
|
|
271
|
+
}>;
|
|
272
|
+
/**
|
|
273
|
+
* Defines the shape of the state of the application.
|
|
274
|
+
*/
|
|
275
|
+
state: {
|
|
276
|
+
global: {
|
|
277
|
+
keys: {
|
|
278
|
+
/**
|
|
279
|
+
* Contract admin
|
|
280
|
+
*/
|
|
281
|
+
admin: string;
|
|
282
|
+
/**
|
|
283
|
+
* Counter for the number of registered applications
|
|
284
|
+
*/
|
|
285
|
+
counter: bigint;
|
|
286
|
+
};
|
|
287
|
+
maps: {};
|
|
288
|
+
};
|
|
289
|
+
box: {
|
|
290
|
+
keys: {};
|
|
291
|
+
maps: {
|
|
292
|
+
/**
|
|
293
|
+
* BoxMap from 4-byte prefix of escrow to app IDs
|
|
294
|
+
*/
|
|
295
|
+
apps: Map<Uint8Array | string, bigint[]>;
|
|
296
|
+
userCredits: Map<string, bigint>;
|
|
297
|
+
};
|
|
298
|
+
};
|
|
299
|
+
};
|
|
300
|
+
};
|
|
301
|
+
/**
|
|
302
|
+
* Defines the possible abi call signatures.
|
|
303
|
+
*/
|
|
304
|
+
export type EscregSignatures = keyof EscregTypes['methods'];
|
|
305
|
+
/**
|
|
306
|
+
* Defines the possible abi call signatures for methods that return a non-void value.
|
|
307
|
+
*/
|
|
308
|
+
export type EscregNonVoidMethodSignatures = keyof EscregTypes['methods'] extends infer T ? T extends keyof EscregTypes['methods'] ? MethodReturn<T> extends void ? never : T : never : never;
|
|
309
|
+
/**
|
|
310
|
+
* Defines an object containing all relevant parameters for a single call to the contract.
|
|
311
|
+
*/
|
|
312
|
+
export type CallParams<TArgs> = Expand<Omit<AppClientMethodCallParams, 'method' | 'args' | 'onComplete'> & {
|
|
313
|
+
/** The args for the ABI method call, either as an ordered array or an object */
|
|
314
|
+
args: Expand<TArgs>;
|
|
315
|
+
}>;
|
|
316
|
+
/**
|
|
317
|
+
* Maps a method signature from the Escreg smart contract to the method's arguments in either tuple or struct form
|
|
318
|
+
*/
|
|
319
|
+
export type MethodArgs<TSignature extends EscregSignatures> = EscregTypes['methods'][TSignature]['argsObj' | 'argsTuple'];
|
|
320
|
+
/**
|
|
321
|
+
* Maps a method signature from the Escreg smart contract to the method's return type
|
|
322
|
+
*/
|
|
323
|
+
export type MethodReturn<TSignature extends EscregSignatures> = EscregTypes['methods'][TSignature]['returns'];
|
|
324
|
+
/**
|
|
325
|
+
* Defines the shape of the keyed global state of the application.
|
|
326
|
+
*/
|
|
327
|
+
export type GlobalKeysState = EscregTypes['state']['global']['keys'];
|
|
328
|
+
/**
|
|
329
|
+
* Defines the shape of the keyed box state of the application.
|
|
330
|
+
*/
|
|
331
|
+
export type BoxKeysState = EscregTypes['state']['box']['keys'];
|
|
332
|
+
/**
|
|
333
|
+
* Exposes methods for constructing `AppClient` params objects for ABI calls to the Escreg smart contract
|
|
334
|
+
*/
|
|
335
|
+
export declare abstract class EscregParamsFactory {
|
|
336
|
+
/**
|
|
337
|
+
* Constructs a no op call for the withdraw(uint64)void ABI method
|
|
338
|
+
*
|
|
339
|
+
* Withdraw funds from the contract to the admin.
|
|
340
|
+
*
|
|
341
|
+
* @param params Parameters for the call
|
|
342
|
+
* @returns An `AppClientMethodCallParams` object for the call
|
|
343
|
+
*/
|
|
344
|
+
static withdraw(params: CallParams<EscregArgs['obj']['withdraw(uint64)void'] | EscregArgs['tuple']['withdraw(uint64)void']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete;
|
|
345
|
+
/**
|
|
346
|
+
* Constructs a no op call for the deleteBoxes(byte[4][])void ABI method
|
|
347
|
+
*
|
|
348
|
+
* Delete app registry boxes by their keys.
|
|
349
|
+
*
|
|
350
|
+
* @param params Parameters for the call
|
|
351
|
+
* @returns An `AppClientMethodCallParams` object for the call
|
|
352
|
+
*/
|
|
353
|
+
static deleteBoxes(params: CallParams<EscregArgs['obj']['deleteBoxes(byte[4][])void'] | EscregArgs['tuple']['deleteBoxes(byte[4][])void']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete;
|
|
354
|
+
/**
|
|
355
|
+
* Constructs a no op call for the register(uint64)void ABI method
|
|
356
|
+
*
|
|
357
|
+
* Register a single application escrow account
|
|
358
|
+
*
|
|
359
|
+
* @param params Parameters for the call
|
|
360
|
+
* @returns An `AppClientMethodCallParams` object for the call
|
|
361
|
+
*/
|
|
362
|
+
static register(params: CallParams<EscregArgs['obj']['register(uint64)void'] | EscregArgs['tuple']['register(uint64)void']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete;
|
|
363
|
+
/**
|
|
364
|
+
* Constructs a no op call for the registerList(uint64[])void ABI method
|
|
365
|
+
*
|
|
366
|
+
* Register multiple application escrow accounts in a single transaction. This is more efficient than calling register multiple times as the MBR cost can be paid for in a single payment and the app IDs can be stored more efficiently in the contract state.
|
|
367
|
+
*
|
|
368
|
+
* @param params Parameters for the call
|
|
369
|
+
* @returns An `AppClientMethodCallParams` object for the call
|
|
370
|
+
*/
|
|
371
|
+
static registerList(params: CallParams<EscregArgs['obj']['registerList(uint64[])void'] | EscregArgs['tuple']['registerList(uint64[])void']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete;
|
|
372
|
+
/**
|
|
373
|
+
* Constructs a no op call for the exists(address)bool ABI method
|
|
374
|
+
*
|
|
375
|
+
* Return true if an app escrow account exists for the given address, false otherwise.
|
|
376
|
+
*
|
|
377
|
+
* @param params Parameters for the call
|
|
378
|
+
* @returns An `AppClientMethodCallParams` object for the call
|
|
379
|
+
*/
|
|
380
|
+
static exists(params: CallParams<EscregArgs['obj']['exists(address)bool'] | EscregArgs['tuple']['exists(address)bool']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete;
|
|
381
|
+
/**
|
|
382
|
+
* Constructs a no op call for the get(address)uint64 ABI method
|
|
383
|
+
*
|
|
384
|
+
* Get the app ID for the given app escrow address. Returns 0 if the app escrow is not registered in the contract.
|
|
385
|
+
*
|
|
386
|
+
* @param params Parameters for the call
|
|
387
|
+
* @returns An `AppClientMethodCallParams` object for the call
|
|
388
|
+
*/
|
|
389
|
+
static get(params: CallParams<EscregArgs['obj']['get(address)uint64'] | EscregArgs['tuple']['get(address)uint64']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete;
|
|
390
|
+
/**
|
|
391
|
+
* Constructs a no op call for the mustGet(address)uint64 ABI method
|
|
392
|
+
*
|
|
393
|
+
* Get the app ID for the given app escrow address. Throws an error if the app escrow is not registered in the contract.
|
|
394
|
+
*
|
|
395
|
+
* @param params Parameters for the call
|
|
396
|
+
* @returns An `AppClientMethodCallParams` object for the call
|
|
397
|
+
*/
|
|
398
|
+
static mustGet(params: CallParams<EscregArgs['obj']['mustGet(address)uint64'] | EscregArgs['tuple']['mustGet(address)uint64']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete;
|
|
399
|
+
/**
|
|
400
|
+
* Constructs a no op call for the getWithAuth(address)(uint64,uint64) ABI method
|
|
401
|
+
*
|
|
402
|
+
* Get the app ID for the given app escrow address and its auth address. Returns 0 for each if not registered in the contract.
|
|
403
|
+
*
|
|
404
|
+
* @param params Parameters for the call
|
|
405
|
+
* @returns An `AppClientMethodCallParams` object for the call
|
|
406
|
+
*/
|
|
407
|
+
static getWithAuth(params: CallParams<EscregArgs['obj']['getWithAuth(address)(uint64,uint64)'] | EscregArgs['tuple']['getWithAuth(address)(uint64,uint64)']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete;
|
|
408
|
+
/**
|
|
409
|
+
* Constructs a no op call for the getWithAuthList(address[])(uint64,uint64)[] ABI method
|
|
410
|
+
*
|
|
411
|
+
* Get the app ID for multiple app escrow addresses and their auth addresses. Returns 0 for each if not registered in the contract.
|
|
412
|
+
*
|
|
413
|
+
* @param params Parameters for the call
|
|
414
|
+
* @returns An `AppClientMethodCallParams` object for the call
|
|
415
|
+
*/
|
|
416
|
+
static getWithAuthList(params: CallParams<EscregArgs['obj']['getWithAuthList(address[])(uint64,uint64)[]'] | EscregArgs['tuple']['getWithAuthList(address[])(uint64,uint64)[]']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete;
|
|
417
|
+
/**
|
|
418
|
+
* Constructs a no op call for the getList(address[])uint64[] ABI method
|
|
419
|
+
*
|
|
420
|
+
* Get the app IDs for multiple app escrow addresses. Returns 0 for each if not registered in the contract.
|
|
421
|
+
*
|
|
422
|
+
* @param params Parameters for the call
|
|
423
|
+
* @returns An `AppClientMethodCallParams` object for the call
|
|
424
|
+
*/
|
|
425
|
+
static getList(params: CallParams<EscregArgs['obj']['getList(address[])uint64[]'] | EscregArgs['tuple']['getList(address[])uint64[]']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete;
|
|
426
|
+
/**
|
|
427
|
+
* Constructs a no op call for the mustGetList(address[])uint64[] ABI method
|
|
428
|
+
*
|
|
429
|
+
* Get the app IDs for multiple app escrow addresses. Throws an error if any of the app escrows are not registered in the contract.
|
|
430
|
+
*
|
|
431
|
+
* @param params Parameters for the call
|
|
432
|
+
* @returns An `AppClientMethodCallParams` object for the call
|
|
433
|
+
*/
|
|
434
|
+
static mustGetList(params: CallParams<EscregArgs['obj']['mustGetList(address[])uint64[]'] | EscregArgs['tuple']['mustGetList(address[])uint64[]']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete;
|
|
435
|
+
/**
|
|
436
|
+
* Constructs a no op call for the increaseBudget(uint64)void ABI method
|
|
437
|
+
*
|
|
438
|
+
* Utility for explicitly increasing the budget of a transaction group by performing no-op inner transactions.
|
|
439
|
+
*
|
|
440
|
+
* @param params Parameters for the call
|
|
441
|
+
* @returns An `AppClientMethodCallParams` object for the call
|
|
442
|
+
*/
|
|
443
|
+
static increaseBudget(params: CallParams<EscregArgs['obj']['increaseBudget(uint64)void'] | EscregArgs['tuple']['increaseBudget(uint64)void']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete;
|
|
444
|
+
/**
|
|
445
|
+
* Constructs a no op call for the depositCredits(address,pay)void ABI method
|
|
446
|
+
*
|
|
447
|
+
* public method to deposit MBR credits for an account
|
|
448
|
+
*
|
|
449
|
+
* @param params Parameters for the call
|
|
450
|
+
* @returns An `AppClientMethodCallParams` object for the call
|
|
451
|
+
*/
|
|
452
|
+
static depositCredits(params: CallParams<EscregArgs['obj']['depositCredits(address,pay)void'] | EscregArgs['tuple']['depositCredits(address,pay)void']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete;
|
|
453
|
+
/**
|
|
454
|
+
* Constructs a no op call for the withdrawCredits()void ABI method
|
|
455
|
+
*
|
|
456
|
+
* Withdraw all remaining MBR credits for sender. This will delete the user credit box, so all credits are withdrawn including the MBR locked for the box itself.
|
|
457
|
+
*
|
|
458
|
+
* @param params Parameters for the call
|
|
459
|
+
* @returns An `AppClientMethodCallParams` object for the call
|
|
460
|
+
*/
|
|
461
|
+
static withdrawCredits(params: CallParams<EscregArgs['obj']['withdrawCredits()void'] | EscregArgs['tuple']['withdrawCredits()void']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete;
|
|
462
|
+
}
|
|
463
|
+
/**
|
|
464
|
+
* A client to make calls to the Escreg smart contract
|
|
465
|
+
*/
|
|
466
|
+
export declare class EscregClient {
|
|
467
|
+
/**
|
|
468
|
+
* The underlying `AppClient` for when you want to have more flexibility
|
|
469
|
+
*/
|
|
470
|
+
readonly appClient: _AppClient;
|
|
471
|
+
/**
|
|
472
|
+
* Creates a new instance of `EscregClient`
|
|
473
|
+
*
|
|
474
|
+
* @param appClient An `AppClient` instance which has been created with the Escreg app spec
|
|
475
|
+
*/
|
|
476
|
+
constructor(appClient: _AppClient);
|
|
477
|
+
/**
|
|
478
|
+
* Creates a new instance of `EscregClient`
|
|
479
|
+
*
|
|
480
|
+
* @param params The parameters to initialise the app client with
|
|
481
|
+
*/
|
|
482
|
+
constructor(params: Omit<AppClientParams, 'appSpec'>);
|
|
483
|
+
/**
|
|
484
|
+
* Checks for decode errors on the given return value and maps the return value to the return type for the given method
|
|
485
|
+
* @returns The typed return value or undefined if there was no value
|
|
486
|
+
*/
|
|
487
|
+
decodeReturnValue<TSignature extends EscregNonVoidMethodSignatures>(method: TSignature, returnValue: ABIReturn | undefined): MethodReturn<TSignature> | undefined;
|
|
488
|
+
/**
|
|
489
|
+
* Returns a new `EscregClient` client, resolving the app by creator address and name
|
|
490
|
+
* using AlgoKit app deployment semantics (i.e. looking for the app creation transaction note).
|
|
491
|
+
* @param params The parameters to create the app client
|
|
492
|
+
*/
|
|
493
|
+
static fromCreatorAndName(params: Omit<ResolveAppClientByCreatorAndName, 'appSpec'>): Promise<EscregClient>;
|
|
494
|
+
/**
|
|
495
|
+
* Returns an `EscregClient` instance for the current network based on
|
|
496
|
+
* pre-determined network-specific app IDs specified in the ARC-56 app spec.
|
|
497
|
+
*
|
|
498
|
+
* If no IDs are in the app spec or the network isn't recognised, an error is thrown.
|
|
499
|
+
* @param params The parameters to create the app client
|
|
500
|
+
*/
|
|
501
|
+
static fromNetwork(params: Omit<ResolveAppClientByNetwork, 'appSpec'>): Promise<EscregClient>;
|
|
502
|
+
/** The ID of the app instance this client is linked to. */
|
|
503
|
+
get appId(): bigint;
|
|
504
|
+
/** The app address of the app instance this client is linked to. */
|
|
505
|
+
get appAddress(): Address;
|
|
506
|
+
/** The name of the app. */
|
|
507
|
+
get appName(): string;
|
|
508
|
+
/** The ARC-56 app spec being used */
|
|
509
|
+
get appSpec(): Arc56Contract;
|
|
510
|
+
/** A reference to the underlying `AlgorandClient` this app client is using. */
|
|
511
|
+
get algorand(): AlgorandClient;
|
|
512
|
+
/**
|
|
513
|
+
* Get parameters to create transactions for the current app. A good mental model for this is that these parameters represent a deferred transaction creation.
|
|
514
|
+
*/
|
|
515
|
+
readonly params: {
|
|
516
|
+
/**
|
|
517
|
+
* Makes a clear_state call to an existing instance of the Escreg smart contract.
|
|
518
|
+
*
|
|
519
|
+
* @param params The params for the bare (raw) call
|
|
520
|
+
* @returns The clearState result
|
|
521
|
+
*/
|
|
522
|
+
clearState: (params?: Expand<AppClientBareCallParams>) => import("@algorandfoundation/algokit-utils/types/composer").AppCallParams;
|
|
523
|
+
/**
|
|
524
|
+
* Makes a call to the Escreg smart contract using the `withdraw(uint64)void` ABI method.
|
|
525
|
+
*
|
|
526
|
+
* Withdraw funds from the contract to the admin.
|
|
527
|
+
*
|
|
528
|
+
* @param params The params for the smart contract call
|
|
529
|
+
* @returns The call params
|
|
530
|
+
*/
|
|
531
|
+
withdraw: (params: CallParams<EscregArgs["obj"]["withdraw(uint64)void"] | EscregArgs["tuple"]["withdraw(uint64)void"]> & {
|
|
532
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
533
|
+
}) => Promise<AppCallMethodCall>;
|
|
534
|
+
/**
|
|
535
|
+
* Makes a call to the Escreg smart contract using the `deleteBoxes(byte[4][])void` ABI method.
|
|
536
|
+
*
|
|
537
|
+
* Delete app registry boxes by their keys.
|
|
538
|
+
*
|
|
539
|
+
* @param params The params for the smart contract call
|
|
540
|
+
* @returns The call params
|
|
541
|
+
*/
|
|
542
|
+
deleteBoxes: (params: CallParams<EscregArgs["obj"]["deleteBoxes(byte[4][])void"] | EscregArgs["tuple"]["deleteBoxes(byte[4][])void"]> & {
|
|
543
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
544
|
+
}) => Promise<AppCallMethodCall>;
|
|
545
|
+
/**
|
|
546
|
+
* Makes a call to the Escreg smart contract using the `register(uint64)void` ABI method.
|
|
547
|
+
*
|
|
548
|
+
* Register a single application escrow account
|
|
549
|
+
*
|
|
550
|
+
* @param params The params for the smart contract call
|
|
551
|
+
* @returns The call params
|
|
552
|
+
*/
|
|
553
|
+
register: (params: CallParams<EscregArgs["obj"]["register(uint64)void"] | EscregArgs["tuple"]["register(uint64)void"]> & {
|
|
554
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
555
|
+
}) => Promise<AppCallMethodCall>;
|
|
556
|
+
/**
|
|
557
|
+
* Makes a call to the Escreg smart contract using the `registerList(uint64[])void` ABI method.
|
|
558
|
+
*
|
|
559
|
+
* Register multiple application escrow accounts in a single transaction. This is more efficient than calling register multiple times as the MBR cost can be paid for in a single payment and the app IDs can be stored more efficiently in the contract state.
|
|
560
|
+
*
|
|
561
|
+
* @param params The params for the smart contract call
|
|
562
|
+
* @returns The call params
|
|
563
|
+
*/
|
|
564
|
+
registerList: (params: CallParams<EscregArgs["obj"]["registerList(uint64[])void"] | EscregArgs["tuple"]["registerList(uint64[])void"]> & {
|
|
565
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
566
|
+
}) => Promise<AppCallMethodCall>;
|
|
567
|
+
/**
|
|
568
|
+
* Makes a call to the Escreg smart contract using the `exists(address)bool` ABI method.
|
|
569
|
+
*
|
|
570
|
+
* This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.
|
|
571
|
+
*
|
|
572
|
+
* Return true if an app escrow account exists for the given address, false otherwise.
|
|
573
|
+
*
|
|
574
|
+
* @param params The params for the smart contract call
|
|
575
|
+
* @returns The call params: boolean indicating whether the given address is registered in the contract
|
|
576
|
+
*/
|
|
577
|
+
exists: (params: CallParams<EscregArgs["obj"]["exists(address)bool"] | EscregArgs["tuple"]["exists(address)bool"]> & {
|
|
578
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
579
|
+
}) => Promise<AppCallMethodCall>;
|
|
580
|
+
/**
|
|
581
|
+
* Makes a call to the Escreg smart contract using the `get(address)uint64` ABI method.
|
|
582
|
+
*
|
|
583
|
+
* This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.
|
|
584
|
+
*
|
|
585
|
+
* Get the app ID for the given app escrow address. Returns 0 if the app escrow is not registered in the contract.
|
|
586
|
+
*
|
|
587
|
+
* @param params The params for the smart contract call
|
|
588
|
+
* @returns The call params: App ID for the given address, or 0 if not registered
|
|
589
|
+
*/
|
|
590
|
+
get: (params: CallParams<EscregArgs["obj"]["get(address)uint64"] | EscregArgs["tuple"]["get(address)uint64"]> & {
|
|
591
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
592
|
+
}) => Promise<AppCallMethodCall>;
|
|
593
|
+
/**
|
|
594
|
+
* Makes a call to the Escreg smart contract using the `mustGet(address)uint64` ABI method.
|
|
595
|
+
*
|
|
596
|
+
* This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.
|
|
597
|
+
*
|
|
598
|
+
* Get the app ID for the given app escrow address. Throws an error if the app escrow is not registered in the contract.
|
|
599
|
+
*
|
|
600
|
+
* @param params The params for the smart contract call
|
|
601
|
+
* @returns The call params: App ID for the given address
|
|
602
|
+
*/
|
|
603
|
+
mustGet: (params: CallParams<EscregArgs["obj"]["mustGet(address)uint64"] | EscregArgs["tuple"]["mustGet(address)uint64"]> & {
|
|
604
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
605
|
+
}) => Promise<AppCallMethodCall>;
|
|
606
|
+
/**
|
|
607
|
+
* Makes a call to the Escreg smart contract using the `getWithAuth(address)(uint64,uint64)` ABI method.
|
|
608
|
+
*
|
|
609
|
+
* This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.
|
|
610
|
+
*
|
|
611
|
+
* Get the app ID for the given app escrow address and its auth address. Returns 0 for each if not registered in the contract.
|
|
612
|
+
*
|
|
613
|
+
* @param params The params for the smart contract call
|
|
614
|
+
* @returns The call params: [app ID for the given address, app ID for the auth address], or 0 for each if not registered
|
|
615
|
+
*/
|
|
616
|
+
getWithAuth: (params: CallParams<EscregArgs["obj"]["getWithAuth(address)(uint64,uint64)"] | EscregArgs["tuple"]["getWithAuth(address)(uint64,uint64)"]> & {
|
|
617
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
618
|
+
}) => Promise<AppCallMethodCall>;
|
|
619
|
+
/**
|
|
620
|
+
* Makes a call to the Escreg smart contract using the `getWithAuthList(address[])(uint64,uint64)[]` ABI method.
|
|
621
|
+
*
|
|
622
|
+
* This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.
|
|
623
|
+
*
|
|
624
|
+
* Get the app ID for multiple app escrow addresses and their auth addresses. Returns 0 for each if not registered in the contract.
|
|
625
|
+
*
|
|
626
|
+
* @param params The params for the smart contract call
|
|
627
|
+
* @returns The call params: Array of [app ID for the given address, app ID for the auth address] for each input address, or 0 for each if not registered
|
|
628
|
+
*/
|
|
629
|
+
getWithAuthList: (params: CallParams<EscregArgs["obj"]["getWithAuthList(address[])(uint64,uint64)[]"] | EscregArgs["tuple"]["getWithAuthList(address[])(uint64,uint64)[]"]> & {
|
|
630
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
631
|
+
}) => Promise<AppCallMethodCall>;
|
|
632
|
+
/**
|
|
633
|
+
* Makes a call to the Escreg smart contract using the `getList(address[])uint64[]` ABI method.
|
|
634
|
+
*
|
|
635
|
+
* This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.
|
|
636
|
+
*
|
|
637
|
+
* Get the app IDs for multiple app escrow addresses. Returns 0 for each if not registered in the contract.
|
|
638
|
+
*
|
|
639
|
+
* @param params The params for the smart contract call
|
|
640
|
+
* @returns The call params: Array of app IDs for each input address, or 0 if not registered
|
|
641
|
+
*/
|
|
642
|
+
getList: (params: CallParams<EscregArgs["obj"]["getList(address[])uint64[]"] | EscregArgs["tuple"]["getList(address[])uint64[]"]> & {
|
|
643
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
644
|
+
}) => Promise<AppCallMethodCall>;
|
|
645
|
+
/**
|
|
646
|
+
* Makes a call to the Escreg smart contract using the `mustGetList(address[])uint64[]` ABI method.
|
|
647
|
+
*
|
|
648
|
+
* This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.
|
|
649
|
+
*
|
|
650
|
+
* Get the app IDs for multiple app escrow addresses. Throws an error if any of the app escrows are not registered in the contract.
|
|
651
|
+
*
|
|
652
|
+
* @param params The params for the smart contract call
|
|
653
|
+
* @returns The call params: Array of app IDs for each input address
|
|
654
|
+
*/
|
|
655
|
+
mustGetList: (params: CallParams<EscregArgs["obj"]["mustGetList(address[])uint64[]"] | EscregArgs["tuple"]["mustGetList(address[])uint64[]"]> & {
|
|
656
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
657
|
+
}) => Promise<AppCallMethodCall>;
|
|
658
|
+
/**
|
|
659
|
+
* Makes a call to the Escreg smart contract using the `increaseBudget(uint64)void` ABI method.
|
|
660
|
+
*
|
|
661
|
+
* Utility for explicitly increasing the budget of a transaction group by performing no-op inner transactions.
|
|
662
|
+
*
|
|
663
|
+
* @param params The params for the smart contract call
|
|
664
|
+
* @returns The call params
|
|
665
|
+
*/
|
|
666
|
+
increaseBudget: (params: CallParams<EscregArgs["obj"]["increaseBudget(uint64)void"] | EscregArgs["tuple"]["increaseBudget(uint64)void"]> & {
|
|
667
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
668
|
+
}) => Promise<AppCallMethodCall>;
|
|
669
|
+
/**
|
|
670
|
+
* Makes a call to the Escreg smart contract using the `depositCredits(address,pay)void` ABI method.
|
|
671
|
+
*
|
|
672
|
+
* public method to deposit MBR credits for an account
|
|
673
|
+
*
|
|
674
|
+
* @param params The params for the smart contract call
|
|
675
|
+
* @returns The call params
|
|
676
|
+
*/
|
|
677
|
+
depositCredits: (params: CallParams<EscregArgs["obj"]["depositCredits(address,pay)void"] | EscregArgs["tuple"]["depositCredits(address,pay)void"]> & {
|
|
678
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
679
|
+
}) => Promise<AppCallMethodCall>;
|
|
680
|
+
/**
|
|
681
|
+
* Makes a call to the Escreg smart contract using the `withdrawCredits()void` ABI method.
|
|
682
|
+
*
|
|
683
|
+
* Withdraw all remaining MBR credits for sender. This will delete the user credit box, so all credits are withdrawn including the MBR locked for the box itself.
|
|
684
|
+
*
|
|
685
|
+
* @param params The params for the smart contract call
|
|
686
|
+
* @returns The call params
|
|
687
|
+
*/
|
|
688
|
+
withdrawCredits: (params?: CallParams<EscregArgs["obj"]["withdrawCredits()void"] | EscregArgs["tuple"]["withdrawCredits()void"]> & {
|
|
689
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
690
|
+
}) => Promise<AppCallMethodCall>;
|
|
691
|
+
};
|
|
692
|
+
/**
|
|
693
|
+
* Create transactions for the current app
|
|
694
|
+
*/
|
|
695
|
+
readonly createTransaction: {
|
|
696
|
+
/**
|
|
697
|
+
* Makes a clear_state call to an existing instance of the Escreg smart contract.
|
|
698
|
+
*
|
|
699
|
+
* @param params The params for the bare (raw) call
|
|
700
|
+
* @returns The clearState result
|
|
701
|
+
*/
|
|
702
|
+
clearState: (params?: Expand<AppClientBareCallParams>) => Promise<Transaction>;
|
|
703
|
+
/**
|
|
704
|
+
* Makes a call to the Escreg smart contract using the `withdraw(uint64)void` ABI method.
|
|
705
|
+
*
|
|
706
|
+
* Withdraw funds from the contract to the admin.
|
|
707
|
+
*
|
|
708
|
+
* @param params The params for the smart contract call
|
|
709
|
+
* @returns The call transaction
|
|
710
|
+
*/
|
|
711
|
+
withdraw: (params: CallParams<EscregArgs["obj"]["withdraw(uint64)void"] | EscregArgs["tuple"]["withdraw(uint64)void"]> & {
|
|
712
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
713
|
+
}) => Promise<{
|
|
714
|
+
transactions: Transaction[];
|
|
715
|
+
methodCalls: Map<number, import("algosdk").ABIMethod>;
|
|
716
|
+
signers: Map<number, TransactionSigner>;
|
|
717
|
+
}>;
|
|
718
|
+
/**
|
|
719
|
+
* Makes a call to the Escreg smart contract using the `deleteBoxes(byte[4][])void` ABI method.
|
|
720
|
+
*
|
|
721
|
+
* Delete app registry boxes by their keys.
|
|
722
|
+
*
|
|
723
|
+
* @param params The params for the smart contract call
|
|
724
|
+
* @returns The call transaction
|
|
725
|
+
*/
|
|
726
|
+
deleteBoxes: (params: CallParams<EscregArgs["obj"]["deleteBoxes(byte[4][])void"] | EscregArgs["tuple"]["deleteBoxes(byte[4][])void"]> & {
|
|
727
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
728
|
+
}) => Promise<{
|
|
729
|
+
transactions: Transaction[];
|
|
730
|
+
methodCalls: Map<number, import("algosdk").ABIMethod>;
|
|
731
|
+
signers: Map<number, TransactionSigner>;
|
|
732
|
+
}>;
|
|
733
|
+
/**
|
|
734
|
+
* Makes a call to the Escreg smart contract using the `register(uint64)void` ABI method.
|
|
735
|
+
*
|
|
736
|
+
* Register a single application escrow account
|
|
737
|
+
*
|
|
738
|
+
* @param params The params for the smart contract call
|
|
739
|
+
* @returns The call transaction
|
|
740
|
+
*/
|
|
741
|
+
register: (params: CallParams<EscregArgs["obj"]["register(uint64)void"] | EscregArgs["tuple"]["register(uint64)void"]> & {
|
|
742
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
743
|
+
}) => Promise<{
|
|
744
|
+
transactions: Transaction[];
|
|
745
|
+
methodCalls: Map<number, import("algosdk").ABIMethod>;
|
|
746
|
+
signers: Map<number, TransactionSigner>;
|
|
747
|
+
}>;
|
|
748
|
+
/**
|
|
749
|
+
* Makes a call to the Escreg smart contract using the `registerList(uint64[])void` ABI method.
|
|
750
|
+
*
|
|
751
|
+
* Register multiple application escrow accounts in a single transaction. This is more efficient than calling register multiple times as the MBR cost can be paid for in a single payment and the app IDs can be stored more efficiently in the contract state.
|
|
752
|
+
*
|
|
753
|
+
* @param params The params for the smart contract call
|
|
754
|
+
* @returns The call transaction
|
|
755
|
+
*/
|
|
756
|
+
registerList: (params: CallParams<EscregArgs["obj"]["registerList(uint64[])void"] | EscregArgs["tuple"]["registerList(uint64[])void"]> & {
|
|
757
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
758
|
+
}) => Promise<{
|
|
759
|
+
transactions: Transaction[];
|
|
760
|
+
methodCalls: Map<number, import("algosdk").ABIMethod>;
|
|
761
|
+
signers: Map<number, TransactionSigner>;
|
|
762
|
+
}>;
|
|
763
|
+
/**
|
|
764
|
+
* Makes a call to the Escreg smart contract using the `exists(address)bool` ABI method.
|
|
765
|
+
*
|
|
766
|
+
* This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.
|
|
767
|
+
*
|
|
768
|
+
* Return true if an app escrow account exists for the given address, false otherwise.
|
|
769
|
+
*
|
|
770
|
+
* @param params The params for the smart contract call
|
|
771
|
+
* @returns The call transaction: boolean indicating whether the given address is registered in the contract
|
|
772
|
+
*/
|
|
773
|
+
exists: (params: CallParams<EscregArgs["obj"]["exists(address)bool"] | EscregArgs["tuple"]["exists(address)bool"]> & {
|
|
774
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
775
|
+
}) => Promise<{
|
|
776
|
+
transactions: Transaction[];
|
|
777
|
+
methodCalls: Map<number, import("algosdk").ABIMethod>;
|
|
778
|
+
signers: Map<number, TransactionSigner>;
|
|
779
|
+
}>;
|
|
780
|
+
/**
|
|
781
|
+
* Makes a call to the Escreg smart contract using the `get(address)uint64` ABI method.
|
|
782
|
+
*
|
|
783
|
+
* This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.
|
|
784
|
+
*
|
|
785
|
+
* Get the app ID for the given app escrow address. Returns 0 if the app escrow is not registered in the contract.
|
|
786
|
+
*
|
|
787
|
+
* @param params The params for the smart contract call
|
|
788
|
+
* @returns The call transaction: App ID for the given address, or 0 if not registered
|
|
789
|
+
*/
|
|
790
|
+
get: (params: CallParams<EscregArgs["obj"]["get(address)uint64"] | EscregArgs["tuple"]["get(address)uint64"]> & {
|
|
791
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
792
|
+
}) => Promise<{
|
|
793
|
+
transactions: Transaction[];
|
|
794
|
+
methodCalls: Map<number, import("algosdk").ABIMethod>;
|
|
795
|
+
signers: Map<number, TransactionSigner>;
|
|
796
|
+
}>;
|
|
797
|
+
/**
|
|
798
|
+
* Makes a call to the Escreg smart contract using the `mustGet(address)uint64` ABI method.
|
|
799
|
+
*
|
|
800
|
+
* This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.
|
|
801
|
+
*
|
|
802
|
+
* Get the app ID for the given app escrow address. Throws an error if the app escrow is not registered in the contract.
|
|
803
|
+
*
|
|
804
|
+
* @param params The params for the smart contract call
|
|
805
|
+
* @returns The call transaction: App ID for the given address
|
|
806
|
+
*/
|
|
807
|
+
mustGet: (params: CallParams<EscregArgs["obj"]["mustGet(address)uint64"] | EscregArgs["tuple"]["mustGet(address)uint64"]> & {
|
|
808
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
809
|
+
}) => Promise<{
|
|
810
|
+
transactions: Transaction[];
|
|
811
|
+
methodCalls: Map<number, import("algosdk").ABIMethod>;
|
|
812
|
+
signers: Map<number, TransactionSigner>;
|
|
813
|
+
}>;
|
|
814
|
+
/**
|
|
815
|
+
* Makes a call to the Escreg smart contract using the `getWithAuth(address)(uint64,uint64)` ABI method.
|
|
816
|
+
*
|
|
817
|
+
* This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.
|
|
818
|
+
*
|
|
819
|
+
* Get the app ID for the given app escrow address and its auth address. Returns 0 for each if not registered in the contract.
|
|
820
|
+
*
|
|
821
|
+
* @param params The params for the smart contract call
|
|
822
|
+
* @returns The call transaction: [app ID for the given address, app ID for the auth address], or 0 for each if not registered
|
|
823
|
+
*/
|
|
824
|
+
getWithAuth: (params: CallParams<EscregArgs["obj"]["getWithAuth(address)(uint64,uint64)"] | EscregArgs["tuple"]["getWithAuth(address)(uint64,uint64)"]> & {
|
|
825
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
826
|
+
}) => Promise<{
|
|
827
|
+
transactions: Transaction[];
|
|
828
|
+
methodCalls: Map<number, import("algosdk").ABIMethod>;
|
|
829
|
+
signers: Map<number, TransactionSigner>;
|
|
830
|
+
}>;
|
|
831
|
+
/**
|
|
832
|
+
* Makes a call to the Escreg smart contract using the `getWithAuthList(address[])(uint64,uint64)[]` ABI method.
|
|
833
|
+
*
|
|
834
|
+
* This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.
|
|
835
|
+
*
|
|
836
|
+
* Get the app ID for multiple app escrow addresses and their auth addresses. Returns 0 for each if not registered in the contract.
|
|
837
|
+
*
|
|
838
|
+
* @param params The params for the smart contract call
|
|
839
|
+
* @returns The call transaction: Array of [app ID for the given address, app ID for the auth address] for each input address, or 0 for each if not registered
|
|
840
|
+
*/
|
|
841
|
+
getWithAuthList: (params: CallParams<EscregArgs["obj"]["getWithAuthList(address[])(uint64,uint64)[]"] | EscregArgs["tuple"]["getWithAuthList(address[])(uint64,uint64)[]"]> & {
|
|
842
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
843
|
+
}) => Promise<{
|
|
844
|
+
transactions: Transaction[];
|
|
845
|
+
methodCalls: Map<number, import("algosdk").ABIMethod>;
|
|
846
|
+
signers: Map<number, TransactionSigner>;
|
|
847
|
+
}>;
|
|
848
|
+
/**
|
|
849
|
+
* Makes a call to the Escreg smart contract using the `getList(address[])uint64[]` ABI method.
|
|
850
|
+
*
|
|
851
|
+
* This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.
|
|
852
|
+
*
|
|
853
|
+
* Get the app IDs for multiple app escrow addresses. Returns 0 for each if not registered in the contract.
|
|
854
|
+
*
|
|
855
|
+
* @param params The params for the smart contract call
|
|
856
|
+
* @returns The call transaction: Array of app IDs for each input address, or 0 if not registered
|
|
857
|
+
*/
|
|
858
|
+
getList: (params: CallParams<EscregArgs["obj"]["getList(address[])uint64[]"] | EscregArgs["tuple"]["getList(address[])uint64[]"]> & {
|
|
859
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
860
|
+
}) => Promise<{
|
|
861
|
+
transactions: Transaction[];
|
|
862
|
+
methodCalls: Map<number, import("algosdk").ABIMethod>;
|
|
863
|
+
signers: Map<number, TransactionSigner>;
|
|
864
|
+
}>;
|
|
865
|
+
/**
|
|
866
|
+
* Makes a call to the Escreg smart contract using the `mustGetList(address[])uint64[]` ABI method.
|
|
867
|
+
*
|
|
868
|
+
* This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.
|
|
869
|
+
*
|
|
870
|
+
* Get the app IDs for multiple app escrow addresses. Throws an error if any of the app escrows are not registered in the contract.
|
|
871
|
+
*
|
|
872
|
+
* @param params The params for the smart contract call
|
|
873
|
+
* @returns The call transaction: Array of app IDs for each input address
|
|
874
|
+
*/
|
|
875
|
+
mustGetList: (params: CallParams<EscregArgs["obj"]["mustGetList(address[])uint64[]"] | EscregArgs["tuple"]["mustGetList(address[])uint64[]"]> & {
|
|
876
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
877
|
+
}) => Promise<{
|
|
878
|
+
transactions: Transaction[];
|
|
879
|
+
methodCalls: Map<number, import("algosdk").ABIMethod>;
|
|
880
|
+
signers: Map<number, TransactionSigner>;
|
|
881
|
+
}>;
|
|
882
|
+
/**
|
|
883
|
+
* Makes a call to the Escreg smart contract using the `increaseBudget(uint64)void` ABI method.
|
|
884
|
+
*
|
|
885
|
+
* Utility for explicitly increasing the budget of a transaction group by performing no-op inner transactions.
|
|
886
|
+
*
|
|
887
|
+
* @param params The params for the smart contract call
|
|
888
|
+
* @returns The call transaction
|
|
889
|
+
*/
|
|
890
|
+
increaseBudget: (params: CallParams<EscregArgs["obj"]["increaseBudget(uint64)void"] | EscregArgs["tuple"]["increaseBudget(uint64)void"]> & {
|
|
891
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
892
|
+
}) => Promise<{
|
|
893
|
+
transactions: Transaction[];
|
|
894
|
+
methodCalls: Map<number, import("algosdk").ABIMethod>;
|
|
895
|
+
signers: Map<number, TransactionSigner>;
|
|
896
|
+
}>;
|
|
897
|
+
/**
|
|
898
|
+
* Makes a call to the Escreg smart contract using the `depositCredits(address,pay)void` ABI method.
|
|
899
|
+
*
|
|
900
|
+
* public method to deposit MBR credits for an account
|
|
901
|
+
*
|
|
902
|
+
* @param params The params for the smart contract call
|
|
903
|
+
* @returns The call transaction
|
|
904
|
+
*/
|
|
905
|
+
depositCredits: (params: CallParams<EscregArgs["obj"]["depositCredits(address,pay)void"] | EscregArgs["tuple"]["depositCredits(address,pay)void"]> & {
|
|
906
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
907
|
+
}) => Promise<{
|
|
908
|
+
transactions: Transaction[];
|
|
909
|
+
methodCalls: Map<number, import("algosdk").ABIMethod>;
|
|
910
|
+
signers: Map<number, TransactionSigner>;
|
|
911
|
+
}>;
|
|
912
|
+
/**
|
|
913
|
+
* Makes a call to the Escreg smart contract using the `withdrawCredits()void` ABI method.
|
|
914
|
+
*
|
|
915
|
+
* Withdraw all remaining MBR credits for sender. This will delete the user credit box, so all credits are withdrawn including the MBR locked for the box itself.
|
|
916
|
+
*
|
|
917
|
+
* @param params The params for the smart contract call
|
|
918
|
+
* @returns The call transaction
|
|
919
|
+
*/
|
|
920
|
+
withdrawCredits: (params?: CallParams<EscregArgs["obj"]["withdrawCredits()void"] | EscregArgs["tuple"]["withdrawCredits()void"]> & {
|
|
921
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
922
|
+
}) => Promise<{
|
|
923
|
+
transactions: Transaction[];
|
|
924
|
+
methodCalls: Map<number, import("algosdk").ABIMethod>;
|
|
925
|
+
signers: Map<number, TransactionSigner>;
|
|
926
|
+
}>;
|
|
927
|
+
};
|
|
928
|
+
/**
|
|
929
|
+
* Send calls to the current app
|
|
930
|
+
*/
|
|
931
|
+
readonly send: {
|
|
932
|
+
/**
|
|
933
|
+
* Makes a clear_state call to an existing instance of the Escreg smart contract.
|
|
934
|
+
*
|
|
935
|
+
* @param params The params for the bare (raw) call
|
|
936
|
+
* @returns The clearState result
|
|
937
|
+
*/
|
|
938
|
+
clearState: (params?: Expand<AppClientBareCallParams & SendParams>) => Promise<{
|
|
939
|
+
groupId: string;
|
|
940
|
+
txIds: string[];
|
|
941
|
+
returns?: ABIReturn[] | undefined;
|
|
942
|
+
confirmations: modelsv2.PendingTransactionResponse[];
|
|
943
|
+
transactions: Transaction[];
|
|
944
|
+
confirmation: modelsv2.PendingTransactionResponse;
|
|
945
|
+
transaction: Transaction;
|
|
946
|
+
return?: ABIReturn | undefined;
|
|
947
|
+
}>;
|
|
948
|
+
/**
|
|
949
|
+
* Makes a call to the Escreg smart contract using the `withdraw(uint64)void` ABI method.
|
|
950
|
+
*
|
|
951
|
+
* Withdraw funds from the contract to the admin.
|
|
952
|
+
*
|
|
953
|
+
* @param params The params for the smart contract call
|
|
954
|
+
* @returns The call result
|
|
955
|
+
*/
|
|
956
|
+
withdraw: (params: CallParams<EscregArgs["obj"]["withdraw(uint64)void"] | EscregArgs["tuple"]["withdraw(uint64)void"]> & SendParams & {
|
|
957
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
958
|
+
}) => Promise<{
|
|
959
|
+
return: (undefined | EscregReturns["withdraw(uint64)void"]);
|
|
960
|
+
transactions: Transaction[];
|
|
961
|
+
transaction: Transaction;
|
|
962
|
+
groupId: string;
|
|
963
|
+
txIds: string[];
|
|
964
|
+
returns?: ABIReturn[] | undefined | undefined;
|
|
965
|
+
confirmations: modelsv2.PendingTransactionResponse[];
|
|
966
|
+
confirmation: modelsv2.PendingTransactionResponse;
|
|
967
|
+
}>;
|
|
968
|
+
/**
|
|
969
|
+
* Makes a call to the Escreg smart contract using the `deleteBoxes(byte[4][])void` ABI method.
|
|
970
|
+
*
|
|
971
|
+
* Delete app registry boxes by their keys.
|
|
972
|
+
*
|
|
973
|
+
* @param params The params for the smart contract call
|
|
974
|
+
* @returns The call result
|
|
975
|
+
*/
|
|
976
|
+
deleteBoxes: (params: CallParams<EscregArgs["obj"]["deleteBoxes(byte[4][])void"] | EscregArgs["tuple"]["deleteBoxes(byte[4][])void"]> & SendParams & {
|
|
977
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
978
|
+
}) => Promise<{
|
|
979
|
+
return: (undefined | EscregReturns["deleteBoxes(byte[4][])void"]);
|
|
980
|
+
transactions: Transaction[];
|
|
981
|
+
transaction: Transaction;
|
|
982
|
+
groupId: string;
|
|
983
|
+
txIds: string[];
|
|
984
|
+
returns?: ABIReturn[] | undefined | undefined;
|
|
985
|
+
confirmations: modelsv2.PendingTransactionResponse[];
|
|
986
|
+
confirmation: modelsv2.PendingTransactionResponse;
|
|
987
|
+
}>;
|
|
988
|
+
/**
|
|
989
|
+
* Makes a call to the Escreg smart contract using the `register(uint64)void` ABI method.
|
|
990
|
+
*
|
|
991
|
+
* Register a single application escrow account
|
|
992
|
+
*
|
|
993
|
+
* @param params The params for the smart contract call
|
|
994
|
+
* @returns The call result
|
|
995
|
+
*/
|
|
996
|
+
register: (params: CallParams<EscregArgs["obj"]["register(uint64)void"] | EscregArgs["tuple"]["register(uint64)void"]> & SendParams & {
|
|
997
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
998
|
+
}) => Promise<{
|
|
999
|
+
return: (undefined | EscregReturns["register(uint64)void"]);
|
|
1000
|
+
transactions: Transaction[];
|
|
1001
|
+
transaction: Transaction;
|
|
1002
|
+
groupId: string;
|
|
1003
|
+
txIds: string[];
|
|
1004
|
+
returns?: ABIReturn[] | undefined | undefined;
|
|
1005
|
+
confirmations: modelsv2.PendingTransactionResponse[];
|
|
1006
|
+
confirmation: modelsv2.PendingTransactionResponse;
|
|
1007
|
+
}>;
|
|
1008
|
+
/**
|
|
1009
|
+
* Makes a call to the Escreg smart contract using the `registerList(uint64[])void` ABI method.
|
|
1010
|
+
*
|
|
1011
|
+
* Register multiple application escrow accounts in a single transaction. This is more efficient than calling register multiple times as the MBR cost can be paid for in a single payment and the app IDs can be stored more efficiently in the contract state.
|
|
1012
|
+
*
|
|
1013
|
+
* @param params The params for the smart contract call
|
|
1014
|
+
* @returns The call result
|
|
1015
|
+
*/
|
|
1016
|
+
registerList: (params: CallParams<EscregArgs["obj"]["registerList(uint64[])void"] | EscregArgs["tuple"]["registerList(uint64[])void"]> & SendParams & {
|
|
1017
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1018
|
+
}) => Promise<{
|
|
1019
|
+
return: (undefined | EscregReturns["registerList(uint64[])void"]);
|
|
1020
|
+
transactions: Transaction[];
|
|
1021
|
+
transaction: Transaction;
|
|
1022
|
+
groupId: string;
|
|
1023
|
+
txIds: string[];
|
|
1024
|
+
returns?: ABIReturn[] | undefined | undefined;
|
|
1025
|
+
confirmations: modelsv2.PendingTransactionResponse[];
|
|
1026
|
+
confirmation: modelsv2.PendingTransactionResponse;
|
|
1027
|
+
}>;
|
|
1028
|
+
/**
|
|
1029
|
+
* Makes a call to the Escreg smart contract using the `exists(address)bool` ABI method.
|
|
1030
|
+
*
|
|
1031
|
+
* This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.
|
|
1032
|
+
*
|
|
1033
|
+
* Return true if an app escrow account exists for the given address, false otherwise.
|
|
1034
|
+
*
|
|
1035
|
+
* @param params The params for the smart contract call
|
|
1036
|
+
* @returns The call result: boolean indicating whether the given address is registered in the contract
|
|
1037
|
+
*/
|
|
1038
|
+
exists: (params: CallParams<EscregArgs["obj"]["exists(address)bool"] | EscregArgs["tuple"]["exists(address)bool"]> & SendParams & {
|
|
1039
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1040
|
+
}) => Promise<{
|
|
1041
|
+
return: (undefined | EscregReturns["exists(address)bool"]);
|
|
1042
|
+
transactions: Transaction[];
|
|
1043
|
+
transaction: Transaction;
|
|
1044
|
+
groupId: string;
|
|
1045
|
+
txIds: string[];
|
|
1046
|
+
returns?: ABIReturn[] | undefined | undefined;
|
|
1047
|
+
confirmations: modelsv2.PendingTransactionResponse[];
|
|
1048
|
+
confirmation: modelsv2.PendingTransactionResponse;
|
|
1049
|
+
}>;
|
|
1050
|
+
/**
|
|
1051
|
+
* Makes a call to the Escreg smart contract using the `get(address)uint64` ABI method.
|
|
1052
|
+
*
|
|
1053
|
+
* This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.
|
|
1054
|
+
*
|
|
1055
|
+
* Get the app ID for the given app escrow address. Returns 0 if the app escrow is not registered in the contract.
|
|
1056
|
+
*
|
|
1057
|
+
* @param params The params for the smart contract call
|
|
1058
|
+
* @returns The call result: App ID for the given address, or 0 if not registered
|
|
1059
|
+
*/
|
|
1060
|
+
get: (params: CallParams<EscregArgs["obj"]["get(address)uint64"] | EscregArgs["tuple"]["get(address)uint64"]> & SendParams & {
|
|
1061
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1062
|
+
}) => Promise<{
|
|
1063
|
+
return: (undefined | EscregReturns["get(address)uint64"]);
|
|
1064
|
+
transactions: Transaction[];
|
|
1065
|
+
transaction: Transaction;
|
|
1066
|
+
groupId: string;
|
|
1067
|
+
txIds: string[];
|
|
1068
|
+
returns?: ABIReturn[] | undefined | undefined;
|
|
1069
|
+
confirmations: modelsv2.PendingTransactionResponse[];
|
|
1070
|
+
confirmation: modelsv2.PendingTransactionResponse;
|
|
1071
|
+
}>;
|
|
1072
|
+
/**
|
|
1073
|
+
* Makes a call to the Escreg smart contract using the `mustGet(address)uint64` ABI method.
|
|
1074
|
+
*
|
|
1075
|
+
* This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.
|
|
1076
|
+
*
|
|
1077
|
+
* Get the app ID for the given app escrow address. Throws an error if the app escrow is not registered in the contract.
|
|
1078
|
+
*
|
|
1079
|
+
* @param params The params for the smart contract call
|
|
1080
|
+
* @returns The call result: App ID for the given address
|
|
1081
|
+
*/
|
|
1082
|
+
mustGet: (params: CallParams<EscregArgs["obj"]["mustGet(address)uint64"] | EscregArgs["tuple"]["mustGet(address)uint64"]> & SendParams & {
|
|
1083
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1084
|
+
}) => Promise<{
|
|
1085
|
+
return: (undefined | EscregReturns["mustGet(address)uint64"]);
|
|
1086
|
+
transactions: Transaction[];
|
|
1087
|
+
transaction: Transaction;
|
|
1088
|
+
groupId: string;
|
|
1089
|
+
txIds: string[];
|
|
1090
|
+
returns?: ABIReturn[] | undefined | undefined;
|
|
1091
|
+
confirmations: modelsv2.PendingTransactionResponse[];
|
|
1092
|
+
confirmation: modelsv2.PendingTransactionResponse;
|
|
1093
|
+
}>;
|
|
1094
|
+
/**
|
|
1095
|
+
* Makes a call to the Escreg smart contract using the `getWithAuth(address)(uint64,uint64)` ABI method.
|
|
1096
|
+
*
|
|
1097
|
+
* This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.
|
|
1098
|
+
*
|
|
1099
|
+
* Get the app ID for the given app escrow address and its auth address. Returns 0 for each if not registered in the contract.
|
|
1100
|
+
*
|
|
1101
|
+
* @param params The params for the smart contract call
|
|
1102
|
+
* @returns The call result: [app ID for the given address, app ID for the auth address], or 0 for each if not registered
|
|
1103
|
+
*/
|
|
1104
|
+
getWithAuth: (params: CallParams<EscregArgs["obj"]["getWithAuth(address)(uint64,uint64)"] | EscregArgs["tuple"]["getWithAuth(address)(uint64,uint64)"]> & SendParams & {
|
|
1105
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1106
|
+
}) => Promise<{
|
|
1107
|
+
return: (undefined | EscregReturns["getWithAuth(address)(uint64,uint64)"]);
|
|
1108
|
+
transactions: Transaction[];
|
|
1109
|
+
transaction: Transaction;
|
|
1110
|
+
groupId: string;
|
|
1111
|
+
txIds: string[];
|
|
1112
|
+
returns?: ABIReturn[] | undefined | undefined;
|
|
1113
|
+
confirmations: modelsv2.PendingTransactionResponse[];
|
|
1114
|
+
confirmation: modelsv2.PendingTransactionResponse;
|
|
1115
|
+
}>;
|
|
1116
|
+
/**
|
|
1117
|
+
* Makes a call to the Escreg smart contract using the `getWithAuthList(address[])(uint64,uint64)[]` ABI method.
|
|
1118
|
+
*
|
|
1119
|
+
* This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.
|
|
1120
|
+
*
|
|
1121
|
+
* Get the app ID for multiple app escrow addresses and their auth addresses. Returns 0 for each if not registered in the contract.
|
|
1122
|
+
*
|
|
1123
|
+
* @param params The params for the smart contract call
|
|
1124
|
+
* @returns The call result: Array of [app ID for the given address, app ID for the auth address] for each input address, or 0 for each if not registered
|
|
1125
|
+
*/
|
|
1126
|
+
getWithAuthList: (params: CallParams<EscregArgs["obj"]["getWithAuthList(address[])(uint64,uint64)[]"] | EscregArgs["tuple"]["getWithAuthList(address[])(uint64,uint64)[]"]> & SendParams & {
|
|
1127
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1128
|
+
}) => Promise<{
|
|
1129
|
+
return: (undefined | EscregReturns["getWithAuthList(address[])(uint64,uint64)[]"]);
|
|
1130
|
+
transactions: Transaction[];
|
|
1131
|
+
transaction: Transaction;
|
|
1132
|
+
groupId: string;
|
|
1133
|
+
txIds: string[];
|
|
1134
|
+
returns?: ABIReturn[] | undefined | undefined;
|
|
1135
|
+
confirmations: modelsv2.PendingTransactionResponse[];
|
|
1136
|
+
confirmation: modelsv2.PendingTransactionResponse;
|
|
1137
|
+
}>;
|
|
1138
|
+
/**
|
|
1139
|
+
* Makes a call to the Escreg smart contract using the `getList(address[])uint64[]` ABI method.
|
|
1140
|
+
*
|
|
1141
|
+
* This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.
|
|
1142
|
+
*
|
|
1143
|
+
* Get the app IDs for multiple app escrow addresses. Returns 0 for each if not registered in the contract.
|
|
1144
|
+
*
|
|
1145
|
+
* @param params The params for the smart contract call
|
|
1146
|
+
* @returns The call result: Array of app IDs for each input address, or 0 if not registered
|
|
1147
|
+
*/
|
|
1148
|
+
getList: (params: CallParams<EscregArgs["obj"]["getList(address[])uint64[]"] | EscregArgs["tuple"]["getList(address[])uint64[]"]> & SendParams & {
|
|
1149
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1150
|
+
}) => Promise<{
|
|
1151
|
+
return: (undefined | EscregReturns["getList(address[])uint64[]"]);
|
|
1152
|
+
transactions: Transaction[];
|
|
1153
|
+
transaction: Transaction;
|
|
1154
|
+
groupId: string;
|
|
1155
|
+
txIds: string[];
|
|
1156
|
+
returns?: ABIReturn[] | undefined | undefined;
|
|
1157
|
+
confirmations: modelsv2.PendingTransactionResponse[];
|
|
1158
|
+
confirmation: modelsv2.PendingTransactionResponse;
|
|
1159
|
+
}>;
|
|
1160
|
+
/**
|
|
1161
|
+
* Makes a call to the Escreg smart contract using the `mustGetList(address[])uint64[]` ABI method.
|
|
1162
|
+
*
|
|
1163
|
+
* This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.
|
|
1164
|
+
*
|
|
1165
|
+
* Get the app IDs for multiple app escrow addresses. Throws an error if any of the app escrows are not registered in the contract.
|
|
1166
|
+
*
|
|
1167
|
+
* @param params The params for the smart contract call
|
|
1168
|
+
* @returns The call result: Array of app IDs for each input address
|
|
1169
|
+
*/
|
|
1170
|
+
mustGetList: (params: CallParams<EscregArgs["obj"]["mustGetList(address[])uint64[]"] | EscregArgs["tuple"]["mustGetList(address[])uint64[]"]> & SendParams & {
|
|
1171
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1172
|
+
}) => Promise<{
|
|
1173
|
+
return: (undefined | EscregReturns["mustGetList(address[])uint64[]"]);
|
|
1174
|
+
transactions: Transaction[];
|
|
1175
|
+
transaction: Transaction;
|
|
1176
|
+
groupId: string;
|
|
1177
|
+
txIds: string[];
|
|
1178
|
+
returns?: ABIReturn[] | undefined | undefined;
|
|
1179
|
+
confirmations: modelsv2.PendingTransactionResponse[];
|
|
1180
|
+
confirmation: modelsv2.PendingTransactionResponse;
|
|
1181
|
+
}>;
|
|
1182
|
+
/**
|
|
1183
|
+
* Makes a call to the Escreg smart contract using the `increaseBudget(uint64)void` ABI method.
|
|
1184
|
+
*
|
|
1185
|
+
* Utility for explicitly increasing the budget of a transaction group by performing no-op inner transactions.
|
|
1186
|
+
*
|
|
1187
|
+
* @param params The params for the smart contract call
|
|
1188
|
+
* @returns The call result
|
|
1189
|
+
*/
|
|
1190
|
+
increaseBudget: (params: CallParams<EscregArgs["obj"]["increaseBudget(uint64)void"] | EscregArgs["tuple"]["increaseBudget(uint64)void"]> & SendParams & {
|
|
1191
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1192
|
+
}) => Promise<{
|
|
1193
|
+
return: (undefined | EscregReturns["increaseBudget(uint64)void"]);
|
|
1194
|
+
transactions: Transaction[];
|
|
1195
|
+
transaction: Transaction;
|
|
1196
|
+
groupId: string;
|
|
1197
|
+
txIds: string[];
|
|
1198
|
+
returns?: ABIReturn[] | undefined | undefined;
|
|
1199
|
+
confirmations: modelsv2.PendingTransactionResponse[];
|
|
1200
|
+
confirmation: modelsv2.PendingTransactionResponse;
|
|
1201
|
+
}>;
|
|
1202
|
+
/**
|
|
1203
|
+
* Makes a call to the Escreg smart contract using the `depositCredits(address,pay)void` ABI method.
|
|
1204
|
+
*
|
|
1205
|
+
* public method to deposit MBR credits for an account
|
|
1206
|
+
*
|
|
1207
|
+
* @param params The params for the smart contract call
|
|
1208
|
+
* @returns The call result
|
|
1209
|
+
*/
|
|
1210
|
+
depositCredits: (params: CallParams<EscregArgs["obj"]["depositCredits(address,pay)void"] | EscregArgs["tuple"]["depositCredits(address,pay)void"]> & SendParams & {
|
|
1211
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1212
|
+
}) => Promise<{
|
|
1213
|
+
return: (undefined | EscregReturns["depositCredits(address,pay)void"]);
|
|
1214
|
+
transactions: Transaction[];
|
|
1215
|
+
transaction: Transaction;
|
|
1216
|
+
groupId: string;
|
|
1217
|
+
txIds: string[];
|
|
1218
|
+
returns?: ABIReturn[] | undefined | undefined;
|
|
1219
|
+
confirmations: modelsv2.PendingTransactionResponse[];
|
|
1220
|
+
confirmation: modelsv2.PendingTransactionResponse;
|
|
1221
|
+
}>;
|
|
1222
|
+
/**
|
|
1223
|
+
* Makes a call to the Escreg smart contract using the `withdrawCredits()void` ABI method.
|
|
1224
|
+
*
|
|
1225
|
+
* Withdraw all remaining MBR credits for sender. This will delete the user credit box, so all credits are withdrawn including the MBR locked for the box itself.
|
|
1226
|
+
*
|
|
1227
|
+
* @param params The params for the smart contract call
|
|
1228
|
+
* @returns The call result
|
|
1229
|
+
*/
|
|
1230
|
+
withdrawCredits: (params?: CallParams<EscregArgs["obj"]["withdrawCredits()void"] | EscregArgs["tuple"]["withdrawCredits()void"]> & SendParams & {
|
|
1231
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
1232
|
+
}) => Promise<{
|
|
1233
|
+
return: (undefined | EscregReturns["withdrawCredits()void"]);
|
|
1234
|
+
transactions: Transaction[];
|
|
1235
|
+
transaction: Transaction;
|
|
1236
|
+
groupId: string;
|
|
1237
|
+
txIds: string[];
|
|
1238
|
+
returns?: ABIReturn[] | undefined | undefined;
|
|
1239
|
+
confirmations: modelsv2.PendingTransactionResponse[];
|
|
1240
|
+
confirmation: modelsv2.PendingTransactionResponse;
|
|
1241
|
+
}>;
|
|
1242
|
+
};
|
|
1243
|
+
/**
|
|
1244
|
+
* Clone this app client with different params
|
|
1245
|
+
*
|
|
1246
|
+
* @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.
|
|
1247
|
+
* @returns A new app client with the altered params
|
|
1248
|
+
*/
|
|
1249
|
+
clone(params: CloneAppClientParams): EscregClient;
|
|
1250
|
+
/**
|
|
1251
|
+
* Makes a readonly (simulated) call to the Escreg smart contract using the `exists(address)bool` ABI method.
|
|
1252
|
+
*
|
|
1253
|
+
* This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.
|
|
1254
|
+
*
|
|
1255
|
+
* Return true if an app escrow account exists for the given address, false otherwise.
|
|
1256
|
+
*
|
|
1257
|
+
* @param params The params for the smart contract call
|
|
1258
|
+
* @returns The call result: boolean indicating whether the given address is registered in the contract
|
|
1259
|
+
*/
|
|
1260
|
+
exists(params: CallParams<EscregArgs['obj']['exists(address)bool'] | EscregArgs['tuple']['exists(address)bool']>): Promise<boolean>;
|
|
1261
|
+
/**
|
|
1262
|
+
* Makes a readonly (simulated) call to the Escreg smart contract using the `get(address)uint64` ABI method.
|
|
1263
|
+
*
|
|
1264
|
+
* This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.
|
|
1265
|
+
*
|
|
1266
|
+
* Get the app ID for the given app escrow address. Returns 0 if the app escrow is not registered in the contract.
|
|
1267
|
+
*
|
|
1268
|
+
* @param params The params for the smart contract call
|
|
1269
|
+
* @returns The call result: App ID for the given address, or 0 if not registered
|
|
1270
|
+
*/
|
|
1271
|
+
get(params: CallParams<EscregArgs['obj']['get(address)uint64'] | EscregArgs['tuple']['get(address)uint64']>): Promise<bigint>;
|
|
1272
|
+
/**
|
|
1273
|
+
* Makes a readonly (simulated) call to the Escreg smart contract using the `mustGet(address)uint64` ABI method.
|
|
1274
|
+
*
|
|
1275
|
+
* This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.
|
|
1276
|
+
*
|
|
1277
|
+
* Get the app ID for the given app escrow address. Throws an error if the app escrow is not registered in the contract.
|
|
1278
|
+
*
|
|
1279
|
+
* @param params The params for the smart contract call
|
|
1280
|
+
* @returns The call result: App ID for the given address
|
|
1281
|
+
*/
|
|
1282
|
+
mustGet(params: CallParams<EscregArgs['obj']['mustGet(address)uint64'] | EscregArgs['tuple']['mustGet(address)uint64']>): Promise<bigint>;
|
|
1283
|
+
/**
|
|
1284
|
+
* Makes a readonly (simulated) call to the Escreg smart contract using the `getWithAuth(address)(uint64,uint64)` ABI method.
|
|
1285
|
+
*
|
|
1286
|
+
* This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.
|
|
1287
|
+
*
|
|
1288
|
+
* Get the app ID for the given app escrow address and its auth address. Returns 0 for each if not registered in the contract.
|
|
1289
|
+
*
|
|
1290
|
+
* @param params The params for the smart contract call
|
|
1291
|
+
* @returns The call result: [app ID for the given address, app ID for the auth address], or 0 for each if not registered
|
|
1292
|
+
*/
|
|
1293
|
+
getWithAuth(params: CallParams<EscregArgs['obj']['getWithAuth(address)(uint64,uint64)'] | EscregArgs['tuple']['getWithAuth(address)(uint64,uint64)']>): Promise<AddressWithAuth>;
|
|
1294
|
+
/**
|
|
1295
|
+
* Makes a readonly (simulated) call to the Escreg smart contract using the `getWithAuthList(address[])(uint64,uint64)[]` ABI method.
|
|
1296
|
+
*
|
|
1297
|
+
* This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.
|
|
1298
|
+
*
|
|
1299
|
+
* Get the app ID for multiple app escrow addresses and their auth addresses. Returns 0 for each if not registered in the contract.
|
|
1300
|
+
*
|
|
1301
|
+
* @param params The params for the smart contract call
|
|
1302
|
+
* @returns The call result: Array of [app ID for the given address, app ID for the auth address] for each input address, or 0 for each if not registered
|
|
1303
|
+
*/
|
|
1304
|
+
getWithAuthList(params: CallParams<EscregArgs['obj']['getWithAuthList(address[])(uint64,uint64)[]'] | EscregArgs['tuple']['getWithAuthList(address[])(uint64,uint64)[]']>): Promise<[bigint, bigint][]>;
|
|
1305
|
+
/**
|
|
1306
|
+
* Makes a readonly (simulated) call to the Escreg smart contract using the `getList(address[])uint64[]` ABI method.
|
|
1307
|
+
*
|
|
1308
|
+
* This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.
|
|
1309
|
+
*
|
|
1310
|
+
* Get the app IDs for multiple app escrow addresses. Returns 0 for each if not registered in the contract.
|
|
1311
|
+
*
|
|
1312
|
+
* @param params The params for the smart contract call
|
|
1313
|
+
* @returns The call result: Array of app IDs for each input address, or 0 if not registered
|
|
1314
|
+
*/
|
|
1315
|
+
getList(params: CallParams<EscregArgs['obj']['getList(address[])uint64[]'] | EscregArgs['tuple']['getList(address[])uint64[]']>): Promise<bigint[]>;
|
|
1316
|
+
/**
|
|
1317
|
+
* Makes a readonly (simulated) call to the Escreg smart contract using the `mustGetList(address[])uint64[]` ABI method.
|
|
1318
|
+
*
|
|
1319
|
+
* This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.
|
|
1320
|
+
*
|
|
1321
|
+
* Get the app IDs for multiple app escrow addresses. Throws an error if any of the app escrows are not registered in the contract.
|
|
1322
|
+
*
|
|
1323
|
+
* @param params The params for the smart contract call
|
|
1324
|
+
* @returns The call result: Array of app IDs for each input address
|
|
1325
|
+
*/
|
|
1326
|
+
mustGetList(params: CallParams<EscregArgs['obj']['mustGetList(address[])uint64[]'] | EscregArgs['tuple']['mustGetList(address[])uint64[]']>): Promise<bigint[]>;
|
|
1327
|
+
/**
|
|
1328
|
+
* Methods to access state for the current Escreg app
|
|
1329
|
+
*/
|
|
1330
|
+
state: {
|
|
1331
|
+
/**
|
|
1332
|
+
* Methods to access global state for the current Escreg app
|
|
1333
|
+
*/
|
|
1334
|
+
global: {
|
|
1335
|
+
/**
|
|
1336
|
+
* Get all current keyed values from global state
|
|
1337
|
+
*/
|
|
1338
|
+
getAll: () => Promise<Partial<Expand<GlobalKeysState>>>;
|
|
1339
|
+
/**
|
|
1340
|
+
* Get the current value of the admin key in global state
|
|
1341
|
+
*/
|
|
1342
|
+
admin: () => Promise<string | undefined>;
|
|
1343
|
+
/**
|
|
1344
|
+
* Get the current value of the counter key in global state
|
|
1345
|
+
*/
|
|
1346
|
+
counter: () => Promise<bigint | undefined>;
|
|
1347
|
+
};
|
|
1348
|
+
/**
|
|
1349
|
+
* Methods to access box state for the current Escreg app
|
|
1350
|
+
*/
|
|
1351
|
+
box: {
|
|
1352
|
+
/**
|
|
1353
|
+
* Get all current keyed values from box state
|
|
1354
|
+
*/
|
|
1355
|
+
getAll: () => Promise<Partial<Expand<BoxKeysState>>>;
|
|
1356
|
+
/**
|
|
1357
|
+
* Get values from the apps map in box state
|
|
1358
|
+
*/
|
|
1359
|
+
apps: {
|
|
1360
|
+
/**
|
|
1361
|
+
* Get all current values of the apps map in box state
|
|
1362
|
+
*/
|
|
1363
|
+
getMap: () => Promise<Map<Uint8Array, bigint[]>>;
|
|
1364
|
+
/**
|
|
1365
|
+
* Get a current value of the apps map by key from box state
|
|
1366
|
+
*/
|
|
1367
|
+
value: (key: Uint8Array | string) => Promise<bigint[] | undefined>;
|
|
1368
|
+
};
|
|
1369
|
+
/**
|
|
1370
|
+
* Get values from the userCredits map in box state
|
|
1371
|
+
*/
|
|
1372
|
+
userCredits: {
|
|
1373
|
+
/**
|
|
1374
|
+
* Get all current values of the userCredits map in box state
|
|
1375
|
+
*/
|
|
1376
|
+
getMap: () => Promise<Map<string, bigint>>;
|
|
1377
|
+
/**
|
|
1378
|
+
* Get a current value of the userCredits map by key from box state
|
|
1379
|
+
*/
|
|
1380
|
+
value: (key: string) => Promise<bigint | undefined>;
|
|
1381
|
+
};
|
|
1382
|
+
};
|
|
1383
|
+
};
|
|
1384
|
+
newGroup(): EscregComposer;
|
|
1385
|
+
}
|
|
1386
|
+
export type EscregComposer<TReturns extends [...any[]] = []> = {
|
|
1387
|
+
/**
|
|
1388
|
+
* Calls the withdraw(uint64)void ABI method.
|
|
1389
|
+
*
|
|
1390
|
+
* Withdraw funds from the contract to the admin.
|
|
1391
|
+
*
|
|
1392
|
+
* @param args The arguments for the contract call
|
|
1393
|
+
* @param params Any additional parameters for the call
|
|
1394
|
+
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
|
|
1395
|
+
*/
|
|
1396
|
+
withdraw(params?: CallParams<EscregArgs['obj']['withdraw(uint64)void'] | EscregArgs['tuple']['withdraw(uint64)void']>): EscregComposer<[...TReturns, EscregReturns['withdraw(uint64)void'] | undefined]>;
|
|
1397
|
+
/**
|
|
1398
|
+
* Calls the deleteBoxes(byte[4][])void ABI method.
|
|
1399
|
+
*
|
|
1400
|
+
* Delete app registry boxes by their keys.
|
|
1401
|
+
*
|
|
1402
|
+
* @param args The arguments for the contract call
|
|
1403
|
+
* @param params Any additional parameters for the call
|
|
1404
|
+
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
|
|
1405
|
+
*/
|
|
1406
|
+
deleteBoxes(params?: CallParams<EscregArgs['obj']['deleteBoxes(byte[4][])void'] | EscregArgs['tuple']['deleteBoxes(byte[4][])void']>): EscregComposer<[...TReturns, EscregReturns['deleteBoxes(byte[4][])void'] | undefined]>;
|
|
1407
|
+
/**
|
|
1408
|
+
* Calls the register(uint64)void ABI method.
|
|
1409
|
+
*
|
|
1410
|
+
* Register a single application escrow account
|
|
1411
|
+
*
|
|
1412
|
+
* @param args The arguments for the contract call
|
|
1413
|
+
* @param params Any additional parameters for the call
|
|
1414
|
+
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
|
|
1415
|
+
*/
|
|
1416
|
+
register(params?: CallParams<EscregArgs['obj']['register(uint64)void'] | EscregArgs['tuple']['register(uint64)void']>): EscregComposer<[...TReturns, EscregReturns['register(uint64)void'] | undefined]>;
|
|
1417
|
+
/**
|
|
1418
|
+
* Calls the registerList(uint64[])void ABI method.
|
|
1419
|
+
*
|
|
1420
|
+
* Register multiple application escrow accounts in a single transaction. This is more efficient than calling register multiple times as the MBR cost can be paid for in a single payment and the app IDs can be stored more efficiently in the contract state.
|
|
1421
|
+
*
|
|
1422
|
+
* @param args The arguments for the contract call
|
|
1423
|
+
* @param params Any additional parameters for the call
|
|
1424
|
+
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
|
|
1425
|
+
*/
|
|
1426
|
+
registerList(params?: CallParams<EscregArgs['obj']['registerList(uint64[])void'] | EscregArgs['tuple']['registerList(uint64[])void']>): EscregComposer<[...TReturns, EscregReturns['registerList(uint64[])void'] | undefined]>;
|
|
1427
|
+
/**
|
|
1428
|
+
* Calls the exists(address)bool ABI method.
|
|
1429
|
+
*
|
|
1430
|
+
* Return true if an app escrow account exists for the given address, false otherwise.
|
|
1431
|
+
*
|
|
1432
|
+
* @param args The arguments for the contract call
|
|
1433
|
+
* @param params Any additional parameters for the call
|
|
1434
|
+
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
|
|
1435
|
+
*/
|
|
1436
|
+
exists(params?: CallParams<EscregArgs['obj']['exists(address)bool'] | EscregArgs['tuple']['exists(address)bool']>): EscregComposer<[...TReturns, EscregReturns['exists(address)bool'] | undefined]>;
|
|
1437
|
+
/**
|
|
1438
|
+
* Calls the get(address)uint64 ABI method.
|
|
1439
|
+
*
|
|
1440
|
+
* Get the app ID for the given app escrow address. Returns 0 if the app escrow is not registered in the contract.
|
|
1441
|
+
*
|
|
1442
|
+
* @param args The arguments for the contract call
|
|
1443
|
+
* @param params Any additional parameters for the call
|
|
1444
|
+
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
|
|
1445
|
+
*/
|
|
1446
|
+
get(params?: CallParams<EscregArgs['obj']['get(address)uint64'] | EscregArgs['tuple']['get(address)uint64']>): EscregComposer<[...TReturns, EscregReturns['get(address)uint64'] | undefined]>;
|
|
1447
|
+
/**
|
|
1448
|
+
* Calls the mustGet(address)uint64 ABI method.
|
|
1449
|
+
*
|
|
1450
|
+
* Get the app ID for the given app escrow address. Throws an error if the app escrow is not registered in the contract.
|
|
1451
|
+
*
|
|
1452
|
+
* @param args The arguments for the contract call
|
|
1453
|
+
* @param params Any additional parameters for the call
|
|
1454
|
+
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
|
|
1455
|
+
*/
|
|
1456
|
+
mustGet(params?: CallParams<EscregArgs['obj']['mustGet(address)uint64'] | EscregArgs['tuple']['mustGet(address)uint64']>): EscregComposer<[...TReturns, EscregReturns['mustGet(address)uint64'] | undefined]>;
|
|
1457
|
+
/**
|
|
1458
|
+
* Calls the getWithAuth(address)(uint64,uint64) ABI method.
|
|
1459
|
+
*
|
|
1460
|
+
* Get the app ID for the given app escrow address and its auth address. Returns 0 for each if not registered in the contract.
|
|
1461
|
+
*
|
|
1462
|
+
* @param args The arguments for the contract call
|
|
1463
|
+
* @param params Any additional parameters for the call
|
|
1464
|
+
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
|
|
1465
|
+
*/
|
|
1466
|
+
getWithAuth(params?: CallParams<EscregArgs['obj']['getWithAuth(address)(uint64,uint64)'] | EscregArgs['tuple']['getWithAuth(address)(uint64,uint64)']>): EscregComposer<[...TReturns, EscregReturns['getWithAuth(address)(uint64,uint64)'] | undefined]>;
|
|
1467
|
+
/**
|
|
1468
|
+
* Calls the getWithAuthList(address[])(uint64,uint64)[] ABI method.
|
|
1469
|
+
*
|
|
1470
|
+
* Get the app ID for multiple app escrow addresses and their auth addresses. Returns 0 for each if not registered in the contract.
|
|
1471
|
+
*
|
|
1472
|
+
* @param args The arguments for the contract call
|
|
1473
|
+
* @param params Any additional parameters for the call
|
|
1474
|
+
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
|
|
1475
|
+
*/
|
|
1476
|
+
getWithAuthList(params?: CallParams<EscregArgs['obj']['getWithAuthList(address[])(uint64,uint64)[]'] | EscregArgs['tuple']['getWithAuthList(address[])(uint64,uint64)[]']>): EscregComposer<[...TReturns, EscregReturns['getWithAuthList(address[])(uint64,uint64)[]'] | undefined]>;
|
|
1477
|
+
/**
|
|
1478
|
+
* Calls the getList(address[])uint64[] ABI method.
|
|
1479
|
+
*
|
|
1480
|
+
* Get the app IDs for multiple app escrow addresses. Returns 0 for each if not registered in the contract.
|
|
1481
|
+
*
|
|
1482
|
+
* @param args The arguments for the contract call
|
|
1483
|
+
* @param params Any additional parameters for the call
|
|
1484
|
+
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
|
|
1485
|
+
*/
|
|
1486
|
+
getList(params?: CallParams<EscregArgs['obj']['getList(address[])uint64[]'] | EscregArgs['tuple']['getList(address[])uint64[]']>): EscregComposer<[...TReturns, EscregReturns['getList(address[])uint64[]'] | undefined]>;
|
|
1487
|
+
/**
|
|
1488
|
+
* Calls the mustGetList(address[])uint64[] ABI method.
|
|
1489
|
+
*
|
|
1490
|
+
* Get the app IDs for multiple app escrow addresses. Throws an error if any of the app escrows are not registered in the contract.
|
|
1491
|
+
*
|
|
1492
|
+
* @param args The arguments for the contract call
|
|
1493
|
+
* @param params Any additional parameters for the call
|
|
1494
|
+
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
|
|
1495
|
+
*/
|
|
1496
|
+
mustGetList(params?: CallParams<EscregArgs['obj']['mustGetList(address[])uint64[]'] | EscregArgs['tuple']['mustGetList(address[])uint64[]']>): EscregComposer<[...TReturns, EscregReturns['mustGetList(address[])uint64[]'] | undefined]>;
|
|
1497
|
+
/**
|
|
1498
|
+
* Calls the increaseBudget(uint64)void ABI method.
|
|
1499
|
+
*
|
|
1500
|
+
* Utility for explicitly increasing the budget of a transaction group by performing no-op inner transactions.
|
|
1501
|
+
*
|
|
1502
|
+
* @param args The arguments for the contract call
|
|
1503
|
+
* @param params Any additional parameters for the call
|
|
1504
|
+
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
|
|
1505
|
+
*/
|
|
1506
|
+
increaseBudget(params?: CallParams<EscregArgs['obj']['increaseBudget(uint64)void'] | EscregArgs['tuple']['increaseBudget(uint64)void']>): EscregComposer<[...TReturns, EscregReturns['increaseBudget(uint64)void'] | undefined]>;
|
|
1507
|
+
/**
|
|
1508
|
+
* Calls the depositCredits(address,pay)void ABI method.
|
|
1509
|
+
*
|
|
1510
|
+
* public method to deposit MBR credits for an account
|
|
1511
|
+
*
|
|
1512
|
+
* @param args The arguments for the contract call
|
|
1513
|
+
* @param params Any additional parameters for the call
|
|
1514
|
+
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
|
|
1515
|
+
*/
|
|
1516
|
+
depositCredits(params?: CallParams<EscregArgs['obj']['depositCredits(address,pay)void'] | EscregArgs['tuple']['depositCredits(address,pay)void']>): EscregComposer<[...TReturns, EscregReturns['depositCredits(address,pay)void'] | undefined]>;
|
|
1517
|
+
/**
|
|
1518
|
+
* Calls the withdrawCredits()void ABI method.
|
|
1519
|
+
*
|
|
1520
|
+
* Withdraw all remaining MBR credits for sender. This will delete the user credit box, so all credits are withdrawn including the MBR locked for the box itself.
|
|
1521
|
+
*
|
|
1522
|
+
* @param args The arguments for the contract call
|
|
1523
|
+
* @param params Any additional parameters for the call
|
|
1524
|
+
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
|
|
1525
|
+
*/
|
|
1526
|
+
withdrawCredits(params?: CallParams<EscregArgs['obj']['withdrawCredits()void'] | EscregArgs['tuple']['withdrawCredits()void']>): EscregComposer<[...TReturns, EscregReturns['withdrawCredits()void'] | undefined]>;
|
|
1527
|
+
/**
|
|
1528
|
+
* Makes a clear_state call to an existing instance of the Escreg smart contract.
|
|
1529
|
+
*
|
|
1530
|
+
* @param args The arguments for the bare call
|
|
1531
|
+
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
|
|
1532
|
+
*/
|
|
1533
|
+
clearState(params?: AppClientBareCallParams): EscregComposer<[...TReturns, undefined]>;
|
|
1534
|
+
/**
|
|
1535
|
+
* Adds a transaction to the composer
|
|
1536
|
+
*
|
|
1537
|
+
* @param txn A transaction to add to the transaction group
|
|
1538
|
+
* @param signer The optional signer to use when signing this transaction.
|
|
1539
|
+
*/
|
|
1540
|
+
addTransaction(txn: Transaction, signer?: TransactionSigner): EscregComposer<TReturns>;
|
|
1541
|
+
/**
|
|
1542
|
+
* Returns the underlying AtomicTransactionComposer instance
|
|
1543
|
+
*/
|
|
1544
|
+
composer(): Promise<TransactionComposer>;
|
|
1545
|
+
/**
|
|
1546
|
+
* Simulates the transaction group and returns the result
|
|
1547
|
+
*/
|
|
1548
|
+
simulate(): Promise<EscregComposerResults<TReturns> & {
|
|
1549
|
+
simulateResponse: modelsv2.SimulateResponse;
|
|
1550
|
+
}>;
|
|
1551
|
+
simulate(options: SkipSignaturesSimulateOptions): Promise<EscregComposerResults<TReturns> & {
|
|
1552
|
+
simulateResponse: modelsv2.SimulateResponse;
|
|
1553
|
+
}>;
|
|
1554
|
+
simulate(options: RawSimulateOptions): Promise<EscregComposerResults<TReturns> & {
|
|
1555
|
+
simulateResponse: modelsv2.SimulateResponse;
|
|
1556
|
+
}>;
|
|
1557
|
+
/**
|
|
1558
|
+
* Sends the transaction group to the network and returns the results
|
|
1559
|
+
*/
|
|
1560
|
+
send(params?: SendParams): Promise<EscregComposerResults<TReturns>>;
|
|
1561
|
+
};
|
|
1562
|
+
export type EscregComposerResults<TReturns extends [...any[]]> = Expand<SendAtomicTransactionComposerResults & {
|
|
1563
|
+
returns: TReturns;
|
|
1564
|
+
}>;
|