import { Account } from "./account.js";
import { AleoNetworkClient, AleoNetworkClientOptions, ProgramImports } from "./network-client.js";
import { ImportedPrograms, ImportedVerifyingKeys } from "./models/imports.js";
import { RecordProvider, RecordSearchParams } from "./record-provider.js";
import { FunctionKeyPair, FunctionKeyProvider, KeySearchParams } from "./function-key-provider.js";
import { ExecutionResponse, OfflineQuery, RecordPlaintext, PrivateKey, Program, ProvingKey, VerifyingKey, Transaction } from "./wasm.js";
/**
 * Represents the options for executing a transaction in the Aleo network.
 * This interface is used to specify the parameters required for building and submitting an execution transaction.
 *
 * @property {string} programName - The name of the program containing the function to be executed.
 * @property {string} functionName - The name of the function to execute within the program.
 * @property {number} priorityFee - The optional priority fee to be paid for the transaction.
 * @property {boolean} privateFee - If true, uses a private record to pay the fee; otherwise, uses the account's public credit balance.
 * @property {string[]} inputs - The inputs to the function being executed.
 * @property {RecordSearchParams} [recordSearchParams] - Optional parameters for searching for a record to pay the execution transaction fee.
 * @property {KeySearchParams} [keySearchParams] - Optional parameters for finding the matching proving & verifying keys for the function.
 * @property {string | RecordPlaintext} [feeRecord] - Optional fee record to use for the transaction.
 * @property {ProvingKey} [provingKey] - Optional proving key to use for the transaction.
 * @property {VerifyingKey} [verifyingKey] - Optional verifying key to use for the transaction.
 * @property {PrivateKey} [privateKey] - Optional private key to use for the transaction.
 * @property {OfflineQuery} [offlineQuery] - Optional offline query if creating transactions in an offline environment.
 * @property {string | Program} [program] - Optional program source code to use for the transaction.
 * @property {ProgramImports} [imports] - Optional programs that the program being executed imports.
 */
interface ExecuteOptions {
    programName: string;
    functionName: string;
    priorityFee: number;
    privateFee: boolean;
    inputs: string[];
    recordSearchParams?: RecordSearchParams;
    keySearchParams?: KeySearchParams;
    feeRecord?: string | RecordPlaintext;
    provingKey?: ProvingKey;
    verifyingKey?: VerifyingKey;
    privateKey?: PrivateKey;
    offlineQuery?: OfflineQuery;
    program?: string | Program;
    imports?: ProgramImports;
}
/**
 * The ProgramManager class is used to execute and deploy programs on the Aleo network and create value transfers.
 */
