Skip to content

Commit

Permalink
feat(core/btc): add json tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Gkirito committed Apr 14, 2024
1 parent 12d5462 commit 9bb9214
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions core/btc/runes/edict.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
)

type Edict struct {
Id RuneId
Amount big.Int
Output uint32
Id RuneId `json:"id"`
Amount big.Int `json:"amount"`
Output uint32 `json:"output"`
}

func NewEdictFromIntegers(tx *wire.MsgTx, id RuneId, amount big.Int, output big.Int) *Edict {
Expand Down
14 changes: 7 additions & 7 deletions core/btc/runes/etching.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ package runes
import "math/big"

type Etching struct {
Divisibility *byte
Premine *big.Int
Rune *Rune
Spacers *uint32
Symbol *rune
Terms *Terms
Turbo bool
Divisibility *uint8 `json:"divisibility"`
Premine *big.Int `json:"premine"`
Rune *Rune `json:"rune"`
Spacers *uint32 `json:"spacers"`
Symbol *rune `json:"symbol"`
Terms *Terms `json:"terms"`
Turbo bool `json:"turbo"`
}

const (
Expand Down
4 changes: 2 additions & 2 deletions core/btc/runes/rune_id.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ var (
)

type RuneId struct {
Block uint64
Tx uint32
Block uint64 `json:"block"`
Tx uint32 `json:"tx"`
}

func (r *RuneId) Next(block big.Int, tx big.Int) *RuneId {
Expand Down
8 changes: 4 additions & 4 deletions core/btc/runes/runestone.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ type Artifact interface {
}

type Runestone struct {
Edicts []Edict
Etching *Etching
Mint *RuneId
Pointer *uint32
Edicts []Edict `json:"edicts"`
Etching *Etching `json:"etching"`
Mint *RuneId `json:"mint"`
Pointer *uint32 `json:"pointer"`
}

func (r Runestone) artifact() {
Expand Down

0 comments on commit 9bb9214

Please sign in to comment.