abel-ghost-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 +11 -0
- package/dist/examples/assets.d.ts +1 -0
- package/dist/examples/assets.js +14 -0
- package/dist/examples/deployed.d.ts +1 -0
- package/dist/examples/deployed.js +31 -0
- package/dist/examples/run.d.ts +1 -0
- package/dist/examples/run.js +48 -0
- package/dist/examples/single.d.ts +1 -0
- package/dist/examples/single.js +21 -0
- package/dist/generated/AbelReaderSDK.d.ts +729 -0
- package/dist/generated/AbelReaderSDK.js +511 -0
- package/dist/generated/RetiReaderSDK.d.ts +3236 -0
- package/dist/generated/RetiReaderSDK.js +1773 -0
- package/dist/generated/sdk.d.ts +2474 -0
- package/dist/generated/sdk.js +1388 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +45 -0
- package/dist/utils/chunk.d.ts +1 -0
- package/dist/utils/chunk.js +9 -0
- package/dist/utils/chunked.d.ts +7 -0
- package/dist/utils/chunked.js +35 -0
- package/package.json +37 -0
|
@@ -0,0 +1,729 @@
|
|
|
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
|
+
export type AssetTinyLabels = {
|
|
36
|
+
name: string;
|
|
37
|
+
unitName: string;
|
|
38
|
+
decimals: number;
|
|
39
|
+
labels: string[];
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Converts the ABI tuple representation of a AssetTinyLabels to the struct representation
|
|
43
|
+
*/
|
|
44
|
+
export declare function AssetTinyLabelsFromTuple(abiTuple: [string, string, number, string[]]): AssetTinyLabels;
|
|
45
|
+
/**
|
|
46
|
+
* The argument types for the AbelReader contract
|
|
47
|
+
*/
|
|
48
|
+
export type AbelReaderArgs = {
|
|
49
|
+
/**
|
|
50
|
+
* The object representation of the arguments for each method
|
|
51
|
+
*/
|
|
52
|
+
obj: {
|
|
53
|
+
'getAssetsTiny(uint64[],uint64)(string,string,uint8,string[])': {
|
|
54
|
+
assetIds: bigint[] | number[];
|
|
55
|
+
abelAppId: bigint | number;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* The tuple representation of the arguments for each method
|
|
60
|
+
*/
|
|
61
|
+
tuple: {
|
|
62
|
+
'getAssetsTiny(uint64[],uint64)(string,string,uint8,string[])': [assetIds: bigint[] | number[], abelAppId: bigint | number];
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* The return type for each method
|
|
67
|
+
*/
|
|
68
|
+
export type AbelReaderReturns = {
|
|
69
|
+
'getAssetsTiny(uint64[],uint64)(string,string,uint8,string[])': AssetTinyLabels;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Defines the types of available calls and state of the AbelReader smart contract.
|
|
73
|
+
*/
|
|
74
|
+
export type AbelReaderTypes = {
|
|
75
|
+
/**
|
|
76
|
+
* Maps method signatures / names to their argument and return types.
|
|
77
|
+
*/
|
|
78
|
+
methods: Record<'getAssetsTiny(uint64[],uint64)(string,string,uint8,string[])' | 'getAssetsTiny', {
|
|
79
|
+
argsObj: AbelReaderArgs['obj']['getAssetsTiny(uint64[],uint64)(string,string,uint8,string[])'];
|
|
80
|
+
argsTuple: AbelReaderArgs['tuple']['getAssetsTiny(uint64[],uint64)(string,string,uint8,string[])'];
|
|
81
|
+
returns: AbelReaderReturns['getAssetsTiny(uint64[],uint64)(string,string,uint8,string[])'];
|
|
82
|
+
}>;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Defines the possible abi call signatures.
|
|
86
|
+
*/
|
|
87
|
+
export type AbelReaderSignatures = keyof AbelReaderTypes['methods'];
|
|
88
|
+
/**
|
|
89
|
+
* Defines the possible abi call signatures for methods that return a non-void value.
|
|
90
|
+
*/
|
|
91
|
+
export type AbelReaderNonVoidMethodSignatures = keyof AbelReaderTypes['methods'] extends infer T ? T extends keyof AbelReaderTypes['methods'] ? MethodReturn<T> extends void ? never : T : never : never;
|
|
92
|
+
/**
|
|
93
|
+
* Defines an object containing all relevant parameters for a single call to the contract.
|
|
94
|
+
*/
|
|
95
|
+
export type CallParams<TArgs> = Expand<Omit<AppClientMethodCallParams, 'method' | 'args' | 'onComplete'> & {
|
|
96
|
+
/** The args for the ABI method call, either as an ordered array or an object */
|
|
97
|
+
args: Expand<TArgs>;
|
|
98
|
+
}>;
|
|
99
|
+
/**
|
|
100
|
+
* Maps a method signature from the AbelReader smart contract to the method's arguments in either tuple or struct form
|
|
101
|
+
*/
|
|
102
|
+
export type MethodArgs<TSignature extends AbelReaderSignatures> = AbelReaderTypes['methods'][TSignature]['argsObj' | 'argsTuple'];
|
|
103
|
+
/**
|
|
104
|
+
* Maps a method signature from the AbelReader smart contract to the method's return type
|
|
105
|
+
*/
|
|
106
|
+
export type MethodReturn<TSignature extends AbelReaderSignatures> = AbelReaderTypes['methods'][TSignature]['returns'];
|
|
107
|
+
/**
|
|
108
|
+
* Defines supported create method params for this smart contract
|
|
109
|
+
*/
|
|
110
|
+
export type AbelReaderCreateCallParams = Expand<CallParams<AbelReaderArgs['obj']['getAssetsTiny(uint64[],uint64)(string,string,uint8,string[])'] | AbelReaderArgs['tuple']['getAssetsTiny(uint64[],uint64)(string,string,uint8,string[])']> & {
|
|
111
|
+
method: 'getAssetsTiny';
|
|
112
|
+
} & {
|
|
113
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
114
|
+
} & CreateSchema> | Expand<CallParams<AbelReaderArgs['obj']['getAssetsTiny(uint64[],uint64)(string,string,uint8,string[])'] | AbelReaderArgs['tuple']['getAssetsTiny(uint64[],uint64)(string,string,uint8,string[])']> & {
|
|
115
|
+
method: 'getAssetsTiny(uint64[],uint64)(string,string,uint8,string[])';
|
|
116
|
+
} & {
|
|
117
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
118
|
+
} & CreateSchema>;
|
|
119
|
+
/**
|
|
120
|
+
* Defines arguments required for the deploy method.
|
|
121
|
+
*/
|
|
122
|
+
export type AbelReaderDeployParams = Expand<Omit<AppFactoryDeployParams, 'createParams' | 'updateParams' | 'deleteParams'> & {
|
|
123
|
+
/**
|
|
124
|
+
* 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)
|
|
125
|
+
*/
|
|
126
|
+
createParams?: AbelReaderCreateCallParams;
|
|
127
|
+
}>;
|
|
128
|
+
/**
|
|
129
|
+
* Exposes methods for constructing `AppClient` params objects for ABI calls to the AbelReader smart contract
|
|
130
|
+
*/
|
|
131
|
+
export declare abstract class AbelReaderParamsFactory {
|
|
132
|
+
/**
|
|
133
|
+
* Gets available create ABI call param factories
|
|
134
|
+
*/
|
|
135
|
+
static get create(): {
|
|
136
|
+
_resolveByMethod<TParams extends AbelReaderCreateCallParams & {
|
|
137
|
+
method: string;
|
|
138
|
+
}>(params: TParams): {
|
|
139
|
+
signer?: TransactionSigner | import("@algorandfoundation/algokit-utils/types/account").TransactionSignerAccount | undefined;
|
|
140
|
+
rekeyTo?: string | Address | undefined;
|
|
141
|
+
note?: string | Uint8Array | undefined;
|
|
142
|
+
lease?: string | Uint8Array | undefined;
|
|
143
|
+
staticFee?: import("@algorandfoundation/algokit-utils/types/amount").AlgoAmount | undefined;
|
|
144
|
+
extraFee?: import("@algorandfoundation/algokit-utils/types/amount").AlgoAmount | undefined;
|
|
145
|
+
maxFee?: import("@algorandfoundation/algokit-utils/types/amount").AlgoAmount | undefined;
|
|
146
|
+
validityWindow?: number | bigint | undefined;
|
|
147
|
+
firstValidRound?: bigint | undefined;
|
|
148
|
+
lastValidRound?: bigint | undefined;
|
|
149
|
+
onComplete?: OnApplicationComplete | undefined;
|
|
150
|
+
accountReferences?: (string | Address)[] | undefined;
|
|
151
|
+
appReferences?: bigint[] | undefined;
|
|
152
|
+
assetReferences?: bigint[] | undefined;
|
|
153
|
+
boxReferences?: (import("@algorandfoundation/algokit-utils/types/app-manager").BoxReference | import("@algorandfoundation/algokit-utils/types/app-manager").BoxIdentifier)[] | undefined;
|
|
154
|
+
accessReferences?: import("@algorandfoundation/algokit-utils/types/app-manager").ResourceReference[] | undefined;
|
|
155
|
+
rejectVersion?: number | undefined;
|
|
156
|
+
sender?: string | Address | undefined;
|
|
157
|
+
method: string;
|
|
158
|
+
args?: (import("algosdk").ABIValue | import("@algorandfoundation/algokit-utils/types/app-arc56").ABIStruct | AppMethodCallTransactionArgument | undefined)[] | undefined;
|
|
159
|
+
} & AppClientCompilationParams & {
|
|
160
|
+
onComplete?: OnApplicationComplete.NoOpOC | undefined;
|
|
161
|
+
};
|
|
162
|
+
/**
|
|
163
|
+
* Constructs create ABI call params for the AbelReader smart contract using the getAssetsTiny(uint64[],uint64)(string,string,uint8,string[]) ABI method
|
|
164
|
+
*
|
|
165
|
+
* @param params Parameters for the call
|
|
166
|
+
* @returns An `AppClientMethodCallParams` object for the call
|
|
167
|
+
*/
|
|
168
|
+
getAssetsTiny(params: CallParams<AbelReaderArgs['obj']['getAssetsTiny(uint64[],uint64)(string,string,uint8,string[])'] | AbelReaderArgs['tuple']['getAssetsTiny(uint64[],uint64)(string,string,uint8,string[])']> & AppClientCompilationParams & {
|
|
169
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
170
|
+
}): AppClientMethodCallParams & AppClientCompilationParams & {
|
|
171
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
/**
|
|
175
|
+
* Constructs a no op call for the getAssetsTiny(uint64[],uint64)(string,string,uint8,string[]) ABI method
|
|
176
|
+
*
|
|
177
|
+
* @param params Parameters for the call
|
|
178
|
+
* @returns An `AppClientMethodCallParams` object for the call
|
|
179
|
+
*/
|
|
180
|
+
static getAssetsTiny(params: CallParams<AbelReaderArgs['obj']['getAssetsTiny(uint64[],uint64)(string,string,uint8,string[])'] | AbelReaderArgs['tuple']['getAssetsTiny(uint64[],uint64)(string,string,uint8,string[])']> & CallOnComplete): AppClientMethodCallParams & CallOnComplete;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* A factory to create and deploy one or more instance of the AbelReader smart contract and to create one or more app clients to interact with those (or other) app instances
|
|
184
|
+
*/
|
|
185
|
+
declare class AbelReaderFactory {
|
|
186
|
+
/**
|
|
187
|
+
* The underlying `AppFactory` for when you want to have more flexibility
|
|
188
|
+
*/
|
|
189
|
+
readonly appFactory: _AppFactory;
|
|
190
|
+
/**
|
|
191
|
+
* Creates a new instance of `AbelReaderFactory`
|
|
192
|
+
*
|
|
193
|
+
* @param params The parameters to initialise the app factory with
|
|
194
|
+
*/
|
|
195
|
+
constructor(params: Omit<AppFactoryParams, 'appSpec'>);
|
|
196
|
+
/** The name of the app (from the ARC-32 / ARC-56 app spec or override). */
|
|
197
|
+
get appName(): string;
|
|
198
|
+
/** The ARC-56 app spec being used */
|
|
199
|
+
get appSpec(): Arc56Contract;
|
|
200
|
+
/** A reference to the underlying `AlgorandClient` this app factory is using. */
|
|
201
|
+
get algorand(): AlgorandClient;
|
|
202
|
+
/**
|
|
203
|
+
* Returns a new `AppClient` client for an app instance of the given ID.
|
|
204
|
+
*
|
|
205
|
+
* Automatically populates appName, defaultSender and source maps from the factory
|
|
206
|
+
* if not specified in the params.
|
|
207
|
+
* @param params The parameters to create the app client
|
|
208
|
+
* @returns The `AppClient`
|
|
209
|
+
*/
|
|
210
|
+
getAppClientById(params: AppFactoryAppClientParams): AbelReaderClient;
|
|
211
|
+
/**
|
|
212
|
+
* Returns a new `AppClient` client, resolving the app by creator address and name
|
|
213
|
+
* using AlgoKit app deployment semantics (i.e. looking for the app creation transaction note).
|
|
214
|
+
*
|
|
215
|
+
* Automatically populates appName, defaultSender and source maps from the factory
|
|
216
|
+
* if not specified in the params.
|
|
217
|
+
* @param params The parameters to create the app client
|
|
218
|
+
* @returns The `AppClient`
|
|
219
|
+
*/
|
|
220
|
+
getAppClientByCreatorAndName(params: AppFactoryResolveAppClientByCreatorAndNameParams): Promise<AbelReaderClient>;
|
|
221
|
+
/**
|
|
222
|
+
* Idempotently deploys the AbelReader smart contract.
|
|
223
|
+
*
|
|
224
|
+
* @param params The arguments for the contract calls and any additional parameters for the call
|
|
225
|
+
* @returns The deployment result
|
|
226
|
+
*/
|
|
227
|
+
deploy(params?: AbelReaderDeployParams): Promise<{
|
|
228
|
+
result: {
|
|
229
|
+
return: import("algosdk").ABIValue | import("@algorandfoundation/algokit-utils/types/app-arc56").ABIStruct | undefined;
|
|
230
|
+
deleteReturn: import("algosdk").ABIValue | import("@algorandfoundation/algokit-utils/types/app-arc56").ABIStruct | undefined;
|
|
231
|
+
compiledApproval?: import("@algorandfoundation/algokit-utils/types/app").CompiledTeal | undefined;
|
|
232
|
+
compiledClear?: import("@algorandfoundation/algokit-utils/types/app").CompiledTeal | undefined;
|
|
233
|
+
operationPerformed: "create";
|
|
234
|
+
version: string;
|
|
235
|
+
name: string;
|
|
236
|
+
createdRound: bigint;
|
|
237
|
+
updatedRound: bigint;
|
|
238
|
+
createdMetadata: import("@algorandfoundation/algokit-utils/types/app").AppDeployMetadata;
|
|
239
|
+
deleted: boolean;
|
|
240
|
+
deletable?: boolean | undefined;
|
|
241
|
+
updatable?: boolean | undefined;
|
|
242
|
+
groupId: string;
|
|
243
|
+
txIds: string[];
|
|
244
|
+
returns?: ABIReturn[] | undefined;
|
|
245
|
+
confirmations: modelsv2.PendingTransactionResponse[];
|
|
246
|
+
transactions: Transaction[];
|
|
247
|
+
confirmation: modelsv2.PendingTransactionResponse;
|
|
248
|
+
transaction: Transaction;
|
|
249
|
+
appId: bigint;
|
|
250
|
+
appAddress: Address;
|
|
251
|
+
} | {
|
|
252
|
+
return: import("algosdk").ABIValue | import("@algorandfoundation/algokit-utils/types/app-arc56").ABIStruct | undefined;
|
|
253
|
+
deleteReturn: import("algosdk").ABIValue | import("@algorandfoundation/algokit-utils/types/app-arc56").ABIStruct | undefined;
|
|
254
|
+
compiledApproval?: import("@algorandfoundation/algokit-utils/types/app").CompiledTeal | undefined;
|
|
255
|
+
compiledClear?: import("@algorandfoundation/algokit-utils/types/app").CompiledTeal | undefined;
|
|
256
|
+
operationPerformed: "update";
|
|
257
|
+
appId: bigint;
|
|
258
|
+
appAddress: Address;
|
|
259
|
+
createdRound: bigint;
|
|
260
|
+
updatedRound: bigint;
|
|
261
|
+
createdMetadata: import("@algorandfoundation/algokit-utils/types/app").AppDeployMetadata;
|
|
262
|
+
deleted: boolean;
|
|
263
|
+
name: string;
|
|
264
|
+
version: string;
|
|
265
|
+
deletable?: boolean | undefined;
|
|
266
|
+
updatable?: boolean | undefined;
|
|
267
|
+
groupId: string;
|
|
268
|
+
txIds: string[];
|
|
269
|
+
returns?: ABIReturn[] | undefined;
|
|
270
|
+
confirmations: modelsv2.PendingTransactionResponse[];
|
|
271
|
+
transactions: Transaction[];
|
|
272
|
+
confirmation: modelsv2.PendingTransactionResponse;
|
|
273
|
+
transaction: Transaction;
|
|
274
|
+
} | {
|
|
275
|
+
return: import("algosdk").ABIValue | import("@algorandfoundation/algokit-utils/types/app-arc56").ABIStruct | undefined;
|
|
276
|
+
deleteReturn: import("algosdk").ABIValue | import("@algorandfoundation/algokit-utils/types/app-arc56").ABIStruct | undefined;
|
|
277
|
+
compiledApproval?: import("@algorandfoundation/algokit-utils/types/app").CompiledTeal | undefined;
|
|
278
|
+
compiledClear?: import("@algorandfoundation/algokit-utils/types/app").CompiledTeal | undefined;
|
|
279
|
+
operationPerformed: "replace";
|
|
280
|
+
version: string;
|
|
281
|
+
name: string;
|
|
282
|
+
createdRound: bigint;
|
|
283
|
+
updatedRound: bigint;
|
|
284
|
+
createdMetadata: import("@algorandfoundation/algokit-utils/types/app").AppDeployMetadata;
|
|
285
|
+
deleted: boolean;
|
|
286
|
+
deletable?: boolean | undefined;
|
|
287
|
+
updatable?: boolean | undefined;
|
|
288
|
+
groupId: string;
|
|
289
|
+
txIds: string[];
|
|
290
|
+
returns?: ABIReturn[] | undefined;
|
|
291
|
+
confirmations: modelsv2.PendingTransactionResponse[];
|
|
292
|
+
transactions: Transaction[];
|
|
293
|
+
confirmation: modelsv2.PendingTransactionResponse;
|
|
294
|
+
transaction: Transaction;
|
|
295
|
+
appId: bigint;
|
|
296
|
+
appAddress: Address;
|
|
297
|
+
deleteResult: import("@algorandfoundation/algokit-utils/types/transaction").ConfirmedTransactionResult;
|
|
298
|
+
} | {
|
|
299
|
+
return: import("algosdk").ABIValue | import("@algorandfoundation/algokit-utils/types/app-arc56").ABIStruct | undefined;
|
|
300
|
+
deleteReturn: import("algosdk").ABIValue | import("@algorandfoundation/algokit-utils/types/app-arc56").ABIStruct | undefined;
|
|
301
|
+
compiledApproval?: import("@algorandfoundation/algokit-utils/types/app").CompiledTeal | undefined;
|
|
302
|
+
compiledClear?: import("@algorandfoundation/algokit-utils/types/app").CompiledTeal | undefined;
|
|
303
|
+
operationPerformed: "nothing";
|
|
304
|
+
appId: bigint;
|
|
305
|
+
appAddress: Address;
|
|
306
|
+
createdRound: bigint;
|
|
307
|
+
updatedRound: bigint;
|
|
308
|
+
createdMetadata: import("@algorandfoundation/algokit-utils/types/app").AppDeployMetadata;
|
|
309
|
+
deleted: boolean;
|
|
310
|
+
name: string;
|
|
311
|
+
version: string;
|
|
312
|
+
deletable?: boolean | undefined;
|
|
313
|
+
updatable?: boolean | undefined;
|
|
314
|
+
};
|
|
315
|
+
appClient: AbelReaderClient;
|
|
316
|
+
}>;
|
|
317
|
+
/**
|
|
318
|
+
* 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.
|
|
319
|
+
*/
|
|
320
|
+
readonly params: {
|
|
321
|
+
/**
|
|
322
|
+
* Gets available create methods
|
|
323
|
+
*/
|
|
324
|
+
create: {
|
|
325
|
+
/**
|
|
326
|
+
* Creates a new instance of the AbelReader smart contract using the getAssetsTiny(uint64[],uint64)(string,string,uint8,string[]) ABI method.
|
|
327
|
+
*
|
|
328
|
+
* @param params The params for the smart contract call
|
|
329
|
+
* @returns The create params
|
|
330
|
+
*/
|
|
331
|
+
getAssetsTiny: (params: CallParams<AbelReaderArgs['obj']['getAssetsTiny(uint64[],uint64)(string,string,uint8,string[])'] | AbelReaderArgs['tuple']['getAssetsTiny(uint64[],uint64)(string,string,uint8,string[])']> & AppClientCompilationParams & CreateSchema & {
|
|
332
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
333
|
+
}) => Promise<{
|
|
334
|
+
deployTimeParams: import("@algorandfoundation/algokit-utils/types/app").TealTemplateParams | undefined;
|
|
335
|
+
schema: {
|
|
336
|
+
globalInts: number;
|
|
337
|
+
globalByteSlices: number;
|
|
338
|
+
localInts: number;
|
|
339
|
+
localByteSlices: number;
|
|
340
|
+
};
|
|
341
|
+
approvalProgram: Uint8Array;
|
|
342
|
+
clearStateProgram: Uint8Array;
|
|
343
|
+
maxFee?: import("@algorandfoundation/algokit-utils/types/amount").AlgoAmount | undefined;
|
|
344
|
+
note?: string | Uint8Array | undefined;
|
|
345
|
+
signer?: TransactionSigner | import("@algorandfoundation/algokit-utils/types/account").TransactionSignerAccount | undefined;
|
|
346
|
+
onComplete?: OnApplicationComplete.NoOpOC | OnApplicationComplete.OptInOC | OnApplicationComplete.CloseOutOC | OnApplicationComplete.UpdateApplicationOC | OnApplicationComplete.DeleteApplicationOC | undefined;
|
|
347
|
+
rejectVersion?: number | undefined;
|
|
348
|
+
lease?: string | Uint8Array | undefined;
|
|
349
|
+
rekeyTo?: string | Address | undefined;
|
|
350
|
+
staticFee?: import("@algorandfoundation/algokit-utils/types/amount").AlgoAmount | undefined;
|
|
351
|
+
extraFee?: import("@algorandfoundation/algokit-utils/types/amount").AlgoAmount | undefined;
|
|
352
|
+
validityWindow?: number | bigint | undefined;
|
|
353
|
+
firstValidRound?: bigint | undefined;
|
|
354
|
+
lastValidRound?: bigint | undefined;
|
|
355
|
+
accountReferences?: (string | Address)[] | undefined;
|
|
356
|
+
appReferences?: bigint[] | undefined;
|
|
357
|
+
assetReferences?: bigint[] | undefined;
|
|
358
|
+
boxReferences?: (import("@algorandfoundation/algokit-utils/types/app-manager").BoxReference | import("@algorandfoundation/algokit-utils/types/app-manager").BoxIdentifier)[] | undefined;
|
|
359
|
+
accessReferences?: import("@algorandfoundation/algokit-utils/types/app-manager").ResourceReference[] | undefined;
|
|
360
|
+
sender?: string | Address | undefined;
|
|
361
|
+
method: string;
|
|
362
|
+
args?: (import("algosdk").ABIValue | import("@algorandfoundation/algokit-utils/types/app-arc56").ABIStruct | AppMethodCallTransactionArgument | undefined)[] | undefined;
|
|
363
|
+
updatable?: boolean | undefined;
|
|
364
|
+
deletable?: boolean | undefined;
|
|
365
|
+
extraProgramPages?: number | undefined;
|
|
366
|
+
} & {
|
|
367
|
+
sender: Address;
|
|
368
|
+
signer: TransactionSigner | import("@algorandfoundation/algokit-utils/types/account").TransactionSignerAccount | undefined;
|
|
369
|
+
method: import("@algorandfoundation/algokit-utils/types/app-arc56").Arc56Method;
|
|
370
|
+
args: (import("algosdk").ABIValue | import("algosdk").TransactionWithSigner | Transaction | Promise<Transaction> | import("@algorandfoundation/algokit-utils/types/composer").AppMethodCall<import("@algorandfoundation/algokit-utils/types/composer").AppMethodCallParams> | import("@algorandfoundation/algokit-utils/types/composer").AppMethodCall<{
|
|
371
|
+
sender: string | Address;
|
|
372
|
+
maxFee?: import("@algorandfoundation/algokit-utils/types/amount").AlgoAmount | undefined;
|
|
373
|
+
note?: string | Uint8Array | undefined;
|
|
374
|
+
args?: Uint8Array[] | undefined;
|
|
375
|
+
signer?: TransactionSigner | import("@algorandfoundation/algokit-utils/types/account").TransactionSignerAccount | undefined;
|
|
376
|
+
onComplete?: OnApplicationComplete.NoOpOC | OnApplicationComplete.OptInOC | OnApplicationComplete.CloseOutOC | OnApplicationComplete.UpdateApplicationOC | OnApplicationComplete.DeleteApplicationOC | undefined;
|
|
377
|
+
rejectVersion?: number | undefined;
|
|
378
|
+
lease?: string | Uint8Array | undefined;
|
|
379
|
+
rekeyTo?: string | Address | undefined;
|
|
380
|
+
staticFee?: import("@algorandfoundation/algokit-utils/types/amount").AlgoAmount | undefined;
|
|
381
|
+
extraFee?: import("@algorandfoundation/algokit-utils/types/amount").AlgoAmount | undefined;
|
|
382
|
+
validityWindow?: number | bigint | undefined;
|
|
383
|
+
firstValidRound?: bigint | undefined;
|
|
384
|
+
lastValidRound?: bigint | undefined;
|
|
385
|
+
accountReferences?: (string | Address)[] | undefined;
|
|
386
|
+
appReferences?: bigint[] | undefined;
|
|
387
|
+
assetReferences?: bigint[] | undefined;
|
|
388
|
+
boxReferences?: (import("@algorandfoundation/algokit-utils/types/app-manager").BoxReference | import("@algorandfoundation/algokit-utils/types/app-manager").BoxIdentifier)[] | undefined;
|
|
389
|
+
accessReferences?: import("@algorandfoundation/algokit-utils/types/app-manager").ResourceReference[] | undefined;
|
|
390
|
+
approvalProgram: string | Uint8Array;
|
|
391
|
+
clearStateProgram: string | Uint8Array;
|
|
392
|
+
schema?: {
|
|
393
|
+
globalInts: number;
|
|
394
|
+
globalByteSlices: number;
|
|
395
|
+
localInts: number;
|
|
396
|
+
localByteSlices: number;
|
|
397
|
+
} | undefined;
|
|
398
|
+
extraProgramPages?: number | undefined;
|
|
399
|
+
}> | import("@algorandfoundation/algokit-utils/types/composer").AppMethodCall<{
|
|
400
|
+
sender: string | Address;
|
|
401
|
+
signer?: TransactionSigner | import("@algorandfoundation/algokit-utils/types/account").TransactionSignerAccount | undefined;
|
|
402
|
+
rekeyTo?: string | Address | undefined;
|
|
403
|
+
note?: string | Uint8Array | undefined;
|
|
404
|
+
lease?: string | Uint8Array | undefined;
|
|
405
|
+
staticFee?: import("@algorandfoundation/algokit-utils/types/amount").AlgoAmount | undefined;
|
|
406
|
+
extraFee?: import("@algorandfoundation/algokit-utils/types/amount").AlgoAmount | undefined;
|
|
407
|
+
maxFee?: import("@algorandfoundation/algokit-utils/types/amount").AlgoAmount | undefined;
|
|
408
|
+
validityWindow?: number | bigint | undefined;
|
|
409
|
+
firstValidRound?: bigint | undefined;
|
|
410
|
+
lastValidRound?: bigint | undefined;
|
|
411
|
+
appId: bigint;
|
|
412
|
+
onComplete?: OnApplicationComplete.UpdateApplicationOC | undefined;
|
|
413
|
+
args?: Uint8Array[] | undefined;
|
|
414
|
+
accountReferences?: (string | Address)[] | undefined;
|
|
415
|
+
appReferences?: bigint[] | undefined;
|
|
416
|
+
assetReferences?: bigint[] | undefined;
|
|
417
|
+
boxReferences?: (import("@algorandfoundation/algokit-utils/types/app-manager").BoxReference | import("@algorandfoundation/algokit-utils/types/app-manager").BoxIdentifier)[] | undefined;
|
|
418
|
+
accessReferences?: import("@algorandfoundation/algokit-utils/types/app-manager").ResourceReference[] | undefined;
|
|
419
|
+
rejectVersion?: number | undefined;
|
|
420
|
+
approvalProgram: string | Uint8Array;
|
|
421
|
+
clearStateProgram: string | Uint8Array;
|
|
422
|
+
}> | undefined)[] | undefined;
|
|
423
|
+
onComplete: OnApplicationComplete.NoOpOC | OnApplicationComplete.OptInOC | OnApplicationComplete.CloseOutOC | OnApplicationComplete.UpdateApplicationOC | OnApplicationComplete.DeleteApplicationOC;
|
|
424
|
+
}>;
|
|
425
|
+
};
|
|
426
|
+
};
|
|
427
|
+
/**
|
|
428
|
+
* Create transactions for the current app
|
|
429
|
+
*/
|
|
430
|
+
readonly createTransaction: {
|
|
431
|
+
/**
|
|
432
|
+
* Gets available create methods
|
|
433
|
+
*/
|
|
434
|
+
create: {
|
|
435
|
+
/**
|
|
436
|
+
* Creates a new instance of the AbelReader smart contract using the getAssetsTiny(uint64[],uint64)(string,string,uint8,string[]) ABI method.
|
|
437
|
+
*
|
|
438
|
+
* @param params The params for the smart contract call
|
|
439
|
+
* @returns The create transaction
|
|
440
|
+
*/
|
|
441
|
+
getAssetsTiny: (params: CallParams<AbelReaderArgs['obj']['getAssetsTiny(uint64[],uint64)(string,string,uint8,string[])'] | AbelReaderArgs['tuple']['getAssetsTiny(uint64[],uint64)(string,string,uint8,string[])']> & AppClientCompilationParams & CreateSchema & {
|
|
442
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
443
|
+
}) => Promise<{
|
|
444
|
+
transactions: Transaction[];
|
|
445
|
+
methodCalls: Map<number, import("algosdk").ABIMethod>;
|
|
446
|
+
signers: Map<number, TransactionSigner>;
|
|
447
|
+
}>;
|
|
448
|
+
};
|
|
449
|
+
};
|
|
450
|
+
/**
|
|
451
|
+
* Send calls to the current app
|
|
452
|
+
*/
|
|
453
|
+
readonly send: {
|
|
454
|
+
/**
|
|
455
|
+
* Gets available create methods
|
|
456
|
+
*/
|
|
457
|
+
create: {
|
|
458
|
+
/**
|
|
459
|
+
* Creates a new instance of the AbelReader smart contract using an ABI method call using the getAssetsTiny(uint64[],uint64)(string,string,uint8,string[]) ABI method.
|
|
460
|
+
*
|
|
461
|
+
* @param params The params for the smart contract call
|
|
462
|
+
* @returns The create result
|
|
463
|
+
*/
|
|
464
|
+
getAssetsTiny: (params: CallParams<AbelReaderArgs['obj']['getAssetsTiny(uint64[],uint64)(string,string,uint8,string[])'] | AbelReaderArgs['tuple']['getAssetsTiny(uint64[],uint64)(string,string,uint8,string[])']> & AppClientCompilationParams & CreateSchema & SendParams & {
|
|
465
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
466
|
+
}) => Promise<{
|
|
467
|
+
result: {
|
|
468
|
+
return: AssetTinyLabels | undefined;
|
|
469
|
+
compiledApproval?: import("@algorandfoundation/algokit-utils/types/app").CompiledTeal | undefined;
|
|
470
|
+
compiledClear?: import("@algorandfoundation/algokit-utils/types/app").CompiledTeal | undefined;
|
|
471
|
+
appId: bigint;
|
|
472
|
+
groupId: string;
|
|
473
|
+
txIds: string[];
|
|
474
|
+
returns?: ABIReturn[] | undefined;
|
|
475
|
+
confirmations: modelsv2.PendingTransactionResponse[];
|
|
476
|
+
transactions: Transaction[];
|
|
477
|
+
confirmation: modelsv2.PendingTransactionResponse;
|
|
478
|
+
transaction: Transaction;
|
|
479
|
+
appAddress: Address;
|
|
480
|
+
};
|
|
481
|
+
appClient: AbelReaderClient;
|
|
482
|
+
}>;
|
|
483
|
+
};
|
|
484
|
+
};
|
|
485
|
+
}
|
|
486
|
+
/**
|
|
487
|
+
* A client to make calls to the AbelReader smart contract
|
|
488
|
+
*/
|
|
489
|
+
declare class AbelReaderClient {
|
|
490
|
+
/**
|
|
491
|
+
* The underlying `AppClient` for when you want to have more flexibility
|
|
492
|
+
*/
|
|
493
|
+
readonly appClient: _AppClient;
|
|
494
|
+
/**
|
|
495
|
+
* Creates a new instance of `AbelReaderClient`
|
|
496
|
+
*
|
|
497
|
+
* @param appClient An `AppClient` instance which has been created with the AbelReader app spec
|
|
498
|
+
*/
|
|
499
|
+
constructor(appClient: _AppClient);
|
|
500
|
+
/**
|
|
501
|
+
* Creates a new instance of `AbelReaderClient`
|
|
502
|
+
*
|
|
503
|
+
* @param params The parameters to initialise the app client with
|
|
504
|
+
*/
|
|
505
|
+
constructor(params: Omit<AppClientParams, 'appSpec'>);
|
|
506
|
+
/**
|
|
507
|
+
* Checks for decode errors on the given return value and maps the return value to the return type for the given method
|
|
508
|
+
* @returns The typed return value or undefined if there was no value
|
|
509
|
+
*/
|
|
510
|
+
decodeReturnValue<TSignature extends AbelReaderNonVoidMethodSignatures>(method: TSignature, returnValue: ABIReturn | undefined): MethodReturn<TSignature> | undefined;
|
|
511
|
+
/**
|
|
512
|
+
* Returns a new `AbelReaderClient` client, resolving the app by creator address and name
|
|
513
|
+
* using AlgoKit app deployment semantics (i.e. looking for the app creation transaction note).
|
|
514
|
+
* @param params The parameters to create the app client
|
|
515
|
+
*/
|
|
516
|
+
static fromCreatorAndName(params: Omit<ResolveAppClientByCreatorAndName, 'appSpec'>): Promise<AbelReaderClient>;
|
|
517
|
+
/**
|
|
518
|
+
* Returns an `AbelReaderClient` instance for the current network based on
|
|
519
|
+
* pre-determined network-specific app IDs specified in the ARC-56 app spec.
|
|
520
|
+
*
|
|
521
|
+
* If no IDs are in the app spec or the network isn't recognised, an error is thrown.
|
|
522
|
+
* @param params The parameters to create the app client
|
|
523
|
+
*/
|
|
524
|
+
static fromNetwork(params: Omit<ResolveAppClientByNetwork, 'appSpec'>): Promise<AbelReaderClient>;
|
|
525
|
+
/** The ID of the app instance this client is linked to. */
|
|
526
|
+
get appId(): bigint;
|
|
527
|
+
/** The app address of the app instance this client is linked to. */
|
|
528
|
+
get appAddress(): Address;
|
|
529
|
+
/** The name of the app. */
|
|
530
|
+
get appName(): string;
|
|
531
|
+
/** The ARC-56 app spec being used */
|
|
532
|
+
get appSpec(): Arc56Contract;
|
|
533
|
+
/** A reference to the underlying `AlgorandClient` this app client is using. */
|
|
534
|
+
get algorand(): AlgorandClient;
|
|
535
|
+
/**
|
|
536
|
+
* Get parameters to create transactions for the current app. A good mental model for this is that these parameters represent a deferred transaction creation.
|
|
537
|
+
*/
|
|
538
|
+
readonly params: {
|
|
539
|
+
/**
|
|
540
|
+
* Makes a clear_state call to an existing instance of the AbelReader smart contract.
|
|
541
|
+
*
|
|
542
|
+
* @param params The params for the bare (raw) call
|
|
543
|
+
* @returns The clearState result
|
|
544
|
+
*/
|
|
545
|
+
clearState: (params?: Expand<AppClientBareCallParams>) => import("@algorandfoundation/algokit-utils/types/composer").AppCallParams;
|
|
546
|
+
/**
|
|
547
|
+
* Makes a call to the AbelReader smart contract using the `getAssetsTiny(uint64[],uint64)(string,string,uint8,string[])` ABI method.
|
|
548
|
+
*
|
|
549
|
+
* This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.
|
|
550
|
+
*
|
|
551
|
+
* @param params The params for the smart contract call
|
|
552
|
+
* @returns The call params
|
|
553
|
+
*/
|
|
554
|
+
getAssetsTiny: (params: CallParams<AbelReaderArgs['obj']['getAssetsTiny(uint64[],uint64)(string,string,uint8,string[])'] | AbelReaderArgs['tuple']['getAssetsTiny(uint64[],uint64)(string,string,uint8,string[])']> & {
|
|
555
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
556
|
+
}) => Promise<AppCallMethodCall>;
|
|
557
|
+
};
|
|
558
|
+
/**
|
|
559
|
+
* Create transactions for the current app
|
|
560
|
+
*/
|
|
561
|
+
readonly createTransaction: {
|
|
562
|
+
/**
|
|
563
|
+
* Makes a clear_state call to an existing instance of the AbelReader smart contract.
|
|
564
|
+
*
|
|
565
|
+
* @param params The params for the bare (raw) call
|
|
566
|
+
* @returns The clearState result
|
|
567
|
+
*/
|
|
568
|
+
clearState: (params?: Expand<AppClientBareCallParams>) => Promise<Transaction>;
|
|
569
|
+
/**
|
|
570
|
+
* Makes a call to the AbelReader smart contract using the `getAssetsTiny(uint64[],uint64)(string,string,uint8,string[])` ABI method.
|
|
571
|
+
*
|
|
572
|
+
* This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.
|
|
573
|
+
*
|
|
574
|
+
* @param params The params for the smart contract call
|
|
575
|
+
* @returns The call transaction
|
|
576
|
+
*/
|
|
577
|
+
getAssetsTiny: (params: CallParams<AbelReaderArgs['obj']['getAssetsTiny(uint64[],uint64)(string,string,uint8,string[])'] | AbelReaderArgs['tuple']['getAssetsTiny(uint64[],uint64)(string,string,uint8,string[])']> & {
|
|
578
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
579
|
+
}) => Promise<{
|
|
580
|
+
transactions: Transaction[];
|
|
581
|
+
methodCalls: Map<number, import("algosdk").ABIMethod>;
|
|
582
|
+
signers: Map<number, TransactionSigner>;
|
|
583
|
+
}>;
|
|
584
|
+
};
|
|
585
|
+
/**
|
|
586
|
+
* Send calls to the current app
|
|
587
|
+
*/
|
|
588
|
+
readonly send: {
|
|
589
|
+
/**
|
|
590
|
+
* Makes a clear_state call to an existing instance of the AbelReader smart contract.
|
|
591
|
+
*
|
|
592
|
+
* @param params The params for the bare (raw) call
|
|
593
|
+
* @returns The clearState result
|
|
594
|
+
*/
|
|
595
|
+
clearState: (params?: Expand<AppClientBareCallParams & SendParams>) => Promise<{
|
|
596
|
+
groupId: string;
|
|
597
|
+
txIds: string[];
|
|
598
|
+
returns?: ABIReturn[] | undefined;
|
|
599
|
+
confirmations: modelsv2.PendingTransactionResponse[];
|
|
600
|
+
transactions: Transaction[];
|
|
601
|
+
confirmation: modelsv2.PendingTransactionResponse;
|
|
602
|
+
transaction: Transaction;
|
|
603
|
+
return?: ABIReturn | undefined;
|
|
604
|
+
}>;
|
|
605
|
+
/**
|
|
606
|
+
* Makes a call to the AbelReader smart contract using the `getAssetsTiny(uint64[],uint64)(string,string,uint8,string[])` ABI method.
|
|
607
|
+
*
|
|
608
|
+
* This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.
|
|
609
|
+
*
|
|
610
|
+
* @param params The params for the smart contract call
|
|
611
|
+
* @returns The call result
|
|
612
|
+
*/
|
|
613
|
+
getAssetsTiny: (params: CallParams<AbelReaderArgs['obj']['getAssetsTiny(uint64[],uint64)(string,string,uint8,string[])'] | AbelReaderArgs['tuple']['getAssetsTiny(uint64[],uint64)(string,string,uint8,string[])']> & SendParams & {
|
|
614
|
+
onComplete?: OnApplicationComplete.NoOpOC;
|
|
615
|
+
}) => Promise<{
|
|
616
|
+
return: AssetTinyLabels | undefined;
|
|
617
|
+
returns?: ABIReturn[] | undefined;
|
|
618
|
+
groupId: string;
|
|
619
|
+
txIds: string[];
|
|
620
|
+
confirmations: modelsv2.PendingTransactionResponse[];
|
|
621
|
+
transactions: Transaction[];
|
|
622
|
+
confirmation: modelsv2.PendingTransactionResponse;
|
|
623
|
+
transaction: Transaction;
|
|
624
|
+
}>;
|
|
625
|
+
};
|
|
626
|
+
/**
|
|
627
|
+
* Clone this app client with different params
|
|
628
|
+
*
|
|
629
|
+
* @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.
|
|
630
|
+
* @returns A new app client with the altered params
|
|
631
|
+
*/
|
|
632
|
+
clone(params: CloneAppClientParams): AbelReaderClient;
|
|
633
|
+
/**
|
|
634
|
+
* Makes a readonly (simulated) call to the AbelReader smart contract using the `getAssetsTiny(uint64[],uint64)(string,string,uint8,string[])` ABI method.
|
|
635
|
+
*
|
|
636
|
+
* This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.
|
|
637
|
+
*
|
|
638
|
+
* @param params The params for the smart contract call
|
|
639
|
+
* @returns The call result
|
|
640
|
+
*/
|
|
641
|
+
getAssetsTiny(params: CallParams<AbelReaderArgs['obj']['getAssetsTiny(uint64[],uint64)(string,string,uint8,string[])'] | AbelReaderArgs['tuple']['getAssetsTiny(uint64[],uint64)(string,string,uint8,string[])']>): Promise<AssetTinyLabels>;
|
|
642
|
+
/**
|
|
643
|
+
* Methods to access state for the current AbelReader app
|
|
644
|
+
*/
|
|
645
|
+
state: {};
|
|
646
|
+
newGroup(): AbelReaderComposer;
|
|
647
|
+
}
|
|
648
|
+
export type AbelReaderComposer<TReturns extends [...any[]] = []> = {
|
|
649
|
+
/**
|
|
650
|
+
* Calls the getAssetsTiny(uint64[],uint64)(string,string,uint8,string[]) ABI method.
|
|
651
|
+
*
|
|
652
|
+
* @param args The arguments for the contract call
|
|
653
|
+
* @param params Any additional parameters for the call
|
|
654
|
+
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
|
|
655
|
+
*/
|
|
656
|
+
getAssetsTiny(params?: CallParams<AbelReaderArgs['obj']['getAssetsTiny(uint64[],uint64)(string,string,uint8,string[])'] | AbelReaderArgs['tuple']['getAssetsTiny(uint64[],uint64)(string,string,uint8,string[])']>): AbelReaderComposer<[...TReturns, AbelReaderReturns['getAssetsTiny(uint64[],uint64)(string,string,uint8,string[])'] | undefined]>;
|
|
657
|
+
/**
|
|
658
|
+
* Makes a clear_state call to an existing instance of the AbelReader smart contract.
|
|
659
|
+
*
|
|
660
|
+
* @param args The arguments for the bare call
|
|
661
|
+
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
|
|
662
|
+
*/
|
|
663
|
+
clearState(params?: AppClientBareCallParams): AbelReaderComposer<[...TReturns, undefined]>;
|
|
664
|
+
/**
|
|
665
|
+
* Adds a transaction to the composer
|
|
666
|
+
*
|
|
667
|
+
* @param txn A transaction to add to the transaction group
|
|
668
|
+
* @param signer The optional signer to use when signing this transaction.
|
|
669
|
+
*/
|
|
670
|
+
addTransaction(txn: Transaction, signer?: TransactionSigner): AbelReaderComposer<TReturns>;
|
|
671
|
+
/**
|
|
672
|
+
* Returns the underlying AtomicTransactionComposer instance
|
|
673
|
+
*/
|
|
674
|
+
composer(): Promise<TransactionComposer>;
|
|
675
|
+
/**
|
|
676
|
+
* Simulates the transaction group and returns the result
|
|
677
|
+
*/
|
|
678
|
+
simulate(): Promise<AbelReaderComposerResults<TReturns> & {
|
|
679
|
+
simulateResponse: modelsv2.SimulateResponse;
|
|
680
|
+
}>;
|
|
681
|
+
simulate(options: SkipSignaturesSimulateOptions): Promise<AbelReaderComposerResults<TReturns> & {
|
|
682
|
+
simulateResponse: modelsv2.SimulateResponse;
|
|
683
|
+
}>;
|
|
684
|
+
simulate(options: RawSimulateOptions): Promise<AbelReaderComposerResults<TReturns> & {
|
|
685
|
+
simulateResponse: modelsv2.SimulateResponse;
|
|
686
|
+
}>;
|
|
687
|
+
/**
|
|
688
|
+
* Sends the transaction group to the network and returns the results
|
|
689
|
+
*/
|
|
690
|
+
send(params?: SendParams): Promise<AbelReaderComposerResults<TReturns>>;
|
|
691
|
+
};
|
|
692
|
+
export type AbelReaderComposerResults<TReturns extends [...any[]]> = Expand<SendAtomicTransactionComposerResults & {
|
|
693
|
+
returns: TReturns;
|
|
694
|
+
}>;
|
|
695
|
+
import { CommonAppCallParams } from '@algorandfoundation/algokit-utils/types/composer';
|
|
696
|
+
type ExtraMethodCallArgs = Omit<CommonAppCallParams, 'appId' | 'sender' | 'method' | 'args' | 'onComplete'>;
|
|
697
|
+
type Methods = AbelReaderTypes['methods'];
|
|
698
|
+
declare class GhostBase {
|
|
699
|
+
static factory: typeof AbelReaderFactory;
|
|
700
|
+
static client: typeof AbelReaderClient;
|
|
701
|
+
algorand: AlgorandClient;
|
|
702
|
+
readerAccount: string;
|
|
703
|
+
ghostAppId?: bigint;
|
|
704
|
+
factory: AbelReaderFactory;
|
|
705
|
+
protected client: AbelReaderClient;
|
|
706
|
+
cacheParamsTimeout: number;
|
|
707
|
+
constructor({ algorand, readerAccount, ghostAppId, }: {
|
|
708
|
+
algorand: AlgorandClient;
|
|
709
|
+
readerAccount?: string;
|
|
710
|
+
ghostAppId?: bigint;
|
|
711
|
+
});
|
|
712
|
+
protected getAndCacheSuggestedParams(): Promise<import("algosdk").SuggestedParams>;
|
|
713
|
+
protected execute<T>({ signature, txnBuilder, methodArgsOrArgsArray, extraMethodCallArgs, extraSimulateArgs, }: {
|
|
714
|
+
signature: string;
|
|
715
|
+
txnBuilder: (builder: AbelReaderComposer<any>, args: any) => AbelReaderComposer<any>;
|
|
716
|
+
methodArgsOrArgsArray: any;
|
|
717
|
+
extraMethodCallArgs?: ExtraMethodCallArgs | ExtraMethodCallArgs[];
|
|
718
|
+
extraSimulateArgs?: RawSimulateOptions;
|
|
719
|
+
}): Promise<T[]>;
|
|
720
|
+
}
|
|
721
|
+
export declare class AbelReaderSDK extends GhostBase {
|
|
722
|
+
constructor(args: ConstructorParameters<typeof GhostBase>[0]);
|
|
723
|
+
getAssetsTiny({ methodArgsOrArgsArray, extraMethodCallArgs, extraSimulateArgs, }: {
|
|
724
|
+
methodArgsOrArgsArray: Methods['getAssetsTiny']['argsObj'] | Methods['getAssetsTiny']['argsObj'][];
|
|
725
|
+
extraMethodCallArgs?: ExtraMethodCallArgs | ExtraMethodCallArgs[];
|
|
726
|
+
extraSimulateArgs?: RawSimulateOptions;
|
|
727
|
+
}): Promise<Methods['getAssetsTiny']['returns'][]>;
|
|
728
|
+
}
|
|
729
|
+
export {};
|