Specify token concatenation format for multiple mints #275

Open
opened 2025-07-22 13:37:28 +00:00 by thesimplekid · 2 comments
thesimplekid commented 2025-07-22 13:37:28 +00:00 (Migrated from github.com)

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:

  1. Colon-separated approach: cashuB...:cashuB...:cashuB...
  2. CBOR array approach: "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:

cashuB<token1>:cashuB<token2>:cashuB<token3>

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

### 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: 1. **Colon-separated approach**: `cashuB...:cashuB...:cashuB...` 2. **CBOR array approach**: `"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: ``` cashuB<token1>:cashuB<token2>:cashuB<token3> ``` 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
gudnuf commented 2025-08-19 23:42:07 +00:00 (Migrated from github.com)

this would also be useful for multiple units. ie. 10 sats + 10 search tokens

this would also be useful for multiple units. ie. 10 sats + 10 search tokens
prusnak commented 2025-08-20 13:32:11 +00:00 (Migrated from github.com)

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.

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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo-admin/nuts#275
No description provided.