@provablehq/wasm 0.10.1 → 0.10.2-rc.1

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.
@@ -27,7 +27,7 @@ export function snarkVerifyBatch(verifying_keys: Array<any>, inputs: Array<any>,
27
27
  * @param {Object} import_verifying_keys The verifying keys for the imports in the form of { "program_id.aleo": [["function, "verifying_key"], ...], ...}
28
28
  * @returns {boolean} True if the execution is valid, false otherwise
29
29
  */
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): boolean;
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
31
  /**
32
32
  * Verify a SNARK proof against a verifying key and public inputs.
33
33
  *
@@ -3012,6 +3012,198 @@ 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
+ }
3015
3207
  export class ProgramManager {
3016
3208
  private constructor();
3017
3209
  free(): void;
@@ -3024,7 +3216,7 @@ export class ProgramManager {
3024
3216
  * @param {Array} inputs The inputs to the function
3025
3217
  * @param {Object | undefined} imports The imports for the program
3026
3218
  */
3027
- static synthesizeKeyPair(private_key: PrivateKey, program: string, function_id: string, inputs: Array<any>, imports?: object | null, edition?: number | null): Promise<KeyPair>;
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>;
3028
3220
  static loadInclusionProver(proving_key: ProvingKey): void;
3029
3221
  /**
3030
3222
  * Create a `ProvingRequest` object. This object creates authorizations for the top level
@@ -3043,7 +3235,7 @@ export class ProgramManager {
3043
3235
  * @param broadcast (optional) Flag to indicate if the transaction should be broadcast
3044
3236
  * @returns {Authorization}
3045
3237
  */
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>;
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>;
3047
3239
  /**
3048
3240
  * Build a proving request from a `Request` object. By default this method currently uses the feemaster.
3049
3241
  *
@@ -3055,7 +3247,7 @@ export class ProgramManager {
3055
3247
  * @param {object | undefined} imports The imports to the program in the format {"programname.aleo":"aleo instructions source code"}.
3056
3248
  * @param {PrivateKey | undefined} [private_key] Optional private key of the signer. If not provided, functions which call other programs may not succeed.
3057
3249
  */
3058
- static buildProvingRequestFromExecutionRequest(request: ExecutionRequest, program: string, unchecked: boolean, broadcast: boolean, edition?: number | null, imports?: object | null, private_key?: PrivateKey | null): Promise<ProvingRequest>;
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>;
3059
3251
  /**
3060
3252
  * Join two records together to create a new record with an amount of credits equal to the sum
3061
3253
  * of the credits of the two original records
@@ -3106,7 +3298,7 @@ export class ProgramManager {
3106
3298
  * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution
3107
3299
  * @returns {Transaction}
3108
3300
  */
3109
- static buildDevnodeDeploymentTransaction(private_key: PrivateKey, program: string, priority_fee_credits: number, fee_record?: RecordPlaintext | null, url?: string | null, imports?: object | null): Promise<Transaction>;
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>;
3110
3302
  /**
3111
3303
  * Upgrade a deployed Aleo program without synthesizing keys and generating certificates.
3112
3304
  * Intended for use with Leo Devnode.
@@ -3127,7 +3319,7 @@ export class ProgramManager {
3127
3319
  * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution
3128
3320
  * @returns {Transaction}
3129
3321
  */
3130
- static buildDevnodeUpgradeTransaction(private_key: PrivateKey, program: string, priority_fee_credits: number, fee_record?: RecordPlaintext | null, url?: string | null, imports?: object | null): Promise<Transaction>;
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>;
3131
3323
  /**
3132
3324
  * Estimate the component of the deployment cost which comes from the fee for the program name.
3133
3325
  * Note that this cost does not represent the entire cost of deployment. It is additional to
@@ -3150,7 +3342,7 @@ export class ProgramManager {
3150
3342
  * are a string representing the program source code \{ "hello.aleo": "hello.aleo source code" \}
3151
3343
  * @returns {u64}
3152
3344
  */
3153
- static estimateDeploymentFee(program: string, imports?: object | null): Promise<bigint>;
3345
+ static estimateDeploymentFee(program: string, imports?: object | null, program_imports?: ProgramImports | null): Promise<bigint>;
3154
3346
  /**
3155
3347
  * Deploy an Aleo program
3156
3348
  *
@@ -3170,7 +3362,7 @@ export class ProgramManager {
3170
3362
  * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution
3171
3363
  * @returns {Transaction}
3172
3364
  */
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>;
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>;
3174
3366
  /**
3175
3367
  * Upgrade an Aleo program
3176
3368
  *
@@ -3188,7 +3380,7 @@ export class ProgramManager {
3188
3380
  * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution
3189
3381
  * @returns {Transaction}
3190
3382
  */
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>;
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>;
3192
3384
  /**
3193
3385
  * Generate an execution transaction without a proof.
3194
3386
  * Intended for use with the Leo devnode tool.
@@ -3200,22 +3392,13 @@ export class ProgramManager {
3200
3392
  * @param priority_fee_credits The optional priority fee to be paid for the transaction
3201
3393
  * @param fee_record The record to spend the fee from
3202
3394
  * @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.
3207
3395
  * @param imports (optional) Provide a list of imports to use for the function execution in the
3208
3396
  * form of a javascript object where the keys are a string of the program name and the values
3209
3397
  * are a string representing the program source code \{ "hello.aleo": "hello.aleo source code" \}
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.
3398
+ * @param edition The edition of the program to execute. Defaults to 1.
3216
3399
  * @returns {Transaction}
3217
3400
  */
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>;
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>;
3219
3402
  /**
3220
3403
  * Estimate the finalize fee component for executing a function. This fee is additional to the
3221
3404
  * size of the execution of the program in bytes. If the function does not have a finalize
@@ -3237,22 +3420,21 @@ export class ProgramManager {
3237
3420
  * @param imports The imports of the program being executed.
3238
3421
  * @param url The url to get the inclusion proving information from.
3239
3422
  * @param offline_query Optional offline query object if building a Transaction offline.
3423
+ * @param edition The program edition (defaults to 1).
3240
3424
  */
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>;
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>;
3242
3426
  /**
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.
3427
+ * Estimate Fee for Aleo function execution.
3246
3428
  *
3247
3429
  * @param program The source code of the program to estimate the execution fee for.
3248
3430
  * @param function The name of the function to estimate the execution fee for.
3249
3431
  * @param imports (optional) Provide a list of imports to use for the fee estimation in the
3250
3432
  * form of a javascript object where the keys are a string of the program name and the values
3251
3433
  * are a string representing the program source code \{ "hello.aleo": "hello.aleo source code" \}
3252
- * @param edition {
3434
+ * @param edition The edition of the program. Defaults to 1.
3253
3435
  * @returns {u64} Fee in microcredits
3254
3436
  */
3255
- static estimateExecutionFee(program: string, _function: string, imports?: object | null, edition?: number | null): bigint;
3437
+ static estimateExecutionFee(program: string, _function: string, imports?: object | null, edition?: number | null, program_imports?: ProgramImports | null): bigint;
3256
3438
  /**
3257
3439
  * Execute an arbitrary function locally
3258
3440
  *
@@ -3270,10 +3452,10 @@ export class ProgramManager {
3270
3452
  * @param {Object | undefined} imports (optional) Provide a list of imports to use for the function execution in the
3271
3453
  * form of a javascript object where the keys are a string of the program name and the values
3272
3454
  * are a string representing the program source code \{ "hello.aleo": "hello.aleo source code" \}
3273
- * @param {ProvingKey | undefined} proving_key (optional) Provide a verifying key to use for the function execution
3455
+ * @param {ProvingKey | undefined} proving_key (optional) Provide a proving key to use for the function execution
3274
3456
  * @param {VerifyingKey | undefined} verifying_key (optional) Provide a verifying key to use for the function execution
3275
3457
  */
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>;
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>;
3277
3459
  /**
3278
3460
  * Estimate Fee for an Authorization.
3279
3461
  *
@@ -3287,7 +3469,7 @@ export class ProgramManager {
3287
3469
  * @param edition: Optional edition to estimate the fee for.
3288
3470
  * @returns {u64} Fee in microcredits
3289
3471
  */
3290
- static estimateFeeForAuthorization(authorization: Authorization, program: string, imports?: object | null, edition?: number | null): bigint;
3472
+ static estimateFeeForAuthorization(authorization: Authorization, program: string, imports?: object | null, edition?: number | null, program_imports?: ProgramImports | null): bigint;
3291
3473
  /**
3292
3474
  * Execute Aleo function and create an Aleo execution transaction
3293
3475
  *
@@ -3298,22 +3480,18 @@ export class ProgramManager {
3298
3480
  * @param priority_fee_credits The optional priority fee to be paid for the transaction
3299
3481
  * @param fee_record The record to spend the fee from
3300
3482
  * @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.
3305
3483
  * @param imports (optional) Provide a list of imports to use for the function execution in the
3306
3484
  * form of a javascript object where the keys are a string of the program name and the values
3307
3485
  * are a string representing the program source code \{ "hello.aleo": "hello.aleo source code" \}
3308
- * @param proving_key (optional) Provide a verifying key to use for the function execution
3486
+ * @param proving_key (optional) Provide a proving key to use for the function execution
3309
3487
  * @param verifying_key (optional) Provide a verifying key to use for the function execution
3310
3488
  * @param fee_proving_key (optional) Provide a proving key to use for the fee execution
3311
3489
  * @param fee_verifying_key (optional) Provide a verifying key to use for the fee execution
3312
3490
  * @param offline_query An offline query object to use if building a transaction without an internet connection.
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.
3491
+ * @param edition The edition of the program to execute. Defaults to 1.
3314
3492
  * @returns {Transaction}
3315
3493
  */
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>;
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>;
3317
3495
  /**
3318
3496
  * Send credits from one Aleo account to another
3319
3497
  *
@@ -3355,7 +3533,7 @@ export class ProgramManager {
3355
3533
  * @param {object | undefined} imports The imports to the program in the format {"programname.aleo":"aleo instructions source code"}.
3356
3534
  * @param {PrivateKey | undefined} [private_key] Optional private key of the signer. If not provided, functions which call other programs may not succeed.
3357
3535
  */
3358
- static buildAuthorizationFromExecutionRequest(request: ExecutionRequest, program: string, unchecked: boolean, edition?: number | null, imports?: object | null, private_key?: PrivateKey | null): Promise<Authorization>;
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>;
3359
3537
  /**
3360
3538
  * Create an execution `Authorization` without generating a circuit. Use this function when
3361
3539
  * fast delegated proving is needed.
@@ -3366,7 +3544,7 @@ export class ProgramManager {
3366
3544
  * @param inputs A javascript array of inputs to the function.
3367
3545
  * @param imports The imports to the program in the format {"programname.aleo":"aleo instructions source code"}.
3368
3546
  */
3369
- static buildAuthorizationUnchecked(private_key: PrivateKey, program: string, function_name: string, inputs: Array<any>, imports?: object | null, edition?: number | null): Promise<Authorization>;
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>;
3370
3548
  /**
3371
3549
  * Create an execution `Authorization` for a given program:function tuple with specified inputs.
3372
3550
  *
@@ -3376,7 +3554,7 @@ export class ProgramManager {
3376
3554
  * @param inputs A javascript array of inputs to the function.
3377
3555
  * @param imports The imports to the program in the format {"programname.aleo":"aleo instructions source code"}.
3378
3556
  */
3379
- static authorize(private_key: PrivateKey, program: string, function_name: string, inputs: Array<any>, imports?: object | null, edition?: number | null): Promise<Authorization>;
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>;
3380
3558
  }
3381
3559
  /**
3382
3560
  * SNARK proof for verification of program execution
Binary file