Versions in this module Expand all Collapse all v0 v0.5.0 Jul 12, 2019 Changes in this version + func GetContractVout(tx *types.Transaction) *corepb.TxOut + func HasContractSpend(tx *types.Transaction) bool + func HasContractVout(tx *types.Transaction) bool + func MakeContractCallVout(from, to *types.AddressHash, amount uint64, gas, gasPrice, nonce uint64, ...) (*corepb.TxOut, error) + func MakeContractCreationVout(from *types.AddressHash, amount, gas, gasPrice, nonce uint64, code []byte) (*corepb.TxOut, error) + func MakeContractVin(op *types.OutPoint, seq uint32) *types.TxIn + func MakeSplitAddress(txHash *crypto.HashType, idx uint32, addrs []types.Address, weights []uint64) types.Address + func MakeUnsignedContractCallTx(from string, amount, changeAmt, gasLimit, gasPrice, nonce uint64, to string, ...) (*types.Transaction, error) + func MakeUnsignedContractDeployTx(from string, amount, changeAmt, gasLimit, gasPrice, nonce uint64, ...) (*types.Transaction, error) + func MakeVinForTest(tx *types.Transaction, index uint32) []*types.TxIn + func NewContractTxWithUtxos(fromAcc *acc.Account, contractAddr string, ...) (*types.Transaction, *rpcpb.Utxo, error) + func SignTx(tx *types.Transaction, privKey *crypto.PrivateKey, pubKey *crypto.PublicKey) error v0.3.1 Mar 14, 2019 Changes in this version + var ErrInvalidArguments = errors.New("invalid arguments") + func DecodeOutPoint(id string) (*corepb.OutPoint, error) + func EncodeOutPoint(op *corepb.OutPoint) string v0.3.0 Mar 5, 2019 Changes in this version + var ErrInsufficientBalance = errors.New("insufficient account balance") + func ConvOutPoint(op *types.OutPoint) *corepb.OutPoint + func ConvPbOutPoint(op *corepb.OutPoint) *types.OutPoint + func IsCoinBaseTxIn(txIn *types.TxIn) bool + func MakeIssueTokenScript(addr string, tag *rpcpb.TokenTag) ([]byte, error) + func MakeIssueTokenVout(addr string, tag *rpcpb.TokenTag) (*corepb.TxOut, error) + func MakePbUtxo(op *types.OutPoint, uw *types.UtxoWrap) *rpcpb.Utxo + func MakePbVin(utxo *rpcpb.Utxo, seq uint32) *corepb.TxIn + func MakeSplitAddr(addrs []string, weights []uint64) (string, error) + func MakeSplitAddrPubkey(addrs []string, weights []uint64) []byte + func MakeSplitAddrVout(addrs []string, weights []uint64) *corepb.TxOut + func MakeTokenVout(addr string, tokenID *TokenID, amount uint64) (*corepb.TxOut, error) + func MakeUnsignedSplitAddrTx(from string, addrs []string, weights []uint64, changeAmt uint64, ...) (*types.Transaction, string, error) + func MakeUnsignedTokenIssueTx(issuer string, issuee string, tag *rpcpb.TokenTag, changeAmt uint64, ...) (*types.Transaction, uint32, error) + func MakeUnsignedTokenTransferTx(from string, to []string, amounts []uint64, tid *TokenID, changeAmt uint64, ...) (*types.Transaction, uint64, error) + func MakeUnsignedTx(from string, to []string, amounts []uint64, changeAmt uint64, ...) (*types.Transaction, error) + func MakeVin(utxo *rpcpb.Utxo, seq uint32) *types.TxIn + func MakeVout(addr string, amount uint64) *corepb.TxOut + func MakeVoutWithSPk(amount uint64, scriptPk []byte) *corepb.TxOut + func NewCoinBaseTxIn() *types.TxIn + func NewIssueTokenUtxoWrap(addr string, tag *rpcpb.TokenTag, height uint32) (*types.UtxoWrap, error) + func NewPbOutPoint(hash *crypto.HashType, index uint32) *corepb.OutPoint + func NewSplitAddrTxWithUtxos(acc *acc.Account, addrs []string, weights []uint64, utxos []*rpcpb.Utxo, ...) (tx *types.Transaction, splitAddr string, change *rpcpb.Utxo, err error) + func NewTokenTag(name, sym string, decimal uint32, supply uint64) *rpcpb.TokenTag + func NewTokenTransferTxWithUtxos(fromAcc *acc.Account, to []string, amounts []uint64, tid *TokenID, ...) (*types.Transaction, *rpcpb.Utxo, *rpcpb.Utxo, error) + func NewTokenUtxoWrap(addr string, tid *TokenID, height uint32, value uint64) (*types.UtxoWrap, error) + func NewTxWithUtxos(fromAcc *acc.Account, utxos []*rpcpb.Utxo, toAddrs []string, amounts []uint64, ...) (*types.Transaction, *rpcpb.Utxo, error) + func NewUtxoWrap(addr string, height uint32, value uint64) *types.UtxoWrap + func ParseTokenAmount(spk []byte) (uint64, error) + func SignTxWithUtxos(tx *types.Transaction, utxos []*rpcpb.Utxo, acc *acc.Account) error + type SortByTokenUTXOValue []*rpcpb.Utxo + func (x SortByTokenUTXOValue) Len() int + func (x SortByTokenUTXOValue) Less(i, j int) bool + func (x SortByTokenUTXOValue) Swap(i, j int) + type SortByUTXOValue []*rpcpb.Utxo + func (x SortByUTXOValue) Len() int + func (x SortByUTXOValue) Less(i, j int) bool + func (x SortByUTXOValue) Swap(i, j int) + type TokenID types.OutPoint + func NewTokenID(hash *crypto.HashType, index uint32) *TokenID + func NewTokenIssueTxWithUtxos(fromAcc *acc.Account, to string, tag *rpcpb.TokenTag, changeAmt uint64, ...) (*types.Transaction, *TokenID, *rpcpb.Utxo, error) + func ParseUtxoAmount(utxo *rpcpb.Utxo) (uint64, *TokenID, error)