import { UnitInfo } from './modules/ao/v0/types/UnitInfo.js'; import { Assignment } from './modules/ao/v0/types/Assignment.js'; import { HTTPResponse } from './modules/ao/v0/types/HTTPResponse.js'; import { Message as Message$1 } from './modules/ao/v0/types/Message.js'; import { Tag } from './modules/ao/v0/types/Tag.js'; import { UnitTimestamp } from './modules/ao/v0/types/UnitTimestamp.js'; type GetRequestOptions$2 = { query: { /** The target process' ID. */ ["process-id"]: string; }; } & RequestInit; /** * This class is responsible for interacting with the following endpoints: * * - `{su-url}/{message-id}` * * Methods within this class provide HTTP-like APIs. */ declare class Message { protected message_id: string; protected scheduler_unit: Scheduler; constructor(schedulerUnit: Scheduler, messageId: string); /** * Make the following request(s): * ```text * GET {su-url}/{message-id}?process-id={process-id} * ``` * @param options Options to pass to the request. * @returns The result of the request. * * @example * ```ts * const res = await new SchedulerUnit() * .message("1447") * .get({ query: { "process-id": "1557" } }); * * // - end of example - * ``` */ get(options: GetRequestOptions$2): Promise; } type GetRequestOptions$1 = { query: { /** The starting date. */ from?: string; /** The ending date. */ to?: string; }; } & RequestInit; /** * @example * ```json * { * "page_info": { * "has_next_page": true * }, * "edges": [ * { * "node": { * "message": { * "id": "no734w5WtHMPgS9cyv2u8xSRtRZRUJxThKYu6PAq6oc", * "owner": { * "address": "uhQjEgutJ2Be9IRA-PmFDSIrL8AR2rcEkou4hYwyDw0", * "key": "vXZsOb7KYARNWcdJ1OiumsA5N0e8TgKcWSirPHsNQDJCh_yizwop7tRpCR_lCQfOcEYlBzAzGmZxUpkxdwGG1k6hCmn7e3-5cB4rKAc8h4gaGZfTzHLdqKQwYpPmFsKhwS2QJJWSiynRW-OmhWt-Uo6G5LLzgSb7qBDKgGBgC14uc_-VxMJJ9Imc93O_WE17dSWxmHwXjRPWfuHDMpi1oWldhfq9WksXLV44ucZzjq04Kzbgi_QoCZ-LBCFN7TZ93AenUys5EqbQMeqy5kjuOczjZ_B74xaorgNfesi4s5i9L29ajWxKX_7jDsMm4A7GjHTI36Q_10qOKtBLUYmiMm8oc_UUV-tH2smJo8Sp6nm1vfOsqmesIf2LaMM2_yvzwxXPtTEfFrTSbv_UxCxIjzV0VYnnk3kDG9NekT1cDGkjYpx2oJSet76wydgylCgpWdvEcmhcECSHbqCjA2OsDlnCAvDoinI0DvDIfIfmMUt6GmVh1KlEzH4Q2Es9otcq9duoH1FtAMxE_2ZDABe41fH_mj4U4LS2MDX6pwRz9B-SOiPHTBK8BUdu7O6TDFocT3zrkJ6RU6RGSW1iiGFyLTX_12ZuoSxAyH5bYilc7hA-ydxFP6kehS4FCGgRmBeuKOT4ybQSQ3TAxPadwd4NdIKd7qQnHDKPU-h5W_UrotM" * }, * "data": "1984", * "tags": [ * { * "name": "Action", * "value": "Eval" * }, * { * "name": "Data-Protocol", * "value": "ao" * }, * { * "name": "Variant", * "value": "ao.TN.1" * }, * { * "name": "Type", * "value": "Message" * }, * { * "name": "SDK", * "value": "aoconnect" * } * ], * "signature": "KaF6F2ERruXW0wMd-vwy6leGSypy5cr3694goxc7CbhoiKau3hE5Q7keuwRQS1i4w-AuSY7ew8dXgjfOxSO96zOUUnmcU04IjGwBFCBuM1ypHluIOq-EHbtnHefkOKutlYeSKBY54p8xGSqhZfE2-_FVUZ6-pJBMR_ZeLSEsJALqKS35p0OQXNpa1hMKhFLgbQUiL9j71U-xnvinoYTWz96HvZdNY-Bb4VoPdRHuep_1yk8xCZof9GH9xYyjk_FQFTyn9lJu6NjpQ3AvO_1qGsEWzr_MtP2IO6J8tS183P5wSy1Uuf7JJOF-PyJlcUk3gNgYiMMAppSOLnjVqYbUyqyqoPWYlqBn7Fxoi3dpKtLIW21R_ik6HAsdEoW9vJnorvlSp8uhLOP8J11fKBbcayNWrUDFuFX-xS8JSbrcc73zdnn-sFYBAdJtkohJiWErAKXqp36IX-h1FJY0TKB10QR0rmzMzjNVnLbFxJ_dlSQq_IHDCkG78jbNlazXmqNAfx2-x1fXylMp9d41Slexcgm4pPSfXKjqZriQm3LL6p-gYAVPcpPQFF9Ai1QB4N8FNKrIzCyGodtAWb4gHf38houjzieVRw2hRf4fvLI98P1Uzysd0dWq7C0Jk9wel8C4rKVyGclpWkunYhyjUvQSkwdoRMIAHap0ukg8wHQLFXc", * "anchor": null, * "target": "0HESttvcBa1KXy4aicLURBK6ts4E_Eu4iqAsyYnlOLA" * }, * "assignment": { * "id": "9O5_GXabuCuFhyaJ_F8V9YYe6-Xsn4cEBcvcS66Sbng", * "owner": { * "address": "fcoN_xJeisVsPXA-trzVAuIiqO3ydLQxM-L4XbrQKzY", * "key": "kePMooMn7uEakQJCE_4DtzcJUPs6x6d-9nG6Pjg84qJqYM9G7-eIg7Enrg-OEqGTjIoreE7tnTB5z66TqQnllSJa8QNDqHbdN1efAs9RknriT62W7Cyqoz_ErjVhc7Wfx02oQm-SpaUSdo1k8orAJ94ADmw_SbCbceCNirStjcNGJ7x1FSj9iNViETvgEmTICYIlyud8C-FU7oLYjEnlAIwUggrP87uEKyp4a1OLDosxGymIZ7F2yue2d1Y0VXl2vhUOvYrvBvAbPUzuOV0x1sajSz33w9uMdZJceOQbxdj3tgWECvzdNTVincyH8wME1-24Wdqki26SEWqvsjTyjpOctT5MC3riEemjv2KXncXf6-vzPGIdl34MbOu5HkmaxBnUrPsm6xPv6JgbthqJCVbvqQ0dFqqHKARU0g5vYpyAXKjjBJvWjKvUHoK_2hSkpLFaf_GHy3ap1MnYELazK5-Rt7yO1Wq6lPfgPRkROOWP0nCZCcDFpyIrA7Wr_BuZ-pzMHquBYV5i3pCWCuFtanTVlVC7EmPSEMIPCBwIVgBeLVMgAoPgwWB3RqD7JvjMcGvDCONflVRf6NoJjXwuzU8ZBp33cqc-XWAVhrAcd0AGt1N0-7riZSmvEWhpjNrc90ODe01gj55dj5LUFvTO0nmHeyVSMsAKmChacU3-C50" * }, * "tags": [ * { * "name": "Process", * "value": "0HESttvcBa1KXy4aicLURBK6ts4E_Eu4iqAsyYnlOLA" * }, * { * "name": "Message", * "value": "no734w5WtHMPgS9cyv2u8xSRtRZRUJxThKYu6PAq6oc" * }, * { * "name": "Epoch", * "value": "0" * }, * { * "name": "Nonce", * "value": "0" * }, * { * "name": "Hash-Chain", * "value": "lJq2vqkAFNUbCkmZzGJvSNRhYbK5DfkB-mxn4ox0kFg" * }, * { * "name": "Block-Height", * "value": "000001402984" * }, * { * "name": "Timestamp", * "value": "1712967091755" * } * ], * "signature": "HPPrw_h3BkWiluEEeFwBvEuoOSDgFaKvXHXAIwyhxD9NRZ0dbja6kT6iOzEaO-6b6Haiwu3Yjffj-iZ4BSAROCRLCp7AC9BaNAZfKsu6SqJjGXgoAeyJXZ72_bpblRIQT00iJSMevwH1HPg7BY14Lk4IdBRIcN4oEoxrya6zazMjdIPb44p-a89qh3HuusYymhPucvGiVr0Et4mye7B_UYI_o0HZVjrYgsJRyzj2IFfwnw1ohqQarmvly8AzHCLK30spZSq_cbnXvrYlEhIa2MkFYB_XsPcW7ABLUZXZj9RKvykzAyzLadAjzK-pbXojQWyX1O3a9PUKji9fbjUgKXnDwBTNT2mneCf-Ch2fnCibpLd4lHJWyo4fybgYrdxKlveUr29dlLWtFhsnCzZevcs5hzm5KUb4WE8c-YWH111iYCLzj-cTpeWEWi2Vs6HweAQNNZr12D9suXS9rKRdPWUZI3aXZNmc1x-r6TZ3WwFKYm3nPXuxokltAf5Vk_bTVRKUB3pWCnO39HLEqpFUWgTnCCkMFJHA9qOzSHh1QjbAGyN3LZgd5d0W3BayOcRfNMGHN5qqojdRXwyp7cu2xfJPAg9rfS0gMUCKbgKWSpRoEns9ELOI-ekG-V5fTga4DQyn54auXvx9yJiRbKfvLPJYtouNOL22Q9OimT5OlmI", * "anchor": null, * "target": "" * } * }, * "cursor": "1712967091755" * } * ] * } * ``` */ type GetProcessResponse = HTTPResponse.PaginatedResponse<{ message: Message$1; assignment: Assignment; }>; /** * This class is responsible for interacting with the following endpoints: * * - `{su-url}/{process-id}` * * Methods within this class provide HTTP-like APIs. */ declare class Process$1 { protected process_id: string; protected scheduler_unit: Scheduler; constructor(schedulerUnit: Scheduler, processId: string); /** * Make the following request(s): * ```text * GET {su-url}/{process-id} * GET {su-url}/{process-id}?from=1715039710324&to=1715039720324 * ```` * @param options (Optional) Options to pass to the request. * * @example * ```ts * // Get all messages * const res = await new SchedulerUnit() * .process("1557") * .get(); * * // Get messages from the given "from" date to the given "to" date * const res = await new SchedulerUnit() * .process("1557") * .get({ query: { from: "1715039710324", to: "1715039720324" } }) * * // - end of example - * ``` */ get(options: GetRequestOptions$1): Promise; } /** * @example * ``` * { * "process_id": "0HESttvcBa1KXy4aicLURBK6ts4E_Eu4iqAsyYnlOLA", * "block": "000001402984", * "owner": { * "address": "uhQjEgutJ2Be9IRA-PmFDSIrL8AR2rcEkou4hYwyDw0", * "key": "vXZsOb7KYARNWcdJ1OiumsA5N0e8TgKcWSirPHsNQDJCh_yizwop7tRpCR_lCQfOcEYlBzAzGmZxUpkxdwGG1k6hCmn7e3-5cB4rKAc8h4gaGZfTzHLdqKQwYpPmFsKhwS2QJJWSiynRW-OmhWt-Uo6G5LLzgSb7qBDKgGBgC14uc_-VxMJJ9Imc93O_WE17dSWxmHwXjRPWfuHDMpi1oWldhfq9WksXLV44ucZzjq04Kzbgi_QoCZ-LBCFN7TZ93AenUys5EqbQMeqy5kjuOczjZ_B74xaorgNfesi4s5i9L29ajWxKX_7jDsMm4A7GjHTI36Q_10qOKtBLUYmiMm8oc_UUV-tH2smJo8Sp6nm1vfOsqmesIf2LaMM2_yvzwxXPtTEfFrTSbv_UxCxIjzV0VYnnk3kDG9NekT1cDGkjYpx2oJSet76wydgylCgpWdvEcmhcECSHbqCjA2OsDlnCAvDoinI0DvDIfIfmMUt6GmVh1KlEzH4Q2Es9otcq9duoH1FtAMxE_2ZDABe41fH_mj4U4LS2MDX6pwRz9B-SOiPHTBK8BUdu7O6TDFocT3zrkJ6RU6RGSW1iiGFyLTX_12ZuoSxAyH5bYilc7hA-ydxFP6kehS4FCGgRmBeuKOT4ybQSQ3TAxPadwd4NdIKd7qQnHDKPU-h5W_UrotM" * }, * "tags": [ * { * "name": "App-Name", * "value": "aos" * }, * { * "name": "Name", * "value": "ap-testnet-phw-001" * }, * { * "name": "aos-Version", * "value": "1.10.25" * }, * { * "name": "Data-Protocol", * "value": "ao" * }, * { * "name": "Variant", * "value": "ao.TN.1" * }, * { * "name": "Type", * "value": "Process" * }, * { * "name": "Module", * "value": "1PdCJiXhNafpJbvC-sjxWTeNzbf9Q_RfUNs84GYoPm0" * }, * { * "name": "Scheduler", * "value": "_GQ33BkPtZrqxA84vM8Zk-N2aO0toNNu_C-l-rawrBA" * }, * { * "name": "SDK", * "value": "aoconnect" * } * ], * "timestamp": 1712967090448, * "data": "1984", * "anchor": null, * "signature": "keLwjXId6AFv2IhQ049kNAmwHP_iFMO_-qfLAz5VIzdKp4lG3bmmk4wE1XzqhnLvjcMBQZnCUZql6LNG9CTZZYUQN3ff1P_KE8EgHRUDtA-LYtgDmqmIcrG5Kqj4QuTy10CFM3Lt9Z28X9nCiqPZNxzGCGlurMLlCQoDfLbfCWHYMCSpl2P7ek5KKsAx_55jdv3DIVVo245a5TPJD_d2dEIdeWo2wpkVUSZYGy4wnMP3Hegtd6Z5BFat98owQ6E76TA1QesEk7Hsz_nhOZaX4Jd9CPBhX4BRssCnOCL1L0PWWHIsutImLOLV8IqsjeGSkCdnjFBfW2zil1pIxF0xIwD4NgV-_f9P4sCQ6Hi5EztCkRlY6ICmE958BtVi4iZCdaKE-9pQiygBNOBxYEzpJIyCs1t3E-Fp1UNjBIfhEuOM50qQFlAwU4zv6_tH7V37tRxh4sd8z7TU_AwrKe4iYrF0DesyjFVR__RflaCMBqPGdbzKDi8DRB_dtdt9HEUPrpmJiJM1r4-Z3OsrtdnxcGsK5DzGGayA4NlOq1xvymIiYshgMYn3YMotTLDAxEyRSNikJFfjBy_q8X8Gy4A_abpMhl74eOgb4N-AMWgB0jXWnZWISIefeGLfAEBsIdXZW6zDKpq0les4pTeMAMb_SsI-_Tku-0IwS179-GOn9Zk" * } * ``` */ type SchedulerUnitProcess = { process_id: string; block: string; owner: { address: string; key: string; }; tags: Tag[]; timestamp: number; data: string; anchor: null | string; signature: string; }; /** * This class is responsible for interacting with the following endpoints: * * - `{su-url}/processes/{process-id}` * * Methods within this class provide HTTP-like APIs. */ declare class Process { protected process_id: string; protected scheduler_unit: Scheduler; constructor(schedulerUnit: Scheduler, processId: string); /** * Make the following request(s): * ```text * GET {su-url}/processes/{process-id} * ```` * @returns The result of the request. * * @example * ```ts * const res = await new SchedulerUnit() * .processes() * .process("1557") * .get(); * * // - end of example - * ``` */ get(): Promise; } /** * This class is responsible for interacting with the following endpoints: * * - `{su-url}/processes/*` * * Methods within this class provide HTTP-like APIs. */ declare class Processes { protected scheduler_unit: Scheduler; constructor(schedulerUnit: Scheduler); /** * Get the object that interacts with the process with the given ID. * @param processId The process' ID. * @returns An object with HTTP-like APIs for interacting with the process. */ process(processId: string): Process; } type GetRequestOptions = { query: { /** The target process' ID. */ ["process-id"]: string; }; } & RequestInit; /** * This class is responsible for interacting with the following endpoints: * * - `{su-url}/timestamp` * * Methods within this class provide HTTP-like APIs. */ declare class Timestamp { protected scheduler_unit: Scheduler; constructor(schedulerUnit: Scheduler); /** * Make the following request(s): * ```text * GET {su-url}/timestamp?process-id={process-id} * ``` * @returns The result of the request. * @example * ```ts * const res = await new SchedulerUnit() * .timestamp() * .get({ query: { "process-id": "1557" } }) * * // - end of example - * ``` */ get(options: GetRequestOptions): Promise; } /** * This class is responsible for interacting with Scheduler Unit API endpoints. * * For more information on this API's endpoints, see the following: * * - https://ao.g8way.io/#/spec > Scheduler (SU) */ declare class Scheduler { /** * The URL to this unit. Examples: * * - https://su-router.ao-testnet.xyz * - https://su55.ao-testnet.xyz */ protected su_url: string; /** * @param suUrl (Optional) The URL to this unit. Can be a Scheduler * Unit URL or a unit Router URL. * * Defaults to the following unit Router URL: * * https://su-router.ao-testnet.xyz. */ constructor(suUrl?: string); /** * Make a `fetch` request using this unit's URL as the request's * base URL. * @param path The path to append to this unit's base URL. * @param requestInit (Optional) Options to pass to the `fetch` API. * @returns The result of the `fetch` call. */ fetch(path: string, requestInit?: RequestInit): Promise; /** * Make the following request(s): * * ```text * GET {su-url} * ``` * * @returns The result of the request. * * @example * ```ts * const res = await new SchedulerUnit().get(); * * // - end of example - * ``` */ get(): Promise; /** * Make the following request(s): * * ```text * POST {su-url} * ``` * * @returns The result of the request. * * @example * ```ts * const res = await new SchedulerUnit() * .post({ * // ... body of the request * }); * * // - end of example - * ``` */ post(options: RequestInit): Promise<{ id: string; timestamp: string; }>; /** * @returns See {@linkcode Message}. */ message(messageId: string): Message; /** * @returns See {@linkcode Process}. */ process(processId: string): Process$1; /** * @returns See {@linkcode Processes}. */ processes(): Processes; /** * @returns See {@linkcode Timestamp}. */ timestamp(): Timestamp; } export { GetRequestOptions$2 as G, Message as M, Process$1 as P, Scheduler as S, Timestamp as T, GetRequestOptions$1 as a, GetProcessResponse as b, SchedulerUnitProcess as c, Process as d, Processes as e, GetRequestOptions as f };