feat: add Ripple Custody full api support - #38
Merged
Merged
Conversation
cybele-ripple
requested changes
Sep 1, 2026
| function fillPath(template: string, params?: Record<string, unknown>): string { | ||
| return template.replace(/\{(?<key>\w+)\}/gu, (_match, key: string) => { | ||
| const value = params?.[key] | ||
| if (value === undefined) { |
Contributor
There was a problem hiding this comment.
consider also adding a check for null like so:
if (value === undefined || value === null) {
this would ensure that "null" passed as a parameter would yield the same missing path parameter error
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.
High Level Overview of Change
custody.api.call— a typed, unsigned HTTP passthrough to any Ripple Custody v1 endpoint the SDK doesn't model as a first-class vertical.custody.api.propose— the signed governed-intent counterpart; wraps any intent payload in aCore_Proposeenvelope, signs it, and submits it (e.g. releasing quarantined transfers) without a dedicated method.Context of Change
api.callmirrors the existing Palisade passthrough (generated route map +operationstypes).api.proposereuses the existingIntentSigner; the envelope build/sign logic is extracted into a sharedbuildProposeEnvelopethat the native transaction path now also uses (no duplication, behavior unchanged).Type of Change
Test Plan
custody-apisuite covering call routing/path-interpolation and propose envelope/signing/overrides; full unit tier green.api.callreads (getMe,getAccounts),api.proposesigned-envelope acceptance, and a non-mutatingv0_ReleaseQuarantinedTransfersdry-run that validates the payload shape.typecheck,lint,format, and the dual ESM+CJSbuildall pass.