Documentation
¶
Index ¶
- Variables
- type Account
- func (*Account) Descriptor() ([]byte, []int)
- func (m *Account) GetID() v1.Account
- func (m *Account) GetState() AccountState
- func (m *Account) Marshal() (dAtA []byte, err error)
- func (m *Account) MarshalTo(dAtA []byte) (int, error)
- func (m *Account) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Account) ProtoMessage()
- func (m *Account) Reset()
- func (m *Account) Size() (n int)
- func (m *Account) String() string
- func (m *Account) Unmarshal(dAtA []byte) error
- func (m *Account) ValidateBasic() error
- func (m *Account) XXX_DiscardUnknown()
- func (m *Account) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Account) XXX_Merge(src proto.Message)
- func (m *Account) XXX_Size() int
- func (m *Account) XXX_Unmarshal(b []byte) error
- type AccountState
- func (*AccountState) Descriptor() ([]byte, []int)
- func (m *AccountState) GetDeposits() []Depositor
- func (m *AccountState) GetFunds() []Balance
- func (m *AccountState) GetOwner() string
- func (m *AccountState) GetSettledAt() int64
- func (m *AccountState) GetState() State
- func (m *AccountState) GetTransferred() github_com_cosmos_cosmos_sdk_types.DecCoins
- func (m *AccountState) Marshal() (dAtA []byte, err error)
- func (m *AccountState) MarshalTo(dAtA []byte) (int, error)
- func (m *AccountState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*AccountState) ProtoMessage()
- func (m *AccountState) Reset()
- func (m *AccountState) Size() (n int)
- func (m *AccountState) String() string
- func (m *AccountState) Unmarshal(dAtA []byte) error
- func (m *AccountState) ValidateBasic() error
- func (m *AccountState) XXX_DiscardUnknown()
- func (m *AccountState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AccountState) XXX_Merge(src proto.Message)
- func (m *AccountState) XXX_Size() int
- func (m *AccountState) XXX_Unmarshal(b []byte) error
- type Accounts
- type Balance
- func (*Balance) Descriptor() ([]byte, []int)
- func (this *Balance) Equal(that interface{}) bool
- func (m *Balance) GetDenom() string
- func (m *Balance) Marshal() (dAtA []byte, err error)
- func (m *Balance) MarshalTo(dAtA []byte) (int, error)
- func (m *Balance) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Balance) ProtoMessage()
- func (m *Balance) Reset()
- func (m *Balance) Size() (n int)
- func (m *Balance) String() string
- func (m *Balance) Unmarshal(dAtA []byte) error
- func (m *Balance) XXX_DiscardUnknown()
- func (m *Balance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Balance) XXX_Merge(src proto.Message)
- func (m *Balance) XXX_Size() int
- func (m *Balance) XXX_Unmarshal(b []byte) error
- type Depositor
- func (*Depositor) Descriptor() ([]byte, []int)
- func (m *Depositor) GetBalance() types.DecCoin
- func (m *Depositor) GetHeight() int64
- func (m *Depositor) GetOwner() string
- func (m *Depositor) GetSource() v1.Source
- func (m *Depositor) Marshal() (dAtA []byte, err error)
- func (m *Depositor) MarshalTo(dAtA []byte) (int, error)
- func (m *Depositor) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Depositor) ProtoMessage()
- func (m *Depositor) Reset()
- func (m *Depositor) Size() (n int)
- func (m *Depositor) String() string
- func (m *Depositor) Unmarshal(dAtA []byte) error
- func (m *Depositor) XXX_DiscardUnknown()
- func (m *Depositor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Depositor) XXX_Merge(src proto.Message)
- func (m *Depositor) XXX_Size() int
- func (m *Depositor) XXX_Unmarshal(b []byte) error
- type Payment
- func (*Payment) Descriptor() ([]byte, []int)
- func (m *Payment) GetID() v1.Payment
- func (m *Payment) GetState() PaymentState
- func (m *Payment) Marshal() (dAtA []byte, err error)
- func (m *Payment) MarshalTo(dAtA []byte) (int, error)
- func (m *Payment) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Payment) ProtoMessage()
- func (m *Payment) Reset()
- func (m *Payment) Size() (n int)
- func (m *Payment) String() string
- func (m *Payment) Unmarshal(dAtA []byte) error
- func (m *Payment) ValidateBasic() error
- func (m *Payment) XXX_DiscardUnknown()
- func (m *Payment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Payment) XXX_Merge(src proto.Message)
- func (m *Payment) XXX_Size() int
- func (m *Payment) XXX_Unmarshal(b []byte) error
- type PaymentState
- func (*PaymentState) Descriptor() ([]byte, []int)
- func (m *PaymentState) GetBalance() types.DecCoin
- func (m *PaymentState) GetOwner() string
- func (m *PaymentState) GetRate() types.DecCoin
- func (m *PaymentState) GetState() State
- func (m *PaymentState) GetUnsettled() types.DecCoin
- func (m *PaymentState) GetWithdrawn() types.Coin
- func (m *PaymentState) Marshal() (dAtA []byte, err error)
- func (m *PaymentState) MarshalTo(dAtA []byte) (int, error)
- func (m *PaymentState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PaymentState) ProtoMessage()
- func (m *PaymentState) Reset()
- func (m *PaymentState) Size() (n int)
- func (m *PaymentState) String() string
- func (m *PaymentState) Unmarshal(dAtA []byte) error
- func (obj *PaymentState) ValidateBasic() error
- func (m *PaymentState) XXX_DiscardUnknown()
- func (m *PaymentState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PaymentState) XXX_Merge(src proto.Message)
- func (m *PaymentState) XXX_Size() int
- func (m *PaymentState) XXX_Unmarshal(b []byte) error
- type Payments
- type State
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthAccount = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowAccount = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupAccount = fmt.Errorf("proto: unexpected end of group") )
View Source
var ( ErrInvalidLengthBalance = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowBalance = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupBalance = fmt.Errorf("proto: unexpected end of group") )
View Source
var ( ErrInvalidLengthDeposit = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowDeposit = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupDeposit = fmt.Errorf("proto: unexpected end of group") )
View Source
var ( ErrInvalidLengthPayment = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowPayment = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupPayment = fmt.Errorf("proto: unexpected end of group") )
View Source
var State_name = map[int32]string{
0: "invalid",
1: "open",
2: "closed",
3: "overdrawn",
}
View Source
var State_value = map[string]int32{
"invalid": 0,
"open": 1,
"closed": 2,
"overdrawn": 3,
}
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
ID v1.Account `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"`
State AccountState `protobuf:"bytes,2,opt,name=state,proto3" json:"state" yaml:"state"`
}
Account
func (*Account) Descriptor ¶
func (*Account) GetState ¶
func (m *Account) GetState() AccountState
func (*Account) MarshalToSizedBuffer ¶
func (*Account) ProtoMessage ¶
func (*Account) ProtoMessage()
func (*Account) ValidateBasic ¶
func (*Account) XXX_DiscardUnknown ¶
func (m *Account) XXX_DiscardUnknown()
func (*Account) XXX_Marshal ¶
func (*Account) XXX_Unmarshal ¶
type AccountState ¶
type AccountState struct {
// Owner is the account bech32 address of the user who owns the deployment.
// It is a string representing a valid bech32 account address.
//
// Example:
// "akash1..."
Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"`
// State represents the current state of an Account.
State State `protobuf:"varint,2,opt,name=state,proto3,enum=akash.escrow.types.v1.State" json:"state" yaml:"state"`
// Transferred total coins spent by this account.
Transferred github_com_cosmos_cosmos_sdk_types.DecCoins `` /* 141-byte string literal not displayed */
// SettledAt represents the block height at which this account was last settled.
SettledAt int64 `protobuf:"varint,4,opt,name=settled_at,json=settledAt,proto3" json:"settledAt" yaml:"settledAt"`
// Funds holds the unspent coins received from all deposits
Funds []Balance `protobuf:"bytes,5,rep,name=funds,proto3" json:"funds" yaml:"funds"`
Deposits []Depositor `protobuf:"bytes,6,rep,name=deposits,proto3" json:"deposits" yaml:"deposits"`
}
Account stores state for an escrow account.
func (*AccountState) Descriptor ¶
func (*AccountState) Descriptor() ([]byte, []int)
func (*AccountState) GetDeposits ¶
func (m *AccountState) GetDeposits() []Depositor
func (*AccountState) GetFunds ¶
func (m *AccountState) GetFunds() []Balance
func (*AccountState) GetOwner ¶
func (m *AccountState) GetOwner() string
func (*AccountState) GetSettledAt ¶
func (m *AccountState) GetSettledAt() int64
func (*AccountState) GetState ¶
func (m *AccountState) GetState() State
func (*AccountState) GetTransferred ¶
func (m *AccountState) GetTransferred() github_com_cosmos_cosmos_sdk_types.DecCoins
func (*AccountState) Marshal ¶
func (m *AccountState) Marshal() (dAtA []byte, err error)
func (*AccountState) MarshalToSizedBuffer ¶
func (m *AccountState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*AccountState) ProtoMessage ¶
func (*AccountState) ProtoMessage()
func (*AccountState) Reset ¶
func (m *AccountState) Reset()
func (*AccountState) Size ¶
func (m *AccountState) Size() (n int)
func (*AccountState) String ¶
func (m *AccountState) String() string
func (*AccountState) Unmarshal ¶
func (m *AccountState) Unmarshal(dAtA []byte) error
func (*AccountState) ValidateBasic ¶
func (m *AccountState) ValidateBasic() error
func (*AccountState) XXX_DiscardUnknown ¶
func (m *AccountState) XXX_DiscardUnknown()
func (*AccountState) XXX_Marshal ¶
func (m *AccountState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AccountState) XXX_Merge ¶
func (m *AccountState) XXX_Merge(src proto.Message)
func (*AccountState) XXX_Size ¶
func (m *AccountState) XXX_Size() int
func (*AccountState) XXX_Unmarshal ¶
func (m *AccountState) XXX_Unmarshal(b []byte) error
type Balance ¶
type Balance struct {
Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"`
Amount cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=amount,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"amount"`
}
Balance holds the unspent coin received from all deposits with same denom DecCoin is not being used here as it does not support negative values, and balance may go negative if account is overdrawn.
func (*Balance) Descriptor ¶
func (*Balance) MarshalToSizedBuffer ¶
func (*Balance) ProtoMessage ¶
func (*Balance) ProtoMessage()
func (*Balance) XXX_DiscardUnknown ¶
func (m *Balance) XXX_DiscardUnknown()
func (*Balance) XXX_Marshal ¶
func (*Balance) XXX_Unmarshal ¶
type Depositor ¶
type Depositor struct {
// Owner is the bech32 address of the depositor.
// It is a string representing a valid account address.
//
// Example:
// "akash1..."
// If depositor is same as the owner, then any incoming coins are added to the Balance.
// If depositor isn't same as the owner, then any incoming coins are added to the Funds.
Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"`
// Height blockchain height at which deposit was created
Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height" yaml:"height"`
// Source indicated origination of the funds
Source v1.Source `protobuf:"varint,3,opt,name=source,proto3,enum=akash.base.deposit.v1.Source" json:"source" yaml:"source"`
// Balance amount of funds available to spend in this deposit.
Balance types.DecCoin `protobuf:"bytes,4,opt,name=balance,proto3" json:"balance" yaml:"balance"`
}
Depositor stores state of a deposit.
func (*Depositor) Descriptor ¶
func (*Depositor) GetBalance ¶
func (*Depositor) MarshalToSizedBuffer ¶
func (*Depositor) ProtoMessage ¶
func (*Depositor) ProtoMessage()
func (*Depositor) XXX_DiscardUnknown ¶
func (m *Depositor) XXX_DiscardUnknown()
func (*Depositor) XXX_Marshal ¶
func (*Depositor) XXX_Unmarshal ¶
type Payment ¶
type Payment struct {
ID v1.Payment `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"`
State PaymentState `protobuf:"bytes,2,opt,name=state,proto3" json:"state" yaml:"state"`
}
Payment
func (*Payment) Descriptor ¶
func (*Payment) GetState ¶
func (m *Payment) GetState() PaymentState
func (*Payment) MarshalToSizedBuffer ¶
func (*Payment) ProtoMessage ¶
func (*Payment) ProtoMessage()
func (*Payment) ValidateBasic ¶
func (*Payment) XXX_DiscardUnknown ¶
func (m *Payment) XXX_DiscardUnknown()
func (*Payment) XXX_Marshal ¶
func (*Payment) XXX_Unmarshal ¶
type PaymentState ¶
type PaymentState struct {
// Owner is the account bech32 address of the user who owns the deployment.
// It is a string representing a valid bech32 account address.
//
// Example:
// "akash1..."
Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner" yaml:"owner"`
// State represents the state of the Payment.
State State `protobuf:"varint,2,opt,name=state,proto3,enum=akash.escrow.types.v1.State" json:"state" yaml:"state"`
// Rate holds the rate of the Payment.
Rate types.DecCoin `protobuf:"bytes,3,opt,name=rate,proto3" json:"rate" yaml:"rate"`
// Balance is the current available coins.
Balance types.DecCoin `protobuf:"bytes,4,opt,name=balance,proto3" json:"balance" yaml:"balance"`
// Unsettled is the amount needed to settle payment if account is overdrawn
Unsettled types.DecCoin `protobuf:"bytes,5,opt,name=unsettled,proto3" json:"unsettled" yaml:"unsettled"`
// Withdrawn corresponds to the amount of coins withdrawn by the Payment.
Withdrawn types.Coin `protobuf:"bytes,6,opt,name=withdrawn,proto3" json:"withdrawn" yaml:"withdrawn"`
}
Payment stores state for a payment.
func (*PaymentState) Descriptor ¶
func (*PaymentState) Descriptor() ([]byte, []int)
func (*PaymentState) GetBalance ¶
func (m *PaymentState) GetBalance() types.DecCoin
func (*PaymentState) GetOwner ¶
func (m *PaymentState) GetOwner() string
func (*PaymentState) GetRate ¶
func (m *PaymentState) GetRate() types.DecCoin
func (*PaymentState) GetState ¶
func (m *PaymentState) GetState() State
func (*PaymentState) GetUnsettled ¶
func (m *PaymentState) GetUnsettled() types.DecCoin
func (*PaymentState) GetWithdrawn ¶
func (m *PaymentState) GetWithdrawn() types.Coin
func (*PaymentState) Marshal ¶
func (m *PaymentState) Marshal() (dAtA []byte, err error)
func (*PaymentState) MarshalToSizedBuffer ¶
func (m *PaymentState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PaymentState) ProtoMessage ¶
func (*PaymentState) ProtoMessage()
func (*PaymentState) Reset ¶
func (m *PaymentState) Reset()
func (*PaymentState) Size ¶
func (m *PaymentState) Size() (n int)
func (*PaymentState) String ¶
func (m *PaymentState) String() string
func (*PaymentState) Unmarshal ¶
func (m *PaymentState) Unmarshal(dAtA []byte) error
func (*PaymentState) ValidateBasic ¶
func (obj *PaymentState) ValidateBasic() error
func (*PaymentState) XXX_DiscardUnknown ¶
func (m *PaymentState) XXX_DiscardUnknown()
func (*PaymentState) XXX_Marshal ¶
func (m *PaymentState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PaymentState) XXX_Merge ¶
func (m *PaymentState) XXX_Merge(src proto.Message)
func (*PaymentState) XXX_Size ¶
func (m *PaymentState) XXX_Size() int
func (*PaymentState) XXX_Unmarshal ¶
func (m *PaymentState) XXX_Unmarshal(b []byte) error
type State ¶
type State int32
State stores state for an escrow account.
const ( // AccountStateInvalid is an invalid state. StateInvalid State = 0 // StateOpen is the state when an object is open. StateOpen State = 1 // StateClosed is the state when an object is closed. StateClosed State = 2 // StateOverdrawn is the state when an object are overdrawn. StateOverdrawn State = 3 )
func (State) EnumDescriptor ¶
Click to show internal directories.
Click to hide internal directories.