docs: certified variables guide#63
Merged
Merged
Conversation
Member
Author
Review: Certified VariablesVerified clean
Needs human verification
No must-fix items found |
…upResultToBuffer Verified against .sources/icp-js-sdk-docs/public/core/latest.zip: - @icp-sdk/core/agent exports both lookup_path (function) and HashTree (type alias): confirmed - @icp-sdk/core/principal exports Principal (class): confirmed - lookup_path returns LookupResult (discriminated union), NOT Uint8Array|null. The previous code passed the LookupResult object directly to TextDecoder.decode() and checked it with `\!leafData` — both incorrect for the new SDK API. Fix: import lookupResultToBuffer from @icp-sdk/core/agent and wrap lookup_path call. lookupResultToBuffer converts LookupResult → Uint8Array|undefined, enabling correct undefined check and TextDecoder.decode() usage. Note: npm run build fails on a pre-existing issue in https-outcalls.mdx (missing .sources/examples submodule files) unrelated to this change.
Member
Author
|
Feedback addressed:
|
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
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
RbTree-backed certified key-value store usingic-certified-map 0.4andic-cdk 0.19;#[init],#[post_upgrade],set,delete,get, and batchset_manymethodsCertifiedDatafrommo:core+ sha2 hash) and full multi-value store usingic-certification/CertTreewith per-key Merkle witnesses@dfinity/certificate-verificationwith all 6 verification stepsicp(not dfx)dfinity/cdk-rs,caffeinelabs/motoko-core,dfinity/examples,dfinity/response-verificationNote: pre-existing build failure in
https-outcalls.mdx(uninitializedexamplessubmodule) is not caused by this page.Sync recommendation
Informed by
dfinity/icskills—skills/certified-variables/SKILL.md; informed bydfinity/cdk-rs,caffeinelabs/motoko-core,dfinity/response-verification,dfinity/portal—docs/building-apps/security/data-integrity-and-authenticity.mdx