v1

package
v0.0.3-rc13 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2025 License: Apache-2.0 Imports: 26 Imported by: 6

Documentation

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	// ModuleName is the module name constant used in many places
	ModuleName = "escrow"

	// StoreKey is the store key string for deployment
	StoreKey = ModuleName

	// RouterKey is the message route for deployment
	RouterKey = ModuleName
)

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 (
	ErrInvalidLengthAccountid        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowAccountid          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupAccountid = 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 (
	ErrAccountExists           = cerrors.Register(ModuleName, errAccountExists, "account exists")
	ErrAccountClosed           = cerrors.Register(ModuleName, errAccountClosed, "account closed")
	ErrAccountNotFound         = cerrors.Register(ModuleName, errAccountNotFound, "account not found")
	ErrAccountOverdrawn        = cerrors.Register(ModuleName, errAccountOverdrawn, "account overdrawn")
	ErrInvalidDenomination     = cerrors.Register(ModuleName, errInvalidDenomination, "invalid denomination")
	ErrPaymentExists           = cerrors.Register(ModuleName, errPaymentExists, "payment exists")
	ErrPaymentClosed           = cerrors.Register(ModuleName, errPaymentClosed, "payment closed")
	ErrPaymentNotFound         = cerrors.Register(ModuleName, errPaymentNotFound, "payment not found")
	ErrPaymentRateZero         = cerrors.Register(ModuleName, errPaymentRateZero, "payment rate zero")
	ErrInvalidPayment          = cerrors.Register(ModuleName, errInvalidPayment, "invalid payment")
	ErrInvalidSettlement       = cerrors.Register(ModuleName, errInvalidSettlement, "invalid settlement")
	ErrInvalidAccountID        = cerrors.Register(ModuleName, errInvalidAccountID, "invalid account ID")
	ErrInvalidAccount          = cerrors.Register(ModuleName, errInvalidAccount, "invalid account")
	ErrInvalidAccountDepositor = cerrors.Register(ModuleName, errInvalidAccountDepositor, "invalid account depositor")
)
View Source
var (
	ErrInvalidLengthFractionalPayment        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowFractionalPayment          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupFractionalPayment = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var Query_serviceDesc = _Query_serviceDesc
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

func AccountKeyPrefix

func AccountKeyPrefix() []byte

func PaymentKeyPrefix

func PaymentKeyPrefix() []byte

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

RegisterInterfaces registers the x/provider interfaces types with the interface registry

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(_ *codec.LegacyAmino)

RegisterLegacyAminoCodec register concrete types on codec

func RegisterQueryHandler

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQueryHandlerClient

func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error

RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.

func RegisterQueryHandlerFromEndpoint

func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQueryHandlerServer

func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error

RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

Types

type Account

type Account struct {
	// Id is the unique identifier for an escrow account.
	ID AccountID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"`
	// Owner is the bech32 address of the account.
	// It is a string representing a valid account address.
	//
	// Example:
	//   "akash1..."
	Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner" yaml:"owner"`
	// State represents the current state of an Account.
	State State `protobuf:"varint,3,opt,name=state,proto3,enum=akash.escrow.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,5,opt,name=settled_at,json=settledAt,proto3" json:"settledAt" yaml:"settledAt"`
	// Balance holds the unspent coins received from all deposits
	Funds    []Funds   `protobuf:"bytes,6,rep,name=funds,proto3" json:"funds" yaml:"funds"`
	Deposits []Deposit `protobuf:"bytes,9,rep,name=deposits,proto3" json:"depositors" yaml:"depositors"`
}

Account stores state for an escrow account.

func (*Account) Descriptor

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

func (*Account) GetDeposits

func (m *Account) GetDeposits() []Deposit

func (*Account) GetFunds

func (m *Account) GetFunds() []Funds

func (*Account) GetID

func (m *Account) GetID() AccountID

func (*Account) GetOwner

func (m *Account) GetOwner() string

func (*Account) GetSettledAt

func (m *Account) GetSettledAt() int64

func (*Account) GetState

func (m *Account) GetState() State

func (*Account) GetTransferred

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 AccountID

type AccountID struct {
	// Scope holds the scope of the account.
	Scope string `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope" yaml:"scope"`
	// Xid TODO: What is this?
	XID string `protobuf:"bytes,2,opt,name=xid,proto3" json:"xid" yaml:"xid"`
}

AccountID is the account identifier.

func (*AccountID) Descriptor

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

func (*AccountID) GetScope

func (m *AccountID) GetScope() string

func (*AccountID) GetXID

func (m *AccountID) GetXID() string

func (*AccountID) Marshal

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

func (*AccountID) MarshalTo

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

func (*AccountID) MarshalToSizedBuffer

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

func (*AccountID) ProtoMessage

func (*AccountID) ProtoMessage()

func (*AccountID) Reset

func (m *AccountID) Reset()

func (*AccountID) Size

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

func (*AccountID) String

func (m *AccountID) String() string

func (*AccountID) Unmarshal

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

func (*AccountID) ValidateBasic

func (obj *AccountID) ValidateBasic() error

func (*AccountID) XXX_DiscardUnknown

func (m *AccountID) XXX_DiscardUnknown()

func (*AccountID) XXX_Marshal

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

func (*AccountID) XXX_Merge

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

func (*AccountID) XXX_Size

func (m *AccountID) XXX_Size() int

func (*AccountID) XXX_Unmarshal

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

type Accounts

type Accounts []Account

type Deposit

type Deposit struct {
	// Depositor 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.
	Depositor string `protobuf:"bytes,1,opt,name=depositor,proto3" json:"depositor" yaml:"depositor"`
	// 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.
	Amount types.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount" yaml:"amount"`
	// Balance amount of funds available to spend in this deposit.
	Balance types.DecCoin `protobuf:"bytes,4,opt,name=balance,proto3" json:"balance" yaml:"balance"`
}

Deposit stores state of a deposit.

func (*Deposit) Descriptor

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

func (*Deposit) GetAmount

func (m *Deposit) GetAmount() types.Coin

func (*Deposit) GetBalance

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

func (*Deposit) GetDepositor

func (m *Deposit) GetDepositor() string

func (*Deposit) GetHeight

func (m *Deposit) GetHeight() int64

func (*Deposit) Marshal

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

func (*Deposit) MarshalTo

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

func (*Deposit) MarshalToSizedBuffer

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

func (*Deposit) ProtoMessage

func (*Deposit) ProtoMessage()

func (*Deposit) Reset

func (m *Deposit) Reset()

func (*Deposit) Size

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

func (*Deposit) String

func (m *Deposit) String() string

func (*Deposit) Unmarshal

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

func (*Deposit) XXX_DiscardUnknown

func (m *Deposit) XXX_DiscardUnknown()

func (*Deposit) XXX_Marshal

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

func (*Deposit) XXX_Merge

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

func (*Deposit) XXX_Size

func (m *Deposit) XXX_Size() int

func (*Deposit) XXX_Unmarshal

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

type FractionalPayment

type FractionalPayment struct {
	// AccountId is the unique identifier for the account.
	AccountID AccountID `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"accountID" yaml:"accountID"`
	// PaymentId is the unique identifier for the payment.
	PaymentID string `protobuf:"bytes,2,opt,name=payment_id,json=paymentId,proto3" json:"paymentID" yaml:"paymentID"`
	// Owner is the bech32 address of the payment.
	// It is a string representing a valid account address.
	//
	// Example:
	//   "akash1..."
	Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner" yaml:"owner"`
	// State represents the state of the FractionalPayment.
	State State `protobuf:"varint,4,opt,name=state,proto3,enum=akash.escrow.v1.State" json:"state" yaml:"state"`
	// Rate holds the rate of the FractionalPayment.
	Rate types.DecCoin `protobuf:"bytes,5,opt,name=rate,proto3" json:"rate" yaml:"rate"`
	// Balance is the current available coins.
	Balance types.DecCoin `protobuf:"bytes,6,opt,name=balance,proto3" json:"balance" yaml:"balance"`
	// Withdrawn corresponds to the amount of coins withdrawn by the FractionalPayment.
	Withdrawn types.Coin `protobuf:"bytes,7,opt,name=withdrawn,proto3" json:"withdrawn" yaml:"withdrawn"`
}

FractionalPayment stores state for a payment.

func (*FractionalPayment) Descriptor

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

func (*FractionalPayment) GetAccountID

func (m *FractionalPayment) GetAccountID() AccountID

func (*FractionalPayment) GetBalance

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

func (*FractionalPayment) GetOwner

func (m *FractionalPayment) GetOwner() string

func (*FractionalPayment) GetPaymentID

func (m *FractionalPayment) GetPaymentID() string

func (*FractionalPayment) GetRate

func (m *FractionalPayment) GetRate() types.DecCoin

func (*FractionalPayment) GetState

func (m *FractionalPayment) GetState() State

func (*FractionalPayment) GetWithdrawn

func (m *FractionalPayment) GetWithdrawn() types.Coin

func (*FractionalPayment) Marshal

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

func (*FractionalPayment) MarshalTo

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

func (*FractionalPayment) MarshalToSizedBuffer

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

func (*FractionalPayment) ProtoMessage

func (*FractionalPayment) ProtoMessage()

func (*FractionalPayment) Reset

func (m *FractionalPayment) Reset()

func (*FractionalPayment) Size

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

func (*FractionalPayment) String

func (m *FractionalPayment) String() string

func (*FractionalPayment) Unmarshal

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

func (*FractionalPayment) ValidateBasic

func (obj *FractionalPayment) ValidateBasic() error

func (*FractionalPayment) XXX_DiscardUnknown

func (m *FractionalPayment) XXX_DiscardUnknown()

func (*FractionalPayment) XXX_Marshal

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

func (*FractionalPayment) XXX_Merge

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

func (*FractionalPayment) XXX_Size

func (m *FractionalPayment) XXX_Size() int

func (*FractionalPayment) XXX_Unmarshal

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

type FractionalPayments

type FractionalPayments []FractionalPayment

type Funds

type Funds struct {
	// Balance holds the unspent coins received from all deposits
	Balance   types.DecCoin               `protobuf:"bytes,1,opt,name=balance,proto3" json:"balance" yaml:"balance"`
	Overdraft cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=overdraft,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"overdraft"`
}

func (*Funds) Descriptor

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

func (*Funds) GetBalance

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

func (*Funds) Marshal

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

func (*Funds) MarshalTo

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

func (*Funds) MarshalToSizedBuffer

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

func (*Funds) ProtoMessage

func (*Funds) ProtoMessage()

func (*Funds) Reset

func (m *Funds) Reset()

func (*Funds) Size

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

func (*Funds) String

func (m *Funds) String() string

func (*Funds) Unmarshal

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

func (*Funds) XXX_DiscardUnknown

func (m *Funds) XXX_DiscardUnknown()

func (*Funds) XXX_Marshal

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

func (*Funds) XXX_Merge

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

func (*Funds) XXX_Size

func (m *Funds) XXX_Size() int

func (*Funds) XXX_Unmarshal

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

type GenesisState

type GenesisState struct {
	// Accounts is a list of accounts on the genesis state.
	Accounts Accounts `protobuf:"bytes,1,rep,name=accounts,proto3,castrepeated=Accounts" json:"accounts" yaml:"accounts"`
	// Payments is a list of fractional payments on the genesis state..
	Payments FractionalPayments `protobuf:"bytes,2,rep,name=payments,proto3,castrepeated=FractionalPayments" json:"payments" yaml:"payments"`
}

GenesisState defines the basic genesis state used by the escrow module.

func (*GenesisState) Descriptor

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

func (*GenesisState) GetAccounts

func (m *GenesisState) GetAccounts() Accounts

func (*GenesisState) GetPayments

func (m *GenesisState) GetPayments() FractionalPayments

func (*GenesisState) Marshal

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

func (*GenesisState) MarshalTo

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

func (*GenesisState) MarshalToSizedBuffer

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

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

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

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

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

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

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

func (*GenesisState) XXX_Merge

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

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

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

type QueryAccountsRequest

type QueryAccountsRequest struct {
	// Scope holds the scope of the account.
	Scope string `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"`
	// Xid TODO: What is this?
	Xid string `protobuf:"bytes,2,opt,name=xid,proto3" json:"xid,omitempty"`
	// Owner is the bech32 address of the account.
	// It is a string representing a valid account address.
	//
	// Example:
	//   "akash1..."
	Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"`
	// State represents the current state of an Account.
	State string `protobuf:"bytes,4,opt,name=state,proto3" json:"state,omitempty"`
	// Pagination is used to paginate request.
	Pagination *query.PageRequest `protobuf:"bytes,5,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryAccountRequest is request type for the Query/Account RPC method.

func (*QueryAccountsRequest) Descriptor

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

func (*QueryAccountsRequest) GetOwner

func (m *QueryAccountsRequest) GetOwner() string

func (*QueryAccountsRequest) GetPagination

func (m *QueryAccountsRequest) GetPagination() *query.PageRequest

func (*QueryAccountsRequest) GetScope

func (m *QueryAccountsRequest) GetScope() string

func (*QueryAccountsRequest) GetState

func (m *QueryAccountsRequest) GetState() string

func (*QueryAccountsRequest) GetXid

func (m *QueryAccountsRequest) GetXid() string

func (*QueryAccountsRequest) Marshal

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

func (*QueryAccountsRequest) MarshalTo

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

func (*QueryAccountsRequest) MarshalToSizedBuffer

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

func (*QueryAccountsRequest) ProtoMessage

func (*QueryAccountsRequest) ProtoMessage()

func (*QueryAccountsRequest) Reset

func (m *QueryAccountsRequest) Reset()

func (*QueryAccountsRequest) Size

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

func (*QueryAccountsRequest) String

func (m *QueryAccountsRequest) String() string

func (*QueryAccountsRequest) Unmarshal

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

func (*QueryAccountsRequest) XXX_DiscardUnknown

func (m *QueryAccountsRequest) XXX_DiscardUnknown()

func (*QueryAccountsRequest) XXX_Marshal

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

func (*QueryAccountsRequest) XXX_Merge

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

func (*QueryAccountsRequest) XXX_Size

func (m *QueryAccountsRequest) XXX_Size() int

func (*QueryAccountsRequest) XXX_Unmarshal

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

type QueryAccountsResponse

type QueryAccountsResponse struct {
	// Accounts is a list of Account.
	Accounts Accounts `protobuf:"bytes,1,rep,name=accounts,proto3,castrepeated=Accounts" json:"accounts"`
	// Pagination contains the information about response pagination.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryProvidersResponse is response type for the Query/Providers RPC method

func (*QueryAccountsResponse) Descriptor

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

func (*QueryAccountsResponse) GetAccounts

func (m *QueryAccountsResponse) GetAccounts() Accounts

func (*QueryAccountsResponse) GetPagination

func (m *QueryAccountsResponse) GetPagination() *query.PageResponse

func (*QueryAccountsResponse) Marshal

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

func (*QueryAccountsResponse) MarshalTo

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

func (*QueryAccountsResponse) MarshalToSizedBuffer

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

func (*QueryAccountsResponse) ProtoMessage

func (*QueryAccountsResponse) ProtoMessage()

func (*QueryAccountsResponse) Reset

func (m *QueryAccountsResponse) Reset()

func (*QueryAccountsResponse) Size

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

func (*QueryAccountsResponse) String

func (m *QueryAccountsResponse) String() string

func (*QueryAccountsResponse) Unmarshal

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

func (*QueryAccountsResponse) XXX_DiscardUnknown

func (m *QueryAccountsResponse) XXX_DiscardUnknown()

func (*QueryAccountsResponse) XXX_Marshal

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

func (*QueryAccountsResponse) XXX_Merge

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

func (*QueryAccountsResponse) XXX_Size

func (m *QueryAccountsResponse) XXX_Size() int

func (*QueryAccountsResponse) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
	// buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
	// Accounts queries all accounts.
	Accounts(ctx context.Context, in *QueryAccountsRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error)
	// buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
	// buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
	// Payments queries all payments.
	Payments(ctx context.Context, in *QueryPaymentsRequest, opts ...grpc.CallOption) (*QueryPaymentsResponse, error)
}

QueryClient is the client API for Query service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewQueryClient

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryPaymentsRequest

type QueryPaymentsRequest struct {
	// Scope holds the scope of the payment.
	Scope string `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"`
	// Xid TODO: What is this?
	Xid string `protobuf:"bytes,2,opt,name=xid,proto3" json:"xid,omitempty"`
	// Id is the unique identifier of the payment.
	Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
	// Owner is the bech32 address of the account.
	// It is a string representing a valid account address.
	//
	// Example:
	//
	//	"akash1..."
	Owner string `protobuf:"bytes,4,opt,name=owner,proto3" json:"owner,omitempty"`
	// State represents the current state of an Account.
	State string `protobuf:"bytes,5,opt,name=state,proto3" json:"state,omitempty"`
	// Pagination is used to paginate request.
	Pagination *query.PageRequest `protobuf:"bytes,6,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryPaymentRequest is request type for the Query/Payment RPC method

func (*QueryPaymentsRequest) Descriptor

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

func (*QueryPaymentsRequest) GetId

func (m *QueryPaymentsRequest) GetId() string

func (*QueryPaymentsRequest) GetOwner

func (m *QueryPaymentsRequest) GetOwner() string

func (*QueryPaymentsRequest) GetPagination

func (m *QueryPaymentsRequest) GetPagination() *query.PageRequest

func (*QueryPaymentsRequest) GetScope

func (m *QueryPaymentsRequest) GetScope() string

func (*QueryPaymentsRequest) GetState

func (m *QueryPaymentsRequest) GetState() string

func (*QueryPaymentsRequest) GetXid

func (m *QueryPaymentsRequest) GetXid() string

func (*QueryPaymentsRequest) Marshal

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

func (*QueryPaymentsRequest) MarshalTo

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

func (*QueryPaymentsRequest) MarshalToSizedBuffer

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

func (*QueryPaymentsRequest) ProtoMessage

func (*QueryPaymentsRequest) ProtoMessage()

func (*QueryPaymentsRequest) Reset

func (m *QueryPaymentsRequest) Reset()

func (*QueryPaymentsRequest) Size

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

func (*QueryPaymentsRequest) String

func (m *QueryPaymentsRequest) String() string

func (*QueryPaymentsRequest) Unmarshal

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

func (*QueryPaymentsRequest) XXX_DiscardUnknown

func (m *QueryPaymentsRequest) XXX_DiscardUnknown()

func (*QueryPaymentsRequest) XXX_Marshal

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

func (*QueryPaymentsRequest) XXX_Merge

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

func (*QueryPaymentsRequest) XXX_Size

func (m *QueryPaymentsRequest) XXX_Size() int

func (*QueryPaymentsRequest) XXX_Unmarshal

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

type QueryPaymentsResponse

type QueryPaymentsResponse struct {
	// Payments is a list of fractional payments.
	Payments FractionalPayments `protobuf:"bytes,1,rep,name=payments,proto3,castrepeated=FractionalPayments" json:"payments"`
	// Pagination contains the information about response pagination.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryProvidersResponse is response type for the Query/Providers RPC method

func (*QueryPaymentsResponse) Descriptor

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

func (*QueryPaymentsResponse) GetPagination

func (m *QueryPaymentsResponse) GetPagination() *query.PageResponse

func (*QueryPaymentsResponse) GetPayments

func (m *QueryPaymentsResponse) GetPayments() FractionalPayments

func (*QueryPaymentsResponse) Marshal

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

func (*QueryPaymentsResponse) MarshalTo

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

func (*QueryPaymentsResponse) MarshalToSizedBuffer

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

func (*QueryPaymentsResponse) ProtoMessage

func (*QueryPaymentsResponse) ProtoMessage()

func (*QueryPaymentsResponse) Reset

func (m *QueryPaymentsResponse) Reset()

func (*QueryPaymentsResponse) Size

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

func (*QueryPaymentsResponse) String

func (m *QueryPaymentsResponse) String() string

func (*QueryPaymentsResponse) Unmarshal

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

func (*QueryPaymentsResponse) XXX_DiscardUnknown

func (m *QueryPaymentsResponse) XXX_DiscardUnknown()

func (*QueryPaymentsResponse) XXX_Marshal

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

func (*QueryPaymentsResponse) XXX_Merge

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

func (*QueryPaymentsResponse) XXX_Size

func (m *QueryPaymentsResponse) XXX_Size() int

func (*QueryPaymentsResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
	// buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
	// Accounts queries all accounts.
	Accounts(context.Context, *QueryAccountsRequest) (*QueryAccountsResponse, error)
	// buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
	// buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
	// Payments queries all payments.
	Payments(context.Context, *QueryPaymentsRequest) (*QueryPaymentsResponse, error)
}

QueryServer is the server API for Query service.

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

func (x State) String() string

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Accounts

func (*UnimplementedQueryServer) Payments

Jump to

Keyboard shortcuts

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