maidsafe / sn_dbc

Safe Network DBCs
BSD 3-Clause "New" or "Revised" License
15 stars 16 forks source link

feat: convert owned dbc to bearer #188

Closed jacderida closed 2 years ago

jacderida commented 2 years ago

Converts an owned DBC (one whose owner is a public key and can only be spent by the holder of that key), to a bearer DBC (one whose owner is a secret key). When an owned DBC is reissued/spent, the secret key must be supplied.

The purpose of this is to make it easier to spend owned DBCs. Our plan is to supply the secret key for the owned DBC when it's deposited in a wallet. At that point it will be converted to a bearer, then when it is used as an input on the next reissue, the secret key has already been supplied. Since there can be many input DBCs on a reissue, we avoid an issue with trying to map different secret keys to different inputs.