@provablehq/wasm 0.10.2-rc.1 → 0.10.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.
@@ -2,6 +2,18 @@
2
2
  /* eslint-disable */
3
3
  export function runRayonThread(receiver: number): void;
4
4
  export function initThreadPool(url: URL, num_threads: number): Promise<void>;
5
+ /**
6
+ * Verify a batch SNARK proof against multiple verifying keys and their corresponding public inputs.
7
+ *
8
+ * This function verifies a batch proof produced by Aleo programs that may not be deployed on chain.
9
+ * Each verifying key is paired with one or more sets of public inputs (instances).
10
+ *
11
+ * @param {Array<string>} verifying_keys Array of verifying key strings, one per circuit
12
+ * @param {Array<Array<Array<string>>>} inputs 3D array of field element strings [circuit_idx][instance_idx][field_idx]
13
+ * @param {Proof} proof The batch proof to verify
14
+ * @returns {boolean} True if the batch proof is valid, false otherwise
15
+ */
16
+ export function snarkVerifyBatch(verifying_keys: Array<any>, inputs: Array<any>, proof: Proof): boolean;
5
17
  /**
6
18
  * Verify a SNARK proof against a verifying key and public inputs.
7
19
  *
@@ -27,20 +39,7 @@ export function snarkVerify(verifying_key: VerifyingKey, inputs: Array<any>, pro
27
39
  * @param {Object} import_verifying_keys The verifying keys for the imports in the form of { "program_id.aleo": [["function, "verifying_key"], ...], ...}
28
40
  * @returns {boolean} True if the execution is valid, false otherwise
29
41
  */
30
- export function verifyFunctionExecution(execution: Execution, verifying_key: VerifyingKey, program: Program, function_id: string, imports: object | null | undefined, imported_verifying_keys: object | null | undefined, block_height: number, program_imports?: ProgramImports | null): boolean;
31
- /**
32
- * Verify a batch SNARK proof against multiple verifying keys and their corresponding public inputs.
33
- *
34
- * This function verifies a batch proof produced by Aleo programs that may not be deployed on chain.
35
- * Each verifying key is paired with one or more sets of public inputs (instances).
36
- *
37
- * @param {Array<string>} verifying_keys Array of verifying key strings, one per circuit
38
- * @param {Array<Array<Array<string>>>} inputs 3D array of field element strings [circuit_idx][instance_idx][field_idx]
39
- * @param {Proof} proof The batch proof to verify
40
- * @returns {boolean} True if the batch proof is valid, false otherwise
41
- */
42
- export function snarkVerifyBatch(verifying_keys: Array<any>, inputs: Array<any>, proof: Proof): boolean;
43
- export function stringToField(string: string): Field;
42
+ export function verifyFunctionExecution(execution: Execution, verifying_key: VerifyingKey, program: Program, function_id: string, imports: object | null | undefined, imported_verifying_keys: object | null | undefined, block_height: number): boolean;
44
43
  /**
45
44
  * Set test consensus version heights for testing.
46
45
  *
@@ -53,6 +52,7 @@ export function stringToField(string: string): Field;
53
52
  * getOrInitConsensusVersionTestHeights("0,1,2,3,4,5,6,7,8,9,10,11,12,13");
54
53
  */
55
54
  export function getOrInitConsensusVersionTestHeights(heights?: string | null): Array<any>;
55
+ export function stringToField(string: string): Field;
56
56
  /**
57
57
  * Public address of an Aleo account
58
58
  */
@@ -3012,198 +3012,6 @@ export class Program {
3012
3012
  */
3013
3013
  toString(): string;
3014
3014
  }
3015
- /**
3016
- * Backed by `Rc<RefCell<>>` for interior mutability — cloning produces a cheap
3017
- * reference-counted copy that shares the same underlying data. This allows
3018
- * execution functions to clone the builder internally while the caller's
3019
- * original reference automatically sees any mutations (e.g. synthesized keys).
3020
- */
3021
- export class ProgramImports {
3022
- free(): void;
3023
- [Symbol.dispose](): void;
3024
- /**
3025
- * Add a program's source code to the imports.
3026
- *
3027
- * The source is parsed, validated, and added to the internal Process.
3028
- * Static imports of the program are resolved depth-first from programs
3029
- * already present in this builder.
3030
- *
3031
- * @param {string} name The program name (e.g., "my_program.aleo").
3032
- * @param {string} source The program source code.
3033
- * @param {number | undefined} edition The program edition (defaults to 1).
3034
- */
3035
- addProgram(name: string, source: string, edition?: number | null): void;
3036
- /**
3037
- * Create a ProgramImports from a plain JavaScript object.
3038
- *
3039
- * Accepts three formats:
3040
- * ```js
3041
- * // 1. Plain string — source code only.
3042
- * { "my_program.aleo": "program source..." }
3043
- *
3044
- * // 2. Structured — program source with optional edition.
3045
- * { "my_program.aleo": { program: "program source..." } }
3046
- *
3047
- * // 3. Structured with keys — program source plus proving/verifying keys per function.
3048
- * {
3049
- * "my_program.aleo": {
3050
- * program: "program source...",
3051
- * keys: {
3052
- * "my_function": {
3053
- * provingKey: Uint8Array,
3054
- * verifyingKey: Uint8Array
3055
- * }
3056
- * }
3057
- * }
3058
- * }
3059
- * ```
3060
- *
3061
- * Programs created via this method default to edition 1.
3062
- *
3063
- * @param {Object} object A plain JavaScript object mapping program names to source code
3064
- * and optional keys.
3065
- * @returns {ProgramImports}
3066
- */
3067
- static fromObject(object: object): ProgramImports;
3068
- /**
3069
- * Return the source code of a program by name, without serializing keys.
3070
- *
3071
- * @param {string} name The program name (e.g., "my_program.aleo").
3072
- * @returns {string | undefined}
3073
- */
3074
- getProgram(name: string): string | undefined;
3075
- /**
3076
- * Return the names of all programs in this builder as a JS `Array<string>`.
3077
- *
3078
- * This is a lightweight alternative to `toObject()` when you only need to
3079
- * enumerate program names without serializing keys.
3080
- *
3081
- * @returns {Array<string>}
3082
- */
3083
- programNames(): Array<any>;
3084
- /**
3085
- * Add a proving key for a function or record within an imported program.
3086
- *
3087
- * The key is transferred directly from the WASM `ProvingKey` type with no
3088
- * serialization overhead.
3089
- *
3090
- * @param {string} program_name The program name (e.g., "my_program.aleo").
3091
- * @param {string} identifier The function name or record name the key belongs to.
3092
- * @param {ProvingKey} key The proving key.
3093
- */
3094
- addProvingKey(program_name: string, identifier: string, key: ProvingKey): void;
3095
- /**
3096
- * Get a proving key for a specific program and identifier (function or record name).
3097
- * Returns a clone of the key from the internal Process. Non-destructive — the key
3098
- * remains available for future calls.
3099
- *
3100
- * @param {string} program_name The program name (e.g., "my_program.aleo").
3101
- * @param {string} identifier The function or record name.
3102
- * @returns {ProvingKey | undefined}
3103
- */
3104
- getProvingKey(program_name: string, identifier: string): ProvingKey | undefined;
3105
- /**
3106
- * Add a verifying key for a function or record within an imported program.
3107
- *
3108
- * The key is transferred directly from the WASM `VerifyingKey` type with no
3109
- * serialization overhead.
3110
- *
3111
- * @param {string} program_name The program name (e.g., "my_program.aleo").
3112
- * @param {string} identifier The function name or record name the key belongs to.
3113
- * @param {VerifyingKey} key The verifying key.
3114
- */
3115
- addVerifyingKey(program_name: string, identifier: string, key: VerifyingKey): void;
3116
- /**
3117
- * Get a verifying key for a specific program and identifier (function or record name).
3118
- * Returns a clone of the key from the internal Process. Non-destructive — the key
3119
- * remains available for future calls.
3120
- *
3121
- * @param {string} program_name The program name (e.g., "my_program.aleo").
3122
- * @param {string} identifier The function or record name.
3123
- * @returns {VerifyingKey | undefined}
3124
- */
3125
- getVerifyingKey(program_name: string, identifier: string): VerifyingKey | undefined;
3126
- /**
3127
- * Add a proving key from its byte representation.
3128
- *
3129
- * Deserializes the bytes into a native proving key and stores it. The program
3130
- * must already have been added via `addProgram`.
3131
- *
3132
- * @param {string} program_name The program name (e.g., "my_program.aleo").
3133
- * @param {string} identifier The function name or record name the key belongs to.
3134
- * @param {Uint8Array} bytes The proving key bytes.
3135
- */
3136
- addProvingKeyBytes(program_name: string, identifier: string, bytes: Uint8Array): void;
3137
- /**
3138
- * Add a verifying key from its byte representation.
3139
- *
3140
- * Deserializes the bytes into a native verifying key and stores it. The program
3141
- * must already have been added via `addProgram`.
3142
- *
3143
- * @param {string} program_name The program name (e.g., "my_program.aleo").
3144
- * @param {string} identifier The function name or record name the key belongs to.
3145
- * @param {Uint8Array} bytes The verifying key bytes.
3146
- */
3147
- addVerifyingKeyBytes(program_name: string, identifier: string, bytes: Uint8Array): void;
3148
- /**
3149
- * Return the names of functions that have both a proving key and a verifying key
3150
- * stored for the given program.
3151
- *
3152
- * @param {string} program_name The program name (e.g., "my_program.aleo").
3153
- * @returns {Array<string>}
3154
- */
3155
- functionKeysAvailable(program_name: string): Array<any>;
3156
- /**
3157
- * Create a new empty ProgramImports builder.
3158
- *
3159
- * Initializes an internal snarkVM Process. This is the same cost as a
3160
- * single execution call, but is paid once and reused across all operations.
3161
- */
3162
- constructor();
3163
- /**
3164
- * Create a cheap clone that shares the same underlying data.
3165
- *
3166
- * Useful for passing to WASM execution functions which consume ownership:
3167
- * the caller keeps the original, and both copies see any mutations
3168
- * (e.g. synthesized keys) through the shared interior state.
3169
- */
3170
- clone(): ProgramImports;
3171
- /**
3172
- * Check whether a specific program has been added.
3173
- *
3174
- * @param {string} name The program name.
3175
- * @returns {boolean}
3176
- */
3177
- contains(name: string): boolean;
3178
- /**
3179
- * Check whether any programs have been added to this builder.
3180
- *
3181
- * @returns {boolean}
3182
- */
3183
- isEmpty(): boolean;
3184
- /**
3185
- * Convert this ProgramImports to a plain JavaScript object.
3186
- *
3187
- * Entries without keys use the simple `{ "name.aleo": "source" }` format.
3188
- * Entries with keys use the structured format:
3189
- * ```js
3190
- * {
3191
- * "name.aleo": {
3192
- * program: "program source...",
3193
- * keys: {
3194
- * "function_name": {
3195
- * provingKey: Uint8Array,
3196
- * verifyingKey: Uint8Array
3197
- * }
3198
- * }
3199
- * }
3200
- * }
3201
- * ```
3202
- *
3203
- * @returns {Object}
3204
- */
3205
- toObject(): object;
3206
- }
3207
3015
  export class ProgramManager {
3208
3016
  private constructor();
3209
3017
  free(): void;
@@ -3216,7 +3024,7 @@ export class ProgramManager {
3216
3024
  * @param {Array} inputs The inputs to the function
3217
3025
  * @param {Object | undefined} imports The imports for the program
3218
3026
  */
3219
- static synthesizeKeyPair(private_key: PrivateKey, program: string, function_id: string, inputs: Array<any>, imports?: object | null, edition?: number | null, program_imports?: ProgramImports | null): Promise<KeyPair>;
3027
+ static synthesizeKeyPair(private_key: PrivateKey, program: string, function_id: string, inputs: Array<any>, imports?: object | null, edition?: number | null): Promise<KeyPair>;
3220
3028
  static loadInclusionProver(proving_key: ProvingKey): void;
3221
3029
  /**
3222
3030
  * Create a `ProvingRequest` object. This object creates authorizations for the top level
@@ -3235,7 +3043,7 @@ export class ProgramManager {
3235
3043
  * @param broadcast (optional) Flag to indicate if the transaction should be broadcast
3236
3044
  * @returns {Authorization}
3237
3045
  */
3238
- static buildProvingRequest(private_key: PrivateKey, program: string, function_name: string, inputs: Array<any>, base_fee_credits: number, priority_fee_credits: number, fee_record: RecordPlaintext | null | undefined, imports: object | null | undefined, broadcast: boolean, unchecked: boolean, edition: number | null | undefined, use_fee_master: boolean, program_imports?: ProgramImports | null): Promise<ProvingRequest>;
3046
+ static buildProvingRequest(private_key: PrivateKey, program: string, function_name: string, inputs: Array<any>, base_fee_credits: number, priority_fee_credits: number, fee_record: RecordPlaintext | null | undefined, imports: object | null | undefined, broadcast: boolean, unchecked: boolean, edition: number | null | undefined, use_fee_master: boolean): Promise<ProvingRequest>;
3239
3047
  /**
3240
3048
  * Build a proving request from a `Request` object. By default this method currently uses the feemaster.
3241
3049
  *
@@ -3247,7 +3055,7 @@ export class ProgramManager {
3247
3055
  * @param {object | undefined} imports The imports to the program in the format {"programname.aleo":"aleo instructions source code"}.
3248
3056
  * @param {PrivateKey | undefined} [private_key] Optional private key of the signer. If not provided, functions which call other programs may not succeed.
3249
3057
  */
3250
- static buildProvingRequestFromExecutionRequest(request: ExecutionRequest, program: string, unchecked: boolean, broadcast: boolean, edition?: number | null, imports?: object | null, private_key?: PrivateKey | null, program_imports?: ProgramImports | null): Promise<ProvingRequest>;
3058
+ static buildProvingRequestFromExecutionRequest(request: ExecutionRequest, program: string, unchecked: boolean, broadcast: boolean, edition?: number | null, imports?: object | null, private_key?: PrivateKey | null): Promise<ProvingRequest>;
3251
3059
  /**
3252
3060
  * Join two records together to create a new record with an amount of credits equal to the sum
3253
3061
  * of the credits of the two original records
@@ -3298,7 +3106,7 @@ export class ProgramManager {
3298
3106
  * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution
3299
3107
  * @returns {Transaction}
3300
3108
  */
3301
- static buildDevnodeDeploymentTransaction(private_key: PrivateKey, program: string, priority_fee_credits: number, fee_record?: RecordPlaintext | null, url?: string | null, imports?: object | null, program_imports?: ProgramImports | null): Promise<Transaction>;
3109
+ static buildDevnodeDeploymentTransaction(private_key: PrivateKey, program: string, priority_fee_credits: number, fee_record?: RecordPlaintext | null, url?: string | null, imports?: object | null): Promise<Transaction>;
3302
3110
  /**
3303
3111
  * Upgrade a deployed Aleo program without synthesizing keys and generating certificates.
3304
3112
  * Intended for use with Leo Devnode.
@@ -3319,7 +3127,7 @@ export class ProgramManager {
3319
3127
  * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution
3320
3128
  * @returns {Transaction}
3321
3129
  */
3322
- static buildDevnodeUpgradeTransaction(private_key: PrivateKey, program: string, priority_fee_credits: number, fee_record?: RecordPlaintext | null, url?: string | null, imports?: object | null, program_imports?: ProgramImports | null): Promise<Transaction>;
3130
+ static buildDevnodeUpgradeTransaction(private_key: PrivateKey, program: string, priority_fee_credits: number, fee_record?: RecordPlaintext | null, url?: string | null, imports?: object | null): Promise<Transaction>;
3323
3131
  /**
3324
3132
  * Estimate the component of the deployment cost which comes from the fee for the program name.
3325
3133
  * Note that this cost does not represent the entire cost of deployment. It is additional to
@@ -3342,7 +3150,7 @@ export class ProgramManager {
3342
3150
  * are a string representing the program source code \{ "hello.aleo": "hello.aleo source code" \}
3343
3151
  * @returns {u64}
3344
3152
  */
3345
- static estimateDeploymentFee(program: string, imports?: object | null, program_imports?: ProgramImports | null): Promise<bigint>;
3153
+ static estimateDeploymentFee(program: string, imports?: object | null): Promise<bigint>;
3346
3154
  /**
3347
3155
  * Deploy an Aleo program
3348
3156
  *
@@ -3362,7 +3170,7 @@ export class ProgramManager {
3362
3170
  * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution
3363
3171
  * @returns {Transaction}
3364
3172
  */
3365
- static buildDeploymentTransaction(private_key: PrivateKey, program: string, priority_fee_credits: number, fee_record?: RecordPlaintext | null, url?: string | null, imports?: object | null, fee_proving_key?: ProvingKey | null, fee_verifying_key?: VerifyingKey | null, offline_query?: OfflineQuery | null, program_imports?: ProgramImports | null): Promise<Transaction>;
3173
+ static buildDeploymentTransaction(private_key: PrivateKey, program: string, priority_fee_credits: number, fee_record?: RecordPlaintext | null, url?: string | null, imports?: object | null, fee_proving_key?: ProvingKey | null, fee_verifying_key?: VerifyingKey | null, offline_query?: OfflineQuery | null): Promise<Transaction>;
3366
3174
  /**
3367
3175
  * Upgrade an Aleo program
3368
3176
  *
@@ -3380,7 +3188,7 @@ export class ProgramManager {
3380
3188
  * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution
3381
3189
  * @returns {Transaction}
3382
3190
  */
3383
- static buildUpgradeTransaction(private_key: PrivateKey, program: string, priority_fee_credits: number, fee_record?: RecordPlaintext | null, url?: string | null, imports?: object | null, fee_proving_key?: ProvingKey | null, fee_verifying_key?: VerifyingKey | null, offline_query?: OfflineQuery | null, program_imports?: ProgramImports | null): Promise<Transaction>;
3191
+ static buildUpgradeTransaction(private_key: PrivateKey, program: string, priority_fee_credits: number, fee_record?: RecordPlaintext | null, url?: string | null, imports?: object | null, fee_proving_key?: ProvingKey | null, fee_verifying_key?: VerifyingKey | null, offline_query?: OfflineQuery | null): Promise<Transaction>;
3384
3192
  /**
3385
3193
  * Generate an execution transaction without a proof.
3386
3194
  * Intended for use with the Leo devnode tool.
@@ -3392,13 +3200,22 @@ export class ProgramManager {
3392
3200
  * @param priority_fee_credits The optional priority fee to be paid for the transaction
3393
3201
  * @param fee_record The record to spend the fee from
3394
3202
  * @param url The url of the Aleo network node to send the transaction to
3203
+ * If this is set to 'true' the keys synthesized (or passed in as optional parameters via the
3204
+ * `proving_key` and `verifying_key` arguments) will be stored in the ProgramManager's memory
3205
+ * and used for subsequent transactions. If this is set to 'false' the proving and verifying
3206
+ * keys will be deallocated from memory after the transaction is executed.
3395
3207
  * @param imports (optional) Provide a list of imports to use for the function execution in the
3396
3208
  * form of a javascript object where the keys are a string of the program name and the values
3397
3209
  * are a string representing the program source code \{ "hello.aleo": "hello.aleo source code" \}
3398
- * @param edition The edition of the program to execute. Defaults to 1.
3210
+ * @param proving_key (optional) Provide a verifying key to use for the function execution
3211
+ * @param verifying_key (optional) Provide a verifying key to use for the function execution
3212
+ * @param fee_proving_key (optional) Provide a proving key to use for the fee execution
3213
+ * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution
3214
+ * @param offline_query An offline query object to use if building a transaction without an internet connection.
3215
+ * @param edition The edition of the program to execute. Defaults to the latest found on the network, or 1 if the program does not exist on the network.
3399
3216
  * @returns {Transaction}
3400
3217
  */
3401
- static buildDevnodeExecutionTransaction(private_key: PrivateKey, program: string, _function: string, inputs: Array<any>, priority_fee_credits: number, fee_record?: RecordPlaintext | null, url?: string | null, imports?: object | null, edition?: number | null, program_imports?: ProgramImports | null): Promise<Transaction>;
3218
+ static buildDevnodeExecutionTransaction(private_key: PrivateKey, program: string, _function: string, inputs: Array<any>, priority_fee_credits: number, fee_record?: RecordPlaintext | null, url?: string | null, imports?: object | null, edition?: number | null): Promise<Transaction>;
3402
3219
  /**
3403
3220
  * Estimate the finalize fee component for executing a function. This fee is additional to the
3404
3221
  * size of the execution of the program in bytes. If the function does not have a finalize
@@ -3420,21 +3237,22 @@ export class ProgramManager {
3420
3237
  * @param imports The imports of the program being executed.
3421
3238
  * @param url The url to get the inclusion proving information from.
3422
3239
  * @param offline_query Optional offline query object if building a Transaction offline.
3423
- * @param edition The program edition (defaults to 1).
3424
3240
  */
3425
- static executeAuthorization(authorization: Authorization, fee_authorization: Authorization | null | undefined, program: string, proving_key?: ProvingKey | null, verifying_key?: VerifyingKey | null, fee_proving_key?: ProvingKey | null, fee_verifying_key?: VerifyingKey | null, imports?: object | null, url?: string | null, offline_query?: OfflineQuery | null, program_imports?: ProgramImports | null, edition?: number | null): Promise<Transaction>;
3241
+ static executeAuthorization(authorization: Authorization, fee_authorization: Authorization | null | undefined, program: string, proving_key?: ProvingKey | null, verifying_key?: VerifyingKey | null, fee_proving_key?: ProvingKey | null, fee_verifying_key?: VerifyingKey | null, imports?: object | null, url?: string | null, offline_query?: OfflineQuery | null): Promise<Transaction>;
3426
3242
  /**
3427
- * Estimate Fee for Aleo function execution.
3243
+ * Estimate Fee for Aleo function execution. Note if "cache" is set to true, the proving and
3244
+ * verifying keys will be stored in the ProgramManager's memory and used for subsequent
3245
+ * program executions.
3428
3246
  *
3429
3247
  * @param program The source code of the program to estimate the execution fee for.
3430
3248
  * @param function The name of the function to estimate the execution fee for.
3431
3249
  * @param imports (optional) Provide a list of imports to use for the fee estimation in the
3432
3250
  * form of a javascript object where the keys are a string of the program name and the values
3433
3251
  * are a string representing the program source code \{ "hello.aleo": "hello.aleo source code" \}
3434
- * @param edition The edition of the program. Defaults to 1.
3252
+ * @param edition {
3435
3253
  * @returns {u64} Fee in microcredits
3436
3254
  */
3437
- static estimateExecutionFee(program: string, _function: string, imports?: object | null, edition?: number | null, program_imports?: ProgramImports | null): bigint;
3255
+ static estimateExecutionFee(program: string, _function: string, imports?: object | null, edition?: number | null): bigint;
3438
3256
  /**
3439
3257
  * Execute an arbitrary function locally
3440
3258
  *
@@ -3452,10 +3270,10 @@ export class ProgramManager {
3452
3270
  * @param {Object | undefined} imports (optional) Provide a list of imports to use for the function execution in the
3453
3271
  * form of a javascript object where the keys are a string of the program name and the values
3454
3272
  * are a string representing the program source code \{ "hello.aleo": "hello.aleo source code" \}
3455
- * @param {ProvingKey | undefined} proving_key (optional) Provide a proving key to use for the function execution
3273
+ * @param {ProvingKey | undefined} proving_key (optional) Provide a verifying key to use for the function execution
3456
3274
  * @param {VerifyingKey | undefined} verifying_key (optional) Provide a verifying key to use for the function execution
3457
3275
  */
3458
- static executeFunctionOffline(private_key: PrivateKey, program: string, _function: string, inputs: Array<any>, prove_execution: boolean, cache: boolean, imports?: object | null, proving_key?: ProvingKey | null, verifying_key?: VerifyingKey | null, url?: string | null, offline_query?: OfflineQuery | null, edition?: number | null, program_imports?: ProgramImports | null): Promise<ExecutionResponse>;
3276
+ static executeFunctionOffline(private_key: PrivateKey, program: string, _function: string, inputs: Array<any>, prove_execution: boolean, cache: boolean, imports?: object | null, proving_key?: ProvingKey | null, verifying_key?: VerifyingKey | null, url?: string | null, offline_query?: OfflineQuery | null, edition?: number | null): Promise<ExecutionResponse>;
3459
3277
  /**
3460
3278
  * Estimate Fee for an Authorization.
3461
3279
  *
@@ -3469,7 +3287,7 @@ export class ProgramManager {
3469
3287
  * @param edition: Optional edition to estimate the fee for.
3470
3288
  * @returns {u64} Fee in microcredits
3471
3289
  */
3472
- static estimateFeeForAuthorization(authorization: Authorization, program: string, imports?: object | null, edition?: number | null, program_imports?: ProgramImports | null): bigint;
3290
+ static estimateFeeForAuthorization(authorization: Authorization, program: string, imports?: object | null, edition?: number | null): bigint;
3473
3291
  /**
3474
3292
  * Execute Aleo function and create an Aleo execution transaction
3475
3293
  *
@@ -3480,18 +3298,22 @@ export class ProgramManager {
3480
3298
  * @param priority_fee_credits The optional priority fee to be paid for the transaction
3481
3299
  * @param fee_record The record to spend the fee from
3482
3300
  * @param url The url of the Aleo network node to send the transaction to
3301
+ * If this is set to 'true' the keys synthesized (or passed in as optional parameters via the
3302
+ * `proving_key` and `verifying_key` arguments) will be stored in the ProgramManager's memory
3303
+ * and used for subsequent transactions. If this is set to 'false' the proving and verifying
3304
+ * keys will be deallocated from memory after the transaction is executed.
3483
3305
  * @param imports (optional) Provide a list of imports to use for the function execution in the
3484
3306
  * form of a javascript object where the keys are a string of the program name and the values
3485
3307
  * are a string representing the program source code \{ "hello.aleo": "hello.aleo source code" \}
3486
- * @param proving_key (optional) Provide a proving key to use for the function execution
3308
+ * @param proving_key (optional) Provide a verifying key to use for the function execution
3487
3309
  * @param verifying_key (optional) Provide a verifying key to use for the function execution
3488
3310
  * @param fee_proving_key (optional) Provide a proving key to use for the fee execution
3489
3311
  * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution
3490
3312
  * @param offline_query An offline query object to use if building a transaction without an internet connection.
3491
- * @param edition The edition of the program to execute. Defaults to 1.
3313
+ * @param edition The edition of the program to execute. Defaults to the latest found on the network, or 1 if the program does not exist on the network.
3492
3314
  * @returns {Transaction}
3493
3315
  */
3494
- static buildExecutionTransaction(private_key: PrivateKey, program: string, _function: string, inputs: Array<any>, priority_fee_credits: number, fee_record?: RecordPlaintext | null, url?: string | null, imports?: object | null, proving_key?: ProvingKey | null, verifying_key?: VerifyingKey | null, fee_proving_key?: ProvingKey | null, fee_verifying_key?: VerifyingKey | null, offline_query?: OfflineQuery | null, edition?: number | null, program_imports?: ProgramImports | null): Promise<Transaction>;
3316
+ static buildExecutionTransaction(private_key: PrivateKey, program: string, _function: string, inputs: Array<any>, priority_fee_credits: number, fee_record?: RecordPlaintext | null, url?: string | null, imports?: object | null, proving_key?: ProvingKey | null, verifying_key?: VerifyingKey | null, fee_proving_key?: ProvingKey | null, fee_verifying_key?: VerifyingKey | null, offline_query?: OfflineQuery | null, edition?: number | null): Promise<Transaction>;
3495
3317
  /**
3496
3318
  * Send credits from one Aleo account to another
3497
3319
  *
@@ -3533,7 +3355,7 @@ export class ProgramManager {
3533
3355
  * @param {object | undefined} imports The imports to the program in the format {"programname.aleo":"aleo instructions source code"}.
3534
3356
  * @param {PrivateKey | undefined} [private_key] Optional private key of the signer. If not provided, functions which call other programs may not succeed.
3535
3357
  */
3536
- static buildAuthorizationFromExecutionRequest(request: ExecutionRequest, program: string, unchecked: boolean, edition?: number | null, imports?: object | null, private_key?: PrivateKey | null, program_imports?: ProgramImports | null): Promise<Authorization>;
3358
+ static buildAuthorizationFromExecutionRequest(request: ExecutionRequest, program: string, unchecked: boolean, edition?: number | null, imports?: object | null, private_key?: PrivateKey | null): Promise<Authorization>;
3537
3359
  /**
3538
3360
  * Create an execution `Authorization` without generating a circuit. Use this function when
3539
3361
  * fast delegated proving is needed.
@@ -3544,7 +3366,7 @@ export class ProgramManager {
3544
3366
  * @param inputs A javascript array of inputs to the function.
3545
3367
  * @param imports The imports to the program in the format {"programname.aleo":"aleo instructions source code"}.
3546
3368
  */
3547
- static buildAuthorizationUnchecked(private_key: PrivateKey, program: string, function_name: string, inputs: Array<any>, imports?: object | null, edition?: number | null, program_imports?: ProgramImports | null): Promise<Authorization>;
3369
+ static buildAuthorizationUnchecked(private_key: PrivateKey, program: string, function_name: string, inputs: Array<any>, imports?: object | null, edition?: number | null): Promise<Authorization>;
3548
3370
  /**
3549
3371
  * Create an execution `Authorization` for a given program:function tuple with specified inputs.
3550
3372
  *
@@ -3554,7 +3376,7 @@ export class ProgramManager {
3554
3376
  * @param inputs A javascript array of inputs to the function.
3555
3377
  * @param imports The imports to the program in the format {"programname.aleo":"aleo instructions source code"}.
3556
3378
  */
3557
- static authorize(private_key: PrivateKey, program: string, function_name: string, inputs: Array<any>, imports?: object | null, edition?: number | null, program_imports?: ProgramImports | null): Promise<Authorization>;
3379
+ static authorize(private_key: PrivateKey, program: string, function_name: string, inputs: Array<any>, imports?: object | null, edition?: number | null): Promise<Authorization>;
3558
3380
  }
3559
3381
  /**
3560
3382
  * SNARK proof for verification of program execution
Binary file