Versions in this module Expand all Collapse all v0 v0.1.0 Apr 19, 2020 Changes in this version + const InputID + const MaxSize + const OutputPaymentID + const OutputTakeOrLeaveID + var ID = ids.NewID([32]byte{ ... }) + func SortIns(ins []Input, signers []*InputSigner) + func SortOuts(outs []Output) + func SortTxSig(sigs []*Sig) + type APIOutput struct + Addresses []ids.ShortID + Addresses2 []ids.ShortID + Amount json.Uint64 + Locktime json.Uint64 + Locktime2 json.Uint64 + Threshold json.Uint32 + Threshold2 json.Uint32 + type BuildGenesisArgs struct + Outputs []APIOutput + type BuildGenesisReply struct + Bytes formatting.CB58 + type Builder struct + ChainID ids.ID + NetworkID uint32 + func (b Builder) NewInputPayment(sourceID ids.ID, sourceIndex uint32, amount uint64, sigs []*Sig) Input + func (b Builder) NewOutputPayment(amount, locktime uint64, threshold uint32, addresses []ids.ShortID) Output + func (b Builder) NewOutputTakeOrLeave(amount, locktime1 uint64, threshold1 uint32, addresses1 []ids.ShortID, ...) Output + func (b Builder) NewSig(index uint32) *Sig + func (b Builder) NewTx(ins []Input, outs []Output, signers []*InputSigner) (*Tx, error) + func (b Builder) NewTxFromUTXOs(keychain *Keychain, utxos []*UTXO, amount, txFee, locktime uint64, ...) (*Tx, error) + type Codec struct + func (c *Codec) MarshalOutput(out Output) ([]byte, error) + func (c *Codec) MarshalTx(tx *Tx) ([]byte, error) + func (c *Codec) MarshalUTXO(utxo *UTXO) ([]byte, error) + func (c *Codec) MarshalUTXOs(utxos []*UTXO) ([]byte, error) + func (c *Codec) MarshalUnsignedTx(tx *Tx) ([]byte, error) + func (c *Codec) UnmarshalTx(b []byte) (*Tx, error) + func (c *Codec) UnmarshalUTXO(b []byte) (*UTXO, error) + func (c *Codec) UnmarshalUTXOs(b []byte) ([]*UTXO, error) + type CodecID uint32 + const CustomID + const GenericID + const NoID + func (c CodecID) String() string + func (c CodecID) Verify() error + type Factory struct + TxFee uint64 + func (f *Factory) New() (interface{}, error) + type GetTxStatusArgs struct + TxID ids.ID + type GetTxStatusReply struct + Status choices.Status + type GetUTXOsArgs struct + Addresses []ids.ShortID + type GetUTXOsReply struct + UTXOs []formatting.CB58 + type Input interface + InputID func() ids.ID + InputSource func() (ids.ID, uint32) + Verify func() error + type InputPayment struct + func (in *InputPayment) Amount() uint64 + func (in *InputPayment) InputID() ids.ID + func (in *InputPayment) InputSource() (ids.ID, uint32) + func (in *InputPayment) PrefixedString(prefix string) string + func (in *InputPayment) String() string + func (in *InputPayment) Verify() error + type InputSigner struct + Keys []*crypto.PrivateKeySECP256K1R + type IssueTxArgs struct + Tx formatting.CB58 + type IssueTxReply struct + TxID ids.ID + type Keychain struct + Addrs ids.ShortSet + Keys []*crypto.PrivateKeySECP256K1R + func NewKeychain(networkID uint32, chainID ids.ID) *Keychain + func (kc *Keychain) Add(key *crypto.PrivateKeySECP256K1R) + func (kc *Keychain) Addresses() ids.ShortSet + func (kc *Keychain) Get(id ids.ShortID) (*crypto.PrivateKeySECP256K1R, bool) + func (kc *Keychain) GetSigsAndKeys(addresses []ids.ShortID, threshold int) ([]*Sig, []*crypto.PrivateKeySECP256K1R, bool) + func (kc *Keychain) New() (*crypto.PrivateKeySECP256K1R, error) + func (kc *Keychain) PrefixedString(prefix string) string + func (kc *Keychain) Spend(utxo *UTXO, time uint64) (Input, *InputSigner, error) + func (kc *Keychain) String() string + type Output interface + Unlock func(Input, uint64) error + Verify func() error + type OutputPayment struct + func (op *OutputPayment) Addresses() []ids.ShortID + func (op *OutputPayment) Amount() uint64 + func (op *OutputPayment) Locktime() uint64 + func (op *OutputPayment) PrefixedString(prefix string) string + func (op *OutputPayment) String() string + func (op *OutputPayment) Threshold() uint32 + func (op *OutputPayment) Unlock(in Input, time uint64) error + func (op *OutputPayment) Verify() error + type OutputTakeOrLeave struct + func (otol *OutputTakeOrLeave) Addresses1() []ids.ShortID + func (otol *OutputTakeOrLeave) Addresses2() []ids.ShortID + func (otol *OutputTakeOrLeave) Amount() uint64 + func (otol *OutputTakeOrLeave) Locktime1() uint64 + func (otol *OutputTakeOrLeave) Locktime2() uint64 + func (otol *OutputTakeOrLeave) PrefixedString(prefix string) string + func (otol *OutputTakeOrLeave) String() string + func (otol *OutputTakeOrLeave) Threshold1() uint32 + func (otol *OutputTakeOrLeave) Threshold2() uint32 + func (otol *OutputTakeOrLeave) Unlock(in Input, time uint64) error + func (otol *OutputTakeOrLeave) Verify() error + type Service struct + func (service *Service) GetTxStatus(r *http.Request, args *GetTxStatusArgs, reply *GetTxStatusReply) error + func (service *Service) GetUTXOs(r *http.Request, args *GetUTXOsArgs, reply *GetUTXOsReply) error + func (service *Service) IssueTx(r *http.Request, args *IssueTxArgs, reply *IssueTxReply) error + type Sig struct + type StaticService struct + func (*StaticService) BuildGenesis(_ *http.Request, args *BuildGenesisArgs, reply *BuildGenesisReply) error + type Tx struct + func (t *Tx) Bytes() []byte + func (t *Tx) ID() ids.ID + func (t *Tx) Ins() []Input + func (t *Tx) Outs() []Output + func (t *Tx) PrefixedString(prefix string) string + func (t *Tx) String() string + func (t *Tx) UTXOs() []*UTXO + func (t *Tx) Verify(ctx *snow.Context, txFee uint64) error + type UTXO struct + func (u *UTXO) Bytes() []byte + func (u *UTXO) ID() ids.ID + func (u *UTXO) Out() Output + func (u *UTXO) PrefixedString(prefix string) string + func (u *UTXO) Source() (ids.ID, uint32) + func (u *UTXO) String() string + type UniqueTx struct + func (tx *UniqueTx) Accept() + func (tx *UniqueTx) Bytes() []byte + func (tx *UniqueTx) Dependencies() []snowstorm.Tx + func (tx *UniqueTx) Evict() + func (tx *UniqueTx) ID() ids.ID + func (tx *UniqueTx) InputIDs() ids.Set + func (tx *UniqueTx) Reject() + func (tx *UniqueTx) Status() choices.Status + func (tx *UniqueTx) Verify() error + func (tx *UniqueTx) VerifyState() error + func (tx *UniqueTx) VerifyTx() error + type VM struct + TxFee uint64 + func (vm *VM) CreateHandlers() map[string]*common.HTTPHandler + func (vm *VM) CreateKey() (string, error) + func (vm *VM) CreateStaticHandlers() map[string]*common.HTTPHandler + func (vm *VM) FlushTxs() + func (vm *VM) GetAddress(privKeyStr string) (string, error) + func (vm *VM) GetBalance(address, assetID string) (uint64, error) + func (vm *VM) GetTx(txID ids.ID) (snowstorm.Tx, error) + func (vm *VM) GetTxHistory(address string) (string, []string, map[string]string, []map[string]string, error) + func (vm *VM) GetUTXOs(addrs ids.ShortSet) ([]*UTXO, error) + func (vm *VM) Initialize(ctx *snow.Context, db database.Database, genesisBytes []byte, ...) error + func (vm *VM) IssueTx(b []byte, finalized func(choices.Status)) (ids.ID, error) + func (vm *VM) ListAssets(address string) ([]string, error) + func (vm *VM) ParseTx(b []byte) (snowstorm.Tx, error) + func (vm *VM) PendingTxs() []snowstorm.Tx + func (vm *VM) Send(amount uint64, assetID, toAddrStr string, fromPKs []string) (string, error) + func (vm *VM) Shutdown()