mint

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2019 License: Apache-2.0 Imports: 15 Imported by: 6

README

mint-withdraw

mixin node mint withdraw

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListMintDistributions

func ListMintDistributions(since, count uint64, node ...string) ([]common.MintDistribution, error)

ListMintDistributions list mint distributions

func MakeOutTransaction

func MakeOutTransaction(t *Transaction, indexs []int, outputAddress string, mask crypto.Key, keys []crypto.Key, extra string) (*common.Transaction, error)

MakeOutTransaction make out transaction

func SendTransaction

func SendTransaction(raw string, node ...string) (crypto.Hash, error)

SendTransaction send transaction

func SetNodes

func SetNodes(ns []string)

SetNodes set mixin nodes

Types

type Signer

type Signer interface {
	VerifyOutputs(t *Transaction) ([]int, error)
	Sign(out *common.Transaction, t *Transaction) (*common.VersionedTransaction, error)
}

Signer signer

type Store

type Store interface {
	ReadProperty(ctx context.Context, key string) (string, error)
	WriteProperty(ctx context.Context, key, value string) error
}

Store store

type Transaction

type Transaction struct {
	common.VersionedTransaction

	Snapshot string      `json:"snapshot"`
	Hash     crypto.Hash `json:"hash,omitempty"`
}

Transaction transaction

func DoTransaction

func DoTransaction(ctx context.Context, rawData string) (*Transaction, error)

DoTransaction do transaction

func ReadTransaction

func ReadTransaction(hash string, node ...string) (*Transaction, error)

ReadTransaction read transaction

func WithdrawTransaction

func WithdrawTransaction(ctx context.Context, t *Transaction, signer Signer, store Store, addr string, mask crypto.Key, keys []crypto.Key, extra string) (*Transaction, error)

WithdrawTransaction withdraw transaction

func (Transaction) CheckDepositInput

func (t Transaction) CheckDepositInput(deposit *common.DepositData, tx crypto.Hash) error

CheckDepositInput check deposit

func (Transaction) ReadLastMintDistribution

func (t Transaction) ReadLastMintDistribution(group string) (*common.MintDistribution, error)

ReadLastMintDistribution read last mint distribution

func (Transaction) ReadUTXO

func (t Transaction) ReadUTXO(hash crypto.Hash, index int) (*common.UTXOWithLock, error)

ReadUTXO read utxo

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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