@algorandfoundation/algokit-utils 7.0.0-beta.18 → 7.0.0-beta.19

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/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "**"
7
7
  ],
8
8
  "name": "@algorandfoundation/algokit-utils",
9
- "version": "7.0.0-beta.18",
9
+ "version": "7.0.0-beta.19",
10
10
  "private": false,
11
11
  "description": "A set of core Algorand utilities written in TypeScript and released via npm that make it easier to build solutions on Algorand.",
12
12
  "author": "Algorand Foundation",
@@ -215,6 +215,8 @@ export interface AppClientParams {
215
215
  /** Optional source map for the clear state program */
216
216
  clearSourceMap?: SourceMap;
217
217
  }
218
+ /** Parameters to clone an app client */
219
+ export type CloneAppClientParams = Expand<Partial<Omit<AppClientParams, 'algorand' | 'appSpec'>>>;
218
220
  /** onComplete parameter for a non-update app call */
219
221
  export type CallOnComplete = {
220
222
  /** On-complete of the call; defaults to no-op */
@@ -284,6 +286,7 @@ export declare class AppClient {
284
286
  private _createTransactionsMethods;
285
287
  private _sendMethods;
286
288
  constructor(params: AppClientParams);
289
+ clone(params: CloneAppClientParams): AppClient;
287
290
  /** Start a new `TransactionComposer` transaction group */
288
291
  newGroup(): TransactionComposer;
289
292
  /**
@@ -448,7 +451,7 @@ export declare class AppClient {
448
451
  approvalProgram: string | Uint8Array;
449
452
  clearStateProgram: string | Uint8Array;
450
453
  schema?: {
451
- globalInts: number; /** Parameters for funding an app account */
454
+ globalInts: number;
452
455
  globalByteSlices: number;
453
456
  localInts: number;
454
457
  localByteSlices: number;
@@ -125,6 +125,19 @@ class AppClient {
125
125
  bare: this.getBareSendMethods(),
126
126
  };
127
127
  }
128
+ clone(params) {
129
+ return new AppClient({
130
+ appId: this._appId,
131
+ appSpec: this._appSpec,
132
+ algorand: this._algorand,
133
+ appName: this._appName,
134
+ defaultSender: this._defaultSender,
135
+ defaultSigner: this._defaultSigner,
136
+ approvalSourceMap: this._approvalSourceMap,
137
+ clearSourceMap: this._clearSourceMap,
138
+ ...params,
139
+ });
140
+ }
128
141
  /** Start a new `TransactionComposer` transaction group */
129
142
  newGroup() {
130
143
  return this._algorand.newGroup();