-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wallet client calls for signature restoration
- Loading branch information
Showing
3 changed files
with
113 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package nut07 | ||
|
||
type State int | ||
|
||
const ( | ||
Unspent State = iota | ||
Pending | ||
Spent | ||
) | ||
|
||
func (state State) String() string { | ||
switch state { | ||
case Unspent: | ||
return "UNSPENT" | ||
case Pending: | ||
return "PENDING" | ||
case Spent: | ||
return "SPENT" | ||
default: | ||
return "unknown" | ||
} | ||
} | ||
|
||
type PostCheckStateRequest struct { | ||
Ys []string `json:"Ys"` | ||
} | ||
|
||
type PostCheckStateResponse struct { | ||
States []ProofState `json:"states"` | ||
} | ||
|
||
type ProofState struct { | ||
Y string `json:"Y"` | ||
State State `json:"state"` | ||
Witness string `json:"witness"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package nut09 | ||
|
||
import "github.com/elnosh/gonuts/cashu" | ||
|
||
type PostRestoreRequest struct { | ||
Outputs cashu.BlindedMessages `json:"outputs"` | ||
} | ||
|
||
type PostRestoreResponse struct { | ||
Outputs cashu.BlindedMessages `json:"outputs"` | ||
Signatures cashu.BlindedSignatures `json:"signatures"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters