WIP: On chain mint and melt #194

Closed
thesimplekid wants to merge 3 commits from onchain_mint_melt into main
thesimplekid commented 2024-11-21 09:57:08 +00:00 (Migrated from github.com)

Depends on https://github.com/cashubtc/nuts/pull/188

  • CDK
  • Nutshell
  • Nutmix
  • goNuts
  • cashu-ts

Supersedes https://github.com/cashubtc/nuts/pull/107

Depends on https://github.com/cashubtc/nuts/pull/188 - [ ] CDK - [ ] Nutshell - [ ] Nutmix - [ ] goNuts - [ ] cashu-ts Supersedes https://github.com/cashubtc/nuts/pull/107
a1denvalu3 (Migrated from github.com) reviewed 2024-11-23 13:31:29 +00:00
@ -0,0 +22,4 @@
{
"amount": <int>,
"unit": <str_enum["sat"]>,
"pubkey": <str>
a1denvalu3 (Migrated from github.com) commented 2024-11-23 13:31:28 +00:00

NUT-19 says this should be optional, depending on whether or not the MintInfo requires it.

NUT-19 says this should be optional, depending on whether or not the `MintInfo` requires it.
a1denvalu3 (Migrated from github.com) reviewed 2024-11-23 13:33:08 +00:00
@ -0,0 +116,4 @@
{
"quote": <str>,
"outputs": <Array[BlindedMessage]>,
"witness": <str>
a1denvalu3 (Migrated from github.com) commented 2024-11-23 13:33:08 +00:00

Here as well. It's not clear if this NUT requires a Mint that requires NUT-19 signatures or only supports them.

Here as well. It's not clear if this NUT requires a Mint that requires NUT-19 signatures or only supports them.
a1denvalu3 commented 2024-11-23 13:53:18 +00:00 (Migrated from github.com)

@thesimplekid Why do we need new NUTs for this? Can't we just add some appendices to NUT-3, NUT-4 and NUT-5 on what additional fields a particular Post{Mint|Melt}OnchainRequest should have?

We can then modify NUT-6 to include information about a particular minting and melting method called btconchain like this:

"nuts": {
    "4": {
      "methods": [
        {
          "method": "bolt11",
          "unit": "sat",
          "min_amount": 0,
          "max_amount": 10000
        },
        {
          "method": "btconchain",
          "unit": "sat",
          "min_amount": 0,
          "max_amount": 10000,
          "min_confirmations": 3,
        }
      ],
      "disabled": false
    },
    "5": {
      "methods": [
        {
          "method": "bolt11",
          "unit": "sat",
          "min_amount": 100,
          "max_amount": 10000
        },
        {
          "method": "btconchain",
          "unit": "sat",
          "min_amount": 0,
          "max_amount": 10000
        }
      ],
      "disabled": false
    },
    ...
  }
@thesimplekid Why do we need new NUTs for this? Can't we just add some appendices to NUT-3, NUT-4 and NUT-5 on what additional fields a particular `Post{Mint|Melt}OnchainRequest` should have? We can then modify NUT-6 to include information about a particular minting and melting method called `btconchain` like this: ``` "nuts": { "4": { "methods": [ { "method": "bolt11", "unit": "sat", "min_amount": 0, "max_amount": 10000 }, { "method": "btconchain", "unit": "sat", "min_amount": 0, "max_amount": 10000, "min_confirmations": 3, } ], "disabled": false }, "5": { "methods": [ { "method": "bolt11", "unit": "sat", "min_amount": 100, "max_amount": 10000 }, { "method": "btconchain", "unit": "sat", "min_amount": 0, "max_amount": 10000 } ], "disabled": false }, ... } ```
thesimplekid commented 2024-11-23 15:11:05 +00:00 (Migrated from github.com)

@thesimplekid Why do we need new NUTs for this? Can't we just add some appendices to NUT-3, NUT-4 and NUT-5 on what additional fields a particular Post{Mint|Melt}OnchainRequest should have?

We can then modify NUT-6 to include information about a particular minting and melting method called btconchain like this:

I think its a reasonable question, and one way to do it. But I don't really think we should be changing or adding to past nuts. I think it gets confusing, its better to just have new nuts. That being said maybe what id defined in the new nuts could be reduced and and reference the existing nuts and some of it is repetitive. Though I did it this way because this way the nut stands more on its own and you don't have to check another nut as much. But think there are arguments for and against that

> @thesimplekid Why do we need new NUTs for this? Can't we just add some appendices to NUT-3, NUT-4 and NUT-5 on what additional fields a particular `Post{Mint|Melt}OnchainRequest` should have? > > We can then modify NUT-6 to include information about a particular minting and melting method called `btconchain` like this: I think its a reasonable question, and one way to do it. But I don't really think we should be changing or adding to past nuts. I think it gets confusing, its better to just have new nuts. That being said maybe what id defined in the new nuts could be reduced and and reference the existing nuts and some of it is repetitive. Though I did it this way because this way the nut stands more on its own and you don't have to check another nut as much. But think there are arguments for and against that
prusnak commented 2024-11-24 10:33:52 +00:00 (Migrated from github.com)

NUTs 3, 4 and 5 are mandatory. Adding optional fields to them feels wrong.

Also on-chain minting has some specifics (and we already see that via quote locking) and therefore I think this deserves another pair of NUTs.

I would like to also see Liquid supported and I feel this should be again another pair of NUTs, although the distinction here is probably not that strong and Liquid support can become a part of the BTC on-chain NUTs.

NUTs 3, 4 and 5 are mandatory. Adding optional fields to them feels wrong. Also on-chain minting has some specifics (and we already see that via quote locking) and therefore I think this deserves another pair of NUTs. I would like to also see Liquid supported and I feel this should be again another pair of NUTs, although the distinction here is probably not that strong and Liquid support can become a part of the BTC on-chain NUTs.
elnosh (Migrated from github.com) reviewed 2024-11-25 17:05:45 +00:00
@ -0,0 +32,4 @@
```json
{
"quote": <str>,
"address": <str>,
elnosh (Migrated from github.com) commented 2024-11-25 16:57:44 +00:00
  "request": <str>,

since in other places throughout this NUT request is being used rather than address

```suggestion "request": <str>, ``` since in other places throughout this NUT `request` is being used rather than `address`
@ -0,0 +100,4 @@
### Witness
In order to mint ecash the wallet **MUST** include a signature as defined in [NUT-19][19].
elnosh (Migrated from github.com) commented 2024-11-25 17:05:12 +00:00

This can be moved to the Minting tokens section where this field is used in the request.

This can be moved to the `Minting tokens` section where this field is used in the request.
thesimplekid commented 2025-05-20 14:09:29 +00:00 (Migrated from github.com)

Closing this as its outdated. Will open new onchain spec soon^tm

Closing this as its outdated. Will open new onchain spec soon^tm

Pull request closed

Sign in to join this conversation.
No description provided.