@provablehq/sdk 0.8.1 → 0.8.2

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 (103) hide show
  1. package/dist/mainnet/account.d.ts +137 -0
  2. package/dist/mainnet/browser.d.ts +35 -0
  3. package/dist/mainnet/browser.js +934 -0
  4. package/dist/mainnet/browser.js.map +1 -0
  5. package/dist/mainnet/constants.d.ts +34 -0
  6. package/dist/mainnet/function-key-provider.d.ts +349 -0
  7. package/dist/mainnet/managed-worker.d.ts +3 -0
  8. package/dist/mainnet/models/blockJSON.d.ts +21 -0
  9. package/dist/mainnet/models/confirmed_transaction.d.ts +9 -0
  10. package/dist/mainnet/models/deployment/deploymentJSON.d.ts +6 -0
  11. package/dist/mainnet/models/deployment/deploymentObject.d.ts +6 -0
  12. package/dist/mainnet/models/execution/executionJSON.d.ts +11 -0
  13. package/dist/mainnet/models/execution/executionObject.d.ts +11 -0
  14. package/dist/mainnet/models/finalizeJSON.d.ts +6 -0
  15. package/dist/mainnet/models/functionObject.d.ts +8 -0
  16. package/dist/mainnet/models/input/inputJSON.d.ts +9 -0
  17. package/dist/mainnet/models/input/inputObject.d.ts +14 -0
  18. package/dist/mainnet/models/output/outputJSON.d.ts +6 -0
  19. package/dist/mainnet/models/output/outputObject.d.ts +17 -0
  20. package/dist/mainnet/models/owner/ownerJSON.d.ts +4 -0
  21. package/dist/mainnet/models/owner/ownerObject.d.ts +5 -0
  22. package/dist/mainnet/models/plaintext/array.d.ts +3 -0
  23. package/dist/mainnet/models/plaintext/literal.d.ts +1 -0
  24. package/dist/mainnet/models/plaintext/plaintext.d.ts +5 -0
  25. package/dist/mainnet/models/plaintext/struct.d.ts +5 -0
  26. package/dist/mainnet/models/transaction/transactionJSON.d.ts +11 -0
  27. package/dist/mainnet/models/transaction/transactionObject.d.ts +14 -0
  28. package/dist/mainnet/models/transition/transitionJSON.d.ts +13 -0
  29. package/dist/mainnet/models/transition/transitionObject.d.ts +15 -0
  30. package/dist/mainnet/network-client.d.ts +358 -0
  31. package/dist/mainnet/node-polyfill.d.ts +5 -0
  32. package/dist/mainnet/node-polyfill.js +261 -0
  33. package/dist/mainnet/node-polyfill.js.map +1 -0
  34. package/dist/mainnet/node.d.ts +2 -0
  35. package/dist/mainnet/node.js +14 -0
  36. package/dist/mainnet/node.js.map +1 -0
  37. package/dist/mainnet/offline-key-provider.d.ts +348 -0
  38. package/dist/mainnet/polyfill/crypto.d.ts +1 -0
  39. package/dist/mainnet/polyfill/fetch.d.ts +1 -0
  40. package/dist/mainnet/polyfill/shared.d.ts +1 -0
  41. package/dist/mainnet/polyfill/worker.d.ts +1 -0
  42. package/dist/mainnet/polyfill/xmlhttprequest.d.ts +1 -0
  43. package/dist/mainnet/program-manager-pTXN5gjF.js +2369 -0
  44. package/dist/mainnet/program-manager-pTXN5gjF.js.map +1 -0
  45. package/dist/mainnet/program-manager.d.ts +669 -0
  46. package/dist/mainnet/record-provider.d.ts +236 -0
  47. package/dist/mainnet/utils.d.ts +4 -0
  48. package/dist/mainnet/wasm.d.ts +1 -0
  49. package/dist/mainnet/worker.d.ts +9 -0
  50. package/dist/mainnet/worker.js +78 -0
  51. package/dist/mainnet/worker.js.map +1 -0
  52. package/dist/testnet/account.d.ts +137 -0
  53. package/dist/testnet/browser.d.ts +35 -0
  54. package/dist/testnet/browser.js +934 -0
  55. package/dist/testnet/browser.js.map +1 -0
  56. package/dist/testnet/constants.d.ts +34 -0
  57. package/dist/testnet/function-key-provider.d.ts +349 -0
  58. package/dist/testnet/managed-worker.d.ts +3 -0
  59. package/dist/testnet/models/blockJSON.d.ts +21 -0
  60. package/dist/testnet/models/confirmed_transaction.d.ts +9 -0
  61. package/dist/testnet/models/deployment/deploymentJSON.d.ts +6 -0
  62. package/dist/testnet/models/deployment/deploymentObject.d.ts +6 -0
  63. package/dist/testnet/models/execution/executionJSON.d.ts +11 -0
  64. package/dist/testnet/models/execution/executionObject.d.ts +11 -0
  65. package/dist/testnet/models/finalizeJSON.d.ts +6 -0
  66. package/dist/testnet/models/functionObject.d.ts +8 -0
  67. package/dist/testnet/models/input/inputJSON.d.ts +9 -0
  68. package/dist/testnet/models/input/inputObject.d.ts +14 -0
  69. package/dist/testnet/models/output/outputJSON.d.ts +6 -0
  70. package/dist/testnet/models/output/outputObject.d.ts +17 -0
  71. package/dist/testnet/models/owner/ownerJSON.d.ts +4 -0
  72. package/dist/testnet/models/owner/ownerObject.d.ts +5 -0
  73. package/dist/testnet/models/plaintext/array.d.ts +3 -0
  74. package/dist/testnet/models/plaintext/literal.d.ts +1 -0
  75. package/dist/testnet/models/plaintext/plaintext.d.ts +5 -0
  76. package/dist/testnet/models/plaintext/struct.d.ts +5 -0
  77. package/dist/testnet/models/transaction/transactionJSON.d.ts +11 -0
  78. package/dist/testnet/models/transaction/transactionObject.d.ts +14 -0
  79. package/dist/testnet/models/transition/transitionJSON.d.ts +13 -0
  80. package/dist/testnet/models/transition/transitionObject.d.ts +15 -0
  81. package/dist/testnet/network-client.d.ts +358 -0
  82. package/dist/testnet/node-polyfill.d.ts +5 -0
  83. package/dist/testnet/node-polyfill.js +261 -0
  84. package/dist/testnet/node-polyfill.js.map +1 -0
  85. package/dist/testnet/node.d.ts +2 -0
  86. package/dist/testnet/node.js +14 -0
  87. package/dist/testnet/node.js.map +1 -0
  88. package/dist/testnet/offline-key-provider.d.ts +348 -0
  89. package/dist/testnet/polyfill/crypto.d.ts +1 -0
  90. package/dist/testnet/polyfill/fetch.d.ts +1 -0
  91. package/dist/testnet/polyfill/shared.d.ts +1 -0
  92. package/dist/testnet/polyfill/worker.d.ts +1 -0
  93. package/dist/testnet/polyfill/xmlhttprequest.d.ts +1 -0
  94. package/dist/testnet/program-manager-DQZd0G79.js +2369 -0
  95. package/dist/testnet/program-manager-DQZd0G79.js.map +1 -0
  96. package/dist/testnet/program-manager.d.ts +669 -0
  97. package/dist/testnet/record-provider.d.ts +236 -0
  98. package/dist/testnet/utils.d.ts +4 -0
  99. package/dist/testnet/wasm.d.ts +1 -0
  100. package/dist/testnet/worker.d.ts +9 -0
  101. package/dist/testnet/worker.js +78 -0
  102. package/dist/testnet/worker.js.map +1 -0
  103. package/package.json +1 -1
