Skip to content

docs: add EIP-712 signTypedData interfaces and docs (WALLET-1253)#18

Open
ost-ptk wants to merge 1 commit into
masterfrom
WALLET-1253-cw-sdk-update-docs-related-to-eip-712-signature-requests
Open

docs: add EIP-712 signTypedData interfaces and docs (WALLET-1253)#18
ost-ptk wants to merge 1 commit into
masterfrom
WALLET-1253-cw-sdk-update-docs-related-to-eip-712-signature-requests

Conversation

@ost-ptk

@ost-ptk ost-ptk commented Jun 4, 2026

Copy link
Copy Markdown
Member

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)

  • MethodssignTypedData(params: SignTypedDataParams, signingPublicKey: string): Promise<SignTypedDataResult | undefined> with params/returns notes and a usage example, matching the style of the existing sign / signMessage entries.
  • TypesSignTypedDataParams, SignTypedDataResult (and EIP712HashArtifacts).
  • CasperWalletSupports — adds signTypedDataEIP712 = 'sign-typed-data-eip712' to the supports enum, and references it from getActivePublicKeySupports. (Forward-looking: the canonical value is defined in the SDK types; documented as part of the EIP-712 rollout.)
  • Error HandlingsignTypedData error codes section documenting SignTypedDataErrorCodes (7 codes) and that signTypedData returns failures in the result.error / result.errorCode envelope rather than throwing.

Notes

  • No changes to index.js or any runtime code — README only.
  • prettier --check passes (repo .prettierrc: single quotes, arrowParens: avoid, trailingComma: none).
  • The SDK's SignTypedDataErrorCodes is a superset of the 3 validation codes in casper-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

@ost-ptk ost-ptk requested a review from Comp0te June 4, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant