arc200-client 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,689 @@
1
+ import * as algosdk from 'algosdk';
2
+ import { Algodv2, TransactionWithSigner, Transaction, AtomicTransactionComposer, modelsv2, ABIResult, OnApplicationComplete } from 'algosdk';
3
+ import * as _algorandfoundation_algokit_utils_types_transaction from '@algorandfoundation/algokit-utils/types/transaction';
4
+ import { TransactionToSign, SendTransactionResult, SendTransactionFrom } from '@algorandfoundation/algokit-utils/types/transaction';
5
+ import * as _algorandfoundation_algokit_utils_types_app from '@algorandfoundation/algokit-utils/types/app';
6
+ import { AppCallTransactionResult, AppCallTransactionResultOfType, AppCompilationResult, AppReference, CoreAppCallArgs, ABIAppCallArg, RawAppCallArgs, TealTemplateParams } from '@algorandfoundation/algokit-utils/types/app';
7
+ import { ApplicationClient, AppDetails, AppClientDeployCoreParams, AppClientCallCoreParams, AppClientCompilationParams } from '@algorandfoundation/algokit-utils/types/app-client';
8
+
9
+ /**
10
+ * Defines an onCompletionAction of 'no_op'
11
+ */
12
+ type OnCompleteNoOp = {
13
+ onCompleteAction?: 'no_op' | OnApplicationComplete.NoOpOC;
14
+ };
15
+ /**
16
+ * Defines the types of available calls and state of the Arc200 smart contract.
17
+ */
18
+ type Arc200 = {
19
+ /**
20
+ * Maps method signatures / names to their argument and return types.
21
+ */
22
+ methods: Record<'arc200_name()string' | 'arc200_name', {
23
+ argsObj: {};
24
+ argsTuple: [];
25
+ /**
26
+ * The name of the token
27
+ */
28
+ returns: string;
29
+ }> & Record<'arc200_symbol()string' | 'arc200_symbol', {
30
+ argsObj: {};
31
+ argsTuple: [];
32
+ /**
33
+ * The symbol of the token
34
+ */
35
+ returns: string;
36
+ }> & Record<'arc200_decimals()uint8' | 'arc200_decimals', {
37
+ argsObj: {};
38
+ argsTuple: [];
39
+ /**
40
+ * The decimals of the token
41
+ */
42
+ returns: number;
43
+ }> & Record<'arc200_totalSupply()uint256' | 'arc200_totalSupply', {
44
+ argsObj: {};
45
+ argsTuple: [];
46
+ /**
47
+ * The total supply of the token
48
+ */
49
+ returns: bigint;
50
+ }> & Record<'arc200_balanceOf(address)uint256' | 'arc200_balanceOf', {
51
+ argsObj: {
52
+ /**
53
+ * The address of the owner of the token
54
+ */
55
+ owner: string;
56
+ };
57
+ argsTuple: [owner: string];
58
+ /**
59
+ * The current balance of the holder of the token
60
+ */
61
+ returns: bigint;
62
+ }> & Record<'arc200_transfer(address,uint256)bool' | 'arc200_transfer', {
63
+ argsObj: {
64
+ /**
65
+ * The destination of the transfer
66
+ */
67
+ to: string;
68
+ /**
69
+ * Amount of tokens to transfer
70
+ */
71
+ value: bigint | number;
72
+ };
73
+ argsTuple: [to: string, value: bigint | number];
74
+ /**
75
+ * Success
76
+ */
77
+ returns: boolean;
78
+ }> & Record<'arc200_transferFrom(address,address,uint256)bool' | 'arc200_transferFrom', {
79
+ argsObj: {
80
+ /**
81
+ * The source of the transfer
82
+ */
83
+ from: string;
84
+ /**
85
+ * The destination of the transfer
86
+ */
87
+ to: string;
88
+ /**
89
+ * Amount of tokens to transfer
90
+ */
91
+ value: bigint | number;
92
+ };
93
+ argsTuple: [from: string, to: string, value: bigint | number];
94
+ /**
95
+ * Success
96
+ */
97
+ returns: boolean;
98
+ }> & Record<'arc200_approve(address,uint256)bool' | 'arc200_approve', {
99
+ argsObj: {
100
+ /**
101
+ * Who is allowed to take tokens on owner's behalf
102
+ */
103
+ spender: string;
104
+ /**
105
+ * Amount of tokens to be taken by spender
106
+ */
107
+ value: bigint | number;
108
+ };
109
+ argsTuple: [spender: string, value: bigint | number];
110
+ /**
111
+ * Success
112
+ */
113
+ returns: boolean;
114
+ }> & Record<'arc200_allowance(address,address)uint256' | 'arc200_allowance', {
115
+ argsObj: {
116
+ /**
117
+ * Owner's account
118
+ */
119
+ owner: string;
120
+ /**
121
+ * Who is allowed to take tokens on owner's behalf
122
+ */
123
+ spender: string;
124
+ };
125
+ argsTuple: [owner: string, spender: string];
126
+ /**
127
+ * The remaining allowance
128
+ */
129
+ returns: bigint;
130
+ }> & Record<'createApplication()void' | 'createApplication', {
131
+ argsObj: {};
132
+ argsTuple: [];
133
+ returns: void;
134
+ }>;
135
+ };
136
+ /**
137
+ * Defines the possible abi call signatures
138
+ */
139
+ type Arc200Sig = keyof Arc200['methods'];
140
+ /**
141
+ * Defines an object containing all relevant parameters for a single call to the contract. Where TSignature is undefined, a bare call is made
142
+ */
143
+ type TypedCallParams<TSignature extends Arc200Sig | undefined> = {
144
+ method: TSignature;
145
+ methodArgs: TSignature extends undefined ? undefined : Array<ABIAppCallArg | undefined>;
146
+ } & AppClientCallCoreParams & CoreAppCallArgs;
147
+ /**
148
+ * Defines the arguments required for a bare call
149
+ */
150
+ type BareCallArgs = Omit<RawAppCallArgs, keyof CoreAppCallArgs>;
151
+ /**
152
+ * Maps a method signature from the Arc200 smart contract to the method's arguments in either tuple of struct form
153
+ */
154
+ type MethodArgs<TSignature extends Arc200Sig> = Arc200['methods'][TSignature]['argsObj' | 'argsTuple'];
155
+ /**
156
+ * Maps a method signature from the Arc200 smart contract to the method's return type
157
+ */
158
+ type MethodReturn<TSignature extends Arc200Sig> = Arc200['methods'][TSignature]['returns'];
159
+ /**
160
+ * A factory for available 'create' calls
161
+ */
162
+ type Arc200CreateCalls = (typeof Arc200CallFactory)['create'];
163
+ /**
164
+ * Defines supported create methods for this smart contract
165
+ */
166
+ type Arc200CreateCallParams = (TypedCallParams<'createApplication()void'> & (OnCompleteNoOp));
167
+ /**
168
+ * Defines arguments required for the deploy method.
169
+ */
170
+ type Arc200DeployArgs = {
171
+ deployTimeParams?: TealTemplateParams;
172
+ /**
173
+ * A delegate which takes a create call factory and returns the create call params for this smart contract
174
+ */
175
+ createCall?: (callFactory: Arc200CreateCalls) => Arc200CreateCallParams;
176
+ };
177
+ /**
178
+ * Exposes methods for constructing all available smart contract calls
179
+ */
180
+ declare abstract class Arc200CallFactory {
181
+ /**
182
+ * Gets available create call factories
183
+ */
184
+ static get create(): {
185
+ /**
186
+ * Constructs a create call for the Arc200 smart contract using the createApplication()void ABI method
187
+ *
188
+ * @param args Any args for the contract call
189
+ * @param params Any additional parameters for the call
190
+ * @returns A TypedCallParams object for the call
191
+ */
192
+ createApplication(args: MethodArgs<'createApplication()void'>, params?: AppClientCallCoreParams & CoreAppCallArgs & AppClientCompilationParams & (OnCompleteNoOp)): {
193
+ sender?: SendTransactionFrom | undefined;
194
+ note?: _algorandfoundation_algokit_utils_types_transaction.TransactionNote;
195
+ sendParams?: _algorandfoundation_algokit_utils_types_transaction.SendTransactionParams | undefined;
196
+ lease?: string | Uint8Array | undefined;
197
+ boxes?: (algosdk.BoxReference | _algorandfoundation_algokit_utils_types_app.BoxReference | _algorandfoundation_algokit_utils_types_app.BoxIdentifier)[] | undefined;
198
+ accounts?: (string | algosdk.Address)[] | undefined;
199
+ apps?: number[] | undefined;
200
+ assets?: number[] | undefined;
201
+ deployTimeParams?: TealTemplateParams | undefined;
202
+ updatable?: boolean | undefined;
203
+ deletable?: boolean | undefined;
204
+ onCompleteAction?: OnApplicationComplete.NoOpOC | "no_op" | undefined;
205
+ method: "createApplication()void";
206
+ methodArgs: any[];
207
+ };
208
+ };
209
+ /**
210
+ * Constructs a no op call for the arc200_name()string ABI method
211
+ *
212
+ * Returns the name of the token
213
+ *
214
+ * @param args Any args for the contract call
215
+ * @param params Any additional parameters for the call
216
+ * @returns A TypedCallParams object for the call
217
+ */
218
+ static arc200Name(args: MethodArgs<'arc200_name()string'>, params: AppClientCallCoreParams & CoreAppCallArgs): {
219
+ sender?: SendTransactionFrom | undefined;
220
+ note?: _algorandfoundation_algokit_utils_types_transaction.TransactionNote;
221
+ sendParams?: _algorandfoundation_algokit_utils_types_transaction.SendTransactionParams | undefined;
222
+ lease?: string | Uint8Array | undefined;
223
+ boxes?: (algosdk.BoxReference | _algorandfoundation_algokit_utils_types_app.BoxReference | _algorandfoundation_algokit_utils_types_app.BoxIdentifier)[] | undefined;
224
+ accounts?: (string | algosdk.Address)[] | undefined;
225
+ apps?: number[] | undefined;
226
+ assets?: number[] | undefined;
227
+ method: "arc200_name()string";
228
+ methodArgs: any[];
229
+ };
230
+ /**
231
+ * Constructs a no op call for the arc200_symbol()string ABI method
232
+ *
233
+ * Returns the symbol of the token
234
+ *
235
+ * @param args Any args for the contract call
236
+ * @param params Any additional parameters for the call
237
+ * @returns A TypedCallParams object for the call
238
+ */
239
+ static arc200Symbol(args: MethodArgs<'arc200_symbol()string'>, params: AppClientCallCoreParams & CoreAppCallArgs): {
240
+ sender?: SendTransactionFrom | undefined;
241
+ note?: _algorandfoundation_algokit_utils_types_transaction.TransactionNote;
242
+ sendParams?: _algorandfoundation_algokit_utils_types_transaction.SendTransactionParams | undefined;
243
+ lease?: string | Uint8Array | undefined;
244
+ boxes?: (algosdk.BoxReference | _algorandfoundation_algokit_utils_types_app.BoxReference | _algorandfoundation_algokit_utils_types_app.BoxIdentifier)[] | undefined;
245
+ accounts?: (string | algosdk.Address)[] | undefined;
246
+ apps?: number[] | undefined;
247
+ assets?: number[] | undefined;
248
+ method: "arc200_symbol()string";
249
+ methodArgs: any[];
250
+ };
251
+ /**
252
+ * Constructs a no op call for the arc200_decimals()uint8 ABI method
253
+ *
254
+ * Returns the decimals of the token
255
+ *
256
+ * @param args Any args for the contract call
257
+ * @param params Any additional parameters for the call
258
+ * @returns A TypedCallParams object for the call
259
+ */
260
+ static arc200Decimals(args: MethodArgs<'arc200_decimals()uint8'>, params: AppClientCallCoreParams & CoreAppCallArgs): {
261
+ sender?: SendTransactionFrom | undefined;
262
+ note?: _algorandfoundation_algokit_utils_types_transaction.TransactionNote;
263
+ sendParams?: _algorandfoundation_algokit_utils_types_transaction.SendTransactionParams | undefined;
264
+ lease?: string | Uint8Array | undefined;
265
+ boxes?: (algosdk.BoxReference | _algorandfoundation_algokit_utils_types_app.BoxReference | _algorandfoundation_algokit_utils_types_app.BoxIdentifier)[] | undefined;
266
+ accounts?: (string | algosdk.Address)[] | undefined;
267
+ apps?: number[] | undefined;
268
+ assets?: number[] | undefined;
269
+ method: "arc200_decimals()uint8";
270
+ methodArgs: any[];
271
+ };
272
+ /**
273
+ * Constructs a no op call for the arc200_totalSupply()uint256 ABI method
274
+ *
275
+ * Returns the total supply of the token
276
+ *
277
+ * @param args Any args for the contract call
278
+ * @param params Any additional parameters for the call
279
+ * @returns A TypedCallParams object for the call
280
+ */
281
+ static arc200TotalSupply(args: MethodArgs<'arc200_totalSupply()uint256'>, params: AppClientCallCoreParams & CoreAppCallArgs): {
282
+ sender?: SendTransactionFrom | undefined;
283
+ note?: _algorandfoundation_algokit_utils_types_transaction.TransactionNote;
284
+ sendParams?: _algorandfoundation_algokit_utils_types_transaction.SendTransactionParams | undefined;
285
+ lease?: string | Uint8Array | undefined;
286
+ boxes?: (algosdk.BoxReference | _algorandfoundation_algokit_utils_types_app.BoxReference | _algorandfoundation_algokit_utils_types_app.BoxIdentifier)[] | undefined;
287
+ accounts?: (string | algosdk.Address)[] | undefined;
288
+ apps?: number[] | undefined;
289
+ assets?: number[] | undefined;
290
+ method: "arc200_totalSupply()uint256";
291
+ methodArgs: any[];
292
+ };
293
+ /**
294
+ * Constructs a no op call for the arc200_balanceOf(address)uint256 ABI method
295
+ *
296
+ * Returns the current balance of the owner of the token
297
+ *
298
+ * @param args Any args for the contract call
299
+ * @param params Any additional parameters for the call
300
+ * @returns A TypedCallParams object for the call
301
+ */
302
+ static arc200BalanceOf(args: MethodArgs<'arc200_balanceOf(address)uint256'>, params: AppClientCallCoreParams & CoreAppCallArgs): {
303
+ sender?: SendTransactionFrom | undefined;
304
+ note?: _algorandfoundation_algokit_utils_types_transaction.TransactionNote;
305
+ sendParams?: _algorandfoundation_algokit_utils_types_transaction.SendTransactionParams | undefined;
306
+ lease?: string | Uint8Array | undefined;
307
+ boxes?: (algosdk.BoxReference | _algorandfoundation_algokit_utils_types_app.BoxReference | _algorandfoundation_algokit_utils_types_app.BoxIdentifier)[] | undefined;
308
+ accounts?: (string | algosdk.Address)[] | undefined;
309
+ apps?: number[] | undefined;
310
+ assets?: number[] | undefined;
311
+ method: "arc200_balanceOf(address)uint256";
312
+ methodArgs: string[];
313
+ };
314
+ /**
315
+ * Constructs a no op call for the arc200_transfer(address,uint256)bool ABI method
316
+ *
317
+ * Transfers tokens
318
+ *
319
+ * @param args Any args for the contract call
320
+ * @param params Any additional parameters for the call
321
+ * @returns A TypedCallParams object for the call
322
+ */
323
+ static arc200Transfer(args: MethodArgs<'arc200_transfer(address,uint256)bool'>, params: AppClientCallCoreParams & CoreAppCallArgs): {
324
+ sender?: SendTransactionFrom | undefined;
325
+ note?: _algorandfoundation_algokit_utils_types_transaction.TransactionNote;
326
+ sendParams?: _algorandfoundation_algokit_utils_types_transaction.SendTransactionParams | undefined;
327
+ lease?: string | Uint8Array | undefined;
328
+ boxes?: (algosdk.BoxReference | _algorandfoundation_algokit_utils_types_app.BoxReference | _algorandfoundation_algokit_utils_types_app.BoxIdentifier)[] | undefined;
329
+ accounts?: (string | algosdk.Address)[] | undefined;
330
+ apps?: number[] | undefined;
331
+ assets?: number[] | undefined;
332
+ method: "arc200_transfer(address,uint256)bool";
333
+ methodArgs: (string | number | bigint)[];
334
+ };
335
+ /**
336
+ * Constructs a no op call for the arc200_transferFrom(address,address,uint256)bool ABI method
337
+ *
338
+ * Transfers tokens from source to destination as approved spender
339
+ *
340
+ * @param args Any args for the contract call
341
+ * @param params Any additional parameters for the call
342
+ * @returns A TypedCallParams object for the call
343
+ */
344
+ static arc200TransferFrom(args: MethodArgs<'arc200_transferFrom(address,address,uint256)bool'>, params: AppClientCallCoreParams & CoreAppCallArgs): {
345
+ sender?: SendTransactionFrom | undefined;
346
+ note?: _algorandfoundation_algokit_utils_types_transaction.TransactionNote;
347
+ sendParams?: _algorandfoundation_algokit_utils_types_transaction.SendTransactionParams | undefined;
348
+ lease?: string | Uint8Array | undefined;
349
+ boxes?: (algosdk.BoxReference | _algorandfoundation_algokit_utils_types_app.BoxReference | _algorandfoundation_algokit_utils_types_app.BoxIdentifier)[] | undefined;
350
+ accounts?: (string | algosdk.Address)[] | undefined;
351
+ apps?: number[] | undefined;
352
+ assets?: number[] | undefined;
353
+ method: "arc200_transferFrom(address,address,uint256)bool";
354
+ methodArgs: (string | number | bigint)[];
355
+ };
356
+ /**
357
+ * Constructs a no op call for the arc200_approve(address,uint256)bool ABI method
358
+ *
359
+ * Approve spender for a token
360
+ *
361
+ * @param args Any args for the contract call
362
+ * @param params Any additional parameters for the call
363
+ * @returns A TypedCallParams object for the call
364
+ */
365
+ static arc200Approve(args: MethodArgs<'arc200_approve(address,uint256)bool'>, params: AppClientCallCoreParams & CoreAppCallArgs): {
366
+ sender?: SendTransactionFrom | undefined;
367
+ note?: _algorandfoundation_algokit_utils_types_transaction.TransactionNote;
368
+ sendParams?: _algorandfoundation_algokit_utils_types_transaction.SendTransactionParams | undefined;
369
+ lease?: string | Uint8Array | undefined;
370
+ boxes?: (algosdk.BoxReference | _algorandfoundation_algokit_utils_types_app.BoxReference | _algorandfoundation_algokit_utils_types_app.BoxIdentifier)[] | undefined;
371
+ accounts?: (string | algosdk.Address)[] | undefined;
372
+ apps?: number[] | undefined;
373
+ assets?: number[] | undefined;
374
+ method: "arc200_approve(address,uint256)bool";
375
+ methodArgs: (string | number | bigint)[];
376
+ };
377
+ /**
378
+ * Constructs a no op call for the arc200_allowance(address,address)uint256 ABI method
379
+ *
380
+ * Returns the current allowance of the spender of the tokens of the owner
381
+ *
382
+ * @param args Any args for the contract call
383
+ * @param params Any additional parameters for the call
384
+ * @returns A TypedCallParams object for the call
385
+ */
386
+ static arc200Allowance(args: MethodArgs<'arc200_allowance(address,address)uint256'>, params: AppClientCallCoreParams & CoreAppCallArgs): {
387
+ sender?: SendTransactionFrom | undefined;
388
+ note?: _algorandfoundation_algokit_utils_types_transaction.TransactionNote;
389
+ sendParams?: _algorandfoundation_algokit_utils_types_transaction.SendTransactionParams | undefined;
390
+ lease?: string | Uint8Array | undefined;
391
+ boxes?: (algosdk.BoxReference | _algorandfoundation_algokit_utils_types_app.BoxReference | _algorandfoundation_algokit_utils_types_app.BoxIdentifier)[] | undefined;
392
+ accounts?: (string | algosdk.Address)[] | undefined;
393
+ apps?: number[] | undefined;
394
+ assets?: number[] | undefined;
395
+ method: "arc200_allowance(address,address)uint256";
396
+ methodArgs: string[];
397
+ };
398
+ }
399
+ /**
400
+ * A client to make calls to the Arc200 smart contract
401
+ */
402
+ declare class Arc200Client {
403
+ private algod;
404
+ /**
405
+ * The underlying `ApplicationClient` for when you want to have more flexibility
406
+ */
407
+ readonly appClient: ApplicationClient;
408
+ private readonly sender;
409
+ /**
410
+ * Creates a new instance of `Arc200Client`
411
+ *
412
+ * @param appDetails appDetails The details to identify the app to deploy
413
+ * @param algod An algod client instance
414
+ */
415
+ constructor(appDetails: AppDetails, algod: Algodv2);
416
+ /**
417
+ * Checks for decode errors on the AppCallTransactionResult and maps the return value to the specified generic type
418
+ *
419
+ * @param result The AppCallTransactionResult to be mapped
420
+ * @param returnValueFormatter An optional delegate to format the return value if required
421
+ * @returns The smart contract response with an updated return value
422
+ */
423
+ protected mapReturnValue<TReturn, TResult extends AppCallTransactionResult = AppCallTransactionResult>(result: AppCallTransactionResult, returnValueFormatter?: (value: any) => TReturn): AppCallTransactionResultOfType<TReturn> & TResult;
424
+ /**
425
+ * Calls the ABI method with the matching signature using an onCompletion code of NO_OP
426
+ *
427
+ * @param typedCallParams An object containing the method signature, args, and any other relevant parameters
428
+ * @param returnValueFormatter An optional delegate which when provided will be used to map non-undefined return values to the target type
429
+ * @returns The result of the smart contract call
430
+ */
431
+ call<TSignature extends keyof Arc200['methods']>(typedCallParams: TypedCallParams<TSignature>, returnValueFormatter?: (value: any) => MethodReturn<TSignature>): Promise<AppCallTransactionResultOfType<MethodReturn<TSignature>> & AppCallTransactionResult>;
432
+ /**
433
+ * Idempotently deploys the Arc200 smart contract.
434
+ *
435
+ * @param params The arguments for the contract calls and any additional parameters for the call
436
+ * @returns The deployment result
437
+ */
438
+ deploy(params?: Arc200DeployArgs & AppClientDeployCoreParams): ReturnType<ApplicationClient['deploy']>;
439
+ /**
440
+ * Gets available create methods
441
+ */
442
+ get create(): {
443
+ /**
444
+ * Creates a new instance of the Arc200 smart contract using the createApplication()void ABI method.
445
+ *
446
+ * @param args The arguments for the smart contract call
447
+ * @param params Any additional parameters for the call
448
+ * @returns The create result
449
+ */
450
+ createApplication(args: MethodArgs<'createApplication()void'>, params?: AppClientCallCoreParams & AppClientCompilationParams & (OnCompleteNoOp)): Promise<AppCallTransactionResultOfType<void> & AppCallTransactionResult & Partial<AppCompilationResult> & AppReference>;
451
+ };
452
+ /**
453
+ * Makes a clear_state call to an existing instance of the Arc200 smart contract.
454
+ *
455
+ * @param args The arguments for the bare call
456
+ * @returns The clear_state result
457
+ */
458
+ clearState(args?: BareCallArgs & AppClientCallCoreParams & CoreAppCallArgs): Promise<AppCallTransactionResult>;
459
+ /**
460
+ * Calls the arc200_name()string ABI method.
461
+ *
462
+ * Returns the name of the token
463
+ *
464
+ * @param args The arguments for the contract call
465
+ * @param params Any additional parameters for the call
466
+ * @returns The result of the call: The name of the token
467
+ */
468
+ arc200Name(args: MethodArgs<'arc200_name()string'>, params?: AppClientCallCoreParams & CoreAppCallArgs): Promise<AppCallTransactionResultOfType<string> & AppCallTransactionResult>;
469
+ /**
470
+ * Calls the arc200_symbol()string ABI method.
471
+ *
472
+ * Returns the symbol of the token
473
+ *
474
+ * @param args The arguments for the contract call
475
+ * @param params Any additional parameters for the call
476
+ * @returns The result of the call: The symbol of the token
477
+ */
478
+ arc200Symbol(args: MethodArgs<'arc200_symbol()string'>, params?: AppClientCallCoreParams & CoreAppCallArgs): Promise<AppCallTransactionResultOfType<string> & AppCallTransactionResult>;
479
+ /**
480
+ * Calls the arc200_decimals()uint8 ABI method.
481
+ *
482
+ * Returns the decimals of the token
483
+ *
484
+ * @param args The arguments for the contract call
485
+ * @param params Any additional parameters for the call
486
+ * @returns The result of the call: The decimals of the token
487
+ */
488
+ arc200Decimals(args: MethodArgs<'arc200_decimals()uint8'>, params?: AppClientCallCoreParams & CoreAppCallArgs): Promise<AppCallTransactionResultOfType<number> & AppCallTransactionResult>;
489
+ /**
490
+ * Calls the arc200_totalSupply()uint256 ABI method.
491
+ *
492
+ * Returns the total supply of the token
493
+ *
494
+ * @param args The arguments for the contract call
495
+ * @param params Any additional parameters for the call
496
+ * @returns The result of the call: The total supply of the token
497
+ */
498
+ arc200TotalSupply(args: MethodArgs<'arc200_totalSupply()uint256'>, params?: AppClientCallCoreParams & CoreAppCallArgs): Promise<AppCallTransactionResultOfType<bigint> & AppCallTransactionResult>;
499
+ /**
500
+ * Calls the arc200_balanceOf(address)uint256 ABI method.
501
+ *
502
+ * Returns the current balance of the owner of the token
503
+ *
504
+ * @param args The arguments for the contract call
505
+ * @param params Any additional parameters for the call
506
+ * @returns The result of the call: The current balance of the holder of the token
507
+ */
508
+ arc200BalanceOf(args: MethodArgs<'arc200_balanceOf(address)uint256'>, params?: AppClientCallCoreParams & CoreAppCallArgs): Promise<AppCallTransactionResultOfType<bigint> & AppCallTransactionResult>;
509
+ /**
510
+ * Calls the arc200_transfer(address,uint256)bool ABI method.
511
+ *
512
+ * Transfers tokens
513
+ *
514
+ * @param args The arguments for the contract call
515
+ * @param params Any additional parameters for the call
516
+ * @returns The result of the call: Success
517
+ */
518
+ arc200Transfer(args: MethodArgs<'arc200_transfer(address,uint256)bool'>, params?: AppClientCallCoreParams & CoreAppCallArgs): Promise<AppCallTransactionResultOfType<boolean> & AppCallTransactionResult>;
519
+ /**
520
+ * Calls the arc200_transferFrom(address,address,uint256)bool ABI method.
521
+ *
522
+ * Transfers tokens from source to destination as approved spender
523
+ *
524
+ * @param args The arguments for the contract call
525
+ * @param params Any additional parameters for the call
526
+ * @returns The result of the call: Success
527
+ */
528
+ arc200TransferFrom(args: MethodArgs<'arc200_transferFrom(address,address,uint256)bool'>, params?: AppClientCallCoreParams & CoreAppCallArgs): Promise<AppCallTransactionResultOfType<boolean> & AppCallTransactionResult>;
529
+ /**
530
+ * Calls the arc200_approve(address,uint256)bool ABI method.
531
+ *
532
+ * Approve spender for a token
533
+ *
534
+ * @param args The arguments for the contract call
535
+ * @param params Any additional parameters for the call
536
+ * @returns The result of the call: Success
537
+ */
538
+ arc200Approve(args: MethodArgs<'arc200_approve(address,uint256)bool'>, params?: AppClientCallCoreParams & CoreAppCallArgs): Promise<AppCallTransactionResultOfType<boolean> & AppCallTransactionResult>;
539
+ /**
540
+ * Calls the arc200_allowance(address,address)uint256 ABI method.
541
+ *
542
+ * Returns the current allowance of the spender of the tokens of the owner
543
+ *
544
+ * @param args The arguments for the contract call
545
+ * @param params Any additional parameters for the call
546
+ * @returns The result of the call: The remaining allowance
547
+ */
548
+ arc200Allowance(args: MethodArgs<'arc200_allowance(address,address)uint256'>, params?: AppClientCallCoreParams & CoreAppCallArgs): Promise<AppCallTransactionResultOfType<bigint> & AppCallTransactionResult>;
549
+ compose(): Arc200Composer;
550
+ }
551
+ type Arc200Composer<TReturns extends [...any[]] = []> = {
552
+ /**
553
+ * Calls the arc200_name()string ABI method.
554
+ *
555
+ * Returns the name of the token
556
+ *
557
+ * @param args The arguments for the contract call
558
+ * @param params Any additional parameters for the call
559
+ * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
560
+ */
561
+ arc200Name(args: MethodArgs<'arc200_name()string'>, params?: AppClientCallCoreParams & CoreAppCallArgs): Arc200Composer<[...TReturns, MethodReturn<'arc200_name()string'>]>;
562
+ /**
563
+ * Calls the arc200_symbol()string ABI method.
564
+ *
565
+ * Returns the symbol of the token
566
+ *
567
+ * @param args The arguments for the contract call
568
+ * @param params Any additional parameters for the call
569
+ * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
570
+ */
571
+ arc200Symbol(args: MethodArgs<'arc200_symbol()string'>, params?: AppClientCallCoreParams & CoreAppCallArgs): Arc200Composer<[...TReturns, MethodReturn<'arc200_symbol()string'>]>;
572
+ /**
573
+ * Calls the arc200_decimals()uint8 ABI method.
574
+ *
575
+ * Returns the decimals of the token
576
+ *
577
+ * @param args The arguments for the contract call
578
+ * @param params Any additional parameters for the call
579
+ * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
580
+ */
581
+ arc200Decimals(args: MethodArgs<'arc200_decimals()uint8'>, params?: AppClientCallCoreParams & CoreAppCallArgs): Arc200Composer<[...TReturns, MethodReturn<'arc200_decimals()uint8'>]>;
582
+ /**
583
+ * Calls the arc200_totalSupply()uint256 ABI method.
584
+ *
585
+ * Returns the total supply of the token
586
+ *
587
+ * @param args The arguments for the contract call
588
+ * @param params Any additional parameters for the call
589
+ * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
590
+ */
591
+ arc200TotalSupply(args: MethodArgs<'arc200_totalSupply()uint256'>, params?: AppClientCallCoreParams & CoreAppCallArgs): Arc200Composer<[...TReturns, MethodReturn<'arc200_totalSupply()uint256'>]>;
592
+ /**
593
+ * Calls the arc200_balanceOf(address)uint256 ABI method.
594
+ *
595
+ * Returns the current balance of the owner of the token
596
+ *
597
+ * @param args The arguments for the contract call
598
+ * @param params Any additional parameters for the call
599
+ * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
600
+ */
601
+ arc200BalanceOf(args: MethodArgs<'arc200_balanceOf(address)uint256'>, params?: AppClientCallCoreParams & CoreAppCallArgs): Arc200Composer<[...TReturns, MethodReturn<'arc200_balanceOf(address)uint256'>]>;
602
+ /**
603
+ * Calls the arc200_transfer(address,uint256)bool ABI method.
604
+ *
605
+ * Transfers tokens
606
+ *
607
+ * @param args The arguments for the contract call
608
+ * @param params Any additional parameters for the call
609
+ * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
610
+ */
611
+ arc200Transfer(args: MethodArgs<'arc200_transfer(address,uint256)bool'>, params?: AppClientCallCoreParams & CoreAppCallArgs): Arc200Composer<[...TReturns, MethodReturn<'arc200_transfer(address,uint256)bool'>]>;
612
+ /**
613
+ * Calls the arc200_transferFrom(address,address,uint256)bool ABI method.
614
+ *
615
+ * Transfers tokens from source to destination as approved spender
616
+ *
617
+ * @param args The arguments for the contract call
618
+ * @param params Any additional parameters for the call
619
+ * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
620
+ */
621
+ arc200TransferFrom(args: MethodArgs<'arc200_transferFrom(address,address,uint256)bool'>, params?: AppClientCallCoreParams & CoreAppCallArgs): Arc200Composer<[...TReturns, MethodReturn<'arc200_transferFrom(address,address,uint256)bool'>]>;
622
+ /**
623
+ * Calls the arc200_approve(address,uint256)bool ABI method.
624
+ *
625
+ * Approve spender for a token
626
+ *
627
+ * @param args The arguments for the contract call
628
+ * @param params Any additional parameters for the call
629
+ * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
630
+ */
631
+ arc200Approve(args: MethodArgs<'arc200_approve(address,uint256)bool'>, params?: AppClientCallCoreParams & CoreAppCallArgs): Arc200Composer<[...TReturns, MethodReturn<'arc200_approve(address,uint256)bool'>]>;
632
+ /**
633
+ * Calls the arc200_allowance(address,address)uint256 ABI method.
634
+ *
635
+ * Returns the current allowance of the spender of the tokens of the owner
636
+ *
637
+ * @param args The arguments for the contract call
638
+ * @param params Any additional parameters for the call
639
+ * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
640
+ */
641
+ arc200Allowance(args: MethodArgs<'arc200_allowance(address,address)uint256'>, params?: AppClientCallCoreParams & CoreAppCallArgs): Arc200Composer<[...TReturns, MethodReturn<'arc200_allowance(address,address)uint256'>]>;
642
+ /**
643
+ * Makes a clear_state call to an existing instance of the Arc200 smart contract.
644
+ *
645
+ * @param args The arguments for the bare call
646
+ * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
647
+ */
648
+ clearState(args?: BareCallArgs & AppClientCallCoreParams & CoreAppCallArgs): Arc200Composer<[...TReturns, undefined]>;
649
+ /**
650
+ * Adds a transaction to the composer
651
+ *
652
+ * @param txn One of: A TransactionWithSigner object (returned as is), a TransactionToSign object (signer is obtained from the signer property), a Transaction object (signer is extracted from the defaultSender parameter), an async SendTransactionResult returned by one of algokit utils helpers (signer is obtained from the defaultSender parameter)
653
+ * @param defaultSender The default sender to be used to obtain a signer where the object provided to the transaction parameter does not include a signer.
654
+ */
655
+ addTransaction(txn: TransactionWithSigner | TransactionToSign | Transaction | Promise<SendTransactionResult>, defaultSender?: SendTransactionFrom): Arc200Composer<TReturns>;
656
+ /**
657
+ * Returns the underlying AtomicTransactionComposer instance
658
+ */
659
+ atc(): Promise<AtomicTransactionComposer>;
660
+ /**
661
+ * Simulates the transaction group and returns the result
662
+ */
663
+ simulate(options?: SimulateOptions): Promise<Arc200ComposerSimulateResult<TReturns>>;
664
+ /**
665
+ * Executes the transaction group and returns the results
666
+ */
667
+ execute(): Promise<Arc200ComposerResults<TReturns>>;
668
+ };
669
+ type SimulateOptions = Omit<ConstructorParameters<typeof modelsv2.SimulateRequest>[0], 'txnGroups'>;
670
+ type Arc200ComposerSimulateResult<TReturns extends [...any[]]> = {
671
+ returns: TReturns;
672
+ methodResults: ABIResult[];
673
+ simulateResponse: modelsv2.SimulateResponse;
674
+ };
675
+ type Arc200ComposerResults<TReturns extends [...any[]]> = {
676
+ returns: TReturns;
677
+ groupId: string;
678
+ txIds: string[];
679
+ transactions: Transaction[];
680
+ };
681
+
682
+ interface IGetClientInput {
683
+ appId: number | bigint;
684
+ sender: SendTransactionFrom | undefined;
685
+ algod: Algodv2;
686
+ }
687
+ declare const getArc200Client: (input: IGetClientInput) => Arc200Client;
688
+
689
+ export { getArc200Client };