Page MenuHomePhabricator

[ecash-wallet] Support for MINT VAULT SLP actions
AbandonedPublicDraft

Authored by bytesofman on Aug 28 2025, 21:18.

Details

Reviewers
None
Group Reviewers
Restricted Project
Summary

Plan to abandon this diff for now and revisit after other punchlist items. Rationale.

  1. SLP_TOKEN_TYPE_MINT_VAULT tokens require special handling compared to ALP and SLP tokens
  • Unique spec where we cannot have mint txs until the genesis tx is confirmed; requires pre-broadcast API calls to check this or assumption that would lead to invalid mints
  • Unique spec where the mint baton requirement is waived, but we do need utxos with the right script to mint. Again, we can only check this with an API call prior to broadcast.
  1. Currently the least-used token spec, with 17 created all time

Would like to support this. For now, those design decisions are difficult to generalize. I do not have experience with the protocol and am not familiar with general best practices.

Test Plan

TBD

Event Timeline

Failed tests logs:

====== Wallet can build and broadcast on regtest: We can handle SLP SLP_TOKEN_TYPE_MINT_VAULT token actions.Wallet can build and broadcast on regtest We can handle SLP SLP_TOKEN_TYPE_MINT_VAULT token actions ======
Error: Missing required token utxos: 0a5a1807a193854601f8ba629fb16999b478d64ecc2ddcade7e1b000451cf908 => Missing mint baton
    at build (src/wallet.ts:288:23)
    at Context.<anonymous> (test/transactions.test.ts:1232:56)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)

Each failure log is accessible here:
Wallet can build and broadcast on regtest: We can handle SLP SLP_TOKEN_TYPE_MINT_VAULT token actions.Wallet can build and broadcast on regtest We can handle SLP SLP_TOKEN_TYPE_MINT_VAULT token actions