declare class ProgramManager {
    account: Account | undefined;
    keyProvider: FunctionKeyProvider;
    host: string;
    networkClient: AleoNetworkClient;
    recordProvider: RecordProvider | undefined;
    /** Create a new instance of the ProgramManager
     *
     * @param { string | undefined } host A host uri running the official Aleo API
     * @param { FunctionKeyProvider | undefined } keyProvider A key provider that implements {@link FunctionKeyProvider} interface
     * @param { RecordProvider | undefined } recordProvider A record provider that implements {@link RecordProvider} interface
     */
    constructor(host?: string | undefined, keyProvider?: FunctionKeyProvider | undefined, recordProvider?: RecordProvider | undefined, networkClientOptions?: AleoNetworkClientOptions | undefined);
    /**
     * Check if the fee is sufficient to pay for the transaction
     */
    checkFee(address: string, feeAmount: bigint): Promise<void>;
    /**
     * Set the account to use for transaction submission to the Aleo network
     *
     * @param {Account} account Account to use for transaction submission
     */
    setAccount(account: Account): void;
    /**
     * Set the key provider that provides the proving and verifying keys for programs
     *
     * @param {FunctionKeyProvider} keyProvider
     */
    setKeyProvider(keyProvider: FunctionKeyProvider): void;
    /**
     * Set the host peer to use for transaction submission to the Aleo network
     *
     * @param host {string} Peer url to use for transaction submission
     */
    setHost(host: string): void;
    /**
     * Set the record provider that provides records for transactions
     *
     * @param {RecordProvider} recordProvider
     */
    setRecordProvider(recordProvider: RecordProvider): void;
    /**
     * Set a header in the `AleoNetworkClient`s header map
     *
     * @param {string} headerName The name of the header to set
     * @param {string} value The header value
     *
     * @example
     * import { ProgramManager } from "@provablehq/sdk/mainnet.js";
     *
     * // Create a ProgramManager
     * const programManager = new ProgramManager("https://api.explorer.provable.com/v1");
     *
     * // Set the value of the `Accept-Language` header to `en-US`
     * programManager.setHeader('Accept-Language', 'en-US');
     */
    setHeader(headerName: string, value: string): void;
    /**
     * Remove a header from the `AleoNetworkClient`s header map
     *
     * @param {string} headerName The name of the header to be removed
     *
     * @example
     * import { ProgramManager } from "@provablehq/sdk/mainnet.js";
     *
     * // Create a ProgramManager
     * const programManager = new ProgramManager("https://api.explorer.provable.com/v1");
     *
     * // Remove the default `X-Aleo-SDK-Version` header
     * programManager.removeHeader('X-Aleo-SDK-Version');
     */
    removeHeader(headerName: string): void;
    /**
     * Builds a deployment transaction for submission to the Aleo network.
     *
     * @param {string} program Program source code
     * @param {number} priorityFee The optional priority fee to be paid for that transaction.
     * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance
     * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for searching for a record to use pay the deployment fee
     * @param {string | RecordPlaintext | undefined} feeRecord Optional Fee record to use for the transaction
     * @param {PrivateKey | undefined} privateKey Optional private key to use for the transaction
     * @returns {string} The transaction id of the deployed program or a failure message from the network
     *
     * @example
     * /// Import the mainnet version of the sdk.
     * import { AleoKeyProvider, ProgramManager, NetworkRecordProvider } from "@provablehq/sdk/mainnet.js";
     *
     * // Create a new NetworkClient, KeyProvider, and RecordProvider
     * const keyProvider = new AleoKeyProvider();
     * const recordProvider = new NetworkRecordProvider(account, networkClient);
     * keyProvider.useCache = true;
     *
     * // Initialize a program manager with the key provider to automatically fetch keys for deployments
     * 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";
     * const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, recordProvider);
     * programManager.setAccount(Account);
     *
     * // Define a fee in credits
     * const priorityFee = 0.0;
     *
     * // Create the deployment transaction.
     * const tx = await programManager.buildDeploymentTransaction(program, fee, false);
     * await programManager.networkClient.submitTransaction(tx);
     *
     * // Verify the transaction was successful
     * setTimeout(async () => {
     *  const transaction = await programManager.networkClient.getTransaction(tx.id());
     *  assert(transaction.id() === tx.id());
     * }, 20000);
     */
    buildDeploymentTransaction(program: string, priorityFee: number, privateFee: boolean, recordSearchParams?: RecordSearchParams, feeRecord?: string | RecordPlaintext, privateKey?: PrivateKey): Promise<Transaction>;
    /**
     * Deploy an Aleo program to the Aleo network
     *
     * @param {string} program Program source code
     * @param {number} priorityFee The optional fee to be paid for the transaction
     * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance
     * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for searching for a record to used pay the deployment fee
     * @param {string | RecordPlaintext | undefined} feeRecord Optional Fee record to use for the transaction
     * @param {PrivateKey | undefined} privateKey Optional private key to use for the transaction
     * @returns {string} The transaction id of the deployed program or a failure message from the network
     *
     * @example
     * /// Import the mainnet version of the sdk.
     * import { AleoKeyProvider, ProgramManager, NetworkRecordProvider } from "@provablehq/sdk/mainnet.js";
     *
     * // Create a new NetworkClient, KeyProvider, and RecordProvider
     * const keyProvider = new AleoKeyProvider();
     * const recordProvider = new NetworkRecordProvider(account, networkClient);
     * keyProvider.useCache = true;
     *
     * // Initialize a program manager with the key provider to automatically fetch keys for deployments
     * 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";
     * const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, recordProvider);
     *
     * // Define a fee in credits
     * const priorityFee = 0.0;
     *
     * // Deploy the program
     * const tx_id = await programManager.deploy(program, fee, false);
     *
     * // Verify the transaction was successful
     * setTimeout(async () => {
     *  const transaction = await programManager.networkClient.getTransaction(tx_id);
     *  assert(transaction.id() === tx_id);
     * }, 20000);
     */
    deploy(program: string, priorityFee: number, privateFee: boolean, recordSearchParams?: RecordSearchParams, feeRecord?: string | RecordPlaintext, privateKey?: PrivateKey): Promise<string>;
    /**
     * Builds an execution transaction for submission to the Aleo network.
     *
     * @param {ExecuteOptions} options - The options for the execution transaction.
     * @returns {Promise<Transaction>} - A promise that resolves to the transaction or an error.
     *
     * @example
     * /// Import the mainnet version of the sdk.
     * import { AleoKeyProvider, ProgramManager, NetworkRecordProvider } from "@provablehq/sdk/mainnet.js";
     *
     * // Create a new NetworkClient, KeyProvider, and RecordProvider using official Aleo record, key, and network providers
     * const keyProvider = new AleoKeyProvider();
     * const recordProvider = new NetworkRecordProvider(account, networkClient);
     * keyProvider.useCache = true;
     *
     * // Initialize a program manager with the key provider to automatically fetch keys for executions
     * const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, recordProvider);
     *
     * // Build and execute the transaction
     * const tx = await programManager.buildExecutionTransaction({
     *   programName: "hello_hello.aleo",
     *   functionName: "hello_hello",
     *   priorityFee: 0.0,
     *   privateFee: false,
     *   inputs: ["5u32", "5u32"],
     *   keySearchParams: { "cacheKey": "hello_hello:hello" }
     * });
     *
     * // Submit the transaction to the network
     * await programManager.networkClient.submitTransaction(tx.toString());
     *
     * // Verify the transaction was successful
     * setTimeout(async () => {
     *  const transaction = await programManager.networkClient.getTransaction(tx.id());
     *  assert(transaction.id() === tx.id());
     * }, 10000);
     */
    buildExecutionTransaction(options: ExecuteOptions): Promise<Transaction>;
    /**
     * Builds an execution transaction for submission to the Aleo network.
     *
     * @param {ExecuteOptions} options - The options for the execution transaction.
     * @returns {Promise<string>} - The transaction id
     *
     * @example
     * /// Import the mainnet version of the sdk.
     * import { AleoKeyProvider, ProgramManager, NetworkRecordProvider } from "@provablehq/sdk/mainnet.js";
     *
     * // Create a new NetworkClient, KeyProvider, and RecordProvider using official Aleo record, key, and network providers
     * const keyProvider = new AleoKeyProvider();
     * const recordProvider = new NetworkRecordProvider(account, networkClient);
     * keyProvider.useCache = true;
     *
     * // Initialize a program manager with the key provider to automatically fetch keys for executions
     * const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, recordProvider);
     *
     * // Build and execute the transaction
     * const tx_id = await programManager.execute({
     *   programName: "hello_hello.aleo",
     *   functionName: "hello_hello",
     *   priorityFee: 0.0,
     *   privateFee: false,
     *   inputs: ["5u32", "5u32"],
     *   keySearchParams: { "cacheKey": "hello_hello:hello" }
     * });
     *
     * // Verify the transaction was successful
     * setTimeout(async () => {
     *  const transaction = await programManager.networkClient.getTransaction(tx_id);
     *  assert(transaction.id() === tx_id);
     * }, 10000);
     */
    execute(options: ExecuteOptions): Promise<string>;
    /**
     * Run an Aleo program in offline mode
     *
     * @param {string} program Program source code containing the function to be executed
     * @param {string} function_name Function name to execute
     * @param {string[]} inputs Inputs to the function
     * @param {number} proveExecution Whether to prove the execution of the function and return an execution transcript that contains the proof.
     * @param {string[] | undefined} imports Optional imports to the program
     * @param {KeySearchParams | undefined} keySearchParams Optional parameters for finding the matching proving & verifying keys for the function
     * @param {ProvingKey | undefined} provingKey Optional proving key to use for the transaction
     * @param {VerifyingKey | undefined} verifyingKey Optional verifying key to use for the transaction
     * @param {PrivateKey | undefined} privateKey Optional private key to use for the transaction
     * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment
     * @returns {Promise<ExecutionResponse>} The execution response containing the outputs of the function and the proof if the program is proved.
     *
     * @example
     * /// Import the mainnet version of the sdk used to build executions.
     * import { Account, ProgramManager } from "@provablehq/sdk/mainnet.js";
     *
     * /// Create the source for the "helloworld" program
     * 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";
     * const programManager = new ProgramManager(undefined, undefined, undefined);
     *
     * /// Create a temporary account for the execution of the program
     * const account = new Account();
     * programManager.setAccount(account);
     *
     * /// Get the response and ensure that the program executed correctly
     * const executionResponse = await programManager.run(program, "hello", ["5u32", "5u32"]);
     * const result = executionResponse.getOutputs();
     * assert(result === ["10u32"]);
     */
    run(program: string, function_name: string, inputs: string[], proveExecution: boolean, imports?: ProgramImports, keySearchParams?: KeySearchParams, provingKey?: ProvingKey, verifyingKey?: VerifyingKey, privateKey?: PrivateKey, offlineQuery?: OfflineQuery): Promise<ExecutionResponse>;
    /**
     * Join two credits records into a single credits record
     *
     * @param {RecordPlaintext | string} recordOne First credits record to join
     * @param {RecordPlaintext | string} recordTwo Second credits record to join
     * @param {number} priorityFee The optional priority fee to be paid for the transaction
     * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance
     * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the fee record to use to pay the fee for the join transaction
     * @param {RecordPlaintext | string | undefined} feeRecord Fee record to use for the join transaction
     * @param {PrivateKey | undefined} privateKey Private key to use for the join transaction
     * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment
     * @returns {Promise<string>} The transaction id
     *
     * @example
     * /// Import the mainnet version of the sdk.
     * import { AleoKeyProvider, ProgramManager, NetworkRecordProvider } from "@provablehq/sdk/mainnet.js";
     *
     * // Create a new NetworkClient, KeyProvider, and RecordProvider
     * const keyProvider = new AleoKeyProvider();
     * const recordProvider = new NetworkRecordProvider(account, networkClient);
     * keyProvider.useCache = true;
     *
     * // Initialize a program manager with the key provider to automatically fetch keys for executions
     * const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, recordProvider);
     * const record_1 = "{  owner: aleo184vuwr5u7u0ha5f5k44067dd2uaqewxx6pe5ltha5pv99wvhfqxqv339h4.private,  microcredits: 45000000u64.private,  _nonce: 4106205762862305308495708971985748592380064201230396559307556388725936304984group.public}"
     * const record_2 = "{  owner: aleo184vuwr5u7u0ha5f5k44067dd2uaqewxx6pe5ltha5pv99wvhfqxqv339h4.private,  microcredits: 45000000u64.private,  _nonce: 1540945439182663264862696551825005342995406165131907382295858612069623286213group.public}"
     * const tx_id = await programManager.join(record_1, record_2, 0.05, false);
     *
     * // Verify the transaction was successful
     * setTimeout(async () => {
     *  const transaction = await programManager.networkClient.getTransaction(tx_id);
     *  assert(transaction.id() === tx_id);
     * }, 10000);
     */
    join(recordOne: RecordPlaintext | string, recordTwo: RecordPlaintext | string, priorityFee: number, privateFee: boolean, recordSearchParams?: RecordSearchParams | undefined, feeRecord?: RecordPlaintext | string | undefined, privateKey?: PrivateKey, offlineQuery?: OfflineQuery): Promise<string>;
    /**
     * Split credits into two new credits records
     *
     * @param {number} splitAmount Amount in microcredits to split from the original credits record
     * @param {RecordPlaintext | string} amountRecord Amount record to use for the split transaction
     * @param {PrivateKey | undefined} privateKey Optional private key to use for the split transaction
     * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment
     * @returns {Promise<string>} The transaction id
     *
     * @example
     * /// Import the mainnet version of the sdk.
     * import { AleoKeyProvider, ProgramManager, NetworkRecordProvider } from "@provablehq/sdk/mainnet.js";
     *
     * // Create a new NetworkClient, KeyProvider, and RecordProvider
     * const keyProvider = new AleoKeyProvider();
     * const recordProvider = new NetworkRecordProvider(account, networkClient);
     * keyProvider.useCache = true;
     *
     * // Initialize a program manager with the key provider to automatically fetch keys for executions
     * const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, recordProvider);
     * const record = "{  owner: aleo184vuwr5u7u0ha5f5k44067dd2uaqewxx6pe5ltha5pv99wvhfqxqv339h4.private,  microcredits: 45000000u64.private,  _nonce: 4106205762862305308495708971985748592380064201230396559307556388725936304984group.public}"
     * const tx_id = await programManager.split(25000000, record);
     *
     * // Verify the transaction was successful
     * setTimeout(async () => {
     *  const transaction = await programManager.networkClient.getTransaction(tx_id);
     *  assert(transaction.id() === tx_id);
     * }, 10000);
     */
    split(splitAmount: number, amountRecord: RecordPlaintext | string, privateKey?: PrivateKey, offlineQuery?: OfflineQuery): Promise<string>;
    /**
     * Pre-synthesize proving and verifying keys for a program
     *
     * @param program {string} The program source code to synthesize keys for
     * @param function_id {string} The function id to synthesize keys for
     * @param inputs {Array<string>}  Sample inputs to the function
     * @param privateKey {PrivateKey | undefined} Optional private key to use for the key synthesis
     *
     * @returns {Promise<FunctionKeyPair>}
     */
    synthesizeKeys(program: string, function_id: string, inputs: Array<string>, privateKey?: PrivateKey): Promise<FunctionKeyPair>;
    /**
     * Build a transaction to transfer credits to another account for later submission to the Aleo network
     *
     * @param {number} amount The amount of credits to transfer
     * @param {string} recipient The recipient of the transfer
     * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'
     * @param {number} priorityFee The optional priority fee to be paid for the transaction
     * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance
     * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee records for the transfer transaction
     * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer
     * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer
     * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction
     * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment
     * @returns {Promise<Transaction>} The transaction object
     *
     * @example
     * /// Import the mainnet version of the sdk.
     * import { AleoKeyProvider, ProgramManager, NetworkRecordProvider } from "@provablehq/sdk/mainnet.js";
     *
     * // Create a new NetworkClient, KeyProvider, and RecordProvider
     * const keyProvider = new AleoKeyProvider();
     * const recordProvider = new NetworkRecordProvider(account, networkClient);
     * keyProvider.useCache = true;
     *
     * // Initialize a program manager with the key provider to automatically fetch keys for executions
     * const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, recordProvider);
     * const tx = await programManager.buildTransferTransaction(1, "aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px", "public", 0.2, false);
     * await programManager.networkClient.submitTransaction(tx.toString());
     *
     * // Verify the transaction was successful
     * setTimeout(async () => {
     *  const transaction = await programManager.networkClient.getTransaction(tx.id());
     *  assert(transaction.id() === tx.id());
     * }, 10000);
     */
    buildTransferTransaction(amount: number, recipient: string, transferType: string, priorityFee: number, privateFee: boolean, recordSearchParams?: RecordSearchParams, amountRecord?: RecordPlaintext | string, feeRecord?: RecordPlaintext | string, privateKey?: PrivateKey, offlineQuery?: OfflineQuery): Promise<Transaction>;
    /**
     * Build a transfer_public transaction to transfer credits to another account for later submission to the Aleo network
     *
     * @param {number} amount The amount of credits to transfer
     * @param {string} recipient The recipient of the transfer
     * @param {number} priorityFee The optional priority fee to be paid for the transfer
     * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction
     * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment
     * @returns {Promise<Transaction>} The transaction object
     *
     * @example
     * /// Import the mainnet version of the sdk.
     * import { AleoKeyProvider, ProgramManager, NetworkRecordProvider } from "@provablehq/sdk/mainnet.js";
     *
     * // Create a new NetworkClient, KeyProvider, and RecordProvider
     * const keyProvider = new AleoKeyProvider();
     * const recordProvider = new NetworkRecordProvider(account, networkClient);
     * keyProvider.useCache = true;
     *
     * // Initialize a program manager with the key provider to automatically fetch keys for executions
     * const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, recordProvider);
     * const tx = await programManager.buildTransferPublicTransaction(1, "aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px", 0.2);
     * await programManager.networkClient.submitTransaction(tx.toString());
     *
     * // Verify the transaction was successful
     * setTimeout(async () => {
     *  const transaction = await programManager.networkClient.getTransaction(tx.id());
     *  assert(transaction.id() === tx.id());
     * }, 10000);
     */
    buildTransferPublicTransaction(amount: number, recipient: string, priorityFee: number, privateKey?: PrivateKey, offlineQuery?: OfflineQuery): Promise<Transaction>;
    /**
     * Build a transfer_public_as_signer transaction to transfer credits to another account for later submission to the Aleo network
     *
     * @param {number} amount The amount of credits to transfer
     * @param {string} recipient The recipient of the transfer
     * @param {number} priorityFee The optional priority fee to be paid for the transfer
     * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction
     * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment
     * @returns {Promise<Transaction>} The transaction object
     *
     * @example
     * /// Import the mainnet version of the sdk.
     * import { AleoKeyProvider, ProgramManager, NetworkRecordProvider } from "@provablehq/sdk/mainnet.js";
     *
     * // Create a new NetworkClient, KeyProvider, and RecordProvider
     * const keyProvider = new AleoKeyProvider();
     * const recordProvider = new NetworkRecordProvider(account, networkClient);
     * keyProvider.useCache = true;
     *
     * // Initialize a program manager with the key provider to automatically fetch keys for executions
     * const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, recordProvider);
     * const tx = await programManager.buildTransferPublicAsSignerTransaction(1, "aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px", 0.2);
     * await programManager.networkClient.submitTransaction(tx.toString());
     *
     * // Verify the transaction was successful
     * setTimeout(async () => {
     *  const transaction = await programManager.networkClient.getTransaction(tx.id());
     *  assert(transaction.id() === tx.id());
     * }, 10000);
     */
    buildTransferPublicAsSignerTransaction(amount: number, recipient: string, priorityFee: number, privateKey?: PrivateKey, offlineQuery?: OfflineQuery): Promise<Transaction>;
    /**
     * Transfer credits to another account
     *
     * @param {number} amount The amount of credits to transfer
     * @param {string} recipient The recipient of the transfer
     * @param {string} transferType The type of transfer to perform - options: 'private', 'privateToPublic', 'public', 'publicToPrivate'
     * @param {number} priorityFee The optional priority fee to be paid for the transfer
     * @param {boolean} privateFee Use a private record to pay the fee. If false this will use the account's public credit balance
     * @param {RecordSearchParams | undefined} recordSearchParams Optional parameters for finding the amount and fee records for the transfer transaction
     * @param {RecordPlaintext | string} amountRecord Optional amount record to use for the transfer
     * @param {RecordPlaintext | string} feeRecord Optional fee record to use for the transfer
     * @param {PrivateKey | undefined} privateKey Optional private key to use for the transfer transaction
     * @param {OfflineQuery | undefined} offlineQuery Optional offline query if creating transactions in an offline environment
     * @returns {Promise<string>} The transaction id
     *
     * @example
     * /// Import the mainnet version of the sdk.
     * import { AleoKeyProvider, ProgramManager, NetworkRecordProvider } from "@provablehq/sdk/mainnet.js";
     *
     * // Create a new NetworkClient, KeyProvider, and RecordProvider
     * const keyProvider = new AleoKeyProvider();
     * const recordProvider = new NetworkRecordProvider(account, networkClient);
     * keyProvider.useCache = true;
     *
     * // Initialize a program manager with the key provider to automatically fetch keys for executions
     * const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, recordProvider);
     * const tx_id = await programManager.transfer(1, "aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px", "public", 0.2, false);
     *
     * // Verify the transaction was successful
     * setTimeout(async () => {
     *  const transaction = await programManager.networkClient.getTransaction(tx_id);
     *  assert(transaction.id() === tx_id);
     * }, 10000);
     */
    transfer(amount: number, recipient: string, transferType: string, priorityFee: number, privateFee: boolean, recordSearchParams?: RecordSearchParams, amountRecord?: RecordPlaintext | string, feeRecord?: RecordPlaintext | string, privateKey?: PrivateKey, offlineQuery?: OfflineQuery): Promise<string>;
    /**
     * Build transaction to bond credits to a validator for later submission to the Aleo Network
     *
     * @param {string} validator_address Address of the validator to bond to, if this address is the same as the staker (i.e. the executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently requires a minimum of 10,000,000 credits to bond (subject to change). If the address is specified is an existing validator and is different from the address of the executor of this function, it will bond the credits to that validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.
     * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.
     * @param {number} amount The amount of credits to bond
     * @param {Partial<ExecuteOptions>} options - Override default execution options.
     * @returns {Promise<Transaction>} The transaction object
     *
     * @example
     * // Import the mainnet version of the sdk.
     * import { AleoKeyProvider, ProgramManager } from "@provablehq/sdk/mainnet.js";
     *
     * // Create a keyProvider to handle key management
     * const keyProvider = new AleoKeyProvider();
     * keyProvider.useCache = true;
     *
     * // Create a new ProgramManager with the key that will be used to bond credits
     * const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, undefined);
     * programManager.setAccount(new Account("YourPrivateKey"));
     *
     * // Create the bonding transaction object for later submission
     * const tx = await programManager.buildBondPublicTransaction("aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j", "aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px", "aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9", 2000000);
     *
     * // The transaction can be later submitted to the network using the network client.
     * await programManager.networkClient.submitTransaction(tx.toString());
     *
     * // Verify the transaction was successful
     * setTimeout(async () => {
     *  const transaction = await programManager.networkClient.getTransaction(tx.id());
     *  assert(transaction.id() === tx.id());
     * }, 10000);
     */
    buildBondPublicTransaction(validator_address: string, withdrawal_address: string, amount: number, options?: Partial<ExecuteOptions>): Promise<Transaction>;
    /**
     * Bond credits to validator.
     *
     * @param {string} validator_address Address of the validator to bond to, if this address is the same as the signer (i.e. the executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently requires a minimum of 1,000,000 credits to bond (subject to change). If the address is specified is an existing validator and is different from the address of the executor of this function, it will bond the credits to that validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.
     * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.
     * @param {number} amount The amount of credits to bond
     * @param {Options} options Options for the execution
     * @returns {Promise<string>} The transaction id
     *
     * @example
     * // Import the mainnet version of the sdk.
     * import { AleoKeyProvider, ProgramManager } from "@provablehq/sdk/mainnet.js";
     *
     * // Create a keyProvider to handle key management
     * const keyProvider = new AleoKeyProvider();
     * keyProvider.useCache = true;
     *
     * // Create a new ProgramManager with the key that will be used to bond credits
     * const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, undefined);
     *
     * // Create the bonding transaction
     * tx_id = await programManager.bondPublic("aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j", "aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px", "aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9", 2000000);
     *
     * // Verify the transaction was successful
     * setTimeout(async () => {
     *  const transaction = await programManager.networkClient.getTransaction(tx_id);
     *  assert(transaction.id() === tx_id);
     * }, 10000);
     */
    bondPublic(validator_address: string, withdrawal_address: string, amount: number, options?: Partial<ExecuteOptions>): Promise<string>;
    /**
     * Build a bond_validator transaction for later submission to the Aleo Network.
     *
     * @param {string} validator_address Address of the validator to bond to, if this address is the same as the staker (i.e. the executor of this function), it will attempt to bond the credits as a validator. If the address is specified is an existing validator and is different from the address of the executor of this function, it will bond the credits to that validator's staking committee as a delegator.
     * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.
     * @param {number} amount The amount of credits to bond. A minimum of 10000 credits is required to bond as a delegator.
     * @param {number} commission The commission rate for the validator (must be between 0 and 100 - an error will be thrown if it is not)
     * @param {Partial<ExecuteOptions>} options - Override default execution options.
     * @returns {Promise<Transaction>} The transaction object
     *
     * @example
     * // Import the mainnet version of the sdk.
     * import { AleoKeyProvider, ProgramManager } from "@provablehq/sdk/mainnet.js";
     *
     * // Create a keyProvider to handle key management
     * const keyProvider = new AleoKeyProvider();
     * keyProvider.useCache = true;
     *
     * // Create a new ProgramManager with the key that will be used to bond credits
     * const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, undefined);
     * programManager.setAccount(new Account("YourPrivateKey"));
     *
     * // Create the bond validator transaction object for later use.
     * const tx = await programManager.buildBondValidatorTransaction("aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px", "aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9", 2000000);
     *
     * // The transaction can later be submitted to the network using the network client.
     * const tx_id = await programManager.networkClient.submitTransaction(tx.toString());
     *
     * // Verify the transaction was successful
     * setTimeout(async () => {
     *  const transaction = await programManager.networkClient.getTransaction(tx_id);
     *  assert(transaction.id() === tx_id);
     * }, 10000);
     */
    buildBondValidatorTransaction(validator_address: string, withdrawal_address: string, amount: number, commission: number, options?: Partial<ExecuteOptions>): Promise<Transaction>;
    /**
     * Build transaction to bond a validator.
     *
     * @param {string} validator_address Address of the validator to bond to, if this address is the same as the staker (i.e. the executor of this function), it will attempt to bond the credits as a validator. Bonding as a validator currently requires a minimum of 10,000,000 credits to bond (subject to change). If the address is specified is an existing validator and is different from the address of the executor of this function, it will bond the credits to that validator's staking committee as a delegator. A minimum of 10 credits is required to bond as a delegator.
     * @param {string} withdrawal_address Address to withdraw the staked credits to when unbond_public is called.
     * @param {number} amount The amount of credits to bond
     * @param {number} commission The commission rate for the validator (must be between 0 and 100 - an error will be thrown if it is not)
     * @param {Partial<ExecuteOptions>} options - Override default execution options.
     * @returns {Promise<string>} The transaction id
     *
     * @example
     * // Import the mainnet version of the sdk.
     * import { AleoKeyProvider, ProgramManager } from "@provablehq/sdk/mainnet.js";
     *
     * // Create a keyProvider to handle key management
     * const keyProvider = new AleoKeyProvider();
     * keyProvider.useCache = true;
     *
     * // Create a new ProgramManager with the key that will be used to bond credits
     * const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, undefined);
     * programManager.setAccount(new Account("YourPrivateKey"));
     *
     * // Create the bonding transaction
     * const tx_id = await programManager.bondValidator("aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px", "aleo1feya8sjy9k2zflvl2dx39pdsq5tju28elnp2ektnn588uu9ghv8s84msv9", 2000000);
     *
     * // Verify the transaction was successful
     * setTimeout(async () => {
     *  const transaction = await programManager.networkClient.getTransaction(tx_id);
     *  assert(transaction.id() === tx_id);
     * }, 10000);
     */
    bondValidator(validator_address: string, withdrawal_address: string, amount: number, commission: number, options?: Partial<ExecuteOptions>): Promise<string>;
    /**
     * Build an unbond_public execution transaction to unbond credits from a validator in the Aleo network.
     *
     * @param {string} staker_address - The address of the staker who is unbonding the credits.
     * @param {number} amount - The amount of credits to unbond (scaled by 1,000,000).
     * @param {Partial<ExecuteOptions>} options - Override default execution options.
     * @returns {Promise<Transaction>} - A promise that resolves to the transaction or an error message.
     *
     * @example
     * // Import the mainnet version of the sdk.
     * import { AleoKeyProvider, ProgramManager } from "@provablehq/sdk/mainnet.js";
     *
     * // Create a keyProvider to handle key management.
     * const keyProvider = new AleoKeyProvider();
     * keyProvider.useCache = true;
     *
     * // Create a new ProgramManager with the key that will be used to unbond credits.
     * const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, undefined);
     * const tx = await programManager.buildUnbondPublicTransaction("aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j", 2000000);
     *
     * // The transaction can be submitted later to the network using the network client.
     * programManager.networkClient.submitTransaction(tx.toString());
     *
     * // Verify the transaction was successful
     * setTimeout(async () => {
     *  const transaction = await programManager.networkClient.getTransaction(tx.id());
     *  assert(transaction.id() === tx.id());
     * }, 10000);
     */
    buildUnbondPublicTransaction(staker_address: string, amount: number, options?: Partial<ExecuteOptions>): Promise<Transaction>;
    /**
     * Unbond a specified amount of staked credits. If the address of the executor of this function is an existing
     * validator, it will subtract this amount of credits from the validator's staked credits. If there are less than
     * 1,000,000 credits staked pool after the unbond, the validator will be removed from the validator set. If the
     * address of the executor of this function is not a validator and has credits bonded as a delegator, it will
     * subtract this amount of credits from the delegator's staked credits. If there are less than 10 credits bonded
     * after the unbond operation, the delegator will be removed from the validator's staking pool.
     *
     * @param {string} staker_address Address of the staker who is unbonding the credits
     * @param {number} amount Amount of credits to unbond.
     * @param {ExecuteOptions} options Options for the execution
     * @returns {Promise<string>} The transaction id
     *
     * @example
     * // Import the mainnet version of the sdk.
     * import { AleoKeyProvider, ProgramManager } from "@provablehq/sdk/mainnet.js";
     *
     * // Create a keyProvider to handle key management
     * const keyProvider = new AleoKeyProvider();
     * keyProvider.useCache = true;
     *
     * // Create a new ProgramManager with the key that will be used to bond credits
     * const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, undefined);
     * programManager.setAccount(new Account("YourPrivateKey"));
     *
     * // Create the unbond_public transaction and send it to the network
     * const tx_id = await programManager.unbondPublic("aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j", 10);
     *
     * // Verify the transaction was successful
     * setTimeout(async () => {
     *  const transaction = await programManager.networkClient.getTransaction(tx_id);
     *  assert(transaction.id() === tx_id);
     * }, 10000);
     */
    unbondPublic(staker_address: string, amount: number, options?: Partial<ExecuteOptions>): Promise<string>;
    /**
     * Build a transaction to claim unbonded public credits in the Aleo network.
     *
     * @param {string} staker_address - The address of the staker who is claiming the credits.
     * @param {Partial<ExecuteOptions>} options - Override default execution options.
     * @returns {Promise<Transaction>} - A promise that resolves to the transaction or an error message.
     *
     * @example
     * // Import the mainnet version of the sdk.
     * import { AleoKeyProvider, ProgramManager } from "@provablehq/sdk/mainnet.js";
     *
     * // Create a keyProvider to handle key management
     * const keyProvider = new AleoKeyProvider();
     * keyProvider.useCache = true;
     *
     * // Create a new ProgramManager with the key that will be used to claim unbonded credits.
     * const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, undefined);
     *
     * // Create the claim_unbond_public transaction object for later use.
     * const tx = await programManager.buildClaimUnbondPublicTransaction("aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j");
     *
     * // The transaction can be submitted later to the network using the network client.
     * programManager.networkClient.submitTransaction(tx.toString());
     *
     * // Verify the transaction was successful
     * setTimeout(async () => {
     *  const transaction = await programManager.networkClient.getTransaction(tx.id());
     *  assert(transaction.id() === tx.id());
     * }, 10000);
     */
    buildClaimUnbondPublicTransaction(staker_address: string, options?: Partial<ExecuteOptions>): Promise<Transaction>;
    /**
     * Claim unbonded credits. If credits have been unbonded by the account executing this function, this method will
     * claim them and add them to the public balance of the account.
     *
     * @param {string} staker_address Address of the staker who is claiming the credits
     * @param {ExecuteOptions} options
     * @returns {Promise<string>} The transaction id
     *
     * @example
     * // Import the mainnet version of the sdk.
     * import { AleoKeyProvider, ProgramManager } from "@provablehq/sdk/mainnet.js";
     *
     * // Create a keyProvider to handle key management
     * const keyProvider = new AleoKeyProvider();
     * keyProvider.useCache = true;
     *
     * // Create a new ProgramManager with the key that will be used to bond credits
     * const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, undefined);
     * programManager.setAccount(new Account("YourPrivateKey"));
     *
     * // Create the claim_unbond_public transaction
     * const tx_id = await programManager.claimUnbondPublic("aleo1jx8s4dvjepculny4wfrzwyhs3tlyv65r58ns3g6q2gm2esh7ps8sqy9s5j");
     *
     * // Verify the transaction was successful
     * setTimeout(async () => {
     *  const transaction = await programManager.networkClient.getTransaction(tx_id);
     *  assert(transaction.id() === tx_id);
     * }, 10000);
     */
    claimUnbondPublic(staker_address: string, options?: Partial<ExecuteOptions>): Promise<string>;
    /**
     * Build a set_validator_state transaction for later usage.
     *
     * This function allows a validator to set their state to be either opened or closed to new stakers.
     * When the validator is open to new stakers, any staker (including the validator) can bond or unbond from the validator.
     * When the validator is closed to new stakers, existing stakers can still bond or unbond from the validator, but new stakers cannot bond.
     *
     * This function serves two primary purposes:
     * 1. Allow a validator to leave the committee, by closing themselves to stakers and then unbonding all of their stakers.
     * 2. Allow a validator to maintain their % of stake, by closing themselves to allowing more stakers to bond to them.
     *
     * @param {boolean} validator_state
     * @param {Partial<ExecuteOptions>} options - Override default execution options
     * @returns {Promise<Transaction>} The transaction object
     *
     * @example
     * // Import the mainnet version of the sdk.
     * import { AleoKeyProvider, ProgramManager } from "@provablehq/sdk/mainnet.js";
     *
     * // Create a keyProvider to handle key management
     * const keyProvider = new AleoKeyProvider();
     * keyProvider.useCache = true;
     *
     * // Create a new ProgramManager with the key that will be used to bond credits
     * const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, undefined);
     *
     * // Create the set_validator_state transaction
     * const tx = await programManager.buildSetValidatorStateTransaction(true);
     *
     * // The transaction can be submitted later to the network using the network client.
     * programManager.networkClient.submitTransaction(tx.toString());
     *
     * // Verify the transaction was successful
     * setTimeout(async () => {
     *  const transaction = await programManager.networkClient.getTransaction(tx.id());
     *  assert(transaction.id() === tx.id());
     * }, 10000);
     */
    buildSetValidatorStateTransaction(validator_state: boolean, options?: Partial<ExecuteOptions>): Promise<Transaction>;
    /**
     * Submit a set_validator_state transaction to the Aleo Network.
     *
     * This function allows a validator to set their state to be either opened or closed to new stakers.
     * When the validator is open to new stakers, any staker (including the validator) can bond or unbond from the validator.
     * When the validator is closed to new stakers, existing stakers can still bond or unbond from the validator, but new stakers cannot bond.
     *
     * This function serves two primary purposes:
     * 1. Allow a validator to leave the committee, by closing themselves to stakers and then unbonding all of their stakers.
     * 2. Allow a validator to maintain their % of stake, by closing themselves to allowing more stakers to bond to them.
     *
     * @param {boolean} validator_state
     * @param {Partial<ExecuteOptions>} options - Override default execution options
     * @returns {Promise<string>} The transaction id
     *
     * @example
     * // Import the mainnet version of the sdk.
     * import { AleoKeyProvider, ProgramManager } from "@provablehq/sdk/mainnet.js";
     *
     * // Create a keyProvider to handle key management
     * const keyProvider = new AleoKeyProvider();
     * keyProvider.useCache = true;
     *
     * // Create a new ProgramManager with the key that will be used to bond credits
     * const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, undefined);
     *
     * // Create the set_validator_state transaction
     * const tx_id = await programManager.setValidatorState(true);
     *
     * // Verify the transaction was successful
     * setTimeout(async () => {
     *  const transaction = await programManager.networkClient.getTransaction(tx_id);
     *  assert(transaction.id() === tx_id);
     * }, 10000);
     */
    setValidatorState(validator_state: boolean, options?: Partial<ExecuteOptions>): Promise<string>;
    /**
     * Verify a proof from an offline execution. This is useful when it is desired to do offchain proving and verification.
     *
     * @param {executionResponse} executionResponse The response from an offline function execution (via the `programManager.run` method)
     * @param {ImportedPrograms} imports The imported programs used in the execution. Specified as { "programName": "programSourceCode", ... }
     * @param {ImportedVerifyingKeys} importedVerifyingKeys The verifying keys in the execution. Specified as { "programName": [["functionName", "verifyingKey"], ...], ... }
     * @returns {boolean} True if the proof is valid, false otherwise
     *
     * @example
     * /// Import the mainnet version of the sdk used to build executions.
     * import { Account, ProgramManager } from "@provablehq/sdk/mainnet.js";
     *
     * /// Create the source for two programs.
     * const program = "import add_it_up.aleo; \n\n program mul_add.aleo;\n\nfunction mul_and_add:\n    input r0 as u32.public;\n    input r1 as u32.private;\n    mul r0 r1 into r2;\n call add_it_up.aleo/add_it r1 r2 into r3;  output r3 as u32.private;\n";
     * const program_import = "program add_it_up.aleo;\n\nfunction add_it:\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";
     * const programManager = new ProgramManager(undefined, undefined, undefined);
     *
     * /// Create a temporary account for the execution of the program
     * const account = Account.fromCipherText(process.env.ciphertext, process.env.password);
     * programManager.setAccount(account);
     *
     * /// Get the response and ensure that the program executed correctly
     * const executionResponse = await programManager.run(program, "mul_and_add", ["5u32", "5u32"], true);
     *
     * /// Construct the imports and verifying keys
     * const imports = { "add_it_up.aleo": program_import };
     * const importedVerifyingKeys = { "add_it_up.aleo": [["add_it", "verifyingKey1..."]] };
     *
     * /// Verify the execution.
     * const isValid = programManager.verifyExecution(executionResponse, imports, importedVerifyingKeys);
     * assert(isValid);
     */
    verifyExecution(executionResponse: ExecutionResponse, imports?: ImportedPrograms, importedVerifyingKeys?: ImportedVerifyingKeys): boolean;
    /**
     * Create a program object from a program's source code
     *
     * @param {string} program Program source code
     * @returns {Program} The program object
     */
    createProgramFromSource(program: string): Program;
    /**
     * Get the credits program object
     *
     * @returns {Program} The credits program object
     */
    creditsProgram(): Program;
    /**
     * Verify a program is valid
     *
     * @param {string} program The program source code
     */
    verifyProgram(program: string): boolean;
    getCreditsRecord(amount: number, nonces: string[], record?: RecordPlaintext | string, params?: RecordSearchParams): Promise<RecordPlaintext>;
}
export { ProgramManager };
