-
Notifications
You must be signed in to change notification settings - Fork 3
docs: add canister discovery, binding generation, and frontend development docs #338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
marc0olo
wants to merge
7
commits into
main
Choose a base branch
from
marc0olo/docs-bindings-env-variables
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+667
−63
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
marc0olo
commented
Feb 4, 2026
| execSync(`icp network status -e ${environment} --json`, { encoding: "utf-8" }) | ||
| ); | ||
| const rootKey: string = networkStatus.root_key; | ||
| const proxyTarget: string = networkStatus.api_url; |
Member
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note:
- the dev server wouldn't work correctly until we update the
network statuscommand to deliver theapi_url
raymondk
reviewed
Feb 4, 2026
|
|
||
| ### Other Languages | ||
|
|
||
| The `didc` CLI generates bindings for various languages. See the [Candid repository](https://github.com/dfinity/candid) for available targets. |
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should have a note somewhere that not all generated bindings will work well with icp-cli.
- The target canister id needs to be fixed, or
- the target canister id has to be fetched from the environment variables.
raymondk
reviewed
Feb 4, 2026
raymondk
reviewed
Feb 4, 2026
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Comprehensive documentation for canister discovery, binding generation, and frontend development workflows.
New Documentation
docs/concepts/canister-discovery.mdicp deployautomatically injectsPUBLIC_CANISTER_ID:*variables into all canisters; reading IDs in Rust/Motoko;ic_envcookie mechanism for frontend canister discoverydocs/concepts/binding-generation.md@icp-sdk/bindgen,candidcrate)Updated Documentation
docs/guides/local-development.mdicp network status --json), and two development approachesdocs/reference/environment-variables.mdPUBLIC_CANISTER_ID:*andIC_ROOT_KEYdocs/concepts/build-deploy-sync.mddocs/tutorial.mddocs/index.md,docs/concepts/index.mddocs-site/astro.config.mjsUpdated Example
examples/.../vite.config.tsicp network status --jsonfor all environments; properic_root_keycookie formatexamples/.../App.tsxIC_ROOT_KEYtype toUint8Array; cleaner implementationexamples/.../README.mdic_envcookie mechanism and dev server setupInfrastructure Updates
.claude/CLAUDE.mdscripts/prepare-docs.sh.mdlinks to Starlight URLsKey Technical Details
ic_root_key(lowercase); library returnsIC_ROOT_KEYasUint8Arrayic_cdk::api::env_var_value()+Principal::from_text()Prim.envVar<system>()(available since Motoko 0.16.2) +Principal.fromText()