Documentation ¶
Index ¶
- Constants
- func ErrInvalidAddress(codespace sdk.CodespaceType, msg string) sdk.Error
- func ErrInvalidDenom(codespace sdk.CodespaceType, msg string) sdk.Error
- func ErrInvalidIOF(codespace sdk.CodespaceType, msg string) sdk.Error
- func ErrInvalidOIndex(codespace sdk.CodespaceType, msg string) sdk.Error
- func ErrInvalidTransaction(codespace sdk.CodespaceType, msg string) sdk.Error
- func ErrInvalidUTXO(codespace sdk.CodespaceType, msg string) sdk.Error
- func RegisterAmino(cdc *amino.Codec)
- type BaseTx
- type BaseUTXO
- func (utxo *BaseUTXO) GetAddress() common.Address
- func (utxo *BaseUTXO) GetDenom() uint64
- func (utxo *BaseUTXO) GetInputAddresses() [2]common.Address
- func (utxo *BaseUTXO) GetPosition() Position
- func (utxo *BaseUTXO) SetAddress(addr common.Address) error
- func (utxo *BaseUTXO) SetDenom(denom uint64) error
- func (utxo *BaseUTXO) SetInputAddresses(addrs [2]common.Address) error
- func (utxo *BaseUTXO) SetPosition(blockNum uint64, txIndex uint16, oIndex uint8, depositNum uint64) error
- type Position
- type Signature
- type SpendMsg
- type UTXO
- type UTXOMapper
Constants ¶
View Source
const ( DefaultCodespace sdk.CodespaceType = 2 CodeInvalidAddress sdk.CodeType = 101 CodeInvalidOIndex sdk.CodeType = 102 CodeInvalidDenomination sdk.CodeType = 103 CodeInvalidIOF sdk.CodeType = 104 CodeInvalidUTXO sdk.CodeType = 105 CodeInvalidTransaction sdk.CodeType = 106 )
Reserve errors 100 ~ 199
Variables ¶
This section is empty.
Functions ¶
func ErrInvalidAddress ¶
func ErrInvalidAddress(codespace sdk.CodespaceType, msg string) sdk.Error
func ErrInvalidDenom ¶
func ErrInvalidDenom(codespace sdk.CodespaceType, msg string) sdk.Error
func ErrInvalidIOF ¶
func ErrInvalidIOF(codespace sdk.CodespaceType, msg string) sdk.Error
func ErrInvalidOIndex ¶
func ErrInvalidOIndex(codespace sdk.CodespaceType, msg string) sdk.Error
func ErrInvalidTransaction ¶
func ErrInvalidTransaction(codespace sdk.CodespaceType, msg string) sdk.Error
---------------------------------------- Error constructors
func ErrInvalidUTXO ¶
func ErrInvalidUTXO(codespace sdk.CodespaceType, msg string) sdk.Error
func RegisterAmino ¶
Types ¶
type BaseTx ¶
func (BaseTx) GetSignatures ¶
type BaseUTXO ¶
type BaseUTXO struct { InputAddresses [2]common.Address Address common.Address Denom uint64 Position Position }
Implements UTXO interface
func (*BaseUTXO) GetInputAddresses ¶
func (*BaseUTXO) GetPosition ¶
func (*BaseUTXO) SetAddress ¶
Implements UTXO
func (*BaseUTXO) SetInputAddresses ¶
type Position ¶
func NewPosition ¶
func (Position) GetSignBytes ¶
Used to determine Sign Bytes for confirm signatures
type Signature ¶ added in v0.2.0
type Signature struct {
Sig []byte
}
----------------------------------------- Wrapper for signature byte arrays
type SpendMsg ¶
type SpendMsg struct { Blknum1 uint64 Txindex1 uint16 Oindex1 uint8 DepositNum1 uint64 Owner1 common.Address ConfirmSigs1 [2]Signature Blknum2 uint64 Txindex2 uint16 Oindex2 uint8 DepositNum2 uint64 Owner2 common.Address ConfirmSigs2 [2]Signature Newowner1 common.Address Denom1 uint64 Newowner2 common.Address Denom2 uint64 Fee uint64 }
type UTXO ¶
type UTXO interface { // Address that owns UTXO GetAddress() common.Address SetAddress(common.Address) error // errors if already set GetInputAddresses() [2]common.Address SetInputAddresses([2]common.Address) error GetDenom() uint64 SetDenom(uint64) error //errors if already set GetPosition() Position SetPosition(uint64, uint16, uint8, uint64) error }
UTXO is a standard unspent transaction output
type UTXOMapper ¶
type UTXOMapper interface { GetUTXO(ctx sdk.Context, addr common.Address, position Position) UTXO GetUTXOsForAddress(ctx sdk.Context, addr common.Address) []UTXO AddUTXO(ctx sdk.Context, utxo UTXO) DeleteUTXO(ctx sdk.Context, addr common.Address, position Position) }
UTXOMapper stores and retrieves UTXO's from stores retrieved from the context.
Click to show internal directories.
Click to hide internal directories.