runes

package
v0.0.0-...-73b4c3b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateMintRuneStoneOutput

func CreateMintRuneStoneOutput(runeId string) (*wire.TxOut, error)

func CreateRuneStoneOutput

func CreateRuneStoneOutput(cli *Client, data RuneStone) (*wire.TxOut, error)

func Encipher

func Encipher(runesId string) ([]byte, error)

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(endpoint string) *Client

func (*Client) Commitment

func (c *Client) Commitment(name string) (string, error)

func (*Client) Encipher

func (c *Client) Encipher(stone RuneStone) (string, error)

type CommitmentResponse

type CommitmentResponse struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
	Data    struct {
		Rune       string `json:"rune"`
		Spacers    int    `json:"spacers"`
		Commitment string `json:"commitment"`
	} `json:"data"`
}

type Edicts

type Edicts struct {
	Id     string   `json:"id"` // blockHeight:txIndex
	Amount *big.Int `json:"amount"`
	Output int      `json:"output"`
}

type EncipherResponse

type EncipherResponse struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
	Data    string `json:"data"`
}

type EtchRequest

type EtchRequest struct {
	FeeRate     int64
	RuneID      string
	Destination string
}

type Etching

type Etching struct {
	Divisibility interface{} `json:"divisibility"` // 默认是nil, 有数据类型为int
	Premine      *big.Int    `json:"premine"`
	Rune         interface{} `json:"rune"`    // runes name,默认是nil, 有数据类型为string
	Spacers      interface{} `json:"spacers"` // 默认是nil, 有数据类型为int
	Symbol       interface{} `json:"symbol"`  // 默认是nil, 有数据需要时string,单个字符
	Terms        *Terms      `json:"terms"`
	Turbo        bool        `json:"turbo"`
}

type RuneStone

type RuneStone struct {
	Edicts  []Edicts    `json:"edicts"`
	Etching *Etching    `json:"etching"`
	Mint    interface{} `json:"mint"` // blockHeight:txIndex
	Pointer int         `json:"pointer"`
}

func NewMintRuneStone

func NewMintRuneStone(runeID string) *RuneStone

NewMintRuneStone runeID = blockHeight:txIndex

type Terms

type Terms struct {
	Amount *big.Int   `json:"amount"`
	Cap    int        `json:"cap"`
	Height []*big.Int `json:"height"`
	Offset []*big.Int `json:"offset"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL