Documentation
¶
Index ¶
- func ListMintDistributions(since, count uint64, node ...string) ([]common.MintDistribution, error)
- func MakeOutTransaction(t *Transaction, indexs []int, outputAddress string, mask crypto.Key, ...) (*common.Transaction, error)
- func SendTransaction(raw string, node ...string) (crypto.Hash, error)
- func SetNodes(ns []string)
- type Signer
- type Store
- type Transaction
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 ¶
SendTransaction send transaction
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
Source Files
¶
Click to show internal directories.
Click to hide internal directories.