@allbridge/bridge-core-sdk 3.27.0-beta.6 → 3.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/dist/browser/index.js +1 -6
  2. package/dist/browser/index.js.map +4 -4
  3. package/dist/cjs/index.js +1 -6
  4. package/dist/cjs/index.js.map +4 -4
  5. package/dist/esm/index.js +1 -6
  6. package/dist/esm/index.js.map +4 -4
  7. package/dist/src/chains/chain.enums.d.ts +2 -12
  8. package/dist/src/chains/chain.enums.js +0 -10
  9. package/dist/src/chains/chain.enums.js.map +1 -1
  10. package/dist/src/chains/index.js +0 -12
  11. package/dist/src/chains/index.js.map +1 -1
  12. package/dist/src/client/core-api/api-client.js +0 -1
  13. package/dist/src/client/core-api/api-client.js.map +1 -1
  14. package/dist/src/client/core-api/core-api-mapper.js +0 -33
  15. package/dist/src/client/core-api/core-api-mapper.js.map +1 -1
  16. package/dist/src/client/core-api/core-api.model.d.ts +2 -14
  17. package/dist/src/client/core-api/core-api.model.js.map +1 -1
  18. package/dist/src/configs/mainnet.js +0 -1
  19. package/dist/src/configs/mainnet.js.map +1 -1
  20. package/dist/src/index.d.ts +4 -12
  21. package/dist/src/index.js +11 -11
  22. package/dist/src/index.js.map +1 -1
  23. package/dist/src/models/index.d.ts +4 -12
  24. package/dist/src/models/index.js +0 -4
  25. package/dist/src/models/index.js.map +1 -1
  26. package/dist/src/services/bridge/evm/index.d.ts +0 -1
  27. package/dist/src/services/bridge/evm/index.js +33 -103
  28. package/dist/src/services/bridge/evm/index.js.map +1 -1
  29. package/dist/src/services/bridge/index.d.ts +2 -2
  30. package/dist/src/services/bridge/index.js +4 -31
  31. package/dist/src/services/bridge/index.js.map +1 -1
  32. package/dist/src/services/bridge/models/bridge.model.d.ts +4 -13
  33. package/dist/src/services/bridge/models/bridge.model.js.map +1 -1
  34. package/dist/src/services/bridge/raw-bridge-transaction-builder.js +1 -1
  35. package/dist/src/services/bridge/raw-bridge-transaction-builder.js.map +1 -1
  36. package/dist/src/services/bridge/srb/index.js +28 -36
  37. package/dist/src/services/bridge/srb/index.js.map +1 -1
  38. package/dist/src/services/bridge/sui/index.js +138 -166
  39. package/dist/src/services/bridge/sui/index.js.map +1 -1
  40. package/dist/src/services/bridge/trx/index.js +70 -98
  41. package/dist/src/services/bridge/trx/index.js.map +1 -1
  42. package/dist/src/services/bridge/utils.d.ts +1 -5
  43. package/dist/src/services/bridge/utils.js +23 -164
  44. package/dist/src/services/bridge/utils.js.map +1 -1
  45. package/dist/src/services/liquidity-pool/index.js +0 -21
  46. package/dist/src/services/liquidity-pool/index.js.map +1 -1
  47. package/dist/src/services/liquidity-pool/sui/index.js.map +1 -1
  48. package/dist/src/services/liquidity-pool/trx/index.js.map +1 -1
  49. package/dist/src/services/models/index.d.ts +5 -7
  50. package/dist/src/services/models/index.js.map +1 -1
  51. package/dist/src/services/token/index.js +2 -23
  52. package/dist/src/services/token/index.js.map +1 -1
  53. package/dist/src/services/token/models/token.model.d.ts +4 -4
  54. package/dist/src/services/token/models/token.model.js.map +1 -1
  55. package/dist/src/services/token/sui/index.js.map +1 -1
  56. package/dist/src/services/utils/trx/index.js.map +1 -1
  57. package/dist/src/services/yield/index.js +0 -8
  58. package/dist/src/services/yield/index.js.map +1 -1
  59. package/dist/src/tokens-info/tokens-info.model.d.ts +0 -25
  60. package/dist/src/tokens-info/tokens-info.model.js.map +1 -1
  61. package/dist/src/utils/index.d.ts +0 -3
  62. package/dist/src/utils/index.js +0 -3
  63. package/dist/src/utils/index.js.map +1 -1
  64. package/dist/src/utils/utils.d.ts +0 -2
  65. package/dist/src/utils/utils.js +0 -11
  66. package/dist/src/utils/utils.js.map +1 -1
  67. package/dist/src/version.d.ts +1 -1
  68. package/dist/src/version.js +1 -1
  69. package/dist/src/version.js.map +1 -1
  70. package/package.json +2 -9
  71. package/dist/src/services/bridge/alg/index.d.ts +0 -16
  72. package/dist/src/services/bridge/alg/index.js +0 -191
  73. package/dist/src/services/bridge/alg/index.js.map +0 -1
  74. package/dist/src/services/bridge/stx/index.d.ts +0 -16
  75. package/dist/src/services/bridge/stx/index.js +0 -136
  76. package/dist/src/services/bridge/stx/index.js.map +0 -1
  77. package/dist/src/services/liquidity-pool/alg/index.d.ts +0 -19
  78. package/dist/src/services/liquidity-pool/alg/index.js +0 -135
  79. package/dist/src/services/liquidity-pool/alg/index.js.map +0 -1
  80. package/dist/src/services/liquidity-pool/stx/index.d.ts +0 -21
  81. package/dist/src/services/liquidity-pool/stx/index.js +0 -141
  82. package/dist/src/services/liquidity-pool/stx/index.js.map +0 -1
  83. package/dist/src/services/models/abi/PayerWithAbr.d.ts +0 -203
  84. package/dist/src/services/models/abi/PayerWithAbr.js +0 -266
  85. package/dist/src/services/models/abi/PayerWithAbr.js.map +0 -1
  86. package/dist/src/services/models/alg/BridgeClient.d.ts +0 -2751
  87. package/dist/src/services/models/alg/BridgeClient.js +0 -2685
  88. package/dist/src/services/models/alg/BridgeClient.js.map +0 -1
  89. package/dist/src/services/models/alg/PaddingUtilClient.d.ts +0 -654
  90. package/dist/src/services/models/alg/PaddingUtilClient.js +0 -425
  91. package/dist/src/services/models/alg/PaddingUtilClient.js.map +0 -1
  92. package/dist/src/services/models/alg/PoolClient.d.ts +0 -2276
  93. package/dist/src/services/models/alg/PoolClient.js +0 -2195
  94. package/dist/src/services/models/alg/PoolClient.js.map +0 -1
  95. package/dist/src/services/models/stx/clarigen-types.d.ts +0 -657
  96. package/dist/src/services/models/stx/clarigen-types.js +0 -2296
  97. package/dist/src/services/models/stx/clarigen-types.js.map +0 -1
  98. package/dist/src/services/token/alg/index.d.ts +0 -17
  99. package/dist/src/services/token/alg/index.js +0 -47
  100. package/dist/src/services/token/alg/index.js.map +0 -1
  101. package/dist/src/services/token/stx/index.d.ts +0 -20
  102. package/dist/src/services/token/stx/index.js +0 -59
  103. package/dist/src/services/token/stx/index.js.map +0 -1
  104. package/dist/src/services/utils/alg/index.d.ts +0 -9
  105. package/dist/src/services/utils/alg/index.js +0 -74
  106. package/dist/src/services/utils/alg/index.js.map +0 -1
  107. package/dist/src/services/utils/stx/get-token-name.d.ts +0 -2
  108. package/dist/src/services/utils/stx/get-token-name.js +0 -15
  109. package/dist/src/services/utils/stx/get-token-name.js.map +0 -1
  110. package/dist/src/services/utils/stx/post-conditions.d.ts +0 -3
  111. package/dist/src/services/utils/stx/post-conditions.js +0 -27
  112. package/dist/src/services/utils/stx/post-conditions.js.map +0 -1
  113. package/dist/src/utils/alg/index.d.ts +0 -21
  114. package/dist/src/utils/alg/index.js +0 -71
  115. package/dist/src/utils/alg/index.js.map +0 -1
