Skip to content

Commit

Permalink
Add marshal json
Browse files Browse the repository at this point in the history
  • Loading branch information
Agusx1211 committed Sep 28, 2023
1 parent 64d522a commit f2d3a57
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions intents/intent.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ func (i *Intent) UnmarshalJSON(data []byte) error {
return nil
}

func (i *Intent) MarshalJSON() ([]byte, error) {
return json.Marshal(JSONIntent{
Version: i.Version,
Packet: i.Packet,
Signatures: i.signatures,
})
}

func (intent *Intent) Hash() ([]byte, error) {
packet := intent.Packet

Expand Down

0 comments on commit f2d3a57

Please sign in to comment.