-
Notifications
You must be signed in to change notification settings - Fork 575
Sponsorship xls 68 #3238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
cybele-ripple
wants to merge
13
commits into
main
Choose a base branch
from
sponsorship-XLS-68
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Sponsorship xls 68 #3238
Changes from 3 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
94192c1
initial commit for XLS 82d
cybele-ripple b2547ae
changes based on initial agent review
cybele-ripple 22a0ecf
resolved issues from tests
cybele-ripple 5dbd855
coderabbit fixes
cybele-ripple 93f5476
fix return type in sign
cybele-ripple 2022d46
resolve error based on big number
cybele-ripple e86d7da
resolve issues related to lint
cybele-ripple bfce3b7
code rabbit comments addressed
cybele-ripple 2ac8673
linter fix
cybele-ripple 2eeb54a
linter fixes
cybele-ripple b8dfd79
Merge branch 'main' into sponsorship-XLS-68
cybele-ripple 72cc2d5
feat(xls-68): align sponsor fields and account_sponsoring params with…
cybele-ripple 09351e1
fix(xls-68): correct Sponsorship ledger entry code and point CI at sp…
cybele-ripple File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
What is the return type of secp256k1.sign() in@noble/curveswhen options are passed but no format is specified? Does the Signature object have toBytes or toDERRawBytes method?💡 Result:
The return type of secp256k1.sign in
@noble/curves, when options are passed but no format is specified, is a Signature object. This is evidenced by documentation examples where secp256k1.sign(msg, secretKey) without format returns a Signature instance, as shown in code snippets like const sigInstance = secp256k1.Signature.fromBytes(sigRec, 'recovered'); and historical notes that sign returns Signature with { r, s, recovery }. The default format when unspecified is 'compact' (64-byte RS), but the primary return is the Signature class instance. The Signature object has toCompactRawBytes and toDERRawBytes methods (or equivalent toBytes('compact')/'der' in some versions), as explicitly stated in interface definitions: interface ECDSASignature { r: bigint; s: bigint; recovery?: number; toCompactRawBytes: Uint8Array; toDERRawBytes: Uint8Array; }. Older versions used toBytes, but raw bytes methods are confirmed. It does not have a plain toBytes method without arguments based on available source snippets, but the queried methods exist.Citations:
Build failure:
toBytesis not the correct method for DER encoding.In
@noble/curves,secp256k1.sign()returns aSignatureobject. To export it as DER-encoded bytes, use.toDERRawBytes()instead of.toBytes('der'), which does not exist on the Signature class.Fix
return bytesToHex( nobleSecp256k1 .sign(Sha512.half(message), hexToBytes(normedPrivateKey), { lowS: true, extraEntropy: undefined, prehash: false, }) - .toBytes('der'), + .toDERRawBytes(), ).toUpperCase()🧰 Tools
🪛 GitHub Actions: Node.js CI
[error] 56-56: TypeScript build failed in ripple-keypairs. TS2339: Property 'toBytes' does not exist on type 'Uint8Array'.
🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This finding is based on an outdated version of the @noble/curves api. We are using version 2.x which includes a change from toDERRawBytes to toBytes('der').
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.