@@ -1,425 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PaddingUtilClient = exports.PaddingUtilFactory = exports.PaddingUtilParamsFactory = exports.APP_SPEC = void 0;
4
- const app_arc56_1 = require("@algorandfoundation/algokit-utils/types/app-arc56");
5
- const app_client_1 = require("@algorandfoundation/algokit-utils/types/app-client");
6
- const app_factory_1 = require("@algorandfoundation/algokit-utils/types/app-factory");
7
- exports.APP_SPEC = {
8
- name: "PaddingUtil",
9
- structs: {},
10
- methods: [
11
- {
12
- name: "createApplication",
13
- args: [],
14
- returns: { type: "void" },
15
- actions: { create: ["NoOp"], call: [] },
16
- readonly: false,
17
- events: [],
18
- recommendations: {},
19
- },
20
- ],
21
- arcs: [22, 28],
22
- networks: {},
23
- state: {
24
- schema: { global: { ints: 0, bytes: 0 }, local: { ints: 0, bytes: 0 } },
25
- keys: { global: {}, local: {}, box: {} },
26
- maps: { global: {}, local: {}, box: {} },
27
- },
28
- bareActions: { create: [], call: ["NoOp"] },
29
- sourceInfo: {
30
- approval: {
31
- sourceInfo: [
32
- { pc: [27], errorMessage: "OnCompletion must be NoOp && can only call when creating" },
33
- { pc: [37], errorMessage: "OnCompletion must be NoOp && can only call when not creating" },
34
- ],
35
- pcOffsetMethod: "none",
36
- },
37
- clear: { sourceInfo: [], pcOffsetMethod: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RyYWN0cy9jb250cmFjdHMvcGFkZGluZy11dGlsLmNvbnRyYWN0LmFsZ28udHM6OQogICAgLy8gQGJhcmVtZXRob2QoKQogICAgdHhuIE9uQ29tcGxldGlvbgogICAgIQogICAgdHhuIEFwcGxpY2F0aW9uSUQKICAgICYmCiAgICBhc3NlcnQgLy8gT25Db21wbGV0aW9uIG11c3QgYmUgTm9PcCAmJiBjYW4gb25seSBjYWxsIHdoZW4gbm90IGNyZWF0aW5nCiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==",
41
- clear: "I3ByYWdtYSB2ZXJzaW9uIDExCiNwcmFnbWEgdHlwZXRyYWNrIGZhbHNlCgovLyBAYWxnb3JhbmRmb3VuZGF0aW9uL2FsZ29yYW5kLXR5cGVzY3JpcHQvYmFzZS1jb250cmFjdC5kLnRzOjpCYXNlQ29udHJhY3QuY2xlYXJTdGF0ZVByb2dyYW0oKSAtPiB1aW50NjQ6Cm1haW46CiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==",
42
- },
43
- byteCode: { approval: "CzEbQQAZgAS4RHs2NhoAjgEAAQAxGRQxGBQQRIEBQzEZFDEYEESBAUM=", clear: "C4EBQw==" },
44
- events: [],
45
- templateVariables: {},
46
- };
47
- class BinaryStateValue {
48
- value;
49
- constructor(value) {
50
- this.value = value;
51
- }
52
- asByteArray() {
53
- return this.value;
54
- }
55
- asString() {
56
- return this.value !== undefined ? Buffer.from(this.value).toString("utf-8") : undefined;
57
- }
58
- }
59
- /**
60
- * Exposes methods for constructing `AppClient` params objects for ABI calls to the PaddingUtil smart contract
61
- */
62
- class PaddingUtilParamsFactory {
63
- /**
64
- * Gets available create ABI call param factories
65
- */
66
- static get create() {
67
- return {
68
- _resolveByMethod(params) {
69
- switch (params.method) {
70
- case "createApplication":
71
- case "createApplication()void":
72
- return PaddingUtilParamsFactory.create.createApplication(params);
73
- }
74
- throw new Error(`Unknown ' + verb + ' method`);
75
- },
76
- /**
77
- * Constructs create ABI call params for the PaddingUtil smart contract using the createApplication()void ABI method
78
- *
79
- * @param params Parameters for the call
80
- * @returns An `AppClientMethodCallParams` object for the call
81
- */
82
- createApplication(params) {
83
- return {
84
- ...params,
85
- method: "createApplication()void",
86
- args: Array.isArray(params.args) ? params.args : [],
87
- };
88
- },
89
- };
90
- }
91
- }
92
- exports.PaddingUtilParamsFactory = PaddingUtilParamsFactory;
93
- /**
94
- * A factory to create and deploy one or more instance of the PaddingUtil smart contract and to create one or more app clients to interact with those (or other) app instances
95
- */
96
- class PaddingUtilFactory {
97
- /**
98
- * The underlying `AppFactory` for when you want to have more flexibility
99
- */
100
- appFactory;
101
- /**
102
- * Creates a new instance of `PaddingUtilFactory`
103
- *
104
- * @param params The parameters to initialise the app factory with
105
- */
106
- constructor(params) {
107
- this.appFactory = new app_factory_1.AppFactory({
108
- ...params,
109
- appSpec: exports.APP_SPEC,
110
- });
111
- }
112
- /** The name of the app (from the ARC-32 / ARC-56 app spec or override). */
113
- get appName() {
114
- return this.appFactory.appName;
115
- }
116
- /** The ARC-56 app spec being used */
117
- get appSpec() {
118
- return exports.APP_SPEC;
119
- }
120
- /** A reference to the underlying `AlgorandClient` this app factory is using. */
121
- get algorand() {
122
- return this.appFactory.algorand;
123
- }
124
- /**
125
- * Returns a new `AppClient` client for an app instance of the given ID.
126
- *
127
- * Automatically populates appName, defaultSender and source maps from the factory
128
- * if not specified in the params.
129
- * @param params The parameters to create the app client
130
- * @returns The `AppClient`
131
- */
132
- getAppClientById(params) {
133
- return new PaddingUtilClient(this.appFactory.getAppClientById(params));
134
- }
135
- /**
136
- * Returns a new `AppClient` client, resolving the app by creator address and name
137
- * using AlgoKit app deployment semantics (i.e. looking for the app creation transaction note).
138
- *
139
- * Automatically populates appName, defaultSender and source maps from the factory
140
- * if not specified in the params.
141
- * @param params The parameters to create the app client
142
- * @returns The `AppClient`
143
- */
144
- async getAppClientByCreatorAndName(params) {
145
- return new PaddingUtilClient(await this.appFactory.getAppClientByCreatorAndName(params));
146
- }
147
- /**
148
- * Idempotently deploys the PaddingUtil smart contract.
149
- *
150
- * @param params The arguments for the contract calls and any additional parameters for the call
151
- * @returns The deployment result
152
- */
153
- async deploy(params = {}) {
154
- const result = await this.appFactory.deploy({
155
- ...params,
156
- createParams: params.createParams?.method
157
- ? PaddingUtilParamsFactory.create._resolveByMethod(params.createParams)
158
- : params.createParams
159
- ? params.createParams
160
- : undefined,
161
- });
162
- return { result: result.result, appClient: new PaddingUtilClient(result.appClient) };
163
- }
164
- /**
165
- * 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.
166
- */
167
- params = {
168
- /**
169
- * Gets available create methods
170
- */
171
- create: {
172
- /**
173
- * Creates a new instance of the PaddingUtil smart contract using the createApplication()void ABI method.
174
- *
175
- * @param params The params for the smart contract call
176
- * @returns The create params
177
- */
178
- createApplication: (params = { args: [] }) => {
179
- return this.appFactory.params.create(PaddingUtilParamsFactory.create.createApplication(params));
180
- },
181
- },
182
- };
183
- /**
184
- * Create transactions for the current app
185
- */
186
- createTransaction = {
187
- /**
188
- * Gets available create methods
189
- */
190
- create: {
191
- /**
192
- * Creates a new instance of the PaddingUtil smart contract using the createApplication()void ABI method.
193
- *
194
- * @param params The params for the smart contract call
195
- * @returns The create transaction
196
- */
197
- createApplication: (params = { args: [] }) => {
198
- return this.appFactory.createTransaction.create(PaddingUtilParamsFactory.create.createApplication(params));
199
- },
200
- },
201
- };
202
- /**
203
- * Send calls to the current app
204
- */
205
- send = {
206
- /**
207
- * Gets available create methods
208
- */
209
- create: {
210
- /**
211
- * Creates a new instance of the PaddingUtil smart contract using an ABI method call using the createApplication()void ABI method.
212
- *
213
- * @param params The params for the smart contract call
214
- * @returns The create result
215
- */
216
- createApplication: async (params = { args: [] }) => {
217
- const result = await this.appFactory.send.create(PaddingUtilParamsFactory.create.createApplication(params));
218
- return {
219
- result: {
220
- ...result.result,
221
- return: result.result.return,
222
- },
223
- appClient: new PaddingUtilClient(result.appClient),
224
- };
225
- },
226
- },
227
- };
228
- }
229
- exports.PaddingUtilFactory = PaddingUtilFactory;
230
- /**
231
- * A client to make calls to the PaddingUtil smart contract
232
- */
233
- class PaddingUtilClient {
234
- /**
235
- * The underlying `AppClient` for when you want to have more flexibility
236
- */
237
- appClient;
238
- constructor(appClientOrParams) {
239
- this.appClient =
240
- appClientOrParams instanceof app_client_1.AppClient
241
- ? appClientOrParams
242
- : new app_client_1.AppClient({
243
- ...appClientOrParams,
244
- appSpec: exports.APP_SPEC,
245
- });
246
- }
247
- /**
248
- * Checks for decode errors on the given return value and maps the return value to the return type for the given method
249
- * @returns The typed return value or undefined if there was no value
250
- */
251
- decodeReturnValue(method, returnValue) {
252
- return returnValue !== undefined
253
- ? // @ts-ignore
254
- (0, app_arc56_1.getArc56ReturnValue)(returnValue, this.appClient.getABIMethod(method), exports.APP_SPEC.structs)
255
- : undefined;
256
- }
257
- /**
258
- * Returns a new `PaddingUtilClient` client, resolving the app by creator address and name
259
- * using AlgoKit app deployment semantics (i.e. looking for the app creation transaction note).
260
- * @param params The parameters to create the app client
261
- */
262
- static async fromCreatorAndName(params) {
263
- return new PaddingUtilClient(await app_client_1.AppClient.fromCreatorAndName({ ...params, appSpec: exports.APP_SPEC }));
264
- }
265
- /**
266
- * Returns an `PaddingUtilClient` instance for the current network based on
267
- * pre-determined network-specific app IDs specified in the ARC-56 app spec.
268
- *
269
- * If no IDs are in the app spec or the network isn't recognised, an error is thrown.
270
- * @param params The parameters to create the app client
271
- */
272
- static async fromNetwork(params) {
273
- return new PaddingUtilClient(await app_client_1.AppClient.fromNetwork({ ...params, appSpec: exports.APP_SPEC }));
274
- }
275
- /** The ID of the app instance this client is linked to. */
276
- get appId() {
277
- return this.appClient.appId;
278
- }
279
- /** The app address of the app instance this client is linked to. */
280
- get appAddress() {
281
- return this.appClient.appAddress;
282
- }
283
- /** The name of the app. */
284
- get appName() {
285
- return this.appClient.appName;
286
- }
287
- /** The ARC-56 app spec being used */
288
- get appSpec() {
289
- return this.appClient.appSpec;
290
- }
291
- /** A reference to the underlying `AlgorandClient` this app client is using. */
292
- get algorand() {
293
- return this.appClient.algorand;
294
- }
295
- /**
296
- * Get parameters to create transactions for the current app. A good mental model for this is that these parameters represent a deferred transaction creation.
297
- */
298
- params = {
299
- /**
300
- * Makes a clear_state call to an existing instance of the PaddingUtil smart contract.
301
- *
302
- * @param params The params for the bare (raw) call
303
- * @returns The clearState result
304
- */
305
- clearState: (params) => {
306
- return this.appClient.params.bare.clearState(params);
307
- },
308
- /**
309
- * Makes a call to the PaddingUtil smart contract using a bare call.
310
- *
311
- * @param params The params for the bare (raw) call
312
- * @returns The call result
313
- */
314
- bare: (params) => {
315
- return this.appClient.params.bare.call(params);
316
- },
317
- };
318
- /**
319
- * Create transactions for the current app
320
- */
321
- createTransaction = {
322
- /**
323
- * Makes a clear_state call to an existing instance of the PaddingUtil smart contract.
324
- *
325
- * @param params The params for the bare (raw) call
326
- * @returns The clearState result
327
- */
328
- clearState: (params) => {
329
- return this.appClient.createTransaction.bare.clearState(params);
330
- },
331
- /**
332
- * Makes a call to the PaddingUtil smart contract using a bare call.
333
- *
334
- * @param params The params for the bare (raw) call
335
- * @returns The call result
336
- */
337
- bare: (params) => {
338
- return this.appClient.createTransaction.bare.call(params);
339
- },
340
- };
341
- /**
342
- * Send calls to the current app
343
- */
344
- send = {
345
- /**
346
- * Makes a clear_state call to an existing instance of the PaddingUtil smart contract.
347
- *
348
- * @param params The params for the bare (raw) call
349
- * @returns The clearState result
350
- */
351
- clearState: (params) => {
352
- return this.appClient.send.bare.clearState(params);
353
- },
354
- /**
355
- * Makes a call to the PaddingUtil smart contract using a bare call.
356
- *
357
- * @param params The params for the bare (raw) call
358
- * @returns The call result
359
- */
360
- bare: (params) => {
361
- return this.appClient.send.bare.call(params);
362
- },
363
- };
364
- /**
365
- * Clone this app client with different params
366
- *
367
- * @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.
368
- * @returns A new app client with the altered params
369
- */
370
- clone(params) {
371
- return new PaddingUtilClient(this.appClient.clone(params));
372
- }
373
- /**
374
- * Methods to access state for the current PaddingUtil app
375
- */
376
- state = {};
377
- newGroup() {
378
- const client = this;
379
- const composer = this.algorand.newGroup();
380
- let promiseChain = Promise.resolve();
381
- const resultMappers = [];
382
- return {
383
- /**
384
- * Add a bare method call to the PaddingUtil contract
385
- */
386
- bare(params) {
387
- promiseChain = promiseChain.then(() => composer.addAppCall(client.params.bare(params)));
388
- return this;
389
- },
390
- /**
391
- * Add a clear state call to the PaddingUtil contract
392
- */
393
- clearState(params) {
394
- promiseChain = promiseChain.then(() => composer.addAppCall(client.params.clearState(params)));
395
- return this;
396
- },
397
- addTransaction(txn, signer) {
398
- promiseChain = promiseChain.then(() => composer.addTransaction(txn, signer));
399
- return this;
400
- },
401
- async composer() {
402
- await promiseChain;
403
- return composer;
404
- },
405
- async simulate(options) {
406
- await promiseChain;
407
- const result = await (!options ? composer.simulate() : composer.simulate(options));
408
- return {
409
- ...result,
410
- returns: result.returns?.map((val, i) => resultMappers[i] !== undefined ? resultMappers[i](val) : val.returnValue),
411
- };
412
- },
413
- async send(params) {
414
- await promiseChain;
415
- const result = await composer.send(params);
416
- return {
417
- ...result,
418
- returns: result.returns?.map((val, i) => resultMappers[i] !== undefined ? resultMappers[i](val) : val.returnValue),
419
- };
420
- },
421
- };
422
- }
423
- }
424
- exports.PaddingUtilClient = PaddingUtilClient;
425
- //# sourceMappingURL=PaddingUtilClient.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PaddingUtilClient.js","sourceRoot":"","sources":["../../../../../src/services/models/alg/PaddingUtilClient.ts"],"names":[],"mappings":";;;AAQA,iFAI2D;AAC3D,mFAU4D;AAC5D,qFAO6D;AAgBhD,QAAA,QAAQ,GAAkB;IACrC,IAAI,EAAE,aAAa;IACnB,OAAO,EAAE,EAAE;IACX,OAAO,EAAE;QACP;YACE,IAAI,EAAE,mBAAmB;YACzB,IAAI,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AAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;gBACnF,OAAO;oBACL,GAAG,MAAM;oBACT,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CACtC,aAAa,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,WAAW,CAC1E;iBACF,CAAC;YACJ,CAAC;YACD,KAAK,CAAC,IAAI,CAAC,MAAmB;gBAC5B,MAAM,YAAY,CAAC;gBACnB,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBAC3C,OAAO;oBACL,GAAG,MAAM;oBACT,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CACtC,aAAa,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,WAAW,CAC1E;iBACF,CAAC;YACJ,CAAC;SACgC,CAAC;IACtC,CAAC;CACF;AAzOD,8CAyOC","sourcesContent":["/* eslint-disable */\n/**\n * This file was automatically generated by @algorandfoundation/algokit-client-generator.\n * DO NOT MODIFY IT BY HAND.\n * requires: @algorandfoundation/algokit-utils: ^7\n */\nimport { type AlgorandClient } from \"@algorandfoundation/algokit-utils/types/algorand-client\";\nimport { ABIReturn, AppReturn, SendAppTransactionResult } from \"@algorandfoundation/algokit-utils/types/app\";\nimport {\n Arc56Contract,\n getArc56ReturnValue,\n getABIStructFromABITuple,\n} from \"@algorandfoundation/algokit-utils/types/app-arc56\";\nimport {\n AppClient as _AppClient,\n AppClientMethodCallParams,\n AppClientParams,\n AppClientBareCallParams,\n CallOnComplete,\n AppClientCompilationParams,\n ResolveAppClientByCreatorAndName,\n ResolveAppClientByNetwork,\n CloneAppClientParams,\n} from \"@algorandfoundation/algokit-utils/types/app-client\";\nimport {\n AppFactory as _AppFactory,\n AppFactoryAppClientParams,\n AppFactoryResolveAppClientByCreatorAndNameParams,\n AppFactoryDeployParams,\n AppFactoryParams,\n CreateSchema,\n} from \"@algorandfoundation/algokit-utils/types/app-factory\";\nimport {\n TransactionComposer,\n AppCallMethodCall,\n AppMethodCallTransactionArgument,\n SimulateOptions,\n RawSimulateOptions,\n SkipSignaturesSimulateOptions,\n} from \"@algorandfoundation/algokit-utils/types/composer\";\nimport {\n SendParams,\n SendSingleTransactionResult,\n SendAtomicTransactionComposerResults,\n} from \"@algorandfoundation/algokit-utils/types/transaction\";\nimport { Address, encodeAddress, modelsv2, OnApplicationComplete, Transaction, TransactionSigner } from \"algosdk\";\n\nexport const APP_SPEC: Arc56Contract = {\n name: \"PaddingUtil\",\n structs: {},\n methods: [\n {\n name: \"createApplication\",\n args: [],\n returns: { type: \"void\" },\n actions: { create: [\"NoOp\"], call: [] },\n readonly: false,\n events: [],\n recommendations: {},\n },\n ],\n arcs: [22, 28],\n networks: {},\n state: {\n schema: { global: { ints: 0, bytes: 0 }, local: { ints: 0, bytes: 0 } },\n keys: { global: {}, local: {}, box: {} },\n maps: { global: {}, local: {}, box: {} },\n },\n bareActions: { create: [], call: [\"NoOp\"] },\n sourceInfo: {\n approval: {\n sourceInfo: [\n { pc: [27], errorMessage: \"OnCompletion must be NoOp && can only call when creating\" },\n { pc: [37], errorMessage: \"OnCompletion must be NoOp && can only call when not creating\" },\n ],\n pcOffsetMethod: \"none\",\n },\n clear: { sourceInfo: [], pcOffsetMethod: \"none\" },\n },\n source: {\n approval:\n \"I3ByYWdtYSB2ZXJzaW9uIDExCiNwcmFnbWEgdHlwZXRyYWNrIGZhbHNlCgovLyBAYWxnb3JhbmRmb3VuZGF0aW9uL2FsZ29yYW5kLXR5cGVzY3JpcHQvYXJjNC9pbmRleC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gICBhc3NlcnQgLy8gT25Db21wbGV0aW9uIG11c3QgYmUgTm9PcCAmJiBjYW4gb25seSBjYWxsIHdoZW4gbm90IGNyZWF0aW5nCiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==\",\n clear:\n \"I3ByYWdtYSB2ZXJzaW9uIDExCiNwcmFnbWEgdHlwZXRyYWNrIGZhbHNlCgovLyBAYWxnb3JhbmRmb3VuZGF0aW9uL2FsZ29yYW5kLXR5cGVzY3JpcHQvYmFzZS1jb250cmFjdC5kLnRzOjpCYXNlQ29udHJhY3QuY2xlYXJTdGF0ZVByb2dyYW0oKSAtPiB1aW50NjQ6Cm1haW46CiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==\",\n },\n byteCode: { approval: \"CzEbQQAZgAS4RHs2NhoAjgEAAQAxGRQxGBQQRIEBQzEZFDEYEESBAUM=\", clear: \"C4EBQw==\" },\n events: [],\n templateVariables: {},\n} as unknown as Arc56Contract;\n\n/**\n * A state record containing binary data\n */\nexport interface BinaryState {\n /**\n * Gets the state value as a Uint8Array\n */\n asByteArray(): Uint8Array | undefined;\n /**\n * Gets the state value as a string\n */\n asString(): string | undefined;\n}\n\nclass BinaryStateValue implements BinaryState {\n constructor(private value: Uint8Array | undefined) {}\n\n asByteArray(): Uint8Array | undefined {\n return this.value;\n }\n\n asString(): string | undefined {\n return this.value !== undefined ? Buffer.from(this.value).toString(\"utf-8\") : undefined;\n }\n}\n\n/**\n * Expands types for IntelliSense so they are more human readable\n * See https://stackoverflow.com/a/69288824\n */\nexport type Expand<T> = T extends (...args: infer A) => infer R\n ? (...args: Expand<A>) => Expand<R>\n : T extends infer O\n ? { [K in keyof O]: O[K] }\n : never;\n\n/**\n * The argument types for the PaddingUtil contract\n */\nexport type PaddingUtilArgs = {\n /**\n * The object representation of the arguments for each method\n */\n obj: {\n \"createApplication()void\": Record<string, never>;\n };\n /**\n * The tuple representation of the arguments for each method\n */\n tuple: {\n \"createApplication()void\": [];\n };\n};\n\n/**\n * The return type for each method\n */\nexport type PaddingUtilReturns = {\n \"createApplication()void\": void;\n};\n\n/**\n * Defines the types of available calls and state of the PaddingUtil smart contract.\n */\nexport type PaddingUtilTypes = {\n /**\n * Maps method signatures / names to their argument and return types.\n */\n methods: Record<\n \"createApplication()void\" | \"createApplication\",\n {\n argsObj: PaddingUtilArgs[\"obj\"][\"createApplication()void\"];\n argsTuple: PaddingUtilArgs[\"tuple\"][\"createApplication()void\"];\n returns: PaddingUtilReturns[\"createApplication()void\"];\n }\n >;\n};\n\n/**\n * Defines the possible abi call signatures.\n */\nexport type PaddingUtilSignatures = keyof PaddingUtilTypes[\"methods\"];\n/**\n * Defines the possible abi call signatures for methods that return a non-void value.\n */\nexport type PaddingUtilNonVoidMethodSignatures = keyof PaddingUtilTypes[\"methods\"] extends infer T\n ? T extends keyof PaddingUtilTypes[\"methods\"]\n ? MethodReturn<T> extends void\n ? never\n : T\n : never\n : never;\n/**\n * Defines an object containing all relevant parameters for a single call to the contract.\n */\nexport type CallParams<TArgs> = Expand<\n Omit<AppClientMethodCallParams, \"method\" | \"args\" | \"onComplete\"> & {\n /** The args for the ABI method call, either as an ordered array or an object */\n args: Expand<TArgs>;\n }\n>;\n/**\n * Maps a method signature from the PaddingUtil smart contract to the method's arguments in either tuple or struct form\n */\nexport type MethodArgs<TSignature extends PaddingUtilSignatures> = PaddingUtilTypes[\"methods\"][TSignature][\n | \"argsObj\"\n | \"argsTuple\"];\n/**\n * Maps a method signature from the PaddingUtil smart contract to the method's return type\n */\nexport type MethodReturn<TSignature extends PaddingUtilSignatures> = PaddingUtilTypes[\"methods\"][TSignature][\"returns\"];\n\n/**\n * Defines supported create method params for this smart contract\n */\nexport type PaddingUtilCreateCallParams =\n | Expand<\n CallParams<\n PaddingUtilArgs[\"obj\"][\"createApplication()void\"] | PaddingUtilArgs[\"tuple\"][\"createApplication()void\"]\n > & { method: \"createApplication\" } & { onComplete?: OnApplicationComplete.NoOpOC } & CreateSchema\n >\n | Expand<\n CallParams<\n PaddingUtilArgs[\"obj\"][\"createApplication()void\"] | PaddingUtilArgs[\"tuple\"][\"createApplication()void\"]\n > & { method: \"createApplication()void\" } & { onComplete?: OnApplicationComplete.NoOpOC } & CreateSchema\n >;\n/**\n * Defines arguments required for the deploy method.\n */\nexport type PaddingUtilDeployParams = Expand<\n Omit<AppFactoryDeployParams, \"createParams\" | \"updateParams\" | \"deleteParams\"> & {\n /**\n * 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)\n */\n createParams?: PaddingUtilCreateCallParams;\n }\n>;\n\n/**\n * Exposes methods for constructing `AppClient` params objects for ABI calls to the PaddingUtil smart contract\n */\nexport abstract class PaddingUtilParamsFactory {\n /**\n * Gets available create ABI call param factories\n */\n static get create() {\n return {\n _resolveByMethod<TParams extends PaddingUtilCreateCallParams & { method: string }>(params: TParams) {\n switch (params.method) {\n case \"createApplication\":\n case \"createApplication()void\":\n return PaddingUtilParamsFactory.create.createApplication(params);\n }\n throw new Error(`Unknown ' + verb + ' method`);\n },\n\n /**\n * Constructs create ABI call params for the PaddingUtil smart contract using the createApplication()void ABI method\n *\n * @param params Parameters for the call\n * @returns An `AppClientMethodCallParams` object for the call\n */\n createApplication(\n params: CallParams<\n PaddingUtilArgs[\"obj\"][\"createApplication()void\"] | PaddingUtilArgs[\"tuple\"][\"createApplication()void\"]\n > &\n AppClientCompilationParams & { onComplete?: OnApplicationComplete.NoOpOC }\n ): AppClientMethodCallParams & AppClientCompilationParams & { onComplete?: OnApplicationComplete.NoOpOC } {\n return {\n ...params,\n method: \"createApplication()void\" as const,\n args: Array.isArray(params.args) ? params.args : [],\n };\n },\n };\n }\n}\n\n/**\n * A factory to create and deploy one or more instance of the PaddingUtil smart contract and to create one or more app clients to interact with those (or other) app instances\n */\nexport class PaddingUtilFactory {\n /**\n * The underlying `AppFactory` for when you want to have more flexibility\n */\n public readonly appFactory: _AppFactory;\n\n /**\n * Creates a new instance of `PaddingUtilFactory`\n *\n * @param params The parameters to initialise the app factory with\n */\n constructor(params: Omit<AppFactoryParams, \"appSpec\">) {\n this.appFactory = new _AppFactory({\n ...params,\n appSpec: APP_SPEC,\n });\n }\n\n /** The name of the app (from the ARC-32 / ARC-56 app spec or override). */\n public get appName() {\n return this.appFactory.appName;\n }\n\n /** The ARC-56 app spec being used */\n get appSpec() {\n return APP_SPEC;\n }\n\n /** A reference to the underlying `AlgorandClient` this app factory is using. */\n public get algorand(): AlgorandClient {\n return this.appFactory.algorand;\n }\n\n /**\n * Returns a new `AppClient` client for an app instance of the given ID.\n *\n * Automatically populates appName, defaultSender and source maps from the factory\n * if not specified in the params.\n * @param params The parameters to create the app client\n * @returns The `AppClient`\n */\n public getAppClientById(params: AppFactoryAppClientParams) {\n return new PaddingUtilClient(this.appFactory.getAppClientById(params));\n }\n\n /**\n * Returns a new `AppClient` client, resolving the app by creator address and name\n * using AlgoKit app deployment semantics (i.e. looking for the app creation transaction note).\n *\n * Automatically populates appName, defaultSender and source maps from the factory\n * if not specified in the params.\n * @param params The parameters to create the app client\n * @returns The `AppClient`\n */\n public async getAppClientByCreatorAndName(params: AppFactoryResolveAppClientByCreatorAndNameParams) {\n return new PaddingUtilClient(await this.appFactory.getAppClientByCreatorAndName(params));\n }\n\n /**\n * Idempotently deploys the PaddingUtil smart contract.\n *\n * @param params The arguments for the contract calls and any additional parameters for the call\n * @returns The deployment result\n */\n public async deploy(params: PaddingUtilDeployParams = {}) {\n const result = await this.appFactory.deploy({\n ...params,\n createParams: params.createParams?.method\n ? PaddingUtilParamsFactory.create._resolveByMethod(params.createParams)\n : params.createParams\n ? (params.createParams as PaddingUtilCreateCallParams & { args: Uint8Array[] })\n : undefined,\n });\n return { result: result.result, appClient: new PaddingUtilClient(result.appClient) };\n }\n\n /**\n * 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.\n */\n readonly params = {\n /**\n * Gets available create methods\n */\n create: {\n /**\n * Creates a new instance of the PaddingUtil smart contract using the createApplication()void ABI method.\n *\n * @param params The params for the smart contract call\n * @returns The create params\n */\n createApplication: (\n params: CallParams<\n PaddingUtilArgs[\"obj\"][\"createApplication()void\"] | PaddingUtilArgs[\"tuple\"][\"createApplication()void\"]\n > &\n AppClientCompilationParams &\n CreateSchema & { onComplete?: OnApplicationComplete.NoOpOC } = { args: [] }\n ) => {\n return this.appFactory.params.create(PaddingUtilParamsFactory.create.createApplication(params));\n },\n },\n };\n\n /**\n * Create transactions for the current app\n */\n readonly createTransaction = {\n /**\n * Gets available create methods\n */\n create: {\n /**\n * Creates a new instance of the PaddingUtil smart contract using the createApplication()void ABI method.\n *\n * @param params The params for the smart contract call\n * @returns The create transaction\n */\n createApplication: (\n params: CallParams<\n PaddingUtilArgs[\"obj\"][\"createApplication()void\"] | PaddingUtilArgs[\"tuple\"][\"createApplication()void\"]\n > &\n AppClientCompilationParams &\n CreateSchema & { onComplete?: OnApplicationComplete.NoOpOC } = { args: [] }\n ) => {\n return this.appFactory.createTransaction.create(PaddingUtilParamsFactory.create.createApplication(params));\n },\n },\n };\n\n /**\n * Send calls to the current app\n */\n readonly send = {\n /**\n * Gets available create methods\n */\n create: {\n /**\n * Creates a new instance of the PaddingUtil smart contract using an ABI method call using the createApplication()void ABI method.\n *\n * @param params The params for the smart contract call\n * @returns The create result\n */\n createApplication: async (\n params: CallParams<\n PaddingUtilArgs[\"obj\"][\"createApplication()void\"] | PaddingUtilArgs[\"tuple\"][\"createApplication()void\"]\n > &\n AppClientCompilationParams &\n CreateSchema &\n SendParams & { onComplete?: OnApplicationComplete.NoOpOC } = { args: [] }\n ) => {\n const result = await this.appFactory.send.create(PaddingUtilParamsFactory.create.createApplication(params));\n return {\n result: {\n ...result.result,\n return: result.result.return as unknown as undefined | PaddingUtilReturns[\"createApplication()void\"],\n },\n appClient: new PaddingUtilClient(result.appClient),\n };\n },\n },\n };\n}\n/**\n * A client to make calls to the PaddingUtil smart contract\n */\nexport class PaddingUtilClient {\n /**\n * The underlying `AppClient` for when you want to have more flexibility\n */\n public readonly appClient: _AppClient;\n\n /**\n * Creates a new instance of `PaddingUtilClient`\n *\n * @param appClient An `AppClient` instance which has been created with the PaddingUtil app spec\n */\n constructor(appClient: _AppClient);\n /**\n * Creates a new instance of `PaddingUtilClient`\n *\n * @param params The parameters to initialise the app client with\n */\n constructor(params: Omit<AppClientParams, \"appSpec\">);\n constructor(appClientOrParams: _AppClient | Omit<AppClientParams, \"appSpec\">) {\n this.appClient =\n appClientOrParams instanceof _AppClient\n ? appClientOrParams\n : new _AppClient({\n ...appClientOrParams,\n appSpec: APP_SPEC,\n });\n }\n\n /**\n * Checks for decode errors on the given return value and maps the return value to the return type for the given method\n * @returns The typed return value or undefined if there was no value\n */\n decodeReturnValue<TSignature extends PaddingUtilNonVoidMethodSignatures>(\n method: TSignature,\n returnValue: ABIReturn | undefined\n ) {\n return returnValue !== undefined\n ? // @ts-ignore\n getArc56ReturnValue<MethodReturn<TSignature>>(\n returnValue,\n this.appClient.getABIMethod(method),\n APP_SPEC.structs\n )\n : undefined;\n }\n\n /**\n * Returns a new `PaddingUtilClient` client, resolving the app by creator address and name\n * using AlgoKit app deployment semantics (i.e. looking for the app creation transaction note).\n * @param params The parameters to create the app client\n */\n public static async fromCreatorAndName(\n params: Omit<ResolveAppClientByCreatorAndName, \"appSpec\">\n ): Promise<PaddingUtilClient> {\n return new PaddingUtilClient(await _AppClient.fromCreatorAndName({ ...params, appSpec: APP_SPEC }));\n }\n\n /**\n * Returns an `PaddingUtilClient` instance for the current network based on\n * pre-determined network-specific app IDs specified in the ARC-56 app spec.\n *\n * If no IDs are in the app spec or the network isn't recognised, an error is thrown.\n * @param params The parameters to create the app client\n */\n static async fromNetwork(params: Omit<ResolveAppClientByNetwork, \"appSpec\">): Promise<PaddingUtilClient> {\n return new PaddingUtilClient(await _AppClient.fromNetwork({ ...params, appSpec: APP_SPEC }));\n }\n\n /** The ID of the app instance this client is linked to. */\n public get appId() {\n return this.appClient.appId;\n }\n\n /** The app address of the app instance this client is linked to. */\n public get appAddress() {\n return this.appClient.appAddress;\n }\n\n /** The name of the app. */\n public get appName() {\n return this.appClient.appName;\n }\n\n /** The ARC-56 app spec being used */\n public get appSpec() {\n return this.appClient.appSpec;\n }\n\n /** A reference to the underlying `AlgorandClient` this app client is using. */\n public get algorand(): AlgorandClient {\n return this.appClient.algorand;\n }\n\n /**\n * Get parameters to create transactions for the current app. A good mental model for this is that these parameters represent a deferred transaction creation.\n */\n readonly params = {\n /**\n * Makes a clear_state call to an existing instance of the PaddingUtil smart contract.\n *\n * @param params The params for the bare (raw) call\n * @returns The clearState result\n */\n clearState: (params?: Expand<AppClientBareCallParams>) => {\n return this.appClient.params.bare.clearState(params);\n },\n\n /**\n * Makes a call to the PaddingUtil smart contract using a bare call.\n *\n * @param params The params for the bare (raw) call\n * @returns The call result\n */\n bare: (params?: Expand<AppClientBareCallParams & { onComplete?: OnApplicationComplete.NoOpOC }>) => {\n return this.appClient.params.bare.call(params);\n },\n };\n\n /**\n * Create transactions for the current app\n */\n readonly createTransaction = {\n /**\n * Makes a clear_state call to an existing instance of the PaddingUtil smart contract.\n *\n * @param params The params for the bare (raw) call\n * @returns The clearState result\n */\n clearState: (params?: Expand<AppClientBareCallParams>) => {\n return this.appClient.createTransaction.bare.clearState(params);\n },\n\n /**\n * Makes a call to the PaddingUtil smart contract using a bare call.\n *\n * @param params The params for the bare (raw) call\n * @returns The call result\n */\n bare: (params?: Expand<AppClientBareCallParams & { onComplete?: OnApplicationComplete.NoOpOC }>) => {\n return this.appClient.createTransaction.bare.call(params);\n },\n };\n\n /**\n * Send calls to the current app\n */\n readonly send = {\n /**\n * Makes a clear_state call to an existing instance of the PaddingUtil smart contract.\n *\n * @param params The params for the bare (raw) call\n * @returns The clearState result\n */\n clearState: (params?: Expand<AppClientBareCallParams & SendParams>) => {\n return this.appClient.send.bare.clearState(params);\n },\n\n /**\n * Makes a call to the PaddingUtil smart contract using a bare call.\n *\n * @param params The params for the bare (raw) call\n * @returns The call result\n */\n bare: (params?: Expand<AppClientBareCallParams & SendParams & { onComplete?: OnApplicationComplete.NoOpOC }>) => {\n return this.appClient.send.bare.call(params);\n },\n };\n\n /**\n * Clone this app client with different params\n *\n * @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.\n * @returns A new app client with the altered params\n */\n public clone(params: CloneAppClientParams) {\n return new PaddingUtilClient(this.appClient.clone(params));\n }\n\n /**\n * Methods to access state for the current PaddingUtil app\n */\n state = {};\n\n public newGroup(): PaddingUtilComposer {\n const client = this;\n const composer = this.algorand.newGroup();\n let promiseChain: Promise<unknown> = Promise.resolve();\n const resultMappers: Array<undefined | ((x: ABIReturn | undefined) => any)> = [];\n return {\n /**\n * Add a bare method call to the PaddingUtil contract\n */\n bare(params: AppClientBareCallParams & { onComplete?: OnApplicationComplete.NoOpOC }) {\n promiseChain = promiseChain.then(() => composer.addAppCall(client.params.bare(params)));\n return this;\n },\n /**\n * Add a clear state call to the PaddingUtil contract\n */\n clearState(params: AppClientBareCallParams) {\n promiseChain = promiseChain.then(() => composer.addAppCall(client.params.clearState(params)));\n return this;\n },\n addTransaction(txn: Transaction, signer?: TransactionSigner) {\n promiseChain = promiseChain.then(() => composer.addTransaction(txn, signer));\n return this;\n },\n async composer() {\n await promiseChain;\n return composer;\n },\n async simulate(options?: SimulateOptions) {\n await promiseChain;\n const result = await (!options ? composer.simulate() : composer.simulate(options));\n return {\n ...result,\n returns: result.returns?.map((val, i) =>\n resultMappers[i] !== undefined ? resultMappers[i]!(val) : val.returnValue\n ),\n };\n },\n async send(params?: SendParams) {\n await promiseChain;\n const result = await composer.send(params);\n return {\n ...result,\n returns: result.returns?.map((val, i) =>\n resultMappers[i] !== undefined ? resultMappers[i]!(val) : val.returnValue\n ),\n };\n },\n } as unknown as PaddingUtilComposer;\n }\n}\nexport type PaddingUtilComposer<TReturns extends [...any[]] = []> = {\n /**\n * Makes a clear_state call to an existing instance of the PaddingUtil smart contract.\n *\n * @param args The arguments for the bare call\n * @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions\n */\n clearState(params?: AppClientBareCallParams): PaddingUtilComposer<[...TReturns, undefined]>;\n\n /**\n * Adds a transaction to the composer\n *\n * @param txn A transaction to add to the transaction group\n * @param signer The optional signer to use when signing this transaction.\n */\n addTransaction(txn: Transaction, signer?: TransactionSigner): PaddingUtilComposer<TReturns>;\n /**\n * Returns the underlying AtomicTransactionComposer instance\n */\n composer(): Promise<TransactionComposer>;\n /**\n * Simulates the transaction group and returns the result\n */\n simulate(): Promise<PaddingUtilComposerResults<TReturns> & { simulateResponse: modelsv2.SimulateResponse }>;\n simulate(\n options: SkipSignaturesSimulateOptions\n ): Promise<PaddingUtilComposerResults<TReturns> & { simulateResponse: modelsv2.SimulateResponse }>;\n simulate(\n options: RawSimulateOptions\n ): Promise<PaddingUtilComposerResults<TReturns> & { simulateResponse: modelsv2.SimulateResponse }>;\n /**\n * Sends the transaction group to the network and returns the results\n */\n send(params?: SendParams): Promise<PaddingUtilComposerResults<TReturns>>;\n};\nexport type PaddingUtilComposerResults<TReturns extends [...any[]]> = Expand<\n SendAtomicTransactionComposerResults & {\n returns: TReturns;\n }\n>;\n"]}