docs: add EIP-712 signTypedData interfaces and docs (WALLET-1253)#18
Open
ost-ptk wants to merge 1 commit into
Open
docs: add EIP-712 signTypedData interfaces and docs (WALLET-1253)#18ost-ptk wants to merge 1 commit into
ost-ptk wants to merge 1 commit into
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
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
Documents the EIP-712 typed-data signing feature in the Casper Wallet SDK README, so dApp developers have the interfaces and usage docs for
signTypedData. Docs-only — no runtime code changes.Part of epic WALLET-1250 (EIP-712 signature requests). Interfaces taken verbatim from the feature's source definitions in
casper-click-websdk(isdk.ts, PR #155).Closes WALLET-1253.
What's added (README.md)
signTypedData(params: SignTypedDataParams, signingPublicKey: string): Promise<SignTypedDataResult | undefined>with params/returns notes and a usage example, matching the style of the existingsign/signMessageentries.SignTypedDataParams,SignTypedDataResult(andEIP712HashArtifacts).signTypedDataEIP712 = 'sign-typed-data-eip712'to the supports enum, and references it fromgetActivePublicKeySupports. (Forward-looking: the canonical value is defined in the SDK types; documented as part of the EIP-712 rollout.)signTypedData error codessection documentingSignTypedDataErrorCodes(7 codes) and thatsignTypedDatareturns failures in theresult.error/result.errorCodeenvelope rather than throwing.Notes
index.jsor any runtime code — README only.prettier --checkpasses (repo.prettierrc: single quotes,arrowParens: avoid,trailingComma: none).SignTypedDataErrorCodesis a superset of the 3 validation codes incasper-wallet-core: the extra 4 (USER_REJECTED,SIGNATURE_SCHEME_NOT_SUPPORTED,ACCOUNT_NOT_FOUND,NOT_AUTHORIZED) originate at the wallet/transport layer, not in the pure logic library.🤖 Generated with Claude Code