Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
10e13e8
Added getSecrets method to fetch multiple secrets
russell-stern May 5, 2026
ccb025f
Fixed linting
russell-stern May 5, 2026
e3ea6ae
Switched to throwing an error on any failed fetch
russell-stern Jun 8, 2026
1629d43
add solana mainnet
Unheilbar Jun 11, 2026
2f367a7
Non code change
ernest-nowacki Jun 11, 2026
7d8a464
Improve test templates script
ernest-nowacki Jun 11, 2026
0e58503
Remove dummy change from readme - no longer needed
ernest-nowacki Jun 11, 2026
ce9382c
Merge pull request #268 from smartcontractkit/bump_protos
Unheilbar Jun 11, 2026
537f022
Merge branch 'main' of github.com:smartcontractkit/cre-sdk-typescript…
ernest-nowacki Jun 11, 2026
5df76f4
Set new versions for the release (#270)
ernest-nowacki Jun 11, 2026
dad0dc7
updates to support typed errors
ettec Jun 10, 2026
ee771b3
lint
ettec Jun 11, 2026
054929d
Merge pull request #267 from smartcontractkit/sdk-typed-errors
ettec Jun 11, 2026
53befbb
Merge pull request #269 from smartcontractkit/chore/health-check
russell-stern Jun 11, 2026
629b396
Add support for private-testnet-pumice (#271)
amit-momin Jun 17, 2026
ebb07e9
Set new versions for the release (#272)
amit-momin Jun 17, 2026
7aabf2e
Set new versions for the release (#273)
amit-momin Jun 17, 2026
8a0b158
Bumped chain-selectors (#274)
amit-momin Jun 23, 2026
c381f84
Solana SDK (#278)
ernest-nowacki Jul 2, 2026
d2bb52d
Update versions (#281)
ernest-nowacki Jul 2, 2026
1d831ca
Added dtcc-mainnet-appchain support and bumped version (#282)
amit-momin Jul 8, 2026
4f85f23
Added getSecrets method to fetch multiple secrets
russell-stern May 5, 2026
3834090
Fixed linting
russell-stern May 5, 2026
4151e0b
Switched to throwing an error on any failed fetch
russell-stern Jun 8, 2026
4fffbee
Merge branch 'get_secrets' of https://github.com/smartcontractkit/cre…
russell-stern Jul 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,23 +270,23 @@ bun generate:sdk # Generate all SDK types and code

The [`breaking-changes`](./.github/workflows/breaking-changes.yml) workflow blocks PRs that alter any of the three protected contracts. If your change is intentional, update the relevant baseline before pushing:

| Contract | What triggers the failure | How to update |
|---|---|---|
| Proto fields | Field deleted, renamed, renumbered, or type changed | No baseline file — CI runs `buf breaking` on `submodules/chainlink-protos` (`cre` module) against the submodule commit pinned on `main` |
| TypeScript public API | An exported type/interface was removed or changed | Run `bun run update-api-baseline` inside `packages/cre-sdk` and commit `api-baseline.d.ts` |
| JS host binding names | A binding was added, removed, or renamed in `host-bindings.ts` | Run `bun test --update-snapshots` inside `packages/cre-sdk` and commit the updated `__snapshots__` file |
| Rust host imports | An `extern "C"` import was added or removed in `lib.rs` | Re-run the sed extraction (see `breaking-changes.yml`) and commit `host-imports-baseline.txt` |
| Contract | What triggers the failure | How to update |
| --------------------- | -------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| Proto fields | Field deleted, renamed, renumbered, or type changed | No baseline file — CI runs `buf breaking` on `submodules/chainlink-protos` (`cre` module) against the submodule commit pinned on `main` |
| TypeScript public API | An exported type/interface was removed or changed | Run `bun run update-api-baseline` inside `packages/cre-sdk` and commit `api-baseline.d.ts` |
| JS host binding names | A binding was added, removed, or renamed in `host-bindings.ts` | Run `bun test --update-snapshots` inside `packages/cre-sdk` and commit the updated `__snapshots__` file |
| Rust host imports | An `extern "C"` import was added or removed in `lib.rs` | Re-run the sed extraction (see `breaking-changes.yml`) and commit `host-imports-baseline.txt` |

#### CI override labels

When a change is **intentionally** breaking and cannot be fixed by updating a baseline (e.g. a coordinated proto break before `main` catches up), a **maintainer** adds the matching label on the PR (this re-runs the workflow):

| Label | Skips |
|-------|--------|
| `breaking-change:proto` | `proto-breaking` (`buf breaking`) |
| `breaking-change:typescript-api` | `ts-api-surface` |
| `breaking-change:host-bindings` | `host-bindings` |
| `breaking-change:approved` | All three jobs |
| Label | Skips |
| -------------------------------- | --------------------------------- |
| `breaking-change:proto` | `proto-breaking` (`buf breaking`) |
| `breaking-change:typescript-api` | `ts-api-surface` |
| `breaking-change:host-bindings` | `host-bindings` |
| `breaking-change:approved` | All three jobs |

Labels are an audit trail in the PR timeline, not a substitute for review. Prefer updating baselines (`api-baseline.d.ts`, snapshots, `host-imports-baseline.txt`) when the new contract is the new source of truth. For proto breaks, coordinate the `chainlink-protos` submodule bump and document migration notes in the PR.

Expand Down
71 changes: 58 additions & 13 deletions bun.lock

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions bunfig.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[install]
# Without this, newer bun versions install workspace packages in a way that
# breaks TypeScript's ability to find the types for built-in globals like
# Response and Request. Setting "hoisted" keeps all packages in one shared
# node_modules folder (the classic layout), which fixes the lookup.
linker = "hoisted"
11 changes: 10 additions & 1 deletion packages/cre-rust-prebuilt-plugin-example/project.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# CRE project settings — only local-simulation is needed for this example.
local-simulation:
rpcs:
- chain-name: ethereum-testnet-sepolia
url: https://por.bcy-p.metalhosts.com/cre-alpha/MvqtrdftrbxcP3ZgGBJb3bK5/ethereum/sepolia

staging-settings:
rpcs:
- chain-name: ethereum-testnet-sepolia
url: https://ethereum-sepolia-rpc.publicnode.com

production-settings:
rpcs:
- chain-name: ethereum-testnet-sepolia
url: https://ethereum-sepolia-rpc.publicnode.com
16 changes: 16 additions & 0 deletions packages/cre-rust-prebuilt-plugin-example/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,19 @@ local-simulation:
workflow-artifacts:
workflow-path: "./wasm/workflow.wasm"
config-path: "./config.json"

staging-settings:
user-workflow:
workflow-name: "rust-inject-prebuilt-plugin"
workflow-artifacts:
workflow-path: "./wasm/workflow.wasm"
config-path: "./config.json"
secrets-path: ""

production-settings:
user-workflow:
workflow-name: "rust-inject-prebuilt-plugin"
workflow-artifacts:
workflow-path: "./wasm/workflow.wasm"
config-path: "./config.json"
secrets-path: ""
11 changes: 10 additions & 1 deletion packages/cre-rust-source-extensions-example/project.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# CRE project settings — only local-simulation is needed for this example.
local-simulation:
rpcs:
- chain-name: ethereum-testnet-sepolia
url: https://por.bcy-p.metalhosts.com/cre-alpha/MvqtrdftrbxcP3ZgGBJb3bK5/ethereum/sepolia

staging-settings:
rpcs:
- chain-name: ethereum-testnet-sepolia
url: https://ethereum-sepolia-rpc.publicnode.com

production-settings:
rpcs:
- chain-name: ethereum-testnet-sepolia
url: https://ethereum-sepolia-rpc.publicnode.com
16 changes: 16 additions & 0 deletions packages/cre-rust-source-extensions-example/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,19 @@ local-simulation:
workflow-artifacts:
workflow-path: "./wasm/workflow.wasm"
config-path: "./config.json"

staging-settings:
user-workflow:
workflow-name: "rust-inject-source-extensions"
workflow-artifacts:
workflow-path: "./wasm/workflow.wasm"
config-path: "./config.json"
secrets-path: ""

production-settings:
user-workflow:
workflow-name: "rust-inject-source-extensions"
workflow-artifacts:
workflow-path: "./wasm/workflow.wasm"
config-path: "./config.json"
secrets-path: ""
11 changes: 7 additions & 4 deletions packages/cre-sdk-examples/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@
###############################################################################
# Ethereum private key or 1Password reference (e.g. op://vault/item/field)
CRE_ETH_PRIVATE_KEY=0000000000000000000000000000000000000000000000000000000000000001
# Profile to use for this environment (e.g. local-simulation, production, production-testnet)
CRE_TARGET=local-simulation
# Profile to use for this environment (e.g. staging-settins, production-settings)
CRE_TARGET=staging-settings
# This one will be used in PoR workflow
SECRET_ADDRESS_ALL=0x4700A50d858Cb281847ca4Ee0938F80DEfB3F1dd
# This one will be used in secrets workflow
SECRET_CHARACTER_ID=5
# These will be used in secrets workflow
SECRET_URL_VALUE="https://swapi.info/api/people/{characterId}"
SECRET_CHARACTER_ID1=5
SECRET_CHARACTER_ID2=6
SECRET_CHARACTER_ID3=7
# Secret header value for HTTP trigger
SECRET_HEADER_VALUE=abcd1234
20 changes: 13 additions & 7 deletions packages/cre-sdk-examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,37 +28,43 @@ The setup is done in a way that treats `cre-sdk-examples` root directory as a CR

**Examples**:

[Hello World workflow](https://github.com/smartcontractkit/cre-sdk-typescript/blob/main/packages/cre-sdk-examples/src/workflows/hello-world/index.ts):
[Hello World workflow](https://github.com/smartcontractkit/cre-sdk-typescript/blob/main/packages/cre-sdk-examples/src/workflows/hello-world/main.ts):

```zsh
cre workflow simulate ./src/workflows/hello-world
```

[Http Fetch workflow](https://github.com/smartcontractkit/cre-sdk-typescript/blob/main/packages/cre-sdk-examples/src/workflows/http-fetch/index.ts):
[Http Fetch workflow](https://github.com/smartcontractkit/cre-sdk-typescript/blob/main/packages/cre-sdk-examples/src/workflows/http-fetch/main.ts):

```zsh
cre workflow simulate ./src/workflows/http-fetch
```

[On Chain Read workflow](https://github.com/smartcontractkit/cre-sdk-typescript/blob/main/packages/cre-sdk-examples/src/workflows/on-chain/index.ts):
[On Chain Read workflow](https://github.com/smartcontractkit/cre-sdk-typescript/blob/main/packages/cre-sdk-examples/src/workflows/on-chain/main.ts):

```zsh
cre workflow simulate ./src/workflows/on-chain
```

[On Chain Write workflow](https://github.com/smartcontractkit/cre-sdk-typescript/blob/main/packages/cre-sdk-examples/src/workflows/on-chain-write/index.ts):
[On Chain Write workflow](https://github.com/smartcontractkit/cre-sdk-typescript/blob/main/packages/cre-sdk-examples/src/workflows/on-chain-write/main.ts):

```zsh
cre workflow simulate ./src/workflows/on-chain-write
```

[Proof of Reserve workflow](https://github.com/smartcontractkit/cre-sdk-typescript/blob/main/packages/cre-sdk-examples/src/workflows/proof-of-reserve/index.ts):
[Solana On-Chain Write workflow](https://github.com/smartcontractkit/cre-sdk-typescript/blob/main/packages/cre-sdk-examples/src/workflows/solana-onchain-write/main.ts):

```zsh
cre workflow simulate ./src/workflows/solana-onchain-write
```

[Proof of Reserve workflow](https://github.com/smartcontractkit/cre-sdk-typescript/blob/main/packages/cre-sdk-examples/src/workflows/proof-of-reserve/main.ts):

```zsh
cre workflow simulate ./src/workflows/proof-of-reserve
```

[Star Wars character example](https://github.com/smartcontractkit/cre-sdk-typescript/blob/main/packages/cre-sdk-examples/src/workflows/star-wars/index.ts):
[Star Wars character example](https://github.com/smartcontractkit/cre-sdk-typescript/blob/main/packages/cre-sdk-examples/src/workflows/star-wars/main.ts):

```zsh
cre workflow simulate ./src/workflows/star-wars
Expand All @@ -75,5 +81,5 @@ bun x cre-compile <input.ts> <output.wasm>
Example:

```bash
bun cre-compile src/workflows/hello-world/index.ts dist/hello-world.wasm
bun cre-compile src/workflows/hello-world/main.ts dist/hello-world.wasm
```
4 changes: 3 additions & 1 deletion packages/cre-sdk-examples/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@chainlink/cre-sdk-examples",
"private": true,
"version": "1.10.0",
"version": "1.16.0",
"type": "module",
"author": "Ernest Nowacki",
"license": "BUSL-1.1",
Expand All @@ -17,6 +17,8 @@
"dependencies": {
"@bufbuild/protobuf": "2.6.3",
"@chainlink/cre-sdk": "workspace:*",
"@solana/addresses": "6.10.0",
"@solana/codecs": "6.10.0",
"viem": "2.34.0",
"zod": "3.25.76"
},
Expand Down
69 changes: 33 additions & 36 deletions packages/cre-sdk-examples/project.yaml
Original file line number Diff line number Diff line change
@@ -1,50 +1,47 @@
# ==========================================================================
# CRE PROJECT SETTINGS FILE
# ==========================================================================
# This file defines environment-specific targets used by the CRE CLI.
# Each top-level key is a target (e.g., `production`, `production-testnet`, etc.).
#
# You can define your own custom target names, such as `my-target`, and point
# the CLI to it via an environment variable.
#
# Below is an example `my-target`:
# Project-specific settings for CRE CLI targets.
# Each target defines cre-cli, account, and rpcs groups.
#
# Example custom target:
# my-target:
# cre-cli:
# # Required: Workflow DON ID used for registering and operating workflows.
# don-family: "small"
# logging:
# # Optional: Path to the seth configuration file (TOML). Used for logging configuration.
# seth-config-path: "/path/to/seth-config.toml"
# account:
# workflow-owner-address: "0x123..." # Optional: Owner wallet/MSIG address (used for --unsigned transactions)
# rpcs:
# # Required: Map each used chain selector to a corresponding RPC URL (HTTPS)
# - chain-name: ethereum-mainnet
# url: "https://sepolia.infura.io/v3/YOUR_API_KEY"
# - chain-name: ethereum-testnet-sepolia # Required if your workflow interacts with this chain
# url: "<select your own rpc url>"
# - chain-name: ethereum-mainnet # Required if your workflow interacts with this chain
# url: "<select your own rpc url>"
#
# RPC URLs support ${VAR_NAME} syntax to reference environment variables.
# This keeps secrets out of project.yaml (which is committed to git).
# Variables are resolved from your .env file or exported shell variables.
# Example:
# - chain-name: ethereum-testnet-sepolia
# url: https://rpc.example.com/${CRE_SECRET_RPC_SEPOLIA}
#
# Experimental chains (automatically used by the simulator when present):
# Use this for chains not yet in official chain-selectors (e.g., hackathons, new chain integrations).
# In your workflow, reference the chain as evm:ChainSelector:<chain-selector>@1.0.0
#
# experimental-chains:
# - chain-selector: 12345 # The chain selector value
# rpc-url: "https://rpc.example.com" # RPC endpoint URL
# forwarder: "0x..." # Forwarder contract address on the chain

# ==========================================================================
local-simulation:
staging-settings:
rpcs:
- chain-name: ethereum-testnet-sepolia
url: https://por.bcy-p.metalhosts.com/cre-alpha/MvqtrdftrbxcP3ZgGBJb3bK5/ethereum/sepolia
url: https://ethereum-sepolia-rpc.publicnode.com
- chain-name: solana-devnet
url: https://api.devnet.solana.com

# ==========================================================================
production-testnet:
cre-cli:
don-family: "zone-a"
logging:
seth-config-path: ""
production-settings:
rpcs:
- chain-name: ethereum-testnet-sepolia
url: https://por.bcy-p.metalhosts.com/cre-alpha/MvqtrdftrbxcP3ZgGBJb3bK5/ethereum/sepolia
- chain-name: ethereum-testnet-sepolia-base-1
url: <select your own rpc url>
dev-platform:
don-id: 4
contracts:
registries:
- name: WorkflowRegistry
address: "0xF3f93fc4dc177748E7557568b5354cB009e3818a"
chain-selector: 16015286601757825753 #ethereum-sepolia
- name: CapabilitiesRegistry
address: "0x02471a03A86ac92DE793af303E9f756f0aE60677"
chain-selector: 16015286601757825753
url: https://ethereum-sepolia-rpc.publicnode.com
- chain-name: solana-devnet
url: https://api.devnet.solana.com
10 changes: 8 additions & 2 deletions packages/cre-sdk-examples/secrets.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
secretsNames:
SECRET_ADDRESS:
- SECRET_ADDRESS_ALL
CHARACTER_ID:
- SECRET_CHARACTER_ID
SECRET_URL:
- SECRET_URL_VALUE
CHARACTER_ID1:
- SECRET_CHARACTER_ID1
CHARACTER_ID2:
- SECRET_CHARACTER_ID2
CHARACTER_ID3:
- SECRET_CHARACTER_ID3
SECRET_HEADER:
- SECRET_HEADER_VALUE
Original file line number Diff line number Diff line change
@@ -1,38 +1,33 @@
# ==========================================================================
# CRE WORKFLOW SETTINGS FILE
# ==========================================================================
# This file defines environment-specific workflow settings used by the CRE CLI.
#
# Each top-level key is a target (e.g., `production`, `production-testnet`, etc.).
# You can also define your own custom targets, such as `my-target`, and
# point the CLI to it via an environment variable.
#
# Note: If any setting in this file conflicts with a setting in the CRE Project Settings File,
# the value defined here in the workflow settings file will take precedence.
#
# Below is an example `my-target`:
# Workflow-specific settings for CRE CLI targets.
# Each target defines user-workflow and workflow-artifacts groups.
# Settings here override CRE Project Settings File values.
#
# Example custom target:
# my-target:
# user-workflow:
# # Optional: The address of the workflow owner (wallet or MSIG contract).
# # Used to establish ownership for encrypting the workflow's secrets.
# # If omitted, defaults to an empty string.
# workflow-owner-address: "0x1234567890abcdef1234567890abcdef12345678"
#
# # Required: The name of the workflow to register with the Workflow Registry contract.
# workflow-name: "MyExampleWorkflow"
# workflow-name: "MyExampleWorkflow" # Required: Workflow Registry name
# workflow-artifacts:
# workflow-path: "./main.ts" # Path to workflow entry point
# config-path: "./config.yaml" # Path to config file
# secrets-path: "../secrets.yaml" # Path to secrets file (project root by default)

# ==========================================================================
local-simulation:
staging-settings:
user-workflow:
workflow-owner-address: "(optional) Multi-signature contract address"
workflow-name: "confidential-http-with-body"
workflow-artifacts:
workflow-path: "./index.ts"
config-path: "./config.json"
workflow-path: "./main.ts"
config-path: "./config.staging.json"
secrets-path: ""

# ==========================================================================
production-testnet:
production-settings:
user-workflow:
workflow-owner-address: "(optional) Multi-signature contract address"
workflow-name: "confidential-http-with-body"
workflow-artifacts:
workflow-path: "./main.ts"
config-path: "./config.production.json"
secrets-path: ""
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"schedule": "*/30 * * * * *"
}
Loading
Loading