From d32c9bc683f4d304a2fc6723d494019ed4e75bd0 Mon Sep 17 00:00:00 2001 From: devin distefano Date: Thu, 5 Mar 2026 15:30:21 -0600 Subject: [PATCH] docs(cre): fill SDK reference gaps, fix inaccuracies, backfill release notes and changelog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SDK reference additions (type conversions, EVM helpers, UnwrapOptions, Secrets API): - Add type-conversions-ts.mdx (Type vs TypeJson, ProtoBigInt, bytes helpers) - Add 5 missing EVM helper functions to evm-client-ts.mdx - Add UnwrapOptions subsection and runtime.getSecret() to core-ts.mdx - Add runtime.GetSecret() to core-go.mdx - Add sidebar entry and cross-links from overview-ts and confidential-http-client-ts Accuracy fixes: - Remove base64ToHex() — function does not exist in @chainlink/cre-sdk - Fix hexToBytes() signature: hex: Hex → hex: string - Fix UnwrapOptions type definition to match actual SDK (conditional, mutually exclusive schema/factory) - Remove incorrect SecretsProvider parameter from TS initWorkflow example - Mark namespace field as optional (not required) in SecretRequest tables for both SDKs Release notes and changelog backfill: - Add Go SDK v1.3.0–v1.5.0 release notes - Add TS SDK v1.1.0 release notes - Add corresponding entries to changelog.json - Regenerate llms-full-go.txt and llms-full-ts.txt Made-with: Cursor --- public/changelog.json | 284 +++++++------ src/config/sidebar.ts | 4 + src/content/cre/llms-full-go.txt | 108 ++++- src/content/cre/llms-full-ts.txt | 384 +++++++++++++++++- .../sdk/confidential-http-client-ts.mdx | 2 +- src/content/cre/reference/sdk/core-go.mdx | 67 +++ src/content/cre/reference/sdk/core-ts.mdx | 107 ++++- .../cre/reference/sdk/evm-client-ts.mdx | 96 +++++ src/content/cre/reference/sdk/overview-ts.mdx | 1 + .../cre/reference/sdk/type-conversions-ts.mdx | 142 +++++++ src/content/cre/release-notes.mdx | 41 +- 11 files changed, 1098 insertions(+), 138 deletions(-) create mode 100644 src/content/cre/reference/sdk/type-conversions-ts.mdx diff --git a/public/changelog.json b/public/changelog.json index a93b1881c9c..e7d1b7f948d 100644 --- a/public/changelog.json +++ b/public/changelog.json @@ -73,7 +73,7 @@ "iconUrl": "https://docs.chain.link/assets/chains/botanix.svg" }, "bsquared": { - "displayName": "B²", + "displayName": "B\u00b2", "iconUrl": "https://docs.chain.link/assets/chains/bsquared.svg" }, "canton": { @@ -390,6 +390,13 @@ } }, "data": [ + { + "category": "release", + "date": "2026-03-05", + "description": "Go SDK version 1.5.0 adds Pharos Atlantic network support.\n\n[See all changes on GitHub](https://github.com/smartcontractkit/cre-sdk-go/compare/v1.4.0...v1.5.0)", + "title": "CRE Go SDK v1.5.0 \u2014 Pharos Atlantic Support", + "topic": "CRE" + }, { "category": "integration", "date": "2026-03-03", @@ -398,6 +405,13 @@ "title": "Data Feeds Expands to Unichain Mainnet", "topic": "Data Feeds" }, + { + "category": "release", + "date": "2026-03-02", + "description": "Go SDK version 1.4.0 adds Solana LogTrigger SDK generation and Solana workflow bindings, and expands network support to Jovay Testnet, Pharos Testnet, and XLayer. Note: previously generated Solana SDK types have been removed and replaced by the new Solana bindings.\n\n[See all changes on GitHub](https://github.com/smartcontractkit/cre-sdk-go/compare/v1.3.0...v1.4.0)", + "title": "CRE Go SDK v1.4.0 \u2014 Solana Bindings and New Networks", + "topic": "CRE" + }, { "category": "release", "date": "2026-03-02", @@ -872,7 +886,7 @@ "category": "release", "date": "2026-02-26", "description": "CRE CLI version 1.2.0 is now available. This release adds dynamic template fetching, new `cre templates` commands for managing template sources, and a new `cre account access` command for checking and requesting deployment access.\n\nUpdate your CLI by running `cre update` when prompted, or follow the [CLI Installation guide](https://docs.chain.link/cre/getting-started/cli-installation) for fresh installations.\n\n[See all changes on GitHub](https://github.com/smartcontractkit/cre-cli/compare/v1.1.0...v1.2.0)", - "title": "CRE CLI v1.2.0 — Dynamic Templates and Deploy Access Management", + "title": "CRE CLI v1.2.0 \u2014 Dynamic Templates and Deploy Access Management", "topic": "CRE" }, { @@ -939,6 +953,13 @@ "title": "Data Streams Expands to New Blockchains", "topic": "Data Streams" }, + { + "category": "release", + "date": "2026-02-18", + "description": "TypeScript SDK version 1.1.0 includes improved error messages across the runtime and utilities, converts the Confidential HTTP capability to run in DON mode, and adds a descriptive error when `cre-setup` has not been run.\n\n[See all changes on GitHub](https://github.com/smartcontractkit/cre-sdk-typescript/compare/v1.0.9...v1.1.0)", + "title": "CRE TS SDK v1.1.0 \u2014 Error Improvements and Confidential HTTP DON Mode", + "topic": "CRE" + }, { "category": "deprecation", "date": "2026-02-18", @@ -985,7 +1006,7 @@ "category": "release", "date": "2026-02-19", "description": "CRE CLI version 1.1.0 is now available. This release adds support for custom WASM builds and an improved CLI interface.\n\n**Required versions:** CLI v1.1.0+, Go SDK v1.2.0+, TS SDK v1.0.9+\n\nUpdate your CLI by running `cre update` when prompted, or follow the [CLI Installation guide](https://docs.chain.link/cre/getting-started/cli-installation) for fresh installations.\n\n[See all changes on GitHub](https://github.com/smartcontractkit/cre-cli/compare/v1.0.11...v1.1.0)", - "title": "CRE CLI v1.1.0 — Custom WASM Builds and Improved CLI Interface", + "title": "CRE CLI v1.1.0 \u2014 Custom WASM Builds and Improved CLI Interface", "topic": "CRE" }, { @@ -1081,7 +1102,14 @@ "category": "release", "date": "2026-02-13", "description": "CRE CLI version 1.0.11 is now available. This release adds World Chain Mainnet support for workflow simulation and production deployment.\n\n**Required versions:** CLI v1.0.11+, Go SDK v1.2.0+, TS SDK v1.0.9+\n\nUpdate your CLI by running `cre update` when prompted, or follow the [CLI Installation guide](https://docs.chain.link/cre/getting-started/cli-installation) for fresh installations.\n\n[See all changes on GitHub](https://github.com/smartcontractkit/cre-cli/compare/v1.0.10...v1.0.11)", - "title": "CRE CLI v1.0.11 — World Chain Mainnet Support", + "title": "CRE CLI v1.0.11 \u2014 World Chain Mainnet Support", + "topic": "CRE" + }, + { + "category": "release", + "date": "2026-02-12", + "description": "Go SDK version 1.3.0 updates the Confidential HTTP capability types. The `encrypt_output` field has moved from `ConfidentialHTTPRequest` to `HTTPRequest`. Update workflows that set this field accordingly.\n\n[See all changes on GitHub](https://github.com/smartcontractkit/cre-sdk-go/compare/v1.2.0...v1.3.0)", + "title": "CRE Go SDK v1.3.0 \u2014 Confidential HTTP Type Update", "topic": "CRE" }, { @@ -1114,7 +1142,7 @@ { "category": "release", "date": "2026-02-09", - "description": "CRE CLI version 1.0.10 is now available. This release fixes secret injection for the Confidential HTTP capability in the simulator — template placeholders now resolve correctly during simulation.\n\nUpdate your CLI by running `cre update` when prompted, or follow the [CLI Installation guide](https://docs.chain.link/cre/getting-started/cli-installation) for fresh installations.\n\n[See all changes on GitHub](https://github.com/smartcontractkit/cre-cli/compare/v1.0.9...v1.0.10)", + "description": "CRE CLI version 1.0.10 is now available. This release fixes secret injection for the Confidential HTTP capability in the simulator \u2014 template placeholders now resolve correctly during simulation.\n\nUpdate your CLI by running `cre update` when prompted, or follow the [CLI Installation guide](https://docs.chain.link/cre/getting-started/cli-installation) for fresh installations.\n\n[See all changes on GitHub](https://github.com/smartcontractkit/cre-cli/compare/v1.0.9...v1.0.10)", "title": "CRE CLI v1.0.10", "topic": "CRE" }, @@ -5408,16 +5436,16 @@ "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/tokens/gho.webp" }, { - "assetName": "PCE Price Index — Level", - "baseAsset": "PCE Price Index — Level", + "assetName": "PCE Price Index \u2014 Level", + "baseAsset": "PCE Price Index \u2014 Level", "quoteAsset": "", "network": "bnb-chain", "url": "https://data.chain.link/feeds/bsc/mainnet/pce-price-index-level", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "PCE Price Index — Percent Change (Annual Rate)", - "baseAsset": "PCE Price Index — Percent Change (Annual Rate)", + "assetName": "PCE Price Index \u2014 Percent Change (Annual Rate)", + "baseAsset": "PCE Price Index \u2014 Percent Change (Annual Rate)", "quoteAsset": "", "network": "bnb-chain", "url": "https://data.chain.link/feeds/bsc/mainnet/pce-price-index-percentage", @@ -5432,16 +5460,16 @@ "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/tokens/xpl.webp" }, { - "assetName": "Real Final Sales to Private Domestic Purchasers — Level", - "baseAsset": "Real Final Sales to Private Domestic Purchasers — Level", + "assetName": "Real Final Sales to Private Domestic Purchasers \u2014 Level", + "baseAsset": "Real Final Sales to Private Domestic Purchasers \u2014 Level", "quoteAsset": "", "network": "bnb-chain", "url": "https://data.chain.link/feeds/bsc/mainnet/real-final-sales-to-private-domestic-purchasers-level", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "Real Final Sales to Private Domestic Purchasers — Percent Change (Annual Rate)", - "baseAsset": "Real Final Sales to Private Domestic Purchasers — Percent Change (Annual Rate)", + "assetName": "Real Final Sales to Private Domestic Purchasers \u2014 Percent Change (Annual Rate)", + "baseAsset": "Real Final Sales to Private Domestic Purchasers \u2014 Percent Change (Annual Rate)", "quoteAsset": "", "network": "bnb-chain", "url": "https://data.chain.link/feeds/bsc/mainnet/real-final-sales-to-private-domestic-purchasers-percentage", @@ -5456,8 +5484,8 @@ "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "Real GDP — Percent Change (Annual Rate)", - "baseAsset": "Real GDP — Percent Change (Annual Rate)", + "assetName": "Real GDP \u2014 Percent Change (Annual Rate)", + "baseAsset": "Real GDP \u2014 Percent Change (Annual Rate)", "quoteAsset": "", "network": "bnb-chain", "url": "https://data.chain.link/feeds/bsc/mainnet/real-gdp-percentage", @@ -6659,320 +6687,320 @@ ], "relatedTokens": [ { - "assetName": "PCE Price Index — Level", - "baseAsset": "PCE Price Index — Level", + "assetName": "PCE Price Index \u2014 Level", + "baseAsset": "PCE Price Index \u2014 Level", "quoteAsset": "", "network": "ethereum", "url": "https://data.chain.link/feeds/ethereum/mainnet/pce-price-index-level", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "PCE Price Index — Level", - "baseAsset": "PCE Price Index — Level", + "assetName": "PCE Price Index \u2014 Level", + "baseAsset": "PCE Price Index \u2014 Level", "quoteAsset": "", "network": "avalanche", "url": "https://data.chain.link/feeds/avalanche/mainnet/pce-price-index-level", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "PCE Price Index — Level", - "baseAsset": "PCE Price Index — Level", + "assetName": "PCE Price Index \u2014 Level", + "baseAsset": "PCE Price Index \u2014 Level", "quoteAsset": "", "network": "arbitrum", "url": "https://data.chain.link/feeds/arbitrum/mainnet/pce-price-index-level", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "PCE Price Index — Level", - "baseAsset": "PCE Price Index — Level", + "assetName": "PCE Price Index \u2014 Level", + "baseAsset": "PCE Price Index \u2014 Level", "quoteAsset": "", "network": "optimism", "url": "https://data.chain.link/feeds/optimism/mainnet/pce-price-index-level", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "PCE Price Index — Level", - "baseAsset": "PCE Price Index — Level", + "assetName": "PCE Price Index \u2014 Level", + "baseAsset": "PCE Price Index \u2014 Level", "quoteAsset": "", "network": "base", "url": "https://data.chain.link/feeds/base/base/pce-price-index-level", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "PCE Price Index — Level", - "baseAsset": "PCE Price Index — Level", + "assetName": "PCE Price Index \u2014 Level", + "baseAsset": "PCE Price Index \u2014 Level", "quoteAsset": "", "network": "linea", "url": "https://data.chain.link/feeds/linea/mainnet/pce-price-index-level", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "PCE Price Index — Level", - "baseAsset": "PCE Price Index — Level", + "assetName": "PCE Price Index \u2014 Level", + "baseAsset": "PCE Price Index \u2014 Level", "quoteAsset": "", "network": "zksync", "url": "https://data.chain.link/feeds/zksync/zksync/pce-price-index-level", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "PCE Price Index — Level", - "baseAsset": "PCE Price Index — Level", + "assetName": "PCE Price Index \u2014 Level", + "baseAsset": "PCE Price Index \u2014 Level", "quoteAsset": "", "network": "sonic", "url": "https://data.chain.link/feeds/sonic/sonic/pce-price-index-level", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "PCE Price Index — Level", - "baseAsset": "PCE Price Index — Level", + "assetName": "PCE Price Index \u2014 Level", + "baseAsset": "PCE Price Index \u2014 Level", "quoteAsset": "", "network": "mantle", "url": "https://data.chain.link/feeds/mantle/mantle/pce-price-index-level", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "PCE Price Index — Level", - "baseAsset": "PCE Price Index — Level", + "assetName": "PCE Price Index \u2014 Level", + "baseAsset": "PCE Price Index \u2014 Level", "quoteAsset": "", "network": "botanix", "url": "https://data.chain.link/feeds/botanix/mainnet/pce-price-index-level", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "PCE Price Index — Percent Change (Annual Rate)", - "baseAsset": "PCE Price Index — Percent Change (Annual Rate)", + "assetName": "PCE Price Index \u2014 Percent Change (Annual Rate)", + "baseAsset": "PCE Price Index \u2014 Percent Change (Annual Rate)", "quoteAsset": "", "network": "ethereum", "url": "https://data.chain.link/feeds/ethereum/mainnet/pce-price-index-percentage", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "PCE Price Index — Percent Change (Annual Rate)", - "baseAsset": "PCE Price Index — Percent Change (Annual Rate)", + "assetName": "PCE Price Index \u2014 Percent Change (Annual Rate)", + "baseAsset": "PCE Price Index \u2014 Percent Change (Annual Rate)", "quoteAsset": "", "network": "avalanche", "url": "https://data.chain.link/feeds/avalanche/mainnet/pce-price-index-percentage", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "PCE Price Index — Percent Change (Annual Rate)", - "baseAsset": "PCE Price Index — Percent Change (Annual Rate)", + "assetName": "PCE Price Index \u2014 Percent Change (Annual Rate)", + "baseAsset": "PCE Price Index \u2014 Percent Change (Annual Rate)", "quoteAsset": "", "network": "arbitrum", "url": "https://data.chain.link/feeds/arbitrum/mainnet/pce-price-index-percentage", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "PCE Price Index — Percent Change (Annual Rate)", - "baseAsset": "PCE Price Index — Percent Change (Annual Rate)", + "assetName": "PCE Price Index \u2014 Percent Change (Annual Rate)", + "baseAsset": "PCE Price Index \u2014 Percent Change (Annual Rate)", "quoteAsset": "", "network": "optimism", "url": "https://data.chain.link/feeds/optimism/mainnet/pce-price-index-percentage", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "PCE Price Index — Percent Change (Annual Rate)", - "baseAsset": "PCE Price Index — Percent Change (Annual Rate)", + "assetName": "PCE Price Index \u2014 Percent Change (Annual Rate)", + "baseAsset": "PCE Price Index \u2014 Percent Change (Annual Rate)", "quoteAsset": "", "network": "base", "url": "https://data.chain.link/feeds/base/base/pce-price-index-percentage", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "PCE Price Index — Percent Change (Annual Rate)", - "baseAsset": "PCE Price Index — Percent Change (Annual Rate)", + "assetName": "PCE Price Index \u2014 Percent Change (Annual Rate)", + "baseAsset": "PCE Price Index \u2014 Percent Change (Annual Rate)", "quoteAsset": "", "network": "linea", "url": "https://data.chain.link/feeds/linea/mainnet/pce-price-index-percentage", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "PCE Price Index — Percent Change (Annual Rate)", - "baseAsset": "PCE Price Index — Percent Change (Annual Rate)", + "assetName": "PCE Price Index \u2014 Percent Change (Annual Rate)", + "baseAsset": "PCE Price Index \u2014 Percent Change (Annual Rate)", "quoteAsset": "", "network": "zksync", "url": "https://data.chain.link/feeds/zksync/zksync/pce-price-index-percentage", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "PCE Price Index — Percent Change (Annual Rate)", - "baseAsset": "PCE Price Index — Percent Change (Annual Rate)", + "assetName": "PCE Price Index \u2014 Percent Change (Annual Rate)", + "baseAsset": "PCE Price Index \u2014 Percent Change (Annual Rate)", "quoteAsset": "", "network": "sonic", "url": "https://data.chain.link/feeds/sonic/sonic/pce-price-index-percentage", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "PCE Price Index — Percent Change (Annual Rate)", - "baseAsset": "PCE Price Index — Percent Change (Annual Rate)", + "assetName": "PCE Price Index \u2014 Percent Change (Annual Rate)", + "baseAsset": "PCE Price Index \u2014 Percent Change (Annual Rate)", "quoteAsset": "", "network": "mantle", "url": "https://data.chain.link/feeds/mantle/mantle/pce-price-index-percentage", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "PCE Price Index — Percent Change (Annual Rate)", - "baseAsset": "PCE Price Index — Percent Change (Annual Rate)", + "assetName": "PCE Price Index \u2014 Percent Change (Annual Rate)", + "baseAsset": "PCE Price Index \u2014 Percent Change (Annual Rate)", "quoteAsset": "", "network": "botanix", "url": "https://data.chain.link/feeds/botanix/mainnet/pce-price-index-percentage", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "Real Final Sales to Private Domestic Purchasers — Level", - "baseAsset": "Real Final Sales to Private Domestic Purchasers — Level", + "assetName": "Real Final Sales to Private Domestic Purchasers \u2014 Level", + "baseAsset": "Real Final Sales to Private Domestic Purchasers \u2014 Level", "quoteAsset": "", "network": "ethereum", "url": "https://data.chain.link/feeds/ethereum/mainnet/real-final-sales-to-private-domestic-purchasers-level", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "Real Final Sales to Private Domestic Purchasers — Level", - "baseAsset": "Real Final Sales to Private Domestic Purchasers — Level", + "assetName": "Real Final Sales to Private Domestic Purchasers \u2014 Level", + "baseAsset": "Real Final Sales to Private Domestic Purchasers \u2014 Level", "quoteAsset": "", "network": "avalanche", "url": "https://data.chain.link/feeds/avalanche/mainnet/real-final-sales-to-private-domestic-purchasers-level", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "Real Final Sales to Private Domestic Purchasers — Level", - "baseAsset": "Real Final Sales to Private Domestic Purchasers — Level", + "assetName": "Real Final Sales to Private Domestic Purchasers \u2014 Level", + "baseAsset": "Real Final Sales to Private Domestic Purchasers \u2014 Level", "quoteAsset": "", "network": "arbitrum", "url": "https://data.chain.link/feeds/arbitrum/mainnet/real-final-sales-to-private-domestic-purchasers-level", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "Real Final Sales to Private Domestic Purchasers — Level", - "baseAsset": "Real Final Sales to Private Domestic Purchasers — Level", + "assetName": "Real Final Sales to Private Domestic Purchasers \u2014 Level", + "baseAsset": "Real Final Sales to Private Domestic Purchasers \u2014 Level", "quoteAsset": "", "network": "optimism", "url": "https://data.chain.link/feeds/optimism/mainnet/real-final-sales-to-private-domestic-purchasers-level", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "Real Final Sales to Private Domestic Purchasers — Level", - "baseAsset": "Real Final Sales to Private Domestic Purchasers — Level", + "assetName": "Real Final Sales to Private Domestic Purchasers \u2014 Level", + "baseAsset": "Real Final Sales to Private Domestic Purchasers \u2014 Level", "quoteAsset": "", "network": "base", "url": "https://data.chain.link/feeds/base/base/real-final-sales-to-private-domestic-purchasers-level", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "Real Final Sales to Private Domestic Purchasers — Level", - "baseAsset": "Real Final Sales to Private Domestic Purchasers — Level", + "assetName": "Real Final Sales to Private Domestic Purchasers \u2014 Level", + "baseAsset": "Real Final Sales to Private Domestic Purchasers \u2014 Level", "quoteAsset": "", "network": "linea", "url": "https://data.chain.link/feeds/linea/mainnet/real-final-sales-to-private-domestic-purchasers-level", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "Real Final Sales to Private Domestic Purchasers — Level", - "baseAsset": "Real Final Sales to Private Domestic Purchasers — Level", + "assetName": "Real Final Sales to Private Domestic Purchasers \u2014 Level", + "baseAsset": "Real Final Sales to Private Domestic Purchasers \u2014 Level", "quoteAsset": "", "network": "zksync", "url": "https://data.chain.link/feeds/zksync/zksync/real-final-sales-to-private-domestic-purchasers-level", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "Real Final Sales to Private Domestic Purchasers — Level", - "baseAsset": "Real Final Sales to Private Domestic Purchasers — Level", + "assetName": "Real Final Sales to Private Domestic Purchasers \u2014 Level", + "baseAsset": "Real Final Sales to Private Domestic Purchasers \u2014 Level", "quoteAsset": "", "network": "sonic", "url": "https://data.chain.link/feeds/sonic/sonic/real-final-sales-to-private-domestic-purchasers-level", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "Real Final Sales to Private Domestic Purchasers — Level", - "baseAsset": "Real Final Sales to Private Domestic Purchasers — Level", + "assetName": "Real Final Sales to Private Domestic Purchasers \u2014 Level", + "baseAsset": "Real Final Sales to Private Domestic Purchasers \u2014 Level", "quoteAsset": "", "network": "mantle", "url": "https://data.chain.link/feeds/mantle/mantle/real-final-sales-to-private-domestic-purchasers-level", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "Real Final Sales to Private Domestic Purchasers — Level", - "baseAsset": "Real Final Sales to Private Domestic Purchasers — Level", + "assetName": "Real Final Sales to Private Domestic Purchasers \u2014 Level", + "baseAsset": "Real Final Sales to Private Domestic Purchasers \u2014 Level", "quoteAsset": "", "network": "botanix", "url": "https://data.chain.link/feeds/botanix/mainnet/real-final-sales-to-private-domestic-purchasers-level", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "Real Final Sales to Private Domestic Purchasers — Percent Change (Annual Rate)", - "baseAsset": "Real Final Sales to Private Domestic Purchasers — Percent Change (Annual Rate)", + "assetName": "Real Final Sales to Private Domestic Purchasers \u2014 Percent Change (Annual Rate)", + "baseAsset": "Real Final Sales to Private Domestic Purchasers \u2014 Percent Change (Annual Rate)", "quoteAsset": "", "network": "ethereum", "url": "https://data.chain.link/feeds/ethereum/mainnet/real-final-sales-to-private-domestic-purchasers-percentage", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "Real Final Sales to Private Domestic Purchasers — Percent Change (Annual Rate)", - "baseAsset": "Real Final Sales to Private Domestic Purchasers — Percent Change (Annual Rate)", + "assetName": "Real Final Sales to Private Domestic Purchasers \u2014 Percent Change (Annual Rate)", + "baseAsset": "Real Final Sales to Private Domestic Purchasers \u2014 Percent Change (Annual Rate)", "quoteAsset": "", "network": "avalanche", "url": "https://data.chain.link/feeds/avalanche/mainnet/real-final-sales-to-private-domestic-purchasers-percentage", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "Real Final Sales to Private Domestic Purchasers — Percent Change (Annual Rate)", - "baseAsset": "Real Final Sales to Private Domestic Purchasers — Percent Change (Annual Rate)", + "assetName": "Real Final Sales to Private Domestic Purchasers \u2014 Percent Change (Annual Rate)", + "baseAsset": "Real Final Sales to Private Domestic Purchasers \u2014 Percent Change (Annual Rate)", "quoteAsset": "", "network": "arbitrum", "url": "https://data.chain.link/feeds/arbitrum/mainnet/real-final-sales-to-private-domestic-purchasers-percentage", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "Real Final Sales to Private Domestic Purchasers — Percent Change (Annual Rate)", - "baseAsset": "Real Final Sales to Private Domestic Purchasers — Percent Change (Annual Rate)", + "assetName": "Real Final Sales to Private Domestic Purchasers \u2014 Percent Change (Annual Rate)", + "baseAsset": "Real Final Sales to Private Domestic Purchasers \u2014 Percent Change (Annual Rate)", "quoteAsset": "", "network": "optimism", "url": "https://data.chain.link/feeds/optimism/mainnet/real-final-sales-to-private-domestic-purchasers-percentage", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "Real Final Sales to Private Domestic Purchasers — Percent Change (Annual Rate)", - "baseAsset": "Real Final Sales to Private Domestic Purchasers — Percent Change (Annual Rate)", + "assetName": "Real Final Sales to Private Domestic Purchasers \u2014 Percent Change (Annual Rate)", + "baseAsset": "Real Final Sales to Private Domestic Purchasers \u2014 Percent Change (Annual Rate)", "quoteAsset": "", "network": "base", "url": "https://data.chain.link/feeds/base/base/real-final-sales-to-private-domestic-purchasers-percentage", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "Real Final Sales to Private Domestic Purchasers — Percent Change (Annual Rate)", - "baseAsset": "Real Final Sales to Private Domestic Purchasers — Percent Change (Annual Rate)", + "assetName": "Real Final Sales to Private Domestic Purchasers \u2014 Percent Change (Annual Rate)", + "baseAsset": "Real Final Sales to Private Domestic Purchasers \u2014 Percent Change (Annual Rate)", "quoteAsset": "", "network": "linea", "url": "https://data.chain.link/feeds/linea/mainnet/real-final-sales-to-private-domestic-purchasers-percentage", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "Real Final Sales to Private Domestic Purchasers — Percent Change (Annual Rate)", - "baseAsset": "Real Final Sales to Private Domestic Purchasers — Percent Change (Annual Rate)", + "assetName": "Real Final Sales to Private Domestic Purchasers \u2014 Percent Change (Annual Rate)", + "baseAsset": "Real Final Sales to Private Domestic Purchasers \u2014 Percent Change (Annual Rate)", "quoteAsset": "", "network": "zksync", "url": "https://data.chain.link/feeds/zksync/zksync/real-final-sales-to-private-domestic-purchasers-percentage", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "Real Final Sales to Private Domestic Purchasers — Percent Change (Annual Rate)", - "baseAsset": "Real Final Sales to Private Domestic Purchasers — Percent Change (Annual Rate)", + "assetName": "Real Final Sales to Private Domestic Purchasers \u2014 Percent Change (Annual Rate)", + "baseAsset": "Real Final Sales to Private Domestic Purchasers \u2014 Percent Change (Annual Rate)", "quoteAsset": "", "network": "sonic", "url": "https://data.chain.link/feeds/sonic/sonic/real-final-sales-to-private-domestic-purchasers-percentage", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "Real Final Sales to Private Domestic Purchasers — Percent Change (Annual Rate)", - "baseAsset": "Real Final Sales to Private Domestic Purchasers — Percent Change (Annual Rate)", + "assetName": "Real Final Sales to Private Domestic Purchasers \u2014 Percent Change (Annual Rate)", + "baseAsset": "Real Final Sales to Private Domestic Purchasers \u2014 Percent Change (Annual Rate)", "quoteAsset": "", "network": "mantle", "url": "https://data.chain.link/feeds/mantle/mantle/real-final-sales-to-private-domestic-purchasers-percentage", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "Real Final Sales to Private Domestic Purchasers — Percent Change (Annual Rate)", - "baseAsset": "Real Final Sales to Private Domestic Purchasers — Percent Change (Annual Rate)", + "assetName": "Real Final Sales to Private Domestic Purchasers \u2014 Percent Change (Annual Rate)", + "baseAsset": "Real Final Sales to Private Domestic Purchasers \u2014 Percent Change (Annual Rate)", "quoteAsset": "", "network": "botanix", "url": "https://data.chain.link/feeds/botanix/mainnet/real-final-sales-to-private-domestic-purchasers-percentage", @@ -7019,120 +7047,120 @@ "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "Real GDP — Level", - "baseAsset": "Real GDP — Level", + "assetName": "Real GDP \u2014 Level", + "baseAsset": "Real GDP \u2014 Level", "quoteAsset": "", "network": "arbitrum", "url": "https://data.chain.link/feeds/arbitrum/mainnet/real-gdp-level", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "Real GDP — Level", - "baseAsset": "Real GDP — Level", + "assetName": "Real GDP \u2014 Level", + "baseAsset": "Real GDP \u2014 Level", "quoteAsset": "", "network": "optimism", "url": "https://data.chain.link/feeds/optimism/mainnet/real-gdp-level", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "Real GDP — Level", - "baseAsset": "Real GDP — Level", + "assetName": "Real GDP \u2014 Level", + "baseAsset": "Real GDP \u2014 Level", "quoteAsset": "", "network": "base", "url": "https://data.chain.link/feeds/base/base/real-gdp-level", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "Real GDP — Level", - "baseAsset": "Real GDP — Level", + "assetName": "Real GDP \u2014 Level", + "baseAsset": "Real GDP \u2014 Level", "quoteAsset": "", "network": "linea", "url": "https://data.chain.link/feeds/linea/mainnet/real-gdp-level", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "Real GDP — Level", - "baseAsset": "Real GDP — Level", + "assetName": "Real GDP \u2014 Level", + "baseAsset": "Real GDP \u2014 Level", "quoteAsset": "", "network": "zksync", "url": "https://data.chain.link/feeds/zksync/zksync/real-gdp-level", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "Real GDP — Percent Change (Annual Rate)", - "baseAsset": "Real GDP — Percent Change (Annual Rate)", + "assetName": "Real GDP \u2014 Percent Change (Annual Rate)", + "baseAsset": "Real GDP \u2014 Percent Change (Annual Rate)", "quoteAsset": "", "network": "ethereum", "url": "https://data.chain.link/feeds/ethereum/mainnet/real-gdp-percentage", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "Real GDP — Percent Change (Annual Rate)", - "baseAsset": "Real GDP — Percent Change (Annual Rate)", + "assetName": "Real GDP \u2014 Percent Change (Annual Rate)", + "baseAsset": "Real GDP \u2014 Percent Change (Annual Rate)", "quoteAsset": "", "network": "avalanche", "url": "https://data.chain.link/feeds/avalanche/mainnet/real-gdp-percentage", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "Real GDP — Percent Change (Annual Rate)", - "baseAsset": "Real GDP — Percent Change (Annual Rate)", + "assetName": "Real GDP \u2014 Percent Change (Annual Rate)", + "baseAsset": "Real GDP \u2014 Percent Change (Annual Rate)", "quoteAsset": "", "network": "arbitrum", "url": "https://data.chain.link/feeds/arbitrum/mainnet/real-gdp-percentage", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "Real GDP — Percent Change (Annual Rate)", - "baseAsset": "Real GDP — Percent Change (Annual Rate)", + "assetName": "Real GDP \u2014 Percent Change (Annual Rate)", + "baseAsset": "Real GDP \u2014 Percent Change (Annual Rate)", "quoteAsset": "", "network": "optimism", "url": "https://data.chain.link/feeds/optimism/mainnet/real-gdp-percentage", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "Real GDP — Percent Change (Annual Rate)", - "baseAsset": "Real GDP — Percent Change (Annual Rate)", + "assetName": "Real GDP \u2014 Percent Change (Annual Rate)", + "baseAsset": "Real GDP \u2014 Percent Change (Annual Rate)", "quoteAsset": "", "network": "base", "url": "https://data.chain.link/feeds/base/base/real-gdp-percentage", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "Real GDP — Percent Change (Annual Rate)", - "baseAsset": "Real GDP — Percent Change (Annual Rate)", + "assetName": "Real GDP \u2014 Percent Change (Annual Rate)", + "baseAsset": "Real GDP \u2014 Percent Change (Annual Rate)", "quoteAsset": "", "network": "linea", "url": "https://data.chain.link/feeds/linea/mainnet/real-gdp-percentage", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "Real GDP — Percent Change (Annual Rate)", - "baseAsset": "Real GDP — Percent Change (Annual Rate)", + "assetName": "Real GDP \u2014 Percent Change (Annual Rate)", + "baseAsset": "Real GDP \u2014 Percent Change (Annual Rate)", "quoteAsset": "", "network": "zksync", "url": "https://data.chain.link/feeds/zksync/zksync/real-gdp-percentage", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "Real GDP — Percent Change (Annual Rate)", - "baseAsset": "Real GDP — Percent Change (Annual Rate)", + "assetName": "Real GDP \u2014 Percent Change (Annual Rate)", + "baseAsset": "Real GDP \u2014 Percent Change (Annual Rate)", "quoteAsset": "", "network": "sonic", "url": "https://data.chain.link/feeds/sonic/sonic/real-gdp-percentage", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "Real GDP — Percent Change (Annual Rate)", - "baseAsset": "Real GDP — Percent Change (Annual Rate)", + "assetName": "Real GDP \u2014 Percent Change (Annual Rate)", + "baseAsset": "Real GDP \u2014 Percent Change (Annual Rate)", "quoteAsset": "", "network": "mantle", "url": "https://data.chain.link/feeds/mantle/mantle/real-gdp-percentage", "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/icons/US.svg" }, { - "assetName": "Real GDP — Percent Change (Annual Rate)", - "baseAsset": "Real GDP — Percent Change (Annual Rate)", + "assetName": "Real GDP \u2014 Percent Change (Annual Rate)", + "baseAsset": "Real GDP \u2014 Percent Change (Annual Rate)", "quoteAsset": "", "network": "botanix", "url": "https://data.chain.link/feeds/botanix/mainnet/real-gdp-percentage", @@ -8006,7 +8034,7 @@ "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/tokens/mrk.webp" }, { - "assetName": "Merlin’s Seal BTC", + "assetName": "Merlin\u2019s Seal BTC", "baseAsset": "MBTC", "quoteAsset": "USD", "url": "https://data.chain.link/streams/mbtc-usd", @@ -9291,7 +9319,7 @@ "date": "2025-06-17", "title": "Chainlink Universal Search + AI", "topic": "General", - "description": "We’ve launched Chainlink Universal Search — an AI-powered experience that helps developers instantly find what they need across all Chainlink web properties.\n\n**What You Can Search:**\n- Data Feeds & Streams\n- CCIP Networks, Lanes & Tokens\n- LINK Token Contracts\n- Faucets\n- Resources:\n - Technical Documentation\n - Quickstarts\n - Tutorials\n - Tech Talks\n - Blogs\n - Videos\n - Case Studies\n- Changelog\n\n**Features:**\n- **Ask or Search:** Use natural language or keyword input\n- **Smart Previews:** Hover to copy key values or open block explorers\n- **Direct Links:** Jump to faucets, changelogs, and integration guides instantly\n\n**Access It Anywhere:**\n- Available across *.chain.link\n- Launch with `Cmd+K` or tap the **Ask AI** button\n\nUniversal Search puts all Chainlink resources at your fingertips—fast, focused, and built for devs." + "description": "We\u2019ve launched Chainlink Universal Search \u2014 an AI-powered experience that helps developers instantly find what they need across all Chainlink web properties.\n\n**What You Can Search:**\n- Data Feeds & Streams\n- CCIP Networks, Lanes & Tokens\n- LINK Token Contracts\n- Faucets\n- Resources:\n - Technical Documentation\n - Quickstarts\n - Tutorials\n - Tech Talks\n - Blogs\n - Videos\n - Case Studies\n- Changelog\n\n**Features:**\n- **Ask or Search:** Use natural language or keyword input\n- **Smart Previews:** Hover to copy key values or open block explorers\n- **Direct Links:** Jump to faucets, changelogs, and integration guides instantly\n\n**Access It Anywhere:**\n- Available across *.chain.link\n- Launch with `Cmd+K` or tap the **Ask AI** button\n\nUniversal Search puts all Chainlink resources at your fingertips\u2014fast, focused, and built for devs." }, { "category": "integration", @@ -10230,7 +10258,7 @@ "iconUrl": "https://d2f70xi62kby8n.cloudfront.net/tokens/frxusd.webp" }, { - "assetName": "Function ƒBTC", + "assetName": "Function \u0192BTC", "baseAsset": "FBTC", "quoteAsset": "USD", "network": "mantle", diff --git a/src/config/sidebar.ts b/src/config/sidebar.ts index eb7fff3d831..fe5c3804ff4 100644 --- a/src/config/sidebar.ts +++ b/src/config/sidebar.ts @@ -574,6 +574,10 @@ export const SIDEBAR: Partial> = { url: "cre/reference/sdk/consensus", highlightAsCurrent: ["cre/reference/sdk/consensus-ts", "cre/reference/sdk/consensus-go"], }, + { + title: "Type Conversions", + url: "cre/reference/sdk/type-conversions-ts", + }, ], }, ], diff --git a/src/content/cre/llms-full-go.txt b/src/content/cre/llms-full-go.txt index aed7c3adebe..51ac49b58aa 100644 --- a/src/content/cre/llms-full-go.txt +++ b/src/content/cre/llms-full-go.txt @@ -442,16 +442,35 @@ To help us assist you faster, please include: # Release Notes Source: https://docs.chain.link/cre/release-notes -Last Updated: 2026-02-26 +Last Updated: 2026-03-05 This page provides detailed release notes for CRE. It includes information on new features, significant changes, and known limitations. +## Go SDK v1.5.0 - March 5, 2026 + +**Go SDK version 1.5.0** adds support for the Pharos Atlantic network. + +- **New Network**: Added Pharos Atlantic support + +[See all changes on GitHub](https://github.com/smartcontractkit/cre-sdk-go/compare/v1.4.0...v1.5.0) + +## Go SDK v1.4.0 - March 2, 2026 + +**Go SDK version 1.4.0** expands network support and adds Solana workflow bindings. + +- **New Networks**: Added Jovay Testnet, Pharos Testnet, and XLayer support +- **Solana Support**: Added Solana LogTrigger SDK generation and Solana workflow bindings +- **Breaking change**: Removed Solana SDK types that were previously generated (now replaced by the new Solana bindings approach) + +[See all changes on GitHub](https://github.com/smartcontractkit/cre-sdk-go/compare/v1.3.0...v1.4.0) + ## CLI v1.2.0 - February 26, 2026 **CRE CLI version 1.2.0 is now available.** - **Dynamic template fetching**: Templates are now fetched at runtime from GitHub, so `cre init` always offers the latest available templates without requiring a CLI update. Two new `cre templates` commands let you manage template sources — run `cre templates list` to browse available templates, or `cre templates add` to include custom or third-party repositories. See [Template Sources](/cre/reference/cli/templates) for details. - **Deploy access management**: New `cre account access` command lets you check your organization's deployment access status and submit an Early Access request directly from the CLI. See [Requesting Deploy Access](/cre/account/deploy-access) for details. +- **Unit tests for TypeScript templates**: TypeScript workflow templates now include a unit test setup out of the box - **Bug Fix**: Fixed an issue where secrets were not correctly injected during workflow simulation in certain configurations. **How to update:** @@ -465,7 +484,7 @@ This page provides detailed release notes for CRE. It includes information on ne CRE now supports the [Confidential HTTP](/cre/capabilities/confidential-http) capability for production workflows, allowing you to make privacy-preserving API calls with enclave execution. See the [Making Confidential Requests](/cre/guides/workflow/using-confidential-http-client/making-requests-ts) guide to learn more. -## CLI v1.1.0 - February 19th, 2026 +## CLI v1.1.0 - February 18, 2026 **CRE CLI version 1.1.0 is now available.** @@ -479,6 +498,24 @@ CRE now supports the [Confidential HTTP](/cre/capabilities/confidential-http) ca [See all changes on GitHub](https://github.com/smartcontractkit/cre-cli/compare/v1.0.11...v1.1.0) +## TS SDK v1.1.0 - February 18, 2026 + +**TypeScript SDK version 1.1.0** includes improvements to error handling, Confidential HTTP behavior, and developer experience: + +- **Improved error messages**: Error messages across the runtime, codegen, and utilities are now more descriptive and actionable +- **Confidential HTTP runs in DON mode**: The Confidential HTTP capability now executes in DON mode (instead of node mode), aligning with how other DON-level capabilities work +- **Clearer setup errors**: The SDK now provides a descriptive error when `cre-setup` has not been run before attempting to compile a workflow + +[See all changes on GitHub](https://github.com/smartcontractkit/cre-sdk-typescript/compare/v1.0.9...v1.1.0) + +## Go SDK v1.3.0 - February 12, 2026 + +**Go SDK version 1.3.0** updates the Confidential HTTP capability types. + +- **Confidential HTTP**: The `encrypt_output` field has moved from `ConfidentialHTTPRequest` to `HTTPRequest`. Update any workflows using `ConfidentialHTTPRequest.encrypt_output` to set this field on the inner `HTTPRequest` instead. + +[See all changes on GitHub](https://github.com/smartcontractkit/cre-sdk-go/compare/v1.2.0...v1.3.0) + ## CLI v1.0.11 - February 13, 2026 **CRE CLI version 1.0.11 is now available.** @@ -15503,6 +15540,73 @@ func onTrigger(config *Config, runtime cre.Runtime, ...) (string, error) { } ``` +## `runtime.GetSecret()` + +Retrieves a secret from the Vault DON. Secrets are key-value pairs stored securely and made available to your workflow at runtime. The `GetSecret` method is available on the `Runtime` interface through the embedded `SecretsProvider`. + +**Signature:** + +```go +runtime.GetSecret(req *SecretRequest) Promise[*Secret] +``` + +### `SecretRequest` + +| Field | Type | Required | Description | +| ----------- | -------- | -------- | --------------------------------------------------------------------- | +| `Id` | `string` | Yes | The identifier of the secret to retrieve. | +| `Namespace` | `string` | No | The namespace the secret belongs to. Defaults to `"main"` if omitted. | + +### `Secret` + +The value returned when the promise resolves. + +| Field | Type | Description | +| ----------- | -------- | -------------------------------- | +| `Id` | `string` | The secret identifier. | +| `Namespace` | `string` | The secret namespace. | +| `Owner` | `string` | The address of the secret owner. | +| `Value` | `string` | The secret value. | + +### `SecretsProvider` interface + +The `SecretsProvider` interface is embedded in `Runtime`, which means `GetSecret` is available directly on the runtime object. It is also passed as a parameter to [`InitWorkflow`](#initworkflow), allowing you to access secrets during workflow initialization. + +```go +type SecretsProvider interface { + GetSecret(req *SecretRequest) Promise[*Secret] +} +``` + +### Example + +```go +import "github.com/smartcontractkit/cre-sdk-go/cre" + +func onTrigger(config *Config, runtime cre.Runtime, ...) (string, error) { + secretPromise := runtime.GetSecret(&cre.SecretRequest{ + Id: "my-api-key", + Namespace: "default", + }) + + secret, err := secretPromise.Await() + if err != nil { + return "", fmt.Errorf("failed to get secret: %w", err) + } + + logger := runtime.Logger() + logger.Info("Secret retrieved", "owner", secret.Owner) + + // Use secret.Value in your workflow logic + return "done", nil +} +``` + + + --- # SDK Reference: EVM Client diff --git a/src/content/cre/llms-full-ts.txt b/src/content/cre/llms-full-ts.txt index 5a0041d9e14..360ca6d5fbe 100644 --- a/src/content/cre/llms-full-ts.txt +++ b/src/content/cre/llms-full-ts.txt @@ -442,16 +442,35 @@ To help us assist you faster, please include: # Release Notes Source: https://docs.chain.link/cre/release-notes -Last Updated: 2026-02-26 +Last Updated: 2026-03-05 This page provides detailed release notes for CRE. It includes information on new features, significant changes, and known limitations. +## Go SDK v1.5.0 - March 5, 2026 + +**Go SDK version 1.5.0** adds support for the Pharos Atlantic network. + +- **New Network**: Added Pharos Atlantic support + +[See all changes on GitHub](https://github.com/smartcontractkit/cre-sdk-go/compare/v1.4.0...v1.5.0) + +## Go SDK v1.4.0 - March 2, 2026 + +**Go SDK version 1.4.0** expands network support and adds Solana workflow bindings. + +- **New Networks**: Added Jovay Testnet, Pharos Testnet, and XLayer support +- **Solana Support**: Added Solana LogTrigger SDK generation and Solana workflow bindings +- **Breaking change**: Removed Solana SDK types that were previously generated (now replaced by the new Solana bindings approach) + +[See all changes on GitHub](https://github.com/smartcontractkit/cre-sdk-go/compare/v1.3.0...v1.4.0) + ## CLI v1.2.0 - February 26, 2026 **CRE CLI version 1.2.0 is now available.** - **Dynamic template fetching**: Templates are now fetched at runtime from GitHub, so `cre init` always offers the latest available templates without requiring a CLI update. Two new `cre templates` commands let you manage template sources — run `cre templates list` to browse available templates, or `cre templates add` to include custom or third-party repositories. See [Template Sources](/cre/reference/cli/templates) for details. - **Deploy access management**: New `cre account access` command lets you check your organization's deployment access status and submit an Early Access request directly from the CLI. See [Requesting Deploy Access](/cre/account/deploy-access) for details. +- **Unit tests for TypeScript templates**: TypeScript workflow templates now include a unit test setup out of the box - **Bug Fix**: Fixed an issue where secrets were not correctly injected during workflow simulation in certain configurations. **How to update:** @@ -465,7 +484,7 @@ This page provides detailed release notes for CRE. It includes information on ne CRE now supports the [Confidential HTTP](/cre/capabilities/confidential-http) capability for production workflows, allowing you to make privacy-preserving API calls with enclave execution. See the [Making Confidential Requests](/cre/guides/workflow/using-confidential-http-client/making-requests-ts) guide to learn more. -## CLI v1.1.0 - February 19th, 2026 +## CLI v1.1.0 - February 18, 2026 **CRE CLI version 1.1.0 is now available.** @@ -479,6 +498,24 @@ CRE now supports the [Confidential HTTP](/cre/capabilities/confidential-http) ca [See all changes on GitHub](https://github.com/smartcontractkit/cre-cli/compare/v1.0.11...v1.1.0) +## TS SDK v1.1.0 - February 18, 2026 + +**TypeScript SDK version 1.1.0** includes improvements to error handling, Confidential HTTP behavior, and developer experience: + +- **Improved error messages**: Error messages across the runtime, codegen, and utilities are now more descriptive and actionable +- **Confidential HTTP runs in DON mode**: The Confidential HTTP capability now executes in DON mode (instead of node mode), aligning with how other DON-level capabilities work +- **Clearer setup errors**: The SDK now provides a descriptive error when `cre-setup` has not been run before attempting to compile a workflow + +[See all changes on GitHub](https://github.com/smartcontractkit/cre-sdk-typescript/compare/v1.0.9...v1.1.0) + +## Go SDK v1.3.0 - February 12, 2026 + +**Go SDK version 1.3.0** updates the Confidential HTTP capability types. + +- **Confidential HTTP**: The `encrypt_output` field has moved from `ConfidentialHTTPRequest` to `HTTPRequest`. Update any workflows using `ConfidentialHTTPRequest.encrypt_output` to set this field on the inner `HTTPRequest` instead. + +[See all changes on GitHub](https://github.com/smartcontractkit/cre-sdk-go/compare/v1.2.0...v1.3.0) + ## CLI v1.0.11 - February 13, 2026 **CRE CLI version 1.0.11 is now available.** @@ -7878,6 +7915,143 @@ CRE CLI version v1.2.0 --- +# SDK Reference: Type Conversions +Source: https://docs.chain.link/cre/reference/sdk/type-conversions-ts +Last Updated: 2026-03-02 + +The CRE TypeScript SDK uses Protocol Buffers under the hood. Each protobuf message generates **two** TypeScript representations: + +- **`Type`** (runtime form): Uses native binary types like `Uint8Array` and `bigint`. These are what the SDK returns from `.result()` calls. +- **`TypeJson`** (JSON-serializable form): Uses `string` and plain objects. These are what you pass *into* SDK methods when constructing requests. + + + + +## Conversion table + +This table shows how protobuf types map to their TypeScript runtime and JSON-serializable forms. + +| Protobuf Type | Runtime (`Type`) | JSON (`TypeJson`) | Notes | +| --------------------------- | ------------------------------------------------ | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `bytes` | `Uint8Array` | `string` (base64) | Use [`hexToBase64()`](/cre/reference/sdk/evm-client-ts#hextobase64) to convert hex to base64 for request objects. Use `bytesToHex()` to convert `Uint8Array` responses back to hex. | +| `int64` / `uint64` | `bigint` | `string` | Numeric strings like `"12345"`. | +| `enum` | Enum constant (`number`) | String name | For example, `TX_STATUS_SUCCESS` (number) vs `"TX_STATUS_SUCCESS"` (string). | +| `google.protobuf.Duration` | `Duration` object | `string` (e.g. `"5s"`) | Duration strings use Go-style format: `"5s"`, `"1.5m"`, `"200ms"`. | +| `google.protobuf.Timestamp` | `Timestamp` `{ seconds: bigint, nanos: number }` | `{ seconds?: string, nanos?: number }` | | +| `BigInt` (CRE custom) | `{ absVal: Uint8Array, sign: bigint }` | `{ absVal: string, sign: string }` | See [ProtoBigInt](#protobigint) below. | + +## ProtoBigInt + +`BigInt` is a CRE-specific protobuf type used to represent arbitrarily large integers. It appears in block numbers, account balances, gas values, and other EVM-related fields. + +### Structure + +The protobuf `BigInt` encodes a signed arbitrary-precision integer as two fields: + +| Field | Runtime type | JSON type | Description | +| -------- | ------------ | ----------------- | ---------------------------------------------------------------------------- | +| `absVal` | `Uint8Array` | `string` (base64) | The absolute value as a big-endian byte array (base64-encoded in JSON form). | +| `sign` | `bigint` | `string` | The sign: `"1"` for positive, `"0"` for zero, `"-1"` for negative. | + +### Converting between `bigint` and `ProtoBigInt` + +Use the SDK helpers to convert between native JavaScript `bigint` and the protobuf format: + +**Native `bigint` to protobuf `BigIntJson`** (for request objects): + +```typescript +import { blockNumber, bigintToProtoBigInt } from "@chainlink/cre-sdk" + +// blockNumber() is a convenience alias for bigintToProtoBigInt() +const block = blockNumber(12345678n) +// → { absVal: "ALxhTg==", sign: "1" } + +// Equivalent: +const block2 = bigintToProtoBigInt(12345678n) +``` + +**Protobuf `BigInt` to native `bigint`** (for response processing): + +```typescript +import { protoBigIntToBigint } from "@chainlink/cre-sdk" + +const header = evmClient.headerByNumber(runtime, {}).result() +const blockNum = protoBigIntToBigint(header.header.blockNumber) +// → e.g., 12345678n +``` + +### Special constants + +The SDK provides pre-built `BigIntJson` constants for common block reference values: + +```typescript +import { LATEST_BLOCK_NUMBER, LAST_FINALIZED_BLOCK_NUMBER } from "@chainlink/cre-sdk" + +// LATEST_BLOCK_NUMBER → most recent mined block +// LAST_FINALIZED_BLOCK_NUMBER → most recent finalized block +``` + +These are negative sentinel values that the CRE platform interprets as symbolic references rather than literal block heights. + +### Common patterns + +**Reading a balance and doing arithmetic:** + +```typescript +import { EVMClient, getNetwork, protoBigIntToBigint, LAST_FINALIZED_BLOCK_NUMBER } from "@chainlink/cre-sdk" + +const balance = evmClient + .balanceAt(runtime, { + account: "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb2", + blockNumber: LAST_FINALIZED_BLOCK_NUMBER, + }) + .result() + +// balance.balance is already a native bigint — no conversion needed +const balanceInEth = balance.balance / 10n ** 18n +``` + +**Specifying a custom block depth:** + +```typescript +import { protoBigIntToBigint, blockNumber } from "@chainlink/cre-sdk" + +// Get the latest block number +const header = evmClient.headerByNumber(runtime, {}).result() +const latest = protoBigIntToBigint(header.header.blockNumber) + +// Query 100 blocks back +const contractCall = evmClient + .callContract(runtime, { + call: encodedCall, + blockNumber: blockNumber(latest - 100n), + }) + .result() +``` + +## `bytes` fields + +Protobuf `bytes` fields appear as `Uint8Array` in runtime types and as base64-encoded `string` in JSON types. When working with EVM data, you often need to convert between hex strings and these representations. + +```typescript +import { hexToBase64, bytesToHex, hexToBytes } from "@chainlink/cre-sdk" + +// Hex → base64 (for request objects that expect base64-encoded bytes) +const base64Data = hexToBase64("0xabcdef") + +// Hex → Uint8Array (for working with raw bytes) +const bytes = hexToBytes("0xabcdef") + +// Uint8Array → hex (for converting response bytes back to hex) +const hex = bytesToHex(new Uint8Array([0xab, 0xcd, 0xef])) +``` + +See the [EVM Client helper functions](/cre/reference/sdk/evm-client-ts#helper-functions) for the full list of conversion utilities. + +--- + # The Confidential HTTP Capability Source: https://docs.chain.link/cre/capabilities/confidential-http-ts Last Updated: 2026-02-06 @@ -14050,7 +14224,7 @@ The [Confidential HTTP](/cre/capabilities/confidential-http-ts) Client lets you ### `ConfidentialHTTPRequest` / `ConfidentialHTTPRequestJson` @@ -14917,12 +15091,65 @@ runtime.runInNodeMode( - `fn`: A function that receives a `NodeRuntime` and executes on each individual node - `consensusAggregation`: An aggregation function (e.g., `consensusMedianAggregation()`) -- `unwrapOptions`: Optional configuration for how to unwrap complex return types +- `unwrapOptions`: Optional configuration for how to deserialize the consensus result. See [`UnwrapOptions`](#unwrapoptions) below. **Returns:** A function that, when called with any additional arguments, returns an object with a `.result()` method. +### `UnwrapOptions` + +When `runInNodeMode` returns a non-primitive object type, the SDK needs to know how to deserialize the consensus result back into a typed object. The `unwrapOptions` parameter tells the SDK which deserialization strategy to use. + + + + +**Type definition:** + +```typescript +type UnwrapOptions = { schema: SchemaValidator; factory?: never } | { schema?: never; factory: () => T } +``` + +**Variants:** + +| Variant | When to use | Example | +| ----------------------- | ---------------------------------------------------------------------------- | ------------------------------------------------ | +| `{ schema: validator }` | Objects with a Zod or any Standard Schema-compatible validator | `{ schema: myZodSchema }` | +| `{ factory: () => T }` | Objects without a schema — provide a factory that returns a default instance | `{ factory: () => ({ price: 0n, source: "" }) }` | + +Note: `schema` and `factory` are mutually exclusive — provide one or the other, not both. + +**Example with `schema` (most common for complex types):** + +```typescript +import { HTTPClient, consensusMedianAggregation, type Runtime, type NodeRuntime } from "@chainlink/cre-sdk" +import { z } from "zod" + +const priceResultSchema = z.object({ + price: z.bigint(), + source: z.string(), +}) + +type PriceResult = z.infer + +const fetchPrice = (nodeRuntime: NodeRuntime): PriceResult => { + const httpClient = new HTTPClient() + // ... fetch and parse price ... + return { price: 42000n, source: "api.example.com" } +} + +const onTrigger = (runtime: Runtime): string => { + const price = runtime + .runInNodeMode(fetchPrice, consensusMedianAggregation(), { schema: priceResultSchema })() + .result() + + runtime.log(`Price: ${price.price} from ${price.source}`) + return "done" +} +``` + **Example:** This example uses `runInNodeMode` to fetch data from an API on each node, and then uses the DON-level `Runtime` to write the aggregated result onchain. @@ -14966,6 +15193,58 @@ const onTrigger = (runtime: Runtime, ...): string => { calling `.result()`. This is because `runInNodeMode` returns a function that can accept additional arguments. +## `runtime.getSecret()` + +Retrieves a secret from the Vault DON. Secrets are key-value pairs stored securely and made available to your workflow at runtime. + +**Signature:** + +```typescript +runtime.getSecret( + req: SecretRequest | SecretRequestJson +): { result: () => Secret } +``` + +### `SecretRequest` / `SecretRequestJson` + +| Field | Type | Required | Description | +| ----------- | -------- | -------- | --------------------------------------------------------------------- | +| `id` | `string` | Yes | The identifier of the secret to retrieve. | +| `namespace` | `string` | No | The namespace the secret belongs to. Defaults to `"main"` if omitted. | + +### `Secret` + +The object returned by `.result()`. + +| Field | Type | Description | +| ----------- | -------- | -------------------------------- | +| `id` | `string` | The secret identifier. | +| `namespace` | `string` | The secret namespace. | +| `owner` | `string` | The address of the secret owner. | +| `value` | `string` | The secret value. | + +### Example + +`runtime.getSecret()` is available directly on the `Runtime` object passed to your handler function. No additional setup is required in `initWorkflow`. + +```typescript +import { type Runtime } from "@chainlink/cre-sdk" + +const onTrigger = (runtime: Runtime): string => { + const secret = runtime.getSecret({ id: "my-api-key" }).result() + + runtime.log(`Secret owner: ${secret.owner}`) + + // Use secret.value in your workflow logic + return "done" +} +``` + + + + --- # SDK Reference: EVM Client @@ -15599,6 +15878,102 @@ See [Custom Block Depths](/cre/guides/workflow/using-evm-client/onchain-read-ts# *** +### `hexToBytes()` + +Converts a `0x`-prefixed hex string to a `Uint8Array`. + +**Signature:** + +```typescript +function hexToBytes(hex: string): Uint8Array +``` + +**Usage:** + +```typescript +import { hexToBytes } from "@chainlink/cre-sdk" + +const bytes = hexToBytes("0xabcdef") +// → Uint8Array [171, 205, 239] +``` + +*** + +### `bigintToBytes()` + +Converts a native JavaScript `bigint` to a big-endian `Uint8Array`. This is useful when you need to encode a `bigint` as raw bytes for protobuf fields or ABI encoding. + +**Signature:** + +```typescript +function bigintToBytes(n: bigint): Uint8Array +``` + +**Usage:** + +```typescript +import { bigintToBytes } from "@chainlink/cre-sdk" + +const bytes = bigintToBytes(256n) +// → Uint8Array [1, 0] +``` + +*** + +### `bytesToBigint()` + +Converts a big-endian `Uint8Array` to a native JavaScript `bigint`. This is the inverse of `bigintToBytes()`. + +**Signature:** + +```typescript +function bytesToBigint(bytes: Uint8Array): bigint +``` + +**Usage:** + +```typescript +import { bytesToBigint } from "@chainlink/cre-sdk" + +const value = bytesToBigint(new Uint8Array([1, 0])) +// → 256n +``` + +*** + +### `bigintToProtoBigInt()` + +Converts a native `bigint`, `number`, or `string` to the protobuf `BigIntJson` format used by SDK methods. The [`blockNumber()`](#blocknumber) function is a convenience alias for this function. + +**Signature:** + +```typescript +function bigintToProtoBigInt(n: number | bigint | string): BigIntJson +``` + +**Returns:** + +A `BigIntJson` object with `absVal` (base64-encoded big-endian bytes) and `sign` (`"1"`, `"0"`, or `"-1"`). + +**Usage:** + +```typescript +import { bigintToProtoBigInt } from "@chainlink/cre-sdk" + +const protoBigInt = bigintToProtoBigInt(12345678n) +// → { absVal: "ALxhTg==", sign: "1" } + +const negative = bigintToProtoBigInt(-42n) +// → { absVal: "Kg==", sign: "-1" } + +const zero = bigintToProtoBigInt(0n) +// → { absVal: "", sign: "0" } +``` + +See [Type Conversions](/cre/reference/sdk/type-conversions-ts#protobigint) for more details on the `ProtoBigInt` format. + +*** + ### `prepareReportRequest()` Prepares a report request with default EVM encoding parameters for use with `runtime.report()`. This helper simplifies report generation by automatically setting the standard encoding configuration (`evm`, `ecdsa`, `keccak256`) required for EVM-based workflows. @@ -16494,6 +16869,7 @@ The SDK Reference is broken down into several pages, each corresponding to a cor - **[HTTP Client](/cre/reference/sdk/http-client-ts)**: Provides a reference for the `HTTPClient`, used for making offchain API requests from individual nodes. - **[Confidential HTTP Client](/cre/reference/sdk/confidential-http-client-ts)**: Provides a reference for the `ConfidentialHTTPClient`, used for privacy-preserving API requests with enclave execution and optional response encryption. - **[Consensus & Aggregation](/cre/reference/sdk/consensus-ts)**: Describes how to use aggregators like `consensusMedianAggregation` and `ConsensusAggregationByFields` with `runtime.runInNodeMode()` to process and consolidate data from multiple nodes. +- **[Type Conversions](/cre/reference/sdk/type-conversions-ts)**: Explains the dual `Type` / `TypeJson` system, protobuf-to-TypeScript type mappings, and the `ProtoBigInt` format used for block numbers, balances, and gas values. ## Package Structure diff --git a/src/content/cre/reference/sdk/confidential-http-client-ts.mdx b/src/content/cre/reference/sdk/confidential-http-client-ts.mdx index 3a0b49acd70..01c0752e65d 100644 --- a/src/content/cre/reference/sdk/confidential-http-client-ts.mdx +++ b/src/content/cre/reference/sdk/confidential-http-client-ts.mdx @@ -27,7 +27,7 @@ The [Confidential HTTP](/cre/capabilities/confidential-http-ts) Client lets you {/* prettier-ignore */} ### `ConfidentialHTTPRequest` / `ConfidentialHTTPRequestJson` diff --git a/src/content/cre/reference/sdk/core-go.mdx b/src/content/cre/reference/sdk/core-go.mdx index 3e22abf709f..796d6bcb248 100644 --- a/src/content/cre/reference/sdk/core-go.mdx +++ b/src/content/cre/reference/sdk/core-go.mdx @@ -253,3 +253,70 @@ func onTrigger(config *Config, runtime cre.Runtime, ...) (string, error) { //... } ``` + +## `runtime.GetSecret()` + +Retrieves a secret from the Vault DON. Secrets are key-value pairs stored securely and made available to your workflow at runtime. The `GetSecret` method is available on the `Runtime` interface through the embedded `SecretsProvider`. + +**Signature:** + +```go +runtime.GetSecret(req *SecretRequest) Promise[*Secret] +``` + +### `SecretRequest` + +| Field | Type | Required | Description | +| ----------- | -------- | -------- | --------------------------------------------------------------------- | +| `Id` | `string` | Yes | The identifier of the secret to retrieve. | +| `Namespace` | `string` | No | The namespace the secret belongs to. Defaults to `"main"` if omitted. | + +### `Secret` + +The value returned when the promise resolves. + +| Field | Type | Description | +| ----------- | -------- | -------------------------------- | +| `Id` | `string` | The secret identifier. | +| `Namespace` | `string` | The secret namespace. | +| `Owner` | `string` | The address of the secret owner. | +| `Value` | `string` | The secret value. | + +### `SecretsProvider` interface + +The `SecretsProvider` interface is embedded in `Runtime`, which means `GetSecret` is available directly on the runtime object. It is also passed as a parameter to [`InitWorkflow`](#initworkflow), allowing you to access secrets during workflow initialization. + +```go +type SecretsProvider interface { + GetSecret(req *SecretRequest) Promise[*Secret] +} +``` + +### Example + +```go +import "github.com/smartcontractkit/cre-sdk-go/cre" + +func onTrigger(config *Config, runtime cre.Runtime, ...) (string, error) { + secretPromise := runtime.GetSecret(&cre.SecretRequest{ + Id: "my-api-key", + Namespace: "default", + }) + + secret, err := secretPromise.Await() + if err != nil { + return "", fmt.Errorf("failed to get secret: %w", err) + } + + logger := runtime.Logger() + logger.Info("Secret retrieved", "owner", secret.Owner) + + // Use secret.Value in your workflow logic + return "done", nil +} +``` + + diff --git a/src/content/cre/reference/sdk/core-ts.mdx b/src/content/cre/reference/sdk/core-ts.mdx index cb9a1011c3a..5b7cb3edeff 100644 --- a/src/content/cre/reference/sdk/core-ts.mdx +++ b/src/content/cre/reference/sdk/core-ts.mdx @@ -389,12 +389,65 @@ runtime.runInNodeMode( - `fn`: A function that receives a `NodeRuntime` and executes on each individual node - `consensusAggregation`: An aggregation function (e.g., `consensusMedianAggregation()`) -- `unwrapOptions`: Optional configuration for how to unwrap complex return types +- `unwrapOptions`: Optional configuration for how to deserialize the consensus result. See [`UnwrapOptions`](#unwrapoptions) below. **Returns:** A function that, when called with any additional arguments, returns an object with a `.result()` method. +### `UnwrapOptions` + +When `runInNodeMode` returns a non-primitive object type, the SDK needs to know how to deserialize the consensus result back into a typed object. The `unwrapOptions` parameter tells the SDK which deserialization strategy to use. + +{/* prettier-ignore */} + + +**Type definition:** + +```typescript +type UnwrapOptions = { schema: SchemaValidator; factory?: never } | { schema?: never; factory: () => T } +``` + +**Variants:** + +| Variant | When to use | Example | +| ----------------------- | ---------------------------------------------------------------------------- | ------------------------------------------------ | +| `{ schema: validator }` | Objects with a Zod or any Standard Schema-compatible validator | `{ schema: myZodSchema }` | +| `{ factory: () => T }` | Objects without a schema — provide a factory that returns a default instance | `{ factory: () => ({ price: 0n, source: "" }) }` | + +Note: `schema` and `factory` are mutually exclusive — provide one or the other, not both. + +**Example with `schema` (most common for complex types):** + +```typescript +import { HTTPClient, consensusMedianAggregation, type Runtime, type NodeRuntime } from "@chainlink/cre-sdk" +import { z } from "zod" + +const priceResultSchema = z.object({ + price: z.bigint(), + source: z.string(), +}) + +type PriceResult = z.infer + +const fetchPrice = (nodeRuntime: NodeRuntime): PriceResult => { + const httpClient = new HTTPClient() + // ... fetch and parse price ... + return { price: 42000n, source: "api.example.com" } +} + +const onTrigger = (runtime: Runtime): string => { + const price = runtime + .runInNodeMode(fetchPrice, consensusMedianAggregation(), { schema: priceResultSchema })() + .result() + + runtime.log(`Price: ${price.price} from ${price.source}`) + return "done" +} +``` + **Example:** This example uses `runInNodeMode` to fetch data from an API on each node, and then uses the DON-level `Runtime` to write the aggregated result onchain. @@ -437,3 +490,55 @@ const onTrigger = (runtime: Runtime, ...): string => { The pattern `runInNodeMode(fn, aggregation)()` requires calling the returned function immediately with `()` before calling `.result()`. This is because `runInNodeMode` returns a function that can accept additional arguments. + +## `runtime.getSecret()` + +Retrieves a secret from the Vault DON. Secrets are key-value pairs stored securely and made available to your workflow at runtime. + +**Signature:** + +```typescript +runtime.getSecret( + req: SecretRequest | SecretRequestJson +): { result: () => Secret } +``` + +### `SecretRequest` / `SecretRequestJson` + +| Field | Type | Required | Description | +| ----------- | -------- | -------- | --------------------------------------------------------------------- | +| `id` | `string` | Yes | The identifier of the secret to retrieve. | +| `namespace` | `string` | No | The namespace the secret belongs to. Defaults to `"main"` if omitted. | + +### `Secret` + +The object returned by `.result()`. + +| Field | Type | Description | +| ----------- | -------- | -------------------------------- | +| `id` | `string` | The secret identifier. | +| `namespace` | `string` | The secret namespace. | +| `owner` | `string` | The address of the secret owner. | +| `value` | `string` | The secret value. | + +### Example + +`runtime.getSecret()` is available directly on the `Runtime` object passed to your handler function. No additional setup is required in `initWorkflow`. + +```typescript +import { type Runtime } from "@chainlink/cre-sdk" + +const onTrigger = (runtime: Runtime): string => { + const secret = runtime.getSecret({ id: "my-api-key" }).result() + + runtime.log(`Secret owner: ${secret.owner}`) + + // Use secret.value in your workflow logic + return "done" +} +``` + +{/* prettier-ignore */} + diff --git a/src/content/cre/reference/sdk/evm-client-ts.mdx b/src/content/cre/reference/sdk/evm-client-ts.mdx index d26104691e8..b430ca74f09 100644 --- a/src/content/cre/reference/sdk/evm-client-ts.mdx +++ b/src/content/cre/reference/sdk/evm-client-ts.mdx @@ -639,6 +639,102 @@ See [Custom Block Depths](/cre/guides/workflow/using-evm-client/onchain-read-ts# --- +### `hexToBytes()` + +Converts a `0x`-prefixed hex string to a `Uint8Array`. + +**Signature:** + +```typescript +function hexToBytes(hex: string): Uint8Array +``` + +**Usage:** + +```typescript +import { hexToBytes } from "@chainlink/cre-sdk" + +const bytes = hexToBytes("0xabcdef") +// → Uint8Array [171, 205, 239] +``` + +--- + +### `bigintToBytes()` + +Converts a native JavaScript `bigint` to a big-endian `Uint8Array`. This is useful when you need to encode a `bigint` as raw bytes for protobuf fields or ABI encoding. + +**Signature:** + +```typescript +function bigintToBytes(n: bigint): Uint8Array +``` + +**Usage:** + +```typescript +import { bigintToBytes } from "@chainlink/cre-sdk" + +const bytes = bigintToBytes(256n) +// → Uint8Array [1, 0] +``` + +--- + +### `bytesToBigint()` + +Converts a big-endian `Uint8Array` to a native JavaScript `bigint`. This is the inverse of `bigintToBytes()`. + +**Signature:** + +```typescript +function bytesToBigint(bytes: Uint8Array): bigint +``` + +**Usage:** + +```typescript +import { bytesToBigint } from "@chainlink/cre-sdk" + +const value = bytesToBigint(new Uint8Array([1, 0])) +// → 256n +``` + +--- + +### `bigintToProtoBigInt()` + +Converts a native `bigint`, `number`, or `string` to the protobuf `BigIntJson` format used by SDK methods. The [`blockNumber()`](#blocknumber) function is a convenience alias for this function. + +**Signature:** + +```typescript +function bigintToProtoBigInt(n: number | bigint | string): BigIntJson +``` + +**Returns:** + +A `BigIntJson` object with `absVal` (base64-encoded big-endian bytes) and `sign` (`"1"`, `"0"`, or `"-1"`). + +**Usage:** + +```typescript +import { bigintToProtoBigInt } from "@chainlink/cre-sdk" + +const protoBigInt = bigintToProtoBigInt(12345678n) +// → { absVal: "ALxhTg==", sign: "1" } + +const negative = bigintToProtoBigInt(-42n) +// → { absVal: "Kg==", sign: "-1" } + +const zero = bigintToProtoBigInt(0n) +// → { absVal: "", sign: "0" } +``` + +See [Type Conversions](/cre/reference/sdk/type-conversions-ts#protobigint) for more details on the `ProtoBigInt` format. + +--- + ### `prepareReportRequest()` Prepares a report request with default EVM encoding parameters for use with `runtime.report()`. This helper simplifies report generation by automatically setting the standard encoding configuration (`evm`, `ecdsa`, `keccak256`) required for EVM-based workflows. diff --git a/src/content/cre/reference/sdk/overview-ts.mdx b/src/content/cre/reference/sdk/overview-ts.mdx index d39951e37fa..ee95f7e9685 100644 --- a/src/content/cre/reference/sdk/overview-ts.mdx +++ b/src/content/cre/reference/sdk/overview-ts.mdx @@ -24,6 +24,7 @@ The SDK Reference is broken down into several pages, each corresponding to a cor - **[HTTP Client](/cre/reference/sdk/http-client-ts)**: Provides a reference for the `HTTPClient`, used for making offchain API requests from individual nodes. - **[Confidential HTTP Client](/cre/reference/sdk/confidential-http-client-ts)**: Provides a reference for the `ConfidentialHTTPClient`, used for privacy-preserving API requests with enclave execution and optional response encryption. - **[Consensus & Aggregation](/cre/reference/sdk/consensus-ts)**: Describes how to use aggregators like `consensusMedianAggregation` and `ConsensusAggregationByFields` with `runtime.runInNodeMode()` to process and consolidate data from multiple nodes. +- **[Type Conversions](/cre/reference/sdk/type-conversions-ts)**: Explains the dual `Type` / `TypeJson` system, protobuf-to-TypeScript type mappings, and the `ProtoBigInt` format used for block numbers, balances, and gas values. ## Package Structure diff --git a/src/content/cre/reference/sdk/type-conversions-ts.mdx b/src/content/cre/reference/sdk/type-conversions-ts.mdx new file mode 100644 index 00000000000..101b9127b25 --- /dev/null +++ b/src/content/cre/reference/sdk/type-conversions-ts.mdx @@ -0,0 +1,142 @@ +--- +section: cre +title: "SDK Reference: Type Conversions" +date: Last Modified +metadata: + description: "Reference for TypeScript protobuf type conversions: understanding Type vs TypeJson variants, ProtoBigInt, and conversion helpers." + datePublished: "2026-03-02" + lastModified: "2026-03-02" +--- + +import { Aside } from "@components" + +The CRE TypeScript SDK uses Protocol Buffers under the hood. Each protobuf message generates **two** TypeScript representations: + +- **`Type`** (runtime form): Uses native binary types like `Uint8Array` and `bigint`. These are what the SDK returns from `.result()` calls. +- **`TypeJson`** (JSON-serializable form): Uses `string` and plain objects. These are what you pass _into_ SDK methods when constructing requests. + +{/* prettier-ignore */} + + +## Conversion table + +This table shows how protobuf types map to their TypeScript runtime and JSON-serializable forms. + +| Protobuf Type | Runtime (`Type`) | JSON (`TypeJson`) | Notes | +| --------------------------- | ------------------------------------------------ | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `bytes` | `Uint8Array` | `string` (base64) | Use [`hexToBase64()`](/cre/reference/sdk/evm-client-ts#hextobase64) to convert hex to base64 for request objects. Use `bytesToHex()` to convert `Uint8Array` responses back to hex. | +| `int64` / `uint64` | `bigint` | `string` | Numeric strings like `"12345"`. | +| `enum` | Enum constant (`number`) | String name | For example, `TX_STATUS_SUCCESS` (number) vs `"TX_STATUS_SUCCESS"` (string). | +| `google.protobuf.Duration` | `Duration` object | `string` (e.g. `"5s"`) | Duration strings use Go-style format: `"5s"`, `"1.5m"`, `"200ms"`. | +| `google.protobuf.Timestamp` | `Timestamp` `{ seconds: bigint, nanos: number }` | `{ seconds?: string, nanos?: number }` | | +| `BigInt` (CRE custom) | `{ absVal: Uint8Array, sign: bigint }` | `{ absVal: string, sign: string }` | See [ProtoBigInt](#protobigint) below. | + +## ProtoBigInt + +`BigInt` is a CRE-specific protobuf type used to represent arbitrarily large integers. It appears in block numbers, account balances, gas values, and other EVM-related fields. + +### Structure + +The protobuf `BigInt` encodes a signed arbitrary-precision integer as two fields: + +| Field | Runtime type | JSON type | Description | +| -------- | ------------ | ----------------- | ---------------------------------------------------------------------------- | +| `absVal` | `Uint8Array` | `string` (base64) | The absolute value as a big-endian byte array (base64-encoded in JSON form). | +| `sign` | `bigint` | `string` | The sign: `"1"` for positive, `"0"` for zero, `"-1"` for negative. | + +### Converting between `bigint` and `ProtoBigInt` + +Use the SDK helpers to convert between native JavaScript `bigint` and the protobuf format: + +**Native `bigint` to protobuf `BigIntJson`** (for request objects): + +```typescript +import { blockNumber, bigintToProtoBigInt } from "@chainlink/cre-sdk" + +// blockNumber() is a convenience alias for bigintToProtoBigInt() +const block = blockNumber(12345678n) +// → { absVal: "ALxhTg==", sign: "1" } + +// Equivalent: +const block2 = bigintToProtoBigInt(12345678n) +``` + +**Protobuf `BigInt` to native `bigint`** (for response processing): + +```typescript +import { protoBigIntToBigint } from "@chainlink/cre-sdk" + +const header = evmClient.headerByNumber(runtime, {}).result() +const blockNum = protoBigIntToBigint(header.header.blockNumber) +// → e.g., 12345678n +``` + +### Special constants + +The SDK provides pre-built `BigIntJson` constants for common block reference values: + +```typescript +import { LATEST_BLOCK_NUMBER, LAST_FINALIZED_BLOCK_NUMBER } from "@chainlink/cre-sdk" + +// LATEST_BLOCK_NUMBER → most recent mined block +// LAST_FINALIZED_BLOCK_NUMBER → most recent finalized block +``` + +These are negative sentinel values that the CRE platform interprets as symbolic references rather than literal block heights. + +### Common patterns + +**Reading a balance and doing arithmetic:** + +```typescript +import { EVMClient, getNetwork, protoBigIntToBigint, LAST_FINALIZED_BLOCK_NUMBER } from "@chainlink/cre-sdk" + +const balance = evmClient + .balanceAt(runtime, { + account: "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb2", + blockNumber: LAST_FINALIZED_BLOCK_NUMBER, + }) + .result() + +// balance.balance is already a native bigint — no conversion needed +const balanceInEth = balance.balance / 10n ** 18n +``` + +**Specifying a custom block depth:** + +```typescript +import { protoBigIntToBigint, blockNumber } from "@chainlink/cre-sdk" + +// Get the latest block number +const header = evmClient.headerByNumber(runtime, {}).result() +const latest = protoBigIntToBigint(header.header.blockNumber) + +// Query 100 blocks back +const contractCall = evmClient + .callContract(runtime, { + call: encodedCall, + blockNumber: blockNumber(latest - 100n), + }) + .result() +``` + +## `bytes` fields + +Protobuf `bytes` fields appear as `Uint8Array` in runtime types and as base64-encoded `string` in JSON types. When working with EVM data, you often need to convert between hex strings and these representations. + +```typescript +import { hexToBase64, bytesToHex, hexToBytes } from "@chainlink/cre-sdk" + +// Hex → base64 (for request objects that expect base64-encoded bytes) +const base64Data = hexToBase64("0xabcdef") + +// Hex → Uint8Array (for working with raw bytes) +const bytes = hexToBytes("0xabcdef") + +// Uint8Array → hex (for converting response bytes back to hex) +const hex = bytesToHex(new Uint8Array([0xab, 0xcd, 0xef])) +``` + +See the [EVM Client helper functions](/cre/reference/sdk/evm-client-ts#helper-functions) for the full list of conversion utilities. diff --git a/src/content/cre/release-notes.mdx b/src/content/cre/release-notes.mdx index c8943c2f3b7..a96298b1e04 100644 --- a/src/content/cre/release-notes.mdx +++ b/src/content/cre/release-notes.mdx @@ -5,19 +5,38 @@ date: Last Modified metadata: description: "Discover what's new in CRE: latest features, changes, and improvements in each release of the Chainlink Runtime Environment." datePublished: "2025-11-04" - lastModified: "2026-02-26" + lastModified: "2026-03-05" --- import { Aside } from "@components" This page provides detailed release notes for CRE. It includes information on new features, significant changes, and known limitations. +## Go SDK v1.5.0 - March 5, 2026 + +**Go SDK version 1.5.0** adds support for the Pharos Atlantic network. + +- **New Network**: Added Pharos Atlantic support + +[See all changes on GitHub](https://github.com/smartcontractkit/cre-sdk-go/compare/v1.4.0...v1.5.0) + +## Go SDK v1.4.0 - March 2, 2026 + +**Go SDK version 1.4.0** expands network support and adds Solana workflow bindings. + +- **New Networks**: Added Jovay Testnet, Pharos Testnet, and XLayer support +- **Solana Support**: Added Solana LogTrigger SDK generation and Solana workflow bindings +- **Breaking change**: Removed Solana SDK types that were previously generated (now replaced by the new Solana bindings approach) + +[See all changes on GitHub](https://github.com/smartcontractkit/cre-sdk-go/compare/v1.3.0...v1.4.0) + ## CLI v1.2.0 - February 26, 2026 **CRE CLI version 1.2.0 is now available.** - **Dynamic template fetching**: Templates are now fetched at runtime from GitHub, so `cre init` always offers the latest available templates without requiring a CLI update. Two new `cre templates` commands let you manage template sources — run `cre templates list` to browse available templates, or `cre templates add` to include custom or third-party repositories. See [Template Sources](/cre/reference/cli/templates) for details. - **Deploy access management**: New `cre account access` command lets you check your organization's deployment access status and submit an Early Access request directly from the CLI. See [Requesting Deploy Access](/cre/account/deploy-access) for details. +- **Unit tests for TypeScript templates**: TypeScript workflow templates now include a unit test setup out of the box - **Bug Fix**: Fixed an issue where secrets were not correctly injected during workflow simulation in certain configurations. **How to update:** @@ -31,7 +50,7 @@ This page provides detailed release notes for CRE. It includes information on ne CRE now supports the [Confidential HTTP](/cre/capabilities/confidential-http) capability for production workflows, allowing you to make privacy-preserving API calls with enclave execution. See the [Making Confidential Requests](/cre/guides/workflow/using-confidential-http-client/making-requests-ts) guide to learn more. -## CLI v1.1.0 - February 19th, 2026 +## CLI v1.1.0 - February 18, 2026 **CRE CLI version 1.1.0 is now available.** @@ -45,6 +64,24 @@ CRE now supports the [Confidential HTTP](/cre/capabilities/confidential-http) ca [See all changes on GitHub](https://github.com/smartcontractkit/cre-cli/compare/v1.0.11...v1.1.0) +## TS SDK v1.1.0 - February 18, 2026 + +**TypeScript SDK version 1.1.0** includes improvements to error handling, Confidential HTTP behavior, and developer experience: + +- **Improved error messages**: Error messages across the runtime, codegen, and utilities are now more descriptive and actionable +- **Confidential HTTP runs in DON mode**: The Confidential HTTP capability now executes in DON mode (instead of node mode), aligning with how other DON-level capabilities work +- **Clearer setup errors**: The SDK now provides a descriptive error when `cre-setup` has not been run before attempting to compile a workflow + +[See all changes on GitHub](https://github.com/smartcontractkit/cre-sdk-typescript/compare/v1.0.9...v1.1.0) + +## Go SDK v1.3.0 - February 12, 2026 + +**Go SDK version 1.3.0** updates the Confidential HTTP capability types. + +- **Confidential HTTP**: The `encrypt_output` field has moved from `ConfidentialHTTPRequest` to `HTTPRequest`. Update any workflows using `ConfidentialHTTPRequest.encrypt_output` to set this field on the inner `HTTPRequest` instead. + +[See all changes on GitHub](https://github.com/smartcontractkit/cre-sdk-go/compare/v1.2.0...v1.3.0) + ## CLI v1.0.11 - February 13, 2026 **CRE CLI version 1.0.11 is now available.**