v1

package
v0.0.3-rc15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 29, 2025 License: Apache-2.0 Imports: 11 Imported by: 8

Documentation

Index

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) Descriptor() ([]byte, []int)

func (*Account) GetID

func (m *Account) GetID() v1.Account

func (*Account) GetState

func (m *Account) GetState() AccountState

func (*Account) Marshal

func (m *Account) Marshal() (dAtA []byte, err error)

func (*Account) MarshalTo

func (m *Account) MarshalTo(dAtA []byte) (int, error)

func (*Account) MarshalToSizedBuffer

func (m *Account) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Account) ProtoMessage

func (*Account) ProtoMessage()

func (*Account) Reset

func (m *Account) Reset()

func (*Account) Size

func (m *Account) Size() (n int)

func (*Account) String

func (m *Account) String() string

func (*Account) Unmarshal

func (m *Account) Unmarshal(dAtA []byte) error

func (*Account) ValidateBasic

func (m *Account) ValidateBasic() error

func (*Account) XXX_DiscardUnknown

func (m *Account) XXX_DiscardUnknown()

func (*Account) XXX_Marshal

func (m *Account) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Account) XXX_Merge

func (m *Account) XXX_Merge(src proto.Message)

func (*Account) XXX_Size

func (m *Account) XXX_Size() int

func (*Account) XXX_Unmarshal

func (m *Account) XXX_Unmarshal(b []byte) error

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"`
	// Balance 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 (*AccountState) Marshal

func (m *AccountState) Marshal() (dAtA []byte, err error)

func (*AccountState) MarshalTo

func (m *AccountState) MarshalTo(dAtA []byte) (int, 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 Accounts

type Accounts []Account

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

func (*Balance) Descriptor

func (*Balance) Descriptor() ([]byte, []int)

func (*Balance) Equal

func (this *Balance) Equal(that interface{}) bool

func (*Balance) GetDenom

func (m *Balance) GetDenom() string

func (*Balance) Marshal

func (m *Balance) Marshal() (dAtA []byte, err error)

func (*Balance) MarshalTo

func (m *Balance) MarshalTo(dAtA []byte) (int, error)

func (*Balance) MarshalToSizedBuffer

func (m *Balance) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Balance) ProtoMessage

func (*Balance) ProtoMessage()

func (*Balance) Reset

func (m *Balance) Reset()

func (*Balance) Size

func (m *Balance) Size() (n int)

func (*Balance) String

func (m *Balance) String() string

func (*Balance) Unmarshal

func (m *Balance) Unmarshal(dAtA []byte) error

func (*Balance) XXX_DiscardUnknown

func (m *Balance) XXX_DiscardUnknown()

func (*Balance) XXX_Marshal

func (m *Balance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Balance) XXX_Merge

func (m *Balance) XXX_Merge(src proto.Message)

func (*Balance) XXX_Size

func (m *Balance) XXX_Size() int

func (*Balance) XXX_Unmarshal

func (m *Balance) XXX_Unmarshal(b []byte) error

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"`
	// Balance amount of funds available to spend in this deposit.
	Balance types.DecCoin `protobuf:"bytes,3,opt,name=balance,proto3" json:"balance" yaml:"balance"`
}

Depositor stores state of a deposit.

func (*Depositor) Descriptor

func (*Depositor) Descriptor() ([]byte, []int)

func (*Depositor) GetBalance

func (m *Depositor) GetBalance() types.DecCoin

func (*Depositor) GetHeight

func (m *Depositor) GetHeight() int64

func (*Depositor) GetOwner

func (m *Depositor) GetOwner() string

func (*Depositor) Marshal

func (m *Depositor) Marshal() (dAtA []byte, err error)

func (*Depositor) MarshalTo

func (m *Depositor) MarshalTo(dAtA []byte) (int, error)

func (*Depositor) MarshalToSizedBuffer

func (m *Depositor) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Depositor) ProtoMessage

func (*Depositor) ProtoMessage()

func (*Depositor) Reset

func (m *Depositor) Reset()

func (*Depositor) Size

func (m *Depositor) Size() (n int)

func (*Depositor) String

func (m *Depositor) String() string

func (*Depositor) Unmarshal

func (m *Depositor) Unmarshal(dAtA []byte) error

func (*Depositor) XXX_DiscardUnknown

func (m *Depositor) XXX_DiscardUnknown()

func (*Depositor) XXX_Marshal

func (m *Depositor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Depositor) XXX_Merge

func (m *Depositor) XXX_Merge(src proto.Message)

func (*Depositor) XXX_Size

func (m *Depositor) XXX_Size() int

func (*Depositor) XXX_Unmarshal

func (m *Depositor) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*Payment) GetID

func (m *Payment) GetID() v1.Payment

func (*Payment) GetState

func (m *Payment) GetState() PaymentState

func (*Payment) Marshal

func (m *Payment) Marshal() (dAtA []byte, err error)

func (*Payment) MarshalTo

func (m *Payment) MarshalTo(dAtA []byte) (int, error)

func (*Payment) MarshalToSizedBuffer

func (m *Payment) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Payment) ProtoMessage

func (*Payment) ProtoMessage()

func (*Payment) Reset

func (m *Payment) Reset()

func (*Payment) Size

func (m *Payment) Size() (n int)

func (*Payment) String

func (m *Payment) String() string

func (*Payment) Unmarshal

func (m *Payment) Unmarshal(dAtA []byte) error

func (*Payment) ValidateBasic

func (m *Payment) ValidateBasic() error

func (*Payment) XXX_DiscardUnknown

func (m *Payment) XXX_DiscardUnknown()

func (*Payment) XXX_Marshal

func (m *Payment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Payment) XXX_Merge

func (m *Payment) XXX_Merge(src proto.Message)

func (*Payment) XXX_Size

func (m *Payment) XXX_Size() int

func (*Payment) XXX_Unmarshal

func (m *Payment) XXX_Unmarshal(b []byte) error

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) MarshalTo

func (m *PaymentState) MarshalTo(dAtA []byte) (int, 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 Payments

type Payments []Payment

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

func (State) EnumDescriptor() ([]byte, []int)

func (State) IsValid

func (s State) IsValid() bool

func (State) String

func (x State) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL