feat: add xrp support#727
Draft
yilmazbahadir wants to merge 3 commits intobaha/feat/asset-modulesfrom
Draft
Conversation
- add new @gridplus/xrp chain package (module, lattice signer plugin, shared helpers) - register xrp:lattice in SDK default chain manifest - add public SDK helpers: fetchXrpAddresses() and signXrp() - extend protocol/constants/types with SHA512HALF + XRP encoding support - gate XRP generic-signing capabilities by firmware version (>= 0.18.10) - allow XRP coin type in derivation path validation and add XRP derivation constant - add XRP e2e signing coverage and default manifest unit assertion - update docs/sidebar/architecture docs for XRP and chain-modules page - update workspace scripts/deps and pnpm lockfile for @gridplus/xrp
- replace `catch (err: any)` with `unknown` handling in general e2e tests - format xrp e2e vector literals and xrp signer queue call for biome - type xrp capability maps as `Record<string, unknown>` to satisfy typecheck
Move compressSecp256k1Pubkey to one xrp shared module and re-export from chain/devices. Replace repeated XRP e2e timeout literals with constants and localize one-off test client setup.
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.
Do not merge! this will be rebased onto
devafter #726 is merged.📝 Summary
Adds first-party XRP support to
gridplus-sdkusing the new chain plugin architecture, including runtime registration, SDK helper APIs, protocol/constants updates, docs, and XRP e2e coverage.Also includes follow-up lint/typecheck fixes for XRP e2e tests.
🔧 Context / Implementation
@gridplus/xrppackages/chains/xrp/src/chain.tspackages/chains/xrp/src/devices/lattice.tspackages/chains/xrp/src/index.tspackages/sdk/src/chains/defaultManifest.tsfetchXrpAddresses(...)inpackages/sdk/src/api/addresses.tssignXrp(...)inpackages/sdk/src/api/signing.tsSHA512HALFhash supportXRPencoding supportpackages/types/*andpackages/sdk/src/constants.tspackages/docs/docs/addresses.mdpackages/docs/docs/signing.mdpackages/docs/docs/intro.mdpackages/docs/docs/chain-modules.md🧪 Test Plan
pnpm lintpnpm typecheckpnpm --filter gridplus-sdk run test-unitpnpm --filter gridplus-sdk run e2e-sign-xrp(with simulator and test firmware capabilities)Expected result:
fetchXrpAddressesandsignXrpwork through SDK helper APIs.🖼️ Screenshots (if applicable)