Specify token concatenation format for multiple mints #275
Labels
No labels
breaking change
bug
documentation
enhancement
needs discussion
needs implementation
new nut
ready
wallet-only
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo-admin/nuts#275
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Background
Token v4 removed support for multiple mints in a single token due to complexity. However, there's still a need to handle tokens from multiple mints, but no specification exists for how to concatenate them.
Problem
Different implementations are handling multi-mint token concatenation differently:
cashuB...:cashuB...:cashuB..."cashuB" + base64(cbor([tokenv4, tokenv4, tokenv4]))Without a clear specification, this leads to interoperability issues.
Proposal
Standardize the colon-separated approach for concatenating tokens from multiple mints:
Where each
cashuB<token>is a complete, valid single-mint token.This approach is simpler and more readable than encoding multiple tokens in a CBOR array.
Originally brought up in matrix: https://matrix.to/#/!QViKSFdmRsqfVtmMRi:matrix.cashu.space/$Lqdjz7Ejug_EK_JNg5kP3Y8N-jYzNSmTu9ZKLzg_ImY?via=matrix.org&via=pub.solar&via=balooga.xyz
this would also be useful for multiple units. ie. 10 sats + 10 search tokens
ISTM that cbor array approach tried to reduce repetitions of "cashuB" string
What do you think about the format
cashuB<token1>:<token2>:<token3>which combines both worlds.