From 274ee847766d76fa8484c1d71edcff3b12ab6444 Mon Sep 17 00:00:00 2001 From: Thomas Hodges Date: Tue, 6 Oct 2026 13:23:23 -0500 Subject: [PATCH] Hide Any API and the old node request pages Any API, the seven direct-request job specs, and the external initiator pages stay at their URLs. Menus, search, and Markdown leave them out. The pages send noindex. The nodes home no longer has the two cards for the old request path. The jobs index names directrequest and fluxmonitor only under the node 2.47 warning. Keeper jobs stay and carry the Automation sunset note. OCR job docs stay. --- src/config/sidebar.ts | 68 --- src/config/sunset.test.ts | 30 + src/config/sunset.ts | 38 +- src/content/chainlink-nodes/llms-full.txt | 568 +----------------- .../chainlink-nodes/oracle-jobs/all-jobs.mdx | 10 + .../chainlink-nodes/oracle-jobs/jobs.mdx | 19 +- .../__tests__/buildMarkdownArtifact.test.ts | 5 + src/pages/chainlink-nodes.astro | 48 -- src/scripts/generate-llms.ts | 3 + 9 files changed, 119 insertions(+), 670 deletions(-) diff --git a/src/config/sidebar.ts b/src/config/sidebar.ts index 7ffb0d295e6..f259c887460 100644 --- a/src/config/sidebar.ts +++ b/src/config/sidebar.ts @@ -2791,74 +2791,6 @@ export const SIDEBAR_WITH_SUNSET_PRODUCTS: Partial { "https://docs.chain.link/chainlink-automation/llms-full.txt", "/quickstarts/time-based-upkeep", "/quickstarts/functions-demo-app?parent=automation", + "/any-api", + "/any-api/introduction", + "/any-api/get-request/examples/single-word-response", + "/chainlink-nodes/external-initiators/external-initiators-introduction", + "/chainlink-nodes/external-initiators/building-external-initiators", + "/chainlink-nodes/job-specs/direct-request-get-uint256", + "/chainlink-nodes/job-specs/multi-word-job", + "https://docs.chain.link/chainlink-nodes/job-specs/direct-request-existing-job", ])("hides %s", (pathname) => { expect(isSunsetDocsPath(pathname)).toBe(true) }) @@ -28,6 +36,11 @@ describe("sunset docs paths", () => { "/quickstarts/circuit-breaker", "/chainlink-local", "chainlink-functions-extra", + "/chainlink-nodes", + "/chainlink-nodes/oracle-jobs/jobs", + "/chainlink-nodes/oracle-jobs/all-jobs", + "/chainlink-nodes/v1/fulfilling-requests", + "/any-api-extra", ])("keeps %s", (pathname) => { expect(isSunsetDocsPath(pathname)).toBe(false) }) @@ -38,7 +51,24 @@ describe("sunset docs paths", () => { expect(isSunsetSidebarSection("vrf")).toBe(false) expect(isSunsetContentFile("/repo/src/content/chainlink-functions/getting-started.mdx")).toBe(true) expect(isSunsetContentFile("/repo/src/content/quickstarts/eth-balance-monitor.mdx")).toBe(true) + expect(isSunsetContentFile("/repo/src/content/any-api/introduction.mdx")).toBe(true) + expect( + isSunsetContentFile("/repo/src/content/chainlink-nodes/external-initiators/building-external-initiators.mdx") + ).toBe(true) + expect(isSunsetContentFile("/repo/src/content/chainlink-nodes/job-specs/direct-request-get-bool.mdx")).toBe(true) expect(isSunsetContentFile("/repo/src/content/quickstarts/circuit-breaker.mdx")).toBe(false) + expect(isSunsetContentFile("/repo/src/content/chainlink-nodes/oracle-jobs/all-jobs.mdx")).toBe(false) + expect(isSunsetContentFile("/repo/src/content/chainlink-nodes/oracle-jobs/jobs.mdx")).toBe(false) + }) + + it("removes Any API and external initiators from the Nodes menu and keeps OCR jobs", () => { + const sectionNames = SIDEBAR.nodeOperator?.map((group) => group.section) ?? [] + const urls = SIDEBAR.nodeOperator?.flatMap((group) => group.contents.map((item) => item.url)) ?? [] + + expect(sectionNames).not.toContain("Connect to Any API") + expect(sectionNames).not.toContain("External Initiators") + expect(sectionNames).toContain("Job and Task Reference") + expect(urls).toContain("chainlink-nodes/oracle-jobs/jobs") }) it("keeps the product trees for their own pages and keeps the pages in the sitemap", () => { diff --git a/src/config/sunset.ts b/src/config/sunset.ts index 19a8ea220b2..9de0b07993a 100644 --- a/src/config/sunset.ts +++ b/src/config/sunset.ts @@ -1,18 +1,35 @@ /** - * Chainlink Functions and Chainlink Automation stay reachable at their old URLs. + * Sunset pages stay reachable at their old URLs. * Site menus, search, and Markdown output leave them out. - * Their own pages still show the left sidebar from SIDEBAR_WITH_SUNSET_PRODUCTS. + * Functions and Automation pages still show the left sidebar from SIDEBAR_WITH_SUNSET_PRODUCTS. * Pages send noindex. They stay in the sitemap so a crawler can recrawl and see noindex. * Set SUNSET_PAGES_STAY_IN_SITEMAP to false after a few weeks to drop them from the sitemap. + * + * Also hidden: Any API, the seven direct-request job specs, and external initiators. + * OCR job docs stay. Keeper jobs stay and carry the Automation sunset note. */ /** Temporary. Flip to false after crawlers have had time to read noindex. */ export const SUNSET_PAGES_STAY_IN_SITEMAP = true -export const SUNSET_DOC_ROOTS = ["chainlink-automation", "chainlink-functions"] as const +export const SUNSET_DOC_ROOTS = ["any-api", "chainlink-automation", "chainlink-functions"] as const export const SUNSET_SIDEBAR_SECTIONS = ["automation", "chainlinkFunctions"] as const +/** Subtrees inside a product that stays in the menu. */ +export const SUNSET_PATH_PREFIXES = ["chainlink-nodes/external-initiators"] as const + +/** Individual pages. The rest of chainlink-nodes stays indexed, including OCR jobs. */ +export const SUNSET_EXACT_PATHS = [ + "chainlink-nodes/job-specs/direct-request-existing-job", + "chainlink-nodes/job-specs/direct-request-get-bool", + "chainlink-nodes/job-specs/direct-request-get-bytes", + "chainlink-nodes/job-specs/direct-request-get-int256", + "chainlink-nodes/job-specs/direct-request-get-string", + "chainlink-nodes/job-specs/direct-request-get-uint256", + "chainlink-nodes/job-specs/multi-word-job", +] as const + /** Quickstarts that document only Functions, only Automation, or both. */ export const SUNSET_QUICKSTART_SLUGS = [ "automation-station", @@ -23,6 +40,7 @@ export const SUNSET_QUICKSTART_SLUGS = [ ] as const const SUNSET_SIDEBAR_SECTION_SET = new Set(SUNSET_SIDEBAR_SECTIONS) +const SUNSET_EXACT_PATH_SET = new Set(SUNSET_EXACT_PATHS) export function normalizeDocsPath(pathname: string): string { const withoutHash = pathname.split("#")[0] ?? "" @@ -48,6 +66,12 @@ export function isSunsetDocsPath(pathname: string): boolean { return true } + if (SUNSET_PATH_PREFIXES.some((prefix) => clean === prefix || clean.startsWith(`${prefix}/`))) { + return true + } + + if (SUNSET_EXACT_PATH_SET.has(clean)) return true + return SUNSET_QUICKSTART_SLUGS.some((slug) => clean === `quickstarts/${slug}`) } @@ -62,5 +86,13 @@ export function isSunsetContentFile(filePath: string): boolean { return true } + if (SUNSET_PATH_PREFIXES.some((prefix) => normalized.includes(`/src/content/${prefix}/`))) { + return true + } + + if (SUNSET_EXACT_PATHS.some((docsPath) => normalized.endsWith(`/src/content/${docsPath}.mdx`))) { + return true + } + return SUNSET_QUICKSTART_SLUGS.some((slug) => normalized.endsWith(`/src/content/quickstarts/${slug}.mdx`)) } diff --git a/src/content/chainlink-nodes/llms-full.txt b/src/content/chainlink-nodes/llms-full.txt index 460f32354a0..280029e53b7 100644 --- a/src/content/chainlink-nodes/llms-full.txt +++ b/src/content/chainlink-nodes/llms-full.txt @@ -835,549 +835,6 @@ event AuthorizedSendersChanged(address[] senders, address changedBy) --- -# Building External Initiators -Source: https://docs.chain.link/chainlink-nodes/external-initiators/building-external-initiators - -An external initiator can trigger a run for any webhook job that it has been linked to. - -The URL for triggering a run is such: - -```shell -curl -X POST -H "Content-Type: application/json" --data '{"myKey": "myVal"}' http://localhost:6688/v2/jobs//runs -``` - -You will need to specify two headers: - -1. "X-Chainlink-EA-AccessKey" -2. "X-Chainlink-EA-Secret" - -## JSON jobs (REMOVED) - -> **CAUTION: v1 Jobs are removed** -> -> The initiators for v1 Jobs are removed for Chainlink nodes running version 1.0.0 and later. Use [v2 job -> types](/chainlink-nodes/oracle-jobs/jobs) instead. -> -> See the [v2 jobs migration page](/chainlink-nodes/oracle-jobs/migration-v1-v2) to learn how to migrate to v2 jobs. - -We will be using the [Chainlink external initiator](https://github.com/smartcontractkit/external-initiator) repo for reference. You can see some examples of existing initiators in the [blockchain](https://github.com/smartcontractkit/external-initiator/tree/master/blockchain) folder. - -External initiators are simple web initiators that can be activated by any job instead of just one. To set one up, you need to have a service similar to an external adapter that sends an `HTTPPost` message runs API call to your chainlink node service. Here is a sample URL for a web job could look like: - -```shell -curl -b cookiefile -X POST -H "Content-Type: application/json" --data '{"myKey":"myVal"}' http://localhost:6688/v2/jobs/%s/runs -``` - -Where `%s` is the jobId. - -External initiators make the same API call, with 2 added headers: - -1. "X-Chainlink-EA-AccessKey" -2. "X-Chainlink-EA-Secret" - -These are keys generated when you register your external initiator with your node. - -Triggering a run through an external initiator is as simple as making this API call to your node. All jobs with this EI configured will then be kicked off in this way. A simple external initiator in pseudo code could look like this: - -```text -while(True): - send_api_call_with_external_initiator_access_key_headers() - sleep(4) -``` - -And have this job run on the same machine as your node. - ---- - -# Adding External Initiators to Nodes -Source: https://docs.chain.link/chainlink-nodes/external-initiators/external-initiators-in-nodes - -> **NOTE** -> -> External initiators are disabled on nodes by default. Set the `FEATURE_EXTERNAL_INITIATORS=true` [configuration -> variable](/chainlink-nodes/v1/configuration) to enable this feature. - -## Creating an external initiator - -To create an external initiator you must use the remote API. You can do this yourself, like so: - -```text -POST http:///v2/external_initiators -d -``` - -where payload is a JSON blob that contains: - -```json -{ - "name": , - "url": -} -``` - -If a URL is provided, Chainlink will notify this URL of added and deleted jobs that can be triggered by this external initiator. This allows the external initiator to program in certain actions e.g. subscribing/unsubscribing to logs based on the job, etc. - -On creation: - -```text -POST -d {"jobId": , "type": , "params": } -``` - -On deletion: - -```text -DELETE / -``` - -You can use the chainlink client for convenience to access this API. - -Enter the [Chainlink nodes CLI](/chainlink-nodes/resources/miscellaneous/#execute-commands-running-docker) and run the following command - -```shell -chainlink initiators create -``` - -`NAME`: The name you want to use for your external initiator. -`URL`: The URL of your jobs endpoint. ie: `http://172.17.0.1:8080/jobs` - -This will give you the environment variables you need to run your external initiator. Copy the output. It will look something like this: - -``` -║ ei_name ║ http://localhost:8080/jobs ║ a4846e85727e46b48889c6e28b555696 ║ dnNfNhiiCTm1o6l+hGJVfCtRSSuDfZbj1VO4BkZG3E+b96lminE7yQHj2KALMAIk ║ iWt64+Q9benOf5JuGwJtQnbByN9rtHwSlElOVpHVTvGTP5Zb2Guwzy6w3wflwyYt ║ 56m38YkeCymYU0kr4Yg6x3e98CyAu+37y2+kMO2AL9lRMjA3hRA1ejFdG9UfFCAE -``` - -Be sure to save these values, since the secrets cannot be shown again. - -You now can use `ei_name` as an initiator in your jobspec. - -Set a new `.env` file, and add the respective values - -```text -EI_DATABASEURL=postgresql://$USERNAME:$PASSWORD@$SERVER:$PORT/$DATABASE -EI_CHAINLINKURL=http://localhost:6688 -EI_IC_ACCESSKEY= -EI_IC_SECRET= -EI_CI_ACCESSKEY= -EI_CI_SECRET= -``` - -At the time of writing, the output should be in order. For example, in from the output above, `EI_IC_ACCESSKEY=a4846e85727e46b48889c6e28b555696` and so on. - -Start your EI. - -Whatever code you used to run your external initiator, pass it the new headers created for the access headers, and then start your service. An easy way to do this is by having it read from the `.env` file you just created. Check out the [Conflux External initiator](https://github.com/Conflux-Network-Global/demo-cfx-chainlink) for an example. - -You'll want to test that your job is running properly. Meeting the criteria of your EI and then checking to see if a sample job kicks off is the best way to test this. - -To try a real-life example, feel free to follow along with the [Conflux EI demo](https://www.youtube.com/watch?v=J8oJEp4qz5w). - -[Additional external initiator reference](https://github.com/smartcontractkit/chainlink/wiki/External-Initiators) - -> **NOTE** -> -> The External Initiator can only initiate [webhook jobs](/chainlink-nodes/oracle-jobs/all-jobs#webhook-jobs) that have -> been linked to it. Trying to initiate a job that is not linked will give an unauthorised error. - -## Deleting an external initiator - -To delete an external initiator you must use the remote API. You can do this yourself, like so: - -```text -DELETE http:///v2/external_initiators/ -``` - -You can alternatively use the chainlink client for convenience: - -```shell -chainlink initiators destroy -``` - -## Listing external initiators - -To see your installed external initiators: - -```text -GET http:///v2/external_initiators?size=100&page=1 -``` - -Or, using the chainlink client: - -```shell -chainlink initiators list -``` - ---- - -# Introduction -Source: https://docs.chain.link/chainlink-nodes/external-initiators/external-initiators-introduction - -External initiators allow jobs in a node to be initiated depending on some external condition. The ability to create and add external initiators to Chainlink nodes enables blockchain agnostic cross-chain compatibility. - -> **NOTE** -> -> At this time of writing, external initiators do not show up in the bridges tab. However, they act exactly the same as -> if they did. - -> **NOTE** -> -> External initiators are disabled on nodes by default. Set the `FEATURE_EXTERNAL_INITIATORS=true` [configuration -> variable](/chainlink-nodes/v1/configuration) to enable this feature. - -Initiator Bridges handle the authentication to and from the External Initiator and where to send the messages. When creating a Bridge two parameters are required: - -Only the [webhook](/chainlink-nodes/oracle-jobs/all-jobs/#webhook-jobs) job type can be initiated using an External Initiator. - -The external initiator must be created before the webhook job, and must be referenced by name (whitelisted) in order for that external initiator to be allowed to trigger the given webhook job. - -When the External Initiator is created it generates two pairs of credentials: Outgoing and Incoming. The Outgoing Access Key and Secret are used to authenticate messages sent from the Core to the External Initiator. The Incoming Access Key and Secret are used to authenticate messages sent from the External Initiator to the Core. - -Then, once you've created the name, bridge, and have the correct access keys for the URL, you can proceed to use the external initiator as if it's a regular initiator in future job specs. - -For how to create an external initiator see [adding external initiators to nodes](/chainlink-nodes/external-initiators/external-initiators-in-nodes). - ---- - -# Existing Job Example specs -Source: https://docs.chain.link/chainlink-nodes/job-specs/direct-request-existing-job - -This is an example v2 (TOML) job spec for returning gas price using [etherscan](https://docs.etherscan.io/api-endpoints/gas-tracker#get-gas-oracle) in one Chainlink API Call. Note that the job : - -- Uses an [external adapter](/chainlink-nodes/external-adapters/external-adapters) to consume the etherscan API: [EtherScan External Adapter](https://github.com/smartcontractkit/external-adapters-js/tree/develop/packages/sources/etherscan). Note that this is done using the [bridge](/chainlink-nodes/oracle-jobs/all-tasks/#bridge-task) task: `type="bridge" name="etherscan"`. -- Calls the `fulfillOracleRequest2` function. If you are a node operator, use an [Operator contract](https://github.com/smartcontractkit/chainlink/blob/contracts-v1.3.0/contracts/src/v0.8/operatorforwarder/Operator.sol) with this job. - -To test this job spec from a smart contract, see this [Example](/any-api/get-request/examples/existing-job-request). - -```toml -type = "directrequest" -schemaVersion = 1 -name = "Etherscan gas price" -maxTaskDuration = "0s" -contractAddress = "YOUR_ORACLE_CONTRACT_ADDRESS" -minIncomingConfirmations = 0 -observationSource = """ - decode_log [type="ethabidecodelog" - abi="OracleRequest(bytes32 indexed specId, address requester, bytes32 requestId, uint256 payment, address callbackAddr, bytes4 callbackFunctionId, uint256 cancelExpiration, uint256 dataVersion, bytes data)" - data="$(jobRun.logData)" - topics="$(jobRun.logTopics)"] - - etherscanFast [type="bridge" name="etherscan" requestData="{\\"data\\": {\\"endpoint\\": \\"gasprice\\", \\"speed\\":\\"fast\\" }}"] - etherscanAverage [type="bridge" name="etherscan" requestData="{\\"data\\": {\\"endpoint\\": \\"gasprice\\", \\"speed\\":\\"medium\\" }}"] - etherscanSafe [type="bridge" name="etherscan" requestData="{\\"data\\": {\\"endpoint\\": \\"gasprice\\", \\"speed\\":\\"safe\\" }}"] - - decode_log -> etherscanFast - decode_log -> etherscanAverage - decode_log -> etherscanSafe - - gasPriceFast [type=jsonparse path="data,result"] - gasPriceAverage [type=jsonparse path="data,result"] - gasPriceSafe [type=jsonparse path="data,result"] - - etherscanFast -> gasPriceFast - etherscanAverage -> gasPriceAverage - etherscanSafe -> gasPriceSafe - - gasPriceFast -> encode_data - gasPriceAverage -> encode_data - gasPriceSafe -> encode_data - - encode_data [type=ethabiencode abi="(bytes32 _requestId, uint256 _fastPrice, uint256 _averagePrice, uint256 _safePrice)" - data="{\\"_requestId\\": $(decode_log.requestId),\\"_fastPrice\\": $(gasPriceFast),\\"_averagePrice\\": $(gasPriceAverage),\\"_safePrice\\": $(gasPriceSafe)}"] - - encode_tx [type=ethabiencode - abi="fulfillOracleRequest2(bytes32 requestId, uint256 payment, address callbackAddress, bytes4 callbackFunctionId, uint256 expiration, bytes calldata data)" - data="{\\"requestId\\": $(decode_log.requestId), \\"payment\\": $(decode_log.payment), \\"callbackAddress\\": $(decode_log.callbackAddr), \\"callbackFunctionId\\": $(decode_log.callbackFunctionId), \\"expiration\\": $(decode_log.cancelExpiration), \\"data\\": $(encode_data)}"] - - submit_tx [type=ethtx to="YOUR_ORACLE_CONTRACT_ADDRESS" data="$(encode_tx)"] - encode_data -> encode_tx -> submit_tx -""" - -``` - ---- - -# GET > Bool Example Job Spec -Source: https://docs.chain.link/chainlink-nodes/job-specs/direct-request-get-bool - -This is an example v2 (TOML) job spec for calling any public API, parsing the result then returning a *bool* in one Chainlink API Call. Note that the job calls the `fulfillOracleRequest2` function. If you are a node operator, use an [Operator contract](https://github.com/smartcontractkit/chainlink/blob/contracts-v1.3.0/contracts/src/v0.8/operatorforwarder/Operator.sol) with this job. - -```toml -type = "directrequest" -schemaVersion = 1 -name = "Get > Bool - (TOML)" -maxTaskDuration = "0s" -contractAddress = "YOUR_ORACLE_CONTRACT_ADDRESS" -minIncomingConfirmations = 0 -observationSource = """ - decode_log [type="ethabidecodelog" - abi="OracleRequest(bytes32 indexed specId, address requester, bytes32 requestId, uint256 payment, address callbackAddr, bytes4 callbackFunctionId, uint256 cancelExpiration, uint256 dataVersion, bytes data)" - data="$(jobRun.logData)" - topics="$(jobRun.logTopics)"] - - decode_cbor [type="cborparse" data="$(decode_log.data)"] - fetch [type="http" method=GET url="$(decode_cbor.get)" allowUnrestrictedNetworkAccess="true"] - parse [type="jsonparse" path="$(decode_cbor.path)" data="$(fetch)"] - encode_data [type="ethabiencode" abi="(bytes32 requestId, bool value)" data="{ \\"requestId\\": $(decode_log.requestId), \\"value\\": $(parse) }"] - encode_tx [type="ethabiencode" - abi="fulfillOracleRequest2(bytes32 requestId, uint256 payment, address callbackAddress, bytes4 callbackFunctionId, uint256 expiration, bytes calldata data)" - data="{\\"requestId\\": $(decode_log.requestId), \\"payment\\": $(decode_log.payment), \\"callbackAddress\\": $(decode_log.callbackAddr), \\"callbackFunctionId\\": $(decode_log.callbackFunctionId), \\"expiration\\": $(decode_log.cancelExpiration), \\"data\\": $(encode_data)}" - ] - submit_tx [type="ethtx" to="YOUR_ORACLE_CONTRACT_ADDRESS" data="$(encode_tx)"] - - decode_log -> decode_cbor -> fetch -> parse -> encode_data -> encode_tx -> submit_tx -""" -``` - ---- - -# GET > Bytes Example Job Spec -Source: https://docs.chain.link/chainlink-nodes/job-specs/direct-request-get-bytes - -This is an example v2 (TOML) job spec for returning *bytes* in one Chainlink API Call. Note that the job calls the `fulfillOracleRequest2` function. If you are a node operator, use an [Operator contract](https://github.com/smartcontractkit/chainlink/blob/contracts-v1.3.0/contracts/src/v0.8/operatorforwarder/Operator.sol) with this job. -To test it from a smart contract, see this [Example](/any-api/get-request/examples/large-responses). - -```toml -type = "directrequest" -schemaVersion = 1 -name = "Get > Bytes" -maxTaskDuration = "0s" -contractAddress = "YOUR_ORACLE_CONTRACT_ADDRESS" -minIncomingConfirmations = 0 -observationSource = """ - decode_log [type="ethabidecodelog" - abi="OracleRequest(bytes32 indexed specId, address requester, bytes32 requestId, uint256 payment, address callbackAddr, bytes4 callbackFunctionId, uint256 cancelExpiration, uint256 dataVersion, bytes data)" - data="$(jobRun.logData)" - topics="$(jobRun.logTopics)"] - - decode_cbor [type="cborparse" data="$(decode_log.data)"] - fetch [type="http" method=GET url="$(decode_cbor.get)" allowUnrestrictedNetworkAccess="true"] - parse [type="jsonparse" path="$(decode_cbor.path)" data="$(fetch)"] - encode_large [type="ethabiencode" - abi="(bytes32 requestId, bytes _data)" - data="{\\"requestId\\": $(decode_log.requestId), \\"_data\\": $(parse)}" - ] - encode_tx [type="ethabiencode" - abi="fulfillOracleRequest2(bytes32 requestId, uint256 payment, address callbackAddress, bytes4 callbackFunctionId, uint256 expiration, bytes calldata data)" - data="{\\"requestId\\": $(decode_log.requestId), \\"payment\\": $(decode_log.payment), \\"callbackAddress\\": $(decode_log.callbackAddr), \\"callbackFunctionId\\": $(decode_log.callbackFunctionId), \\"expiration\\": $(decode_log.cancelExpiration), \\"data\\": $(encode_large)}" - ] - - submit_tx [type="ethtx" to="YOUR_ORACLE_CONTRACT_ADDRESS" data="$(encode_tx)"] - - decode_log -> decode_cbor -> fetch -> parse -> encode_large -> encode_tx -> submit_tx -""" - -``` - -This is an example legacy v1 job spec for returning large responses in one Chainlink API Call. - -```json -{ - "name": "large-word", - "initiators": [ - { - "id": 9, - "jobSpecId": "7a97ff84-93ec-406d-9062-1b2531f9251a", - "type": "runlog", - "params": { - "address": "0xc57B33452b4F7BB189bB5AfaE9cc4aBa1f7a4FD8" - } - } - ], - "tasks": [ - { - "jobSpecId": "7a97ff8493ec406d90621b2531f9251a", - "type": "httpget" - }, - { - "jobSpecId": "7a97ff8493ec406d90621b2531f9251a", - "type": "jsonparse" - }, - { - "jobSpecId": "7a97ff8493ec406d90621b2531f9251a", - "type": "resultcollect" - }, - { - "jobSpecId": "7a97ff8493ec406d90621b2531f9251a", - "type": "ethtx", - "confirmations": 1, - "params": { - "abiEncoding": ["bytes32", "bytes"] - } - } - ] -} -``` - ---- - -# GET > Int256 Example Job Spec -Source: https://docs.chain.link/chainlink-nodes/job-specs/direct-request-get-int256 - -This is an example v2 (TOML) job spec for calling any public API, retrieving a number , removing its decimals then returning *int256* in one Chainlink API Call. Note that the job calls the `fulfillOracleRequest2` function. If you are a node operator, use an [Operator contract](https://github.com/smartcontractkit/chainlink/blob/contracts-v1.3.0/contracts/src/v0.8/operatorforwarder/Operator.sol) with this job. - -```toml -type = "directrequest" -schemaVersion = 1 -name = "Get > Int256 - (TOML)" -maxTaskDuration = "0s" -contractAddress = "YOUR_ORACLE_CONTRACT_ADDRESS" -minIncomingConfirmations = 0 -observationSource = """ - decode_log [type="ethabidecodelog" - abi="OracleRequest(bytes32 indexed specId, address requester, bytes32 requestId, uint256 payment, address callbackAddr, bytes4 callbackFunctionId, uint256 cancelExpiration, uint256 dataVersion, bytes data)" - data="$(jobRun.logData)" - topics="$(jobRun.logTopics)"] - - decode_cbor [type="cborparse" data="$(decode_log.data)"] - fetch [type="http" method=GET url="$(decode_cbor.get)" allowUnrestrictedNetworkAccess="true"] - parse [type="jsonparse" path="$(decode_cbor.path)" data="$(fetch)"] - - multiply [type="multiply" input="$(parse)" times="$(decode_cbor.times)"] - - encode_data [type="ethabiencode" abi="(bytes32 requestId, int256 value)" data="{ \\"requestId\\": $(decode_log.requestId), \\"value\\": $(multiply) }"] - encode_tx [type="ethabiencode" - abi="fulfillOracleRequest2(bytes32 requestId, uint256 payment, address callbackAddress, bytes4 callbackFunctionId, uint256 expiration, bytes calldata data)" - data="{\\"requestId\\": $(decode_log.requestId), \\"payment\\": $(decode_log.payment), \\"callbackAddress\\": $(decode_log.callbackAddr), \\"callbackFunctionId\\": $(decode_log.callbackFunctionId), \\"expiration\\": $(decode_log.cancelExpiration), \\"data\\": $(encode_data)}" - ] - submit_tx [type="ethtx" to="YOUR_ORACLE_CONTRACT_ADDRESS" data="$(encode_tx)"] - - decode_log -> decode_cbor -> fetch -> parse -> multiply -> encode_data -> encode_tx -> submit_tx -""" -``` - ---- - -# GET > String Example Job Spec -Source: https://docs.chain.link/chainlink-nodes/job-specs/direct-request-get-string - -This is an example v2 (TOML) job spec for returning a *string* in one Chainlink API Call. Note that the job calls the `fulfillOracleRequest2` function. If you are a node operator, use an [Operator contract](https://github.com/smartcontractkit/chainlink/blob/contracts-v1.3.0/contracts/src/v0.8/operatorforwarder/Operator.sol) with this job. -To test it from a smart contract, see this [Example](/any-api/get-request/examples/array-response). - -```toml -# THIS IS EXAMPLE CODE THAT USES HARDCODED VALUES FOR CLARITY. -# THIS IS EXAMPLE CODE THAT USES UN-AUDITED CODE. -# DO NOT USE THIS CODE IN PRODUCTION. - -type = "directrequest" -# evmChainID for Sepolia Testnet -evmChainID = "11155111" -schemaVersion = 1 -name = "Get > String" -contractAddress = "YOUR_ORACLE_CONTRACT_ADDRESS" -maxTaskDuration = "0s" -minIncomingConfirmations = 0 -observationSource = """ - decode_log [type="ethabidecodelog" - abi="OracleRequest(bytes32 indexed specId, address requester, bytes32 requestId, uint256 payment, address callbackAddr, bytes4 callbackFunctionId, uint256 cancelExpiration, uint256 dataVersion, bytes data)" - data="$(jobRun.logData)" - topics="$(jobRun.logTopics)"] - - decode_cbor [type="cborparse" data="$(decode_log.data)"] - fetch [type="http" method=GET url="$(decode_cbor.get)" allowUnrestrictedNetworkAccess="true"] - parse [type="jsonparse" path="$(decode_cbor.path)" data="$(fetch)"] - encode_data [type="ethabiencode" abi="(bytes32 requestId, string value)" data="{ \\"requestId\\": $(decode_log.requestId), \\"value\\": $(parse) }"] - encode_tx [type="ethabiencode" - abi="fulfillOracleRequest2(bytes32 requestId, uint256 payment, address callbackAddress, bytes4 callbackFunctionId, uint256 expiration, bytes calldata data)" - data="{\\"requestId\\": $(decode_log.requestId), \\"payment\\": $(decode_log.payment), \\"callbackAddress\\": $(decode_log.callbackAddr), \\"callbackFunctionId\\": $(decode_log.callbackFunctionId), \\"expiration\\": $(decode_log.cancelExpiration), \\"data\\": $(encode_data)}" - ] - submit_tx [type="ethtx" to="YOUR_ORACLE_CONTRACT_ADDRESS" data="$(encode_tx)"] - - decode_log -> decode_cbor -> fetch -> parse -> encode_data -> encode_tx -> submit_tx -""" -``` - ---- - -# GET > Uint256 Example Job Spec -Source: https://docs.chain.link/chainlink-nodes/job-specs/direct-request-get-uint256 - -This is an example v2 (TOML) job spec for calling any public API, retrieving a number , removing its decimals then returning *uint256* in one Chainlink API Call. Note that the job calls the `fulfillOracleRequest2` function. If you are a node operator, use an [Operator contract](https://github.com/smartcontractkit/chainlink/blob/contracts-v1.3.0/contracts/src/v0.8/operatorforwarder/Operator.sol) with this job. -To test it from a smart contract, see this [Example](/any-api/get-request/examples/single-word-response). - -```toml -type = "directrequest" -schemaVersion = 1 -name = "Get > Uint256 - (TOML)" -maxTaskDuration = "0s" -contractAddress = "YOUR_ORACLE_CONTRACT_ADDRESS" -minIncomingConfirmations = 0 -observationSource = """ - decode_log [type="ethabidecodelog" - abi="OracleRequest(bytes32 indexed specId, address requester, bytes32 requestId, uint256 payment, address callbackAddr, bytes4 callbackFunctionId, uint256 cancelExpiration, uint256 dataVersion, bytes data)" - data="$(jobRun.logData)" - topics="$(jobRun.logTopics)"] - - decode_cbor [type="cborparse" data="$(decode_log.data)"] - fetch [type="http" method=GET url="$(decode_cbor.get)" allowUnrestrictedNetworkAccess="true"] - parse [type="jsonparse" path="$(decode_cbor.path)" data="$(fetch)"] - - multiply [type="multiply" input="$(parse)" times="$(decode_cbor.times)"] - - encode_data [type="ethabiencode" abi="(bytes32 requestId, uint256 value)" data="{ \\"requestId\\": $(decode_log.requestId), \\"value\\": $(multiply) }"] - encode_tx [type="ethabiencode" - abi="fulfillOracleRequest2(bytes32 requestId, uint256 payment, address callbackAddress, bytes4 callbackFunctionId, uint256 expiration, bytes calldata data)" - data="{\\"requestId\\": $(decode_log.requestId), \\"payment\\": $(decode_log.payment), \\"callbackAddress\\": $(decode_log.callbackAddr), \\"callbackFunctionId\\": $(decode_log.callbackFunctionId), \\"expiration\\": $(decode_log.cancelExpiration), \\"data\\": $(encode_data)}" - ] - submit_tx [type="ethtx" to="YOUR_ORACLE_CONTRACT_ADDRESS" data="$(encode_tx)"] - - decode_log -> decode_cbor -> fetch -> parse -> multiply -> encode_data -> encode_tx -> submit_tx -""" -``` - ---- - -# MultiWord Example Job Spec -Source: https://docs.chain.link/chainlink-nodes/job-specs/multi-word-job - -This is an example v2 (TOML) job spec for returning multiple responses in 1 Chainlink API Call.Note that the job calls the `fulfillOracleRequest2` function. If you are a node operator, use an [Operator contract](https://github.com/smartcontractkit/chainlink/blob/contracts-v1.3.0/contracts/src/v0.8/operatorforwarder/Operator.sol) with this job. -To test it from a smart contract, see this [Example](/any-api/get-request/examples/multi-variable-responses). - -```toml -type = "directrequest" -schemaVersion = 1 -name = "multi-word (TOML)" -maxTaskDuration = "0s" -contractAddress = "YOUR_ORACLE_CONTRACT_ADDRESS" -minIncomingConfirmations = 0 -observationSource = """ - decode_log [type="ethabidecodelog" - abi="OracleRequest(bytes32 indexed specId, address requester, bytes32 requestId, uint256 payment, address callbackAddr, bytes4 callbackFunctionId, uint256 cancelExpiration, uint256 dataVersion, bytes data)" - data="$(jobRun.logData)" - topics="$(jobRun.logTopics)"] - decode_cbor [type="cborparse" data="$(decode_log.data)"] - decode_log -> decode_cbor - decode_cbor -> btc - decode_cbor -> usd - decode_cbor -> eur - btc [type="http" method=GET url="$(decode_cbor.urlBTC)" allowunrestrictednetworkaccess="true"] - btc_parse [type="jsonparse" path="$(decode_cbor.pathBTC)" data="$(btc)"] - btc_multiply [type="multiply" input="$(btc_parse)", times="100000"] - btc -> btc_parse -> btc_multiply - usd [type="http" method=GET url="$(decode_cbor.urlUSD)" allowunrestrictednetworkaccess="true"] - usd_parse [type="jsonparse" path="$(decode_cbor.pathUSD)" data="$(usd)"] - usd_multiply [type="multiply" input="$(usd_parse)", times="100000"] - usd -> usd_parse -> usd_multiply - eur [type="http" method=GET url="$(decode_cbor.urlEUR)" allowunrestrictednetworkaccess="true"] - eur_parse [type="jsonparse" path="$(decode_cbor.pathEUR)" data="$(eur)"] - eurs_multiply [type="multiply" input="$(eur_parse)", times="100000"] - eur -> eur_parse -> eurs_multiply - btc_multiply -> encode_mwr - usd_multiply -> encode_mwr - eurs_multiply -> encode_mwr - // MWR API does NOT auto populate the requestID. - encode_mwr [type="ethabiencode" - abi="(bytes32 requestId, uint256 _btc, uint256 _usd, uint256 _eurs)" - data="{\\"requestId\\": $(decode_log.requestId), \\"_btc\\": $(btc_multiply), \\"_usd\\": $(usd_multiply), \\"_eurs\\": $(eurs_multiply)}" - ] - encode_tx [type="ethabiencode" - abi="fulfillOracleRequest2(bytes32 requestId, uint256 payment, address callbackAddress, bytes4 callbackFunctionId, uint256 expiration, bytes calldata data)" - data="{\\"requestId\\": $(decode_log.requestId), \\"payment\\": $(decode_log.payment), \\"callbackAddress\\": $(decode_log.callbackAddr), \\"callbackFunctionId\\": $(decode_log.callbackFunctionId), \\"expiration\\": $(decode_log.cancelExpiration), \\"data\\": $(encode_mwr)}" - ] - submit_tx [type="ethtx" to="YOUR_ORACLE_CONTRACT_ADDRESS" data="$(encode_tx)"] - encode_mwr -> encode_tx -> submit_tx -""" -``` - ---- - # Job Types Source: https://docs.chain.link/chainlink-nodes/oracle-jobs/all-jobs @@ -1632,6 +1089,13 @@ See [shared fields](/chainlink-nodes/oracle-jobs/jobs/#shared-fields). ## Keeper jobs +> **CAUTION: Chainlink Automation has been deprecated (v1.x: June 30, 2026 | v2.1: July 31, 2026, testnet: June 24, 2026)** +> +> Chainlink Automation v1.x has been deprecated as of June 30, 2026, and v2.1 has been deprecated as of July 31, 2026 +> (testnet: June 24, 2026). Migrate to the [Chainlink Runtime Environment (CRE)](/cre), which does everything and more +> →. Migrate your existing upkeeps to avoid service disruption. See the [Automation to CRE migration +> guide](/cre/reference/cla-migration) for a full concept mapping and code examples. + Keeper jobs occasionally poll a smart contract method that expresses whether something in the contract is ready for some onchain action to be performed. When it's ready, the job executes that onchain action. Examples: @@ -2622,12 +2086,22 @@ Source: https://docs.chain.link/chainlink-nodes/oracle-jobs/jobs Chainlink nodes require jobs to do anything useful. For example, posting asset price data onchain requires jobs. Chainlink nodes support the following job types: - [`cron`](/chainlink-nodes/oracle-jobs/all-jobs/#solidity-cron-jobs) -- [`directrequest`](/chainlink-nodes/oracle-jobs/all-jobs/#direct-request-jobs) -- [`fluxmonitor`](/chainlink-nodes/oracle-jobs/all-jobs/#flux-monitor-jobs) - [`keeper`](/chainlink-nodes/oracle-jobs/all-jobs/#keeper-jobs) - [`offchainreporting`](/chainlink-nodes/oracle-jobs/all-jobs/#offchain-reporting-jobs) - [`webhook`](/chainlink-nodes/oracle-jobs/all-jobs/#webhook-jobs) +> **CAUTION: Deprecation** +> +> After Chainlink Node version 2.47, Chainlink is deprecating support for the legacy Direct Request, Flux Monitor, and +> Run Log job types. These job types will no longer be supported in Chainlink node releases. Node operators and +> developers that continue to rely on them can choose to remain on the last compatible release, but should not expect +> ongoing development support, including maintenance, bug fixes, security patches, or compatibility with future +> releases. Teams using these legacy job types should begin planning to upgrade to the [Chainlink Runtime Environment +> (CRE)](/cre) as an alternative. +> +> - [`directrequest`](/chainlink-nodes/oracle-jobs/all-jobs/#direct-request-jobs) +> - [`fluxmonitor`](/chainlink-nodes/oracle-jobs/all-jobs/#flux-monitor-jobs) + Jobs are represented by TOML specifications. ## Example v2 job spec @@ -2655,11 +2129,11 @@ Every job type supported by a node shares the following TOML fields: - `name`: The name of the job in the Operator UI - `type`: Specifies the v2 job type, which can be one of the following: - `cron` - - `directrequest` - - `fluxmonitor` - `keeper` - `offchainreporting` - `webhook` + - `directrequest` (deprecated after node 2.47) + - `fluxmonitor` (deprecated after node 2.47) - `schemaVersion`: Must be present and set to a value of `1`. This field will handle progressive iterations of the job spec format gracefully with backwards-compatibility. - `observationSource`: The v2 pipeline task DAG, which is specified in DOT syntax. See below for information on writing pipeline DAGs. - `maxTaskDuration`: The default maximum duration that any task is allowed to run. If the duration is exceeded, the task is errored. This value can be overridden on a per-task basis using the `timeout` attribute. See the [Shared attributes](/chainlink-nodes/oracle-jobs/tasks#shared-attributes) section for details. diff --git a/src/content/chainlink-nodes/oracle-jobs/all-jobs.mdx b/src/content/chainlink-nodes/oracle-jobs/all-jobs.mdx index 639f3dab21d..a5f9af922c8 100644 --- a/src/content/chainlink-nodes/oracle-jobs/all-jobs.mdx +++ b/src/content/chainlink-nodes/oracle-jobs/all-jobs.mdx @@ -257,6 +257,16 @@ See [shared fields](/chainlink-nodes/oracle-jobs/jobs/#shared-fields). ## Keeper jobs + + Keeper jobs occasionally poll a smart contract method that expresses whether something in the contract is ready for some onchain action to be performed. When it's ready, the job executes that onchain action. Examples: diff --git a/src/content/chainlink-nodes/oracle-jobs/jobs.mdx b/src/content/chainlink-nodes/oracle-jobs/jobs.mdx index 41b89181f97..e372ddfd080 100644 --- a/src/content/chainlink-nodes/oracle-jobs/jobs.mdx +++ b/src/content/chainlink-nodes/oracle-jobs/jobs.mdx @@ -18,12 +18,23 @@ import { Aside } from "@components" Chainlink nodes require jobs to do anything useful. For example, posting asset price data onchain requires jobs. Chainlink nodes support the following job types: - [`cron`](/chainlink-nodes/oracle-jobs/all-jobs/#solidity-cron-jobs) -- [`directrequest`](/chainlink-nodes/oracle-jobs/all-jobs/#direct-request-jobs) -- [`fluxmonitor`](/chainlink-nodes/oracle-jobs/all-jobs/#flux-monitor-jobs) - [`keeper`](/chainlink-nodes/oracle-jobs/all-jobs/#keeper-jobs) - [`offchainreporting`](/chainlink-nodes/oracle-jobs/all-jobs/#offchain-reporting-jobs) - [`webhook`](/chainlink-nodes/oracle-jobs/all-jobs/#webhook-jobs) + + Jobs are represented by TOML specifications. ## Example v2 job spec @@ -51,11 +62,11 @@ Every job type supported by a node shares the following TOML fields: - `name`: The name of the job in the Operator UI - `type`: Specifies the v2 job type, which can be one of the following: - `cron` - - `directrequest` - - `fluxmonitor` - `keeper` - `offchainreporting` - `webhook` + - `directrequest` (deprecated after node 2.47) + - `fluxmonitor` (deprecated after node 2.47) - `schemaVersion`: Must be present and set to a value of `1`. This field will handle progressive iterations of the job spec format gracefully with backwards-compatibility. - `observationSource`: The v2 pipeline task DAG, which is specified in DOT syntax. See below for information on writing pipeline DAGs. - `maxTaskDuration`: The default maximum duration that any task is allowed to run. If the duration is exceeded, the task is errored. This value can be overridden on a per-task basis using the `timeout` attribute. See the [Shared attributes](/chainlink-nodes/oracle-jobs/tasks#shared-attributes) section for details. diff --git a/src/lib/markdown/__tests__/buildMarkdownArtifact.test.ts b/src/lib/markdown/__tests__/buildMarkdownArtifact.test.ts index 6f45d7ad883..a44e44d4fd6 100644 --- a/src/lib/markdown/__tests__/buildMarkdownArtifact.test.ts +++ b/src/lib/markdown/__tests__/buildMarkdownArtifact.test.ts @@ -25,6 +25,11 @@ describe("buildMarkdownArtifact", () => { await expect(buildMarkdownArtifact("chainlink-automation/overview/supported-networks")).resolves.toBeNull() await expect(buildMarkdownArtifact("quickstarts/time-based-upkeep")).resolves.toBeNull() await expect(buildMarkdownArtifact("quickstarts/functions-demo-app")).resolves.toBeNull() + await expect(buildMarkdownArtifact("any-api/introduction")).resolves.toBeNull() + await expect(buildMarkdownArtifact("chainlink-nodes/job-specs/multi-word-job")).resolves.toBeNull() + await expect( + buildMarkdownArtifact("chainlink-nodes/external-initiators/external-initiators-introduction") + ).resolves.toBeNull() }) it("rejects path escapes", async () => { diff --git a/src/pages/chainlink-nodes.astro b/src/pages/chainlink-nodes.astro index 60013bd3b04..56d5100b965 100644 --- a/src/pages/chainlink-nodes.astro +++ b/src/pages/chainlink-nodes.astro @@ -34,54 +34,6 @@ import styles from "@features/landing/styles/EthereumLandingPage.module.css" /> -
-
- -

Fulfill Your First Job Request

-

Deploy an Oracle contract and make job requests to your node.

- - {"Learn More"} - Right arrow - -
-
-
- -

Add External Adapters to Your Node

-

Bring high-quality data and premium web APIs to contract developers.

- - {"Learn More"} - Right arrow - -
diff --git a/src/scripts/generate-llms.ts b/src/scripts/generate-llms.ts index 4deb98abe0c..7d817b818ba 100644 --- a/src/scripts/generate-llms.ts +++ b/src/scripts/generate-llms.ts @@ -5,6 +5,7 @@ import path from "path" import { fileURLToPath } from "node:url" import { LLM_SECTIONS_CONFIG, SUPPORTED_LLM_SECTIONS, type LlmsSectionConfig } from "../config/llms.js" import { SIDEBAR } from "../config/sidebar.js" +import { isSunsetContentFile } from "../config/sunset.js" import type { SectionEntry, SectionContent } from "../config/sidebar.js" import { transformPageBodyToMarkdown } from "../lib/markdown/buildMarkdownArtifact.js" import { unescapeMarkdown } from "../lib/markdown/formatters.js" @@ -174,6 +175,7 @@ async function main() { for (const absFile of orderedPages) { if (!absFile.endsWith(".mdx") && !absFile.endsWith(".md")) continue + if (isSunsetContentFile(absFile)) continue const raw = await fs.readFile(absFile, "utf-8") const { sdkLang } = extractFrontmatter(raw) @@ -222,6 +224,7 @@ async function main() { for (const absFile of orderedPages) { if (!absFile.endsWith(".mdx") && !absFile.endsWith(".md")) continue + if (isSunsetContentFile(absFile)) continue const raw = await fs.readFile(absFile, "utf-8") const rendered = await renderLlmsPageMarkdown(raw, absFile, section) if (rendered.transformMode !== "normal") {