Skip to content

feat: support mpt_utility APIs for key rotation - #149

Open
yinyiqian1 wants to merge 3 commits into
XRPLF:mainfrom
yinyiqian1:mpt-utility-key-rotation
Open

yinyiqian1 wants to merge 3 commits into
XRPLF:mainfrom
yinyiqian1:mpt-utility-key-rotation

Conversation

@yinyiqian1

@yinyiqian1 yinyiqian1 commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Add API layer for rippled and other downstream consumer to call, also added context hash for each tx/mode:

Hash = SHA-512Half(TransactionType ‖ Account ‖ MPTokenIssuanceID ‖ Sequence ‖ Counterparty ‖ Version)
(For transactions that do not need to bind to a balance, Version = 0)

  • ConfidentialMPTMirrorUpdate

    • Issuer mode:
      • mpt_get_issuer_mirror_update_proof / mpt_verify_issuer_mirror_update_proof (128 bytes)
      • context hash = ConfidentialMPTMirrorUpdate || issuer || MPTokenIssuanceID || seq || holder || 0
    • Holder mode:
      • mpt_get_holder_mirror_update_proof / mpt_verify_holder_mirror_update_proof (128 bytes)
      • context hash = ConfidentialMPTMirrorUpdate || holder || MPTokenIssuanceID || seq || holder || holder's ConfidentialBalanceVersion
  • ConfidentialMPTHolderKeyUpdate

    • Rotation (tfHolderKeyRotation):
      • mpt_get_holder_key_rotation_proof / mpt_verify_holder_key_rotation_proof (224 bytes)
      • context hash = ConfidentialMPTHolderKeyUpdate || holder || MPTokenIssuanceID || seq || holder || holder's ConfidentialBalanceVersion
    • Recovery (tfHolderKeyRecovery):
      • mpt_get_holder_key_recovery_proof / mpt_verify_holder_key_recovery_proof (64 bytes)
      • context hash = ConfidentialMPTHolderKeyUpdate || holder || MPTokenIssuanceID || seq || holder || 0
    • Cancel (tfCancelRecovery): No proof required
  • ConfidentialMPTRecoverBalance

    • mpt_get_recover_balance_proof / mpt_verify_recover_balance_proof (128 bytes)
    • context hash = ConfidentialMPTRecoverBalance || issuer || MPTokenIssuanceID || seq || holder || 0

Also updated the CXX standard to 17 because some of the cpp functions need the newer version.

@yinyiqian1
yinyiqian1 force-pushed the mpt-utility-key-rotation branch 2 times, most recently from 7409e7d to be5674c Compare October 6, 2026 22:18
@yinyiqian1 yinyiqian1 changed the title Support mpt_utility APIs for key rotation feat: support mpt_utility APIs for key rotation Oct 6, 2026
@yinyiqian1
yinyiqian1 force-pushed the mpt-utility-key-rotation branch 3 times, most recently from 3b14f11 to 237145b Compare October 7, 2026 16:22
@yinyiqian1
yinyiqian1 force-pushed the mpt-utility-key-rotation branch from 237145b to 18eb2cc Compare October 7, 2026 16:38
@yinyiqian1
yinyiqian1 marked this pull request as ready for review October 7, 2026 16:51
@yinyiqian1
yinyiqian1 requested a review from mrtcnk October 7, 2026 20:29
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