@@ -0,0 +1,669 @@
1
+ import { Account } from "./account";
2
+ import { AleoNetworkClient, ProgramImports } from "./network-client";
3
+ import { RecordProvider, RecordSearchParams } from "./record-provider";
4
+ import { FunctionKeyPair, FunctionKeyProvider, KeySearchParams } from "./function-key-provider";
5
+ import { ExecutionResponse, OfflineQuery, RecordPlaintext, PrivateKey, Program, ProvingKey, VerifyingKey, Transaction } from "./wasm";
6
+ /**
7
+ * Represents the options for executing a transaction in the Aleo network.
8
+ * This interface is used to specify the parameters required for building and submitting an execution transaction.
9
+ *
10
+ * @property {string} programName - The name of the program containing the function to be executed.
11
+ * @property {string} functionName - The name of the function to execute within the program.
12
+ * @property {number} fee - The fee to be paid for the transaction.
13
+ * @property {boolean} privateFee - If true, uses a private record to pay the fee; otherwise, uses the account's public credit balance.
14
+ * @property {string[]} inputs - The inputs to the function being executed.
15
+ * @property {RecordSearchParams} [recordSearchParams] - Optional parameters for searching for a record to pay the execution transaction fee.
16
+ * @property {KeySearchParams} [keySearchParams] - Optional parameters for finding the matching proving & verifying keys for the function.
17
+ * @property {string | RecordPlaintext} [feeRecord] - Optional fee record to use for the transaction.
18
+ * @property {ProvingKey} [provingKey] - Optional proving key to use for the transaction.
19
+ * @property {VerifyingKey} [verifyingKey] - Optional verifying key to use for the transaction.
20
+ * @property {PrivateKey} [privateKey] - Optional private key to use for the transaction.
21
+ * @property {OfflineQuery} [offlineQuery] - Optional offline query if creating transactions in an offline environment.
22
+ * @property {string | Program} [program] - Optional program source code to use for the transaction.
23
+ * @property {ProgramImports} [imports] - Optional programs that the program being executed imports.
24
+ */
25
+ interface ExecuteOptions {
26
+ programName: string;
27
+ functionName: string;
28
+ fee: number;
29
+ privateFee: boolean;
30
+ inputs: string[];
31
+ recordSearchParams?: RecordSearchParams;
32
+ keySearchParams?: KeySearchParams;
33
+ feeRecord?: string | RecordPlaintext;
34
+ provingKey?: ProvingKey;
35
+ verifyingKey?: VerifyingKey;
36
+ privateKey?: PrivateKey;
37
+ offlineQuery?: OfflineQuery;
38
+ program?: string | Program;
39
+ imports?: ProgramImports;
40
+ }
41
+ /**
42
+ * The ProgramManager class is used to execute and deploy programs on the Aleo network and create value transfers.
43
+ */
44
+ declare class ProgramManager {
45
+ account: Account | undefined;
46
+ keyProvider: FunctionKeyProvider;
47
+ host: string;
48
+ networkClient: AleoNetworkClient;
49
+ recordProvider: RecordProvider | undefined;
50
+ /** Create a new instance of the ProgramManager
51
+ *
52
+ * @param { string | undefined } host A host uri running the official Aleo API
53
+ * @param { FunctionKeyProvider | undefined } keyProvider A key provider that implements {@link FunctionKeyProvider} interface
54
+ * @param { RecordProvider | undefined } recordProvider A record provider that implements {@link RecordProvider} interface
55
+ */
56
+ constructor(host?: string | undefined, keyProvider?: FunctionKeyProvider | undefined, recordProvider?: RecordProvider | undefined);
57
+ /**
58
+ * Set the account to use for transaction submission to the Aleo network
59
+ *
60
+ * @param {Account} account Account to use for transaction submission
61
+ */
62
+ setAccount(account: Account): void;
63
+ /**
64
+ * Set the key provider that provides the proving and verifying keys for programs
65
+ *
66
+ * @param {FunctionKeyProvider} keyProvider
67
+ */
68
+ setKeyProvider(keyProvider: FunctionKeyProvider): void;
69
+ /**
70
+ * Set the host peer to use for transaction submission to the Aleo network
71
+ *
72
+ * @param host {string} Peer url to use for transaction submission
73
+ */
74
+ setHost(host: string): void;
75
+ /**
76
+ * Set the record provider that provides records for transactions
77
+ *
78
+ * @param {RecordProvider} recordProvider
79
+ */
80
+ setRecordProvider(recordProvider: RecordProvider): void;
81
+ /**
82
+ * Builds a deployment transaction for submission to the Aleo network.
83
+ *
84
+ * @param {string} program Program source code
85
+ * @param {number} fee Fee to pay for the transaction
86
+ * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance
87
+ * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for searching for a record to use
88
+ * pay the deployment fee
89
+ * @param {string | RecordPlaintext | undefined} feeRecord Optional Fee record to use for the transaction
90
+ * @param {PrivateKey | undefined} privateKey Optional private key to use for the transaction
91
+ * @returns {string} The transaction id of the deployed program or a failure message from the network
92
+ *
93
+ * @example
94
+ * // Create a new NetworkClient, KeyProvider, and RecordProvider
95
+ * const networkClient = new AleoNetworkClient("https://api.explorer.provable.com/v1");
96
+ * const keyProvider = new AleoKeyProvider();
97
+ * const recordProvider = new NetworkRecordProvider(account, networkClient);
98
+ *
99
+ * // Initialize a program manager with the key provider to automatically fetch keys for deployments
100
+ * const program = "program hello_hello.aleo;\n\nfunction hello:\n input r0 as u32.public;\n input r1 as u32.private;\n add r0 r1 into r2;\n output r2 as u32.private;\n";
101
+ * const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, recordProvider);
102
+ *
103
+ * // Define a fee in credits
104
+ * const fee = 1.2;
105
+ *
106
+ * // Create the deployment transaction.
107
+ * const tx = await programManager.buildDeploymentTransaction(program, fee, false);
108
+ */
109
+ buildDeploymentTransaction(program: string, fee: number, privateFee: boolean, recordSearchParams?: RecordSearchParams, feeRecord?: string | RecordPlaintext, privateKey?: PrivateKey): Promise<Transaction>;
110
+ /**
111
+ * Deploy an Aleo program to the Aleo network
112
+ *
113
+ * @param {string} program Program source code
114
+ * @param {number} fee Fee to pay for the transaction
115
+ * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance
116
+ * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for searching for a record to use
117
+ * pay the deployment fee
118
+ * @param {string | RecordPlaintext | undefined} feeRecord Optional Fee record to use for the transaction
119
+ * @param {PrivateKey | undefined} privateKey Optional private key to use for the transaction
120
+ * @returns {string} The transaction id of the deployed program or a failure message from the network
121
+ *
122
+ * @example
123
+ * // Create a new NetworkClient, KeyProvider, and RecordProvider
124
+ * const networkClient = new AleoNetworkClient("https://api.explorer.provable.com/v1");
125
+ * const keyProvider = new AleoKeyProvider();
126
+ * const recordProvider = new NetworkRecordProvider(account, networkClient);
127
+ *
128
+ * // Initialize a program manager with the key provider to automatically fetch keys for deployments
129
+ * const program = "program hello_hello.aleo;\n\nfunction hello:\n input r0 as u32.public;\n input r1 as u32.private;\n add r0 r1 into r2;\n output r2 as u32.private;\n";
130
+ * const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, recordProvider);
131
+ *
132
+ * // Define a fee in credits
133
+ * const fee = 1.2;
134
+ *
135
+ * // Deploy the program
136
+ * const tx_id = await programManager.deploy(program, fee, false);
137
+ *
138
+ * // Verify the transaction was successful
139
+ * const transaction = await programManager.networkClient.getTransaction(tx_id);
140
+ */
141
+ deploy(program: string, fee: number, privateFee: boolean, recordSearchParams?: RecordSearchParams, feeRecord?: string | RecordPlaintext, privateKey?: PrivateKey): Promise<string>;
142
+ /**
143
+ * Builds an execution transaction for submission to the Aleo network.
144
+ *
145
+ * @param {ExecuteOptions} options - The options for the execution transaction.
146
+ * @returns {Promise<Transaction>} - A promise that resolves to the transaction or an error.
147
+ *
148
+ * @example
149
+ * // Create a new NetworkClient, KeyProvider, and RecordProvider using official Aleo record, key, and network providers
150
+ * const networkClient = new AleoNetworkClient("https://api.explorer.provable.com/v1");
151
+ * const keyProvider = new AleoKeyProvider();
152
+ * keyProvider.useCache = true;
153
+ * const recordProvider = new NetworkRecordProvider(account, networkClient);
154
+ *
155
+ * // Initialize a program manager with the key provider to automatically fetch keys for executions
156
+ * const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, recordProvider);
157
+ *
158
+ * // Build and execute the transaction
159
+ * const transaction = await programManager.buildExecutionTransaction({
160
+ * programName: "hello_hello.aleo",
161
+ * functionName: "hello_hello",
162
+ * fee: 0.020,
163
+ * privateFee: false,
164
+ * inputs: ["5u32", "5u32"],
165
+ * keySearchParams: { "cacheKey": "hello_hello:hello" }
166
+ * });
167
+ * const result = await programManager.networkClient.submitTransaction(transaction);
168
+ */
169
+ buildExecutionTransaction(options: ExecuteOptions): Promise<Transaction>;
170
+ /**
171
+ * Builds an execution transaction for submission to the Aleo network.
172
+ *
173
+ * @param {ExecuteOptions} options - The options for the execution transaction.
174
+ * @returns {Promise<Transaction>} - A promise that resolves to the transaction or an error.
175
+ *
176
+ * @example
177
+ * // Create a new NetworkClient, KeyProvider, and RecordProvider using official Aleo record, key, and network providers
178
+ * const networkClient = new AleoNetworkClient("https://api.explorer.provable.com/v1");
179
+ * const keyProvider = new AleoKeyProvider();
180
+ * keyProvider.useCache = true;
181
+ * const recordProvider = new NetworkRecordProvider(account, networkClient);
182
+ *
183
+ * // Initialize a program manager with the key provider to automatically fetch keys for executions
184
+ * const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, recordProvider);
185
+ *
186
+ * // Build and execute the transaction
187
+ * const transaction = await programManager.execute({
188
+ * programName: "hello_hello.aleo",
189
+ * functionName: "hello_hello",
190
+ * fee: 0.020,
191
+ * privateFee: false,
192
+ * inputs: ["5u32", "5u32"],
193
+ * keySearchParams: { "cacheKey": "hello_hello:hello" }
194
+ * });
195
+ * const result = await programManager.networkClient.submitTransaction(transaction);
196
+ */
197
+ execute(options: ExecuteOptions): Promise<string>;
198
+ /**
199
+ * Run an Aleo program in offline mode
200
+ *
201
+ * @param {string} program Program source code containing the function to be executed
202
+ * @param {string} function_name Function name to execute
203
+ * @param {string[]} inputs Inputs to the function
204
+ * @param {number} proveExecution Whether to prove the execution of the function and return an execution transcript
205
+ * that contains the proof.
206
+ * @param {string[] | undefined} imports Optional imports to the program
207
+ * @param {KeySearchParams | undefined} keySearchParams Optional parameters for finding the matching proving &
208
+ * verifying keys for the function
209
+ * @param {ProvingKey | undefined} provingKey Optional proving key to use for the transaction
210
+ * @param {VerifyingKey | undefined} verifyingKey Optional verifying key to use for the transaction
211
+ * @param {PrivateKey | undefined} privateKey Optional private key to use for the transaction
212
+ * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment
213
+ * @returns {Promise<string>}
214
+ *
215
+ * @example
216
+ * import { Account, Program } from '@provablehq/sdk';
217
+ *
218
+ * /// Create the source for the "helloworld" program
219
+ * const program = "program helloworld.aleo;\n\nfunction hello:\n input r0 as u32.public;\n input r1 as u32.private;\n add r0 r1 into r2;\n output r2 as u32.private;\n";
220
+ * const programManager = new ProgramManager();
221
+ *
222
+ * /// Create a temporary account for the execution of the program
223
+ * const account = new Account();
224
+ * programManager.setAccount(account);
225
+ *
226
+ * /// Get the response and ensure that the program executed correctly
227
+ * const executionResponse = await programManager.run(program, "hello", ["5u32", "5u32"]);
228
+ * const result = executionResponse.getOutputs();
229
+ * assert(result === ["10u32"]);
230
+ */
231
+ run(program: string, function_name: string, inputs: string[], proveExecution: boolean, imports?: ProgramImports, keySearchParams?: KeySearchParams, provingKey?: ProvingKey, verifyingKey?: VerifyingKey, privateKey?: PrivateKey, offlineQuery?: OfflineQuery): Promise<ExecutionResponse>;
232
+ /**
233
+ * Join two credits records into a single credits record
234
+ *
235
+ * @param {RecordPlaintext | string} recordOne First credits record to join
236
+ * @param {RecordPlaintext | string} recordTwo Second credits record to join
237
+ * @param {number} fee Fee in credits pay for the join transaction
238
+ * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance
239
+ * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the fee record to use
240
+ * to pay the fee for the join transaction
241
+ * @param {RecordPlaintext | string | undefined} feeRecord Fee record to use for the join transaction
242
+ * @param {PrivateKey | undefined} privateKey Private key to use for the join transaction
243
+ * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment
244
+ * @returns {Promise<string>}
245
+ */
246
+ join(recordOne: RecordPlaintext | string, recordTwo: RecordPlaintext | string, fee: number, privateFee: boolean, recordSearchParams?: RecordSearchParams | undefined, feeRecord?: RecordPlaintext | string | undefined, privateKey?: PrivateKey, offlineQuery?: OfflineQuery): Promise<string>;
247
+ /**
248
+ * Split credits into two new credits records
249
+ *
250
+ * @param {number} splitAmount Amount in microcredits to split from the original credits record
251
+ * @param {RecordPlaintext | string} amountRecord Amount record to use for the split transaction
252
+ * @param {PrivateKey | undefined} privateKey Optional private key to use for the split transaction
253
+ * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment
254
+ * @returns {Promise<string>}
255
+ *
256
+ * @example
257
+ * // Create a new NetworkClient, KeyProvider, and RecordProvider
258
+ * const networkClient = new AleoNetworkClient("https://api.explorer.provable.com/v1");
259
+ * const keyProvider = new AleoKeyProvider();
260
+ * const recordProvider = new NetworkRecordProvider(account, networkClient);
261
+ *
262
+ * // Initialize a program manager with the key provider to automatically fetch keys for executions
263
+ * const programName = "hello_hello.aleo";
264
+ * const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, recordProvider);
265
+ * const record = "{ owner: aleo184vuwr5u7u0ha5f5k44067dd2uaqewxx6pe5ltha5pv99wvhfqxqv339h4.private, microcredits: 45000000u64.private, _nonce: 4106205762862305308495708971985748592380064201230396559307556388725936304984group.public}"
266
+ * const tx_id = await programManager.split(25000000, record);
267
+ * const transaction = await programManager.networkClient.getTransaction(tx_id);
268
+ */
269
+ split(splitAmount: number, amountRecord: RecordPlaintext | string, privateKey?: PrivateKey, offlineQuery?: OfflineQuery): Promise<string>;
270
+ /**
271
+ * Pre-synthesize proving and verifying keys for a program
272
+ *
273
+ * @param program {string} The program source code to synthesize keys for
274
+ * @param function_id {string} The function id to synthesize keys for
275
+ * @param inputs {Array<string>} Sample inputs to the function
276
+ * @param privateKey {PrivateKey | undefined} Optional private key to use for the key synthesis
277
+ *
278
+ * @returns {Promise<FunctionKeyPair>}
279
+ */
280
+ synthesizeKeys(program: string, function_id: string, inputs: Array<string>, privateKey?: PrivateKey): Promise<FunctionKeyPair>;
281
+ /**
282
+ * Build a transaction to transfer credits to another account for later submission to the Aleo network
283
+ *
284
+ * @param {number} amount The amount of credits to transfer
285
+ * @param {string} recipient The recipient of the transfer
286
+ * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'
287
+ * @param {number} fee The fee to pay for the transfer
288
+ * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance
289
+ * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee
290
+ * records for the transfer transaction
291
+ * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer
292
+ * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer
293
+ * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction
294
+ * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment
295
+ * @returns {Promise<string>} The transaction id of the transfer transaction
296
+ *
297
+ * @example
298
+ * // Create a new NetworkClient, KeyProvider, and RecordProvider
299
+ * const networkClient = new AleoNetworkClient("https://api.explorer.provable.com/v1");
300
+ * const keyProvider = new AleoKeyProvider();
301
+ * const recordProvider = new NetworkRecordProvider(account, networkClient);
302
+ *
303
+ * // Initialize a program manager with the key provider to automatically fetch keys for executions
304
+ * const programName = "hello_hello.aleo";
305
+ * const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, recordProvider);
306
+ * await programManager.initialize();
307
+ * const tx_id = await programManager.transfer(1, "aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px", "private", 0.2)
308
+ * const transaction = await programManager.networkClient.getTransaction(tx_id);
309
+ */
310
+ buildTransferTransaction(amount: number, recipient: string, transferType: string, fee: number, privateFee: boolean, recordSearchParams?: RecordSearchParams, amountRecord?: RecordPlaintext | string, feeRecord?: RecordPlaintext | string, privateKey?: PrivateKey, offlineQuery?: OfflineQuery): Promise<Transaction>;
311
+ /**
312
+ * Build a transfer_public transaction to transfer credits to another account for later submission to the Aleo network
313
+ *
314
+ * @param {number} amount The amount of credits to transfer
315
+ * @param {string} recipient The recipient of the transfer
316
+ * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'
317
+ * @param {number} fee The fee to pay for the transfer
318
+ * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance
319
+ * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee
320
+ * records for the transfer transaction
321
+ * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer
322
+ * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer
323
+ * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction
324
+ * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment
325
+ * @returns {Promise<string>} The transaction id of the transfer transaction
326
+ */
327
+ buildTransferPublicTransaction(amount: number, recipient: string, fee: number, privateKey?: PrivateKey, offlineQuery?: OfflineQuery): Promise<Transaction>;
328
+ /**
329
+ * Build a transfer_public_as_signer transaction to transfer credits to another account for later submission to the Aleo network
330
+ *
331
+ * @param {number} amount The amount of credits to transfer
332
+ * @param {string} recipient The recipient of the transfer
333
+ * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'
334
+ * @param {number} fee The fee to pay for the transfer
335
+ * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance
336
+ * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee
337
+ * records for the transfer transaction
338
+ * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer
339
+ * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer
340
+ * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction
341
+ * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment
342
+ * @returns {Promise<string>} The transaction id of the transfer transaction
343
+ */
344
+ buildTransferPublicAsSignerTransaction(amount: number, recipient: string, fee: number, privateKey?: PrivateKey, offlineQuery?: OfflineQuery): Promise<Transaction>;
345
+ /**
346
+ * Transfer credits to another account
347
+ *
348
+ * @param {number} amount The amount of credits to transfer
349
+ * @param {string} recipient The recipient of the transfer
350
+ * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'
351
+ * @param {number} fee The fee to pay for the transfer
352
+ * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance
353
+ * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee
354
+ * records for the transfer transaction
355
+ * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer
356
+ * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer
357
+ * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction
358
+ * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment
359
+ * @returns {Promise<string>} The transaction id of the transfer transaction
360
+ *
361
+ * @example
362
+ * // Create a new NetworkClient, KeyProvider, and RecordProvider
363
+ * const networkClient = new AleoNetworkClient("https://api.explorer.provable.com/v1");
364
+ * const keyProvider = new AleoKeyProvider();
365
+ * const recordProvider = new NetworkRecordProvider(account, networkClient);
366
+ *
367
+ * // Initialize a program manager with the key provider to automatically fetch keys for executions
368
+ * const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, recordProvider);
369
+ * await programManager.initialize();
370
+ * const tx_id = await programManager.transfer(1, "aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px", "private", 0.2)
371
+ * const transaction = await programManager.networkClient.getTransaction(tx_id);
372
+ */
373
+ transfer(amount: number, recipient: string, transferType: string, fee: number, privateFee: boolean, recordSearchParams?: RecordSearchParams, amountRecord?: RecordPlaintext | string, feeRecord?: RecordPlaintext | string, privateKey?: PrivateKey, offlineQuery?: OfflineQuery): Promise<string>;
374
+ /**
375
+ * Build transaction to bond credits to a validator for later submission to the Aleo Network
376
+ *
377
+ * @example
378
+ * // Create a keyProvider to handle key management
379
+ * const keyProvider = new AleoKeyProvider();
380
+ * keyProvider.useCache = true;
381
+ *
382
+ * // Create a new ProgramManager with the key that will be used to bond credits
383
+ * const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, undefined);
384
+ * programManager.setAccount(new Account("YourPrivateKey"));
385
+ *
386
+ * // Create the bonding transaction object for later submission
387
+ * const tx = await programManager.buildBondPublicTransaction("aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j", "aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px", "aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9", 2000000);
388
+ * console.log(tx);
389
+ *
390
+ * // The transaction can be later submitted to the network using the network client.
391
+ * const result = await programManager.networkClient.submitTransaction(tx);
392
+ *
393
+ * @returns string
394
+ * @param {string} staker_address Address of the staker who is bonding the credits
395
+ * @param {string} validator_address Address of the validator to bond to, if this address is the same as the staker (i.e. the
396
+ * executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently
397
+ * requires a minimum of 10,000,000 credits to bond (subject to change). If the address is specified is an existing
398
+ * validator and is different from the address of the executor of this function, it will bond the credits to that
399
+ * validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.
400
+ * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.
401
+ * @param {number} amount The amount of credits to bond
402
+ * @param {Partial<ExecuteOptions>} options - Override default execution options.
403
+ */
404
+ buildBondPublicTransaction(staker_address: string, validator_address: string, withdrawal_address: string, amount: number, options?: Partial<ExecuteOptions>): Promise<Transaction>;
405
+ /**
406
+ * Bond credits to validator.
407
+ *
408
+ * @example
409
+ * // Create a keyProvider to handle key management
410
+ * const keyProvider = new AleoKeyProvider();
411
+ * keyProvider.useCache = true;
412
+ *
413
+ * // Create a new ProgramManager with the key that will be used to bond credits
414
+ * const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, undefined);
415
+ * programManager.setAccount(new Account("YourPrivateKey"));
416
+ *
417
+ * // Create the bonding transaction
418
+ * const tx_id = await programManager.bondPublic("aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j", "aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px", "aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9", 2000000);
419
+ *
420
+ * @returns string
421
+ * @param {string} staker_address Address of the staker who is bonding the credits
422
+ * @param {string} validator_address Address of the validator to bond to, if this address is the same as the signer (i.e. the
423
+ * executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently
424
+ * requires a minimum of 1,000,000 credits to bond (subject to change). If the address is specified is an existing
425
+ * validator and is different from the address of the executor of this function, it will bond the credits to that
426
+ * validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.
427
+ * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.
428
+ * @param {number} amount The amount of credits to bond
429
+ * @param {Options} options Options for the execution
430
+ */
431
+ bondPublic(staker_address: string, validator_address: string, withdrawal_address: string, amount: number, options?: Partial<ExecuteOptions>): Promise<string>;
432
+ /**
433
+ * Build a bond_validator transaction for later submission to the Aleo Network.
434
+ *
435
+ * @example
436
+ * // Create a keyProvider to handle key management
437
+ * const keyProvider = new AleoKeyProvider();
438
+ * keyProvider.useCache = true;
439
+ *
440
+ * // Create a new ProgramManager with the key that will be used to bond credits
441
+ * const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, undefined);
442
+ * programManager.setAccount(new Account("YourPrivateKey"));
443
+ *
444
+ * // Create the bond validator transaction object for later use.
445
+ * const tx = await programManager.buildBondValidatorTransaction("aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px", "aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9", 2000000);
446
+ * console.log(tx);
447
+ *
448
+ * // The transaction can later be submitted to the network using the network client.
449
+ * const tx_id = await programManager.networkClient.submitTransaction(tx);
450
+ *
451
+ * @returns string
452
+ * @param {string} validator_address Address of the validator to bond to, if this address is the same as the staker (i.e. the
453
+ * executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently
454
+ * requires a minimum of 10,000,000 credits to bond (subject to change). If the address is specified is an existing
455
+ * validator and is different from the address of the executor of this function, it will bond the credits to that
456
+ * validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.
457
+ * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.
458
+ * @param {number} amount The amount of credits to bond
459
+ * @param {number} commission The commission rate for the validator (must be between 0 and 100 - an error will be thrown if it is not)
460
+ * @param {Partial<ExecuteOptions>} options - Override default execution options.
461
+ */
462
+ buildBondValidatorTransaction(validator_address: string, withdrawal_address: string, amount: number, commission: number, options?: Partial<ExecuteOptions>): Promise<Transaction>;
463
+ /**
464
+ * Build transaction to bond a validator.
465
+ *
466
+ * @example
467
+ * // Create a keyProvider to handle key management
468
+ * const keyProvider = new AleoKeyProvider();
469
+ * keyProvider.useCache = true;
470
+ *
471
+ * // Create a new ProgramManager with the key that will be used to bond credits
472
+ * const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, undefined);
473
+ * programManager.setAccount(new Account("YourPrivateKey"));
474
+ *
475
+ * // Create the bonding transaction
476
+ * const tx_id = await programManager.bondValidator("aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px", "aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9", 2000000);
477
+ *
478
+ * @returns string
479
+ * @param {string} validator_address Address of the validator to bond to, if this address is the same as the staker (i.e. the
480
+ * executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently
481
+ * requires a minimum of 10,000,000 credits to bond (subject to change). If the address is specified is an existing
482
+ * validator and is different from the address of the executor of this function, it will bond the credits to that
483
+ * validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.
484
+ * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.
485
+ * @param {number} amount The amount of credits to bond
486
+ * @param {number} commission The commission rate for the validator (must be between 0 and 100 - an error will be thrown if it is not)
487
+ * @param {Partial<ExecuteOptions>} options - Override default execution options.
488
+ */
489
+ bondValidator(validator_address: string, withdrawal_address: string, amount: number, commission: number, options?: Partial<ExecuteOptions>): Promise<string>;
490
+ /**
491
+ * Build a transaction to unbond public credits from a validator in the Aleo network.
492
+ *
493
+ * @param {string} staker_address - The address of the staker who is unbonding the credits.
494
+ * @param {number} amount - The amount of credits to unbond (scaled by 1,000,000).
495
+ * @param {Partial<ExecuteOptions>} options - Override default execution options.
496
+ * @returns {Promise<Transaction>} - A promise that resolves to the transaction or an error message.
497
+ *
498
+ * @example
499
+ * // Create a keyProvider to handle key management.
500
+ * const keyProvider = new AleoKeyProvider();
501
+ * keyProvider.useCache = true;
502
+ *
503
+ * // Create a new ProgramManager with the key that will be used to unbond credits.
504
+ * const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, undefined);
505
+ * const tx = await programManager.buildUnbondPublicTransaction("aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j", 2000000);
506
+ * console.log(tx);
507
+ *
508
+ * // The transaction can be submitted later to the network using the network client.
509
+ * programManager.networkClient.submitTransaction(tx);
510
+ */
511
+ buildUnbondPublicTransaction(staker_address: string, amount: number, options?: Partial<ExecuteOptions>): Promise<Transaction>;
512
+ /**
513
+ * Unbond a specified amount of staked credits.
514
+ *
515
+ * @example
516
+ * // Create a keyProvider to handle key management
517
+ * const keyProvider = new AleoKeyProvider();
518
+ * keyProvider.useCache = true;
519
+ *
520
+ * // Create a new ProgramManager with the key that will be used to bond credits
521
+ * const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, undefined);
522
+ * programManager.setAccount(new Account("YourPrivateKey"));
523
+ *
524
+ * // Create the bonding transaction and send it to the network
525
+ * const tx_id = await programManager.unbondPublic("aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j", 10);
526
+ *
527
+ * @returns string
528
+ * @param {string} staker_address Address of the staker who is unbonding the credits
529
+ * @param {number} amount Amount of credits to unbond. If the address of the executor of this function is an
530
+ * existing validator, it will subtract this amount of credits from the validator's staked credits. If there are
531
+ * less than 1,000,000 credits staked pool after the unbond, the validator will be removed from the validator set.
532
+ * If the address of the executor of this function is not a validator and has credits bonded as a delegator, it will
533
+ * subtract this amount of credits from the delegator's staked credits. If there are less than 10 credits bonded
534
+ * after the unbond operation, the delegator will be removed from the validator's staking pool.
535
+ * @param {ExecuteOptions} options Options for the execution
536
+ */
537
+ unbondPublic(staker_address: string, amount: number, options?: Partial<ExecuteOptions>): Promise<string>;
538
+ /**
539
+ * Build a transaction to claim unbonded public credits in the Aleo network.
540
+ *
541
+ * @param {string} staker_address - The address of the staker who is claiming the credits.
542
+ * @param {Partial<ExecuteOptions>} options - Override default execution options.
543
+ * @returns {Promise<Transaction>} - A promise that resolves to the transaction or an error message.
544
+ *
545
+ * @example
546
+ * // Create a keyProvider to handle key management
547
+ * const keyProvider = new AleoKeyProvider();
548
+ * keyProvider.useCache = true;
549
+ *
550
+ * // Create a new ProgramManager with the key that will be used to claim unbonded credits.
551
+ * const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, undefined);
552
+ *
553
+ * // Create the claim unbonded transaction object for later use.
554
+ * const tx = await programManager.buildClaimUnbondPublicTransaction("aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j");
555
+ * console.log(tx);
556
+ *
557
+ * // The transaction can be submitted later to the network using the network client.
558
+ * programManager.networkClient.submitTransaction(tx);
559
+ */
560
+ buildClaimUnbondPublicTransaction(staker_address: string, options?: Partial<ExecuteOptions>): Promise<Transaction>;
561
+ /**
562
+ * Claim unbonded credits. If credits have been unbonded by the account executing this function, this method will
563
+ * claim them and add them to the public balance of the account.
564
+ *
565
+ * @example
566
+ * // Create a keyProvider to handle key management
567
+ * const keyProvider = new AleoKeyProvider();
568
+ * keyProvider.useCache = true;
569
+ *
570
+ * // Create a new ProgramManager with the key that will be used to bond credits
571
+ * const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, undefined);
572
+ * programManager.setAccount(new Account("YourPrivateKey"));
573
+ *
574
+ * // Create the bonding transaction
575
+ * const tx_id = await programManager.claimUnbondPublic("aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j");
576
+ *
577
+ * @param {string} staker_address Address of the staker who is claiming the credits
578
+ * @param {ExecuteOptions} options
579
+ * @returns string
580
+ */
581
+ claimUnbondPublic(staker_address: string, options?: Partial<ExecuteOptions>): Promise<string>;
582
+ /**
583
+ * Build a set_validator_state transaction for later usage.
584
+ *
585
+ * This function allows a validator to set their state to be either opened or closed to new stakers.
586
+ * When the validator is open to new stakers, any staker (including the validator) can bond or unbond from the validator.
587
+ * When the validator is closed to new stakers, existing stakers can still bond or unbond from the validator, but new stakers cannot bond.
588
+ *
589
+ * This function serves two primary purposes:
590
+ * 1. Allow a validator to leave the committee, by closing themselves to stakers and then unbonding all of their stakers.
591
+ * 2. Allow a validator to maintain their % of stake, by closing themselves to allowing more stakers to bond to them.
592
+ *
593
+ * @example
594
+ * // Create a keyProvider to handle key management
595
+ * const keyProvider = new AleoKeyProvider();
596
+ * keyProvider.useCache = true;
597
+ *
598
+ * // Create a new ProgramManager with the key that will be used to bond credits
599
+ * const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, undefined);
600
+ * programManager.setAccount(new Account("ValidatorPrivateKey"));
601
+ *
602
+ * // Create the bonding transaction
603
+ * const tx = await programManager.buildSetValidatorStateTransaction(true);
604
+ *
605
+ * // The transaction can be submitted later to the network using the network client.
606
+ * programManager.networkClient.submitTransaction(tx);
607
+ *
608
+ * @returns string
609
+ * @param {boolean} validator_state
610
+ * @param {Partial<ExecuteOptions>} options - Override default execution options
611
+ */
612
+ buildSetValidatorStateTransaction(validator_state: boolean, options?: Partial<ExecuteOptions>): Promise<string>;
613
+ /**
614
+ * Submit a set_validator_state transaction to the Aleo Network.
615
+ *
616
+ * This function allows a validator to set their state to be either opened or closed to new stakers.
617
+ * When the validator is open to new stakers, any staker (including the validator) can bond or unbond from the validator.
618
+ * When the validator is closed to new stakers, existing stakers can still bond or unbond from the validator, but new stakers cannot bond.
619
+ *
620
+ * This function serves two primary purposes:
621
+ * 1. Allow a validator to leave the committee, by closing themselves to stakers and then unbonding all of their stakers.
622
+ * 2. Allow a validator to maintain their % of stake, by closing themselves to allowing more stakers to bond to them.
623
+ *
624
+ * @example
625
+ * // Create a keyProvider to handle key management
626
+ * const keyProvider = new AleoKeyProvider();
627
+ * keyProvider.useCache = true;
628
+ *
629
+ * // Create a new ProgramManager with the key that will be used to bond credits
630
+ * const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, undefined);
631
+ * programManager.setAccount(new Account("ValidatorPrivateKey"));
632
+ *
633
+ * // Create the bonding transaction
634
+ * const tx_id = await programManager.setValidatorState(true);
635
+ *
636
+ * @returns string
637
+ * @param {boolean} validator_state
638
+ * @param {Partial<ExecuteOptions>} options - Override default execution options
639
+ */
640
+ setValidatorState(validator_state: boolean, options?: Partial<ExecuteOptions>): Promise<string>;
641
+ /**
642
+ * Verify a proof of execution from an offline execution
643
+ *
644
+ * @param {executionResponse} executionResponse
645
+ * @returns {boolean} True if the proof is valid, false otherwise
646
+ */
647
+ verifyExecution(executionResponse: ExecutionResponse): boolean;
648
+ /**
649
+ * Create a program object from a program's source code
650
+ *
651
+ * @param {string} program Program source code
652
+ * @returns {Program} The program object
653
+ */
654
+ createProgramFromSource(program: string): Program;
655
+ /**
656
+ * Get the credits program object
657
+ *
658
+ * @returns {Program} The credits program object
659
+ */
660
+ creditsProgram(): Program;
661
+ /**
662
+ * Verify a program is valid
663
+ *
664
+ * @param {string} program The program source code
665
+ */
666
+ verifyProgram(program: string): boolean;
667
+ getCreditsRecord(amount: number, nonces: string[], record?: RecordPlaintext | string, params?: RecordSearchParams): Promise<RecordPlaintext>;
668
+ }
669
+ export { ProgramManager };