v1

package
v0.2.12 Latest Latest
Warning

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

Go to latest
Published: May 28, 2026 License: Apache-2.0 Imports: 21 Imported by: 51

Documentation

Index

Constants

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

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

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

Variables

View Source
var (
	ErrInvalidLengthBid        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowBid          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupBid = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	// ErrEmptyProvider is the error when provider is empty
	ErrEmptyProvider = sdkerrors.RegisterWithGRPCCode(ModuleName, errCodeEmptyProvider, codes.InvalidArgument, "empty provider")
	// ErrSameAccount is the error when owner and provider are the same account
	ErrSameAccount = sdkerrors.RegisterWithGRPCCode(ModuleName, errCodeSameAccount, codes.InvalidArgument, "owner and provider are the same account")
	// ErrInternal is the error for internal error
	ErrInternal = sdkerrors.RegisterWithGRPCCode(ModuleName, errCodeInternal, codes.Internal, "internal error")
	// ErrBidOverOrder is the error when bid price is above max order price
	ErrBidOverOrder = sdkerrors.RegisterWithGRPCCode(ModuleName, errCodeOverOrder, codes.InvalidArgument, "bid price above max order price")
	// ErrAttributeMismatch is the error for attribute mismatch
	ErrAttributeMismatch = sdkerrors.RegisterWithGRPCCode(ModuleName, errCodeAttributeMismatch, codes.InvalidArgument, "attribute mismatch")
	// ErrCapabilitiesMismatch is the error for capabilities mismatch
	ErrCapabilitiesMismatch = sdkerrors.RegisterWithGRPCCode(ModuleName, errCodeCapabilitiesMismatch, codes.InvalidArgument, "capabilities mismatch")
	// ErrUnknownBid is the error for unknown bid
	ErrUnknownBid = sdkerrors.RegisterWithGRPCCode(ModuleName, errCodeUnknownBid, codes.NotFound, "unknown bid")
	// ErrUnknownLease is the error for unknown lease
	ErrUnknownLease = sdkerrors.RegisterWithGRPCCode(ModuleName, errCodeUnknownLease, codes.NotFound, "unknown lease")
	// ErrUnknownLeaseForBid is the error when lease is unknown for bid
	ErrUnknownLeaseForBid = sdkerrors.RegisterWithGRPCCode(ModuleName, errCodeUnknownLeaseForBid, codes.NotFound, "unknown lease for bid")
	// ErrUnknownOrderForBid is the error when order is unknown for bid
	ErrUnknownOrderForBid = sdkerrors.RegisterWithGRPCCode(ModuleName, errCodeUnknownOrderForBid, codes.NotFound, "unknown order for bid")
	// ErrLeaseNotActive is the error when lease is not active
	ErrLeaseNotActive = sdkerrors.RegisterWithGRPCCode(ModuleName, errCodeLeaseNotActive, codes.FailedPrecondition, "lease not active")
	// ErrBidNotActive is the error when bid is not active
	ErrBidNotActive = sdkerrors.RegisterWithGRPCCode(ModuleName, errCodeBidNotActive, codes.FailedPrecondition, "bid not active")
	// ErrBidNotOpen is the error when bid is not open
	ErrBidNotOpen = sdkerrors.RegisterWithGRPCCode(ModuleName, errCodeBidNotOpen, codes.FailedPrecondition, "bid not open")
	// ErrNoLeaseForOrder is the error when there is no lease for order
	ErrNoLeaseForOrder = sdkerrors.RegisterWithGRPCCode(ModuleName, errCodeNoLeaseForOrder, codes.NotFound, "no lease for order")
	// ErrOrderNotFound order not found
	ErrOrderNotFound = sdkerrors.RegisterWithGRPCCode(ModuleName, errCodeOrderNotFound, codes.NotFound, "invalid order: order not found")
	// ErrGroupNotFound group not found
	ErrGroupNotFound = sdkerrors.RegisterWithGRPCCode(ModuleName, errCodeGroupNotFound, codes.NotFound, "group not found")
	// ErrGroupNotOpen group not open
	ErrGroupNotOpen = sdkerrors.RegisterWithGRPCCode(ModuleName, errCodeGroupNotOpen, codes.FailedPrecondition, "group not open")
	// ErrOrderNotOpen order not open
	ErrOrderNotOpen = sdkerrors.RegisterWithGRPCCode(ModuleName, errCodeOrderNotOpen, codes.FailedPrecondition, "bid: order not open")
	// ErrBidNotFound bid not found
	ErrBidNotFound = sdkerrors.RegisterWithGRPCCode(ModuleName, errCodeBidNotFound, codes.NotFound, "invalid bid: bid not found")
	// ErrBidZeroPrice zero price
	ErrBidZeroPrice = sdkerrors.RegisterWithGRPCCode(ModuleName, errCodeBidZeroPrice, codes.InvalidArgument, "invalid bid: zero price")
	// ErrLeaseNotFound lease not found
	ErrLeaseNotFound = sdkerrors.RegisterWithGRPCCode(ModuleName, errCodeLeaseNotFound, codes.NotFound, "invalid lease: lease not found")
	// ErrBidExists bid exists
	ErrBidExists = sdkerrors.RegisterWithGRPCCode(ModuleName, errCodeBidExists, codes.AlreadyExists, "invalid bid: bid exists from provider")
	// ErrBidInvalidPrice bid invalid price
	ErrBidInvalidPrice = sdkerrors.RegisterWithGRPCCode(ModuleName, errCodeInvalidPrice, codes.InvalidArgument, "bid price is invalid")
	// ErrOrderActive order active
	ErrOrderActive = sdkerrors.RegisterWithGRPCCode(ModuleName, errCodeOrderActive, codes.FailedPrecondition, "order active")
	// ErrOrderClosed order closed
	ErrOrderClosed = sdkerrors.RegisterWithGRPCCode(ModuleName, errCodeOrderClosed, codes.FailedPrecondition, "order closed")
	// ErrOrderExists indicates a new order was proposed overwrite the existing store key
	ErrOrderExists = sdkerrors.RegisterWithGRPCCode(ModuleName, errCodeOrderExists, codes.AlreadyExists, "order already exists in store")
	// ErrOrderTooEarly to match bid
	ErrOrderTooEarly = sdkerrors.RegisterWithGRPCCode(ModuleName, errCodeOrderTooEarly, codes.FailedPrecondition, "order: chain height to low for bidding")
	// ErrOrderDurationExceeded order should be closed
	ErrOrderDurationExceeded = sdkerrors.RegisterWithGRPCCode(ModuleName, errCodeOrderDurationExceeded, codes.FailedPrecondition, "order duration has exceeded the bidding duration")
	// ErrInvalidDeposit indicates an invalid deposit
	ErrInvalidDeposit = sdkerrors.RegisterWithGRPCCode(ModuleName, errInvalidDeposit, codes.InvalidArgument, "deposit invalid")
	// ErrInvalidParam indicates an invalid chain parameter
	ErrInvalidParam = sdkerrors.RegisterWithGRPCCode(ModuleName, errInvalidParam, codes.InvalidArgument, "parameter invalid")
	// ErrUnknownProvider is the error for unknown provider
	ErrUnknownProvider = sdkerrors.RegisterWithGRPCCode(ModuleName, errUnknownProvider, codes.NotFound, "unknown provider")
	// ErrInvalidBid is the error for invalid bid
	ErrInvalidBid = sdkerrors.RegisterWithGRPCCode(ModuleName, errInvalidBid, codes.InvalidArgument, "invalid bid")
	// ErrInvalidLeaseClosedReason indicates reason for lease close does not match context
	ErrInvalidLeaseClosedReason = sdkerrors.RegisterWithGRPCCode(ModuleName, errInvalidLeaseClosedReason, codes.InvalidArgument, "invalid lease closed reason")
	ErrInvalidEscrowID          = sdkerrors.RegisterWithGRPCCode(ModuleName, errInvalidEscrowID, codes.InvalidArgument, "invalid escrow id")

	// ErrLeaseNotReclamable is the error when lease does not have reclamation configured
	ErrLeaseNotReclamable = sdkerrors.RegisterWithGRPCCode(ModuleName, errLeaseNotReclamable, codes.FailedPrecondition, "lease does not have reclamation configured")
	// ErrLeaseAlreadyReclaiming is the error when reclamation has already been started
	ErrLeaseAlreadyReclaiming = sdkerrors.RegisterWithGRPCCode(ModuleName, errLeaseAlreadyReclaiming, codes.FailedPrecondition, "reclamation already in progress")
	// ErrReclamationNotStarted is the error when provider tries to close without starting reclamation
	ErrReclamationNotStarted = sdkerrors.RegisterWithGRPCCode(ModuleName, errReclamationNotStarted, codes.FailedPrecondition, "reclamation not started; call MsgLeaseStartReclaim first")
	// ErrReclamationWindowNotElapsed is the error when reclamation window has not yet expired
	ErrReclamationWindowNotElapsed = sdkerrors.RegisterWithGRPCCode(ModuleName, errReclamationWindowNotElapsed, codes.FailedPrecondition, "reclamation window has not elapsed")
	// ErrReclamationWindowInvalid is the error when window duration is outside governance bounds
	ErrReclamationWindowInvalid = sdkerrors.RegisterWithGRPCCode(ModuleName, errReclamationWindowInvalid, codes.InvalidArgument, "reclamation window outside governance bounds")
	// ErrReclamationRequired is the error when order requires reclamation but bid does not offer it
	ErrReclamationRequired = sdkerrors.RegisterWithGRPCCode(ModuleName, errReclamationRequired, codes.InvalidArgument, "order requires reclamation but bid does not offer it")
	// ErrReclamationWindowTooShort is the error when provider's window is shorter than order minimum
	ErrReclamationWindowTooShort = sdkerrors.RegisterWithGRPCCode(ModuleName, errReclamationWindowTooShort, codes.InvalidArgument, "reclamation window shorter than order minimum")
)
View Source
var (
	ErrInvalidLengthEvent        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowEvent          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupEvent = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthFilters        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowFilters          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupFilters = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthLease        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowLease          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupLease = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthOrder        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowOrder          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupOrder = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidPath = errors.New("query: invalid path")
	ErrOwnerValue  = errors.New("query: invalid owner value")
	ErrStateValue  = errors.New("query: invalid state value")
)
View Source
var (
	ErrInvalidLengthReclamation        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowReclamation          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupReclamation = fmt.Errorf("proto: unexpected end of group")
)
View Source
var LeaseClosedReason_name = map[int32]string{
	0:     "lease_closed_invalid",
	1:     "lease_closed_owner",
	10000: "lease_closed_reason_unstable",
	10001: "lease_closed_reason_decommission",
	10002: "lease_closed_reason_unspecified",
	10003: "lease_closed_reason_manifest_timeout",
	20000: "lease_closed_reason_insufficient_funds",
}
View Source
var LeaseClosedReason_value = map[string]int32{
	"lease_closed_invalid":                   0,
	"lease_closed_owner":                     1,
	"lease_closed_reason_unstable":           10000,
	"lease_closed_reason_decommission":       10001,
	"lease_closed_reason_unspecified":        10002,
	"lease_closed_reason_manifest_timeout":   10003,
	"lease_closed_reason_insufficient_funds": 20000,
}
View Source
var Lease_State_name = map[int32]string{
	0: "invalid",
	1: "active",
	2: "insufficient_funds",
	3: "closed",
	4: "reclaiming",
}
View Source
var Lease_State_value = map[string]int32{
	"invalid":            0,
	"active":             1,
	"insufficient_funds": 2,
	"closed":             3,
	"reclaiming":         4,
}

Functions

func BidPrefix

func BidPrefix() []byte

func LeasePath

func LeasePath(id LeaseID) string

LeasePath return lease path of given lease id for queries

func LeasePrefix

func LeasePrefix() []byte

func OrderPrefix

func OrderPrefix() []byte

func ParamsPrefix

func ParamsPrefix() []byte

func SecondaryLeasePrefix

func SecondaryLeasePrefix() []byte

Types

type BidID

type BidID 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"`
	// Dseq (deployment sequence number) is a unique numeric identifier for the deployment.
	// It is used to differentiate deployments created by the same owner.
	DSeq uint64 `protobuf:"varint,2,opt,name=dseq,proto3" json:"dseq" yaml:"dseq"`
	// Gseq (group sequence number) is a unique numeric identifier for the group.
	// It is used to differentiate groups created by the same owner in a deployment.
	GSeq uint32 `protobuf:"varint,3,opt,name=gseq,proto3" json:"gseq" yaml:"gseq"`
	// Oseq (order sequence) distinguishes multiple orders associated with a single deployment.
	// Oseq is incremented when a lease associated with an existing deployment is closed, and a new order is generated.
	OSeq uint32 `protobuf:"varint,4,opt,name=oseq,proto3" json:"oseq" yaml:"oseq"`
	// Provider is the account bech32 address of the provider making the bid.
	// It is a string representing a valid account bech32 address.
	//
	// Example:
	//   "akash1..."
	Provider string `protobuf:"bytes,5,opt,name=provider,proto3" json:"provider" yaml:"provider"`
	// BSeq (bid sequence) distinguishes multiple bids associated with a single deployment from same provider.
	BSeq uint32 `protobuf:"varint,6,opt,name=bseq,proto3" json:"bseq" yaml:"bseq"`
}

BidID stores owner and all other seq numbers. A successful bid becomes a Lease(ID).

func MakeBidID

func MakeBidID(id OrderID, provider sdk.AccAddress) BidID

MakeBidID returns BidID instance with provided order details and provider

func ParseBidPath added in v0.2.8

func ParseBidPath(parts []string) (BidID, error)

ParseBidPath returns bidID details with provided queries, and return error if occurred due to wrong query

func (BidID) DeploymentID

func (id BidID) DeploymentID() dtypes.DeploymentID

DeploymentID method returns deployment details with specific bid details

func (*BidID) Descriptor

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

func (*BidID) Equal

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

func (BidID) Equals

func (id BidID) Equals(other BidID) bool

Equals method compares specific bid with provided bid

func (*BidID) GetBSeq

func (m *BidID) GetBSeq() uint32

func (*BidID) GetDSeq

func (m *BidID) GetDSeq() uint64

func (*BidID) GetGSeq

func (m *BidID) GetGSeq() uint32

func (*BidID) GetOSeq

func (m *BidID) GetOSeq() uint32

func (*BidID) GetOwner

func (m *BidID) GetOwner() string

func (*BidID) GetProvider

func (m *BidID) GetProvider() string

func (BidID) GroupID

func (id BidID) GroupID() dtypes.GroupID

GroupID method returns GroupID details with specific bid details

func (BidID) LeaseID

func (id BidID) LeaseID() LeaseID

LeaseID method returns lease details of bid

func (*BidID) Marshal

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

func (*BidID) MarshalTo

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

func (*BidID) MarshalToSizedBuffer

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

func (BidID) OrderID

func (id BidID) OrderID() OrderID

OrderID method returns OrderID details with specific bid details

func (*BidID) ProtoMessage

func (*BidID) ProtoMessage()

func (*BidID) Reset

func (m *BidID) Reset()

func (*BidID) Size

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

func (BidID) String

func (id BidID) String() string

String method for consistent output.

func (BidID) ToEscrowAccountID

func (id BidID) ToEscrowAccountID() ev1.Account

func (*BidID) Unmarshal

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

func (BidID) Validate

func (id BidID) Validate() error

Validate validates bid instance and returns nil

func (*BidID) XXX_DiscardUnknown

func (m *BidID) XXX_DiscardUnknown()

func (*BidID) XXX_Marshal

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

func (*BidID) XXX_Merge

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

func (*BidID) XXX_Size

func (m *BidID) XXX_Size() int

func (*BidID) XXX_Unmarshal

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

type EventBidClosed

type EventBidClosed struct {
	// Id is the unique identifier of the Bid.
	ID BidID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"`
}

EventBidClosed is triggered when a bid is closed. It contains all the information required to identify a bid.

func (*EventBidClosed) Descriptor

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

func (*EventBidClosed) Equal

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

func (*EventBidClosed) GetID

func (m *EventBidClosed) GetID() BidID

func (*EventBidClosed) Marshal

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

func (*EventBidClosed) MarshalTo

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

func (*EventBidClosed) MarshalToSizedBuffer

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

func (*EventBidClosed) ProtoMessage

func (*EventBidClosed) ProtoMessage()

func (*EventBidClosed) Reset

func (m *EventBidClosed) Reset()

func (*EventBidClosed) Size

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

func (*EventBidClosed) String

func (m *EventBidClosed) String() string

func (*EventBidClosed) Unmarshal

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

func (*EventBidClosed) XXX_DiscardUnknown

func (m *EventBidClosed) XXX_DiscardUnknown()

func (*EventBidClosed) XXX_Marshal

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

func (*EventBidClosed) XXX_Merge

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

func (*EventBidClosed) XXX_Size

func (m *EventBidClosed) XXX_Size() int

func (*EventBidClosed) XXX_Unmarshal

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

type EventBidCreated

type EventBidCreated struct {
	// Id is the unique identifier of the Bid.
	ID BidID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"`
	// Price stated on the Bid.
	Price types.DecCoin `protobuf:"bytes,3,opt,name=price,proto3" json:"price" yaml:"price"`
}

EventBidCreated is triggered when a bid is created. It contains all the information required to identify a bid.

func (*EventBidCreated) Descriptor

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

func (*EventBidCreated) Equal

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

func (*EventBidCreated) GetID

func (m *EventBidCreated) GetID() BidID

func (*EventBidCreated) GetPrice

func (m *EventBidCreated) GetPrice() types.DecCoin

func (*EventBidCreated) Marshal

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

func (*EventBidCreated) MarshalTo

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

func (*EventBidCreated) MarshalToSizedBuffer

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

func (*EventBidCreated) ProtoMessage

func (*EventBidCreated) ProtoMessage()

func (*EventBidCreated) Reset

func (m *EventBidCreated) Reset()

func (*EventBidCreated) Size

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

func (*EventBidCreated) String

func (m *EventBidCreated) String() string

func (*EventBidCreated) Unmarshal

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

func (*EventBidCreated) XXX_DiscardUnknown

func (m *EventBidCreated) XXX_DiscardUnknown()

func (*EventBidCreated) XXX_Marshal

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

func (*EventBidCreated) XXX_Merge

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

func (*EventBidCreated) XXX_Size

func (m *EventBidCreated) XXX_Size() int

func (*EventBidCreated) XXX_Unmarshal

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

type EventLeaseClosed

type EventLeaseClosed struct {
	// Id is the unique identifier of the Lease.
	ID     LeaseID           `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"`
	Reason LeaseClosedReason `protobuf:"varint,2,opt,name=reason,proto3,enum=akash.market.v1.LeaseClosedReason" json:"reason" yaml:"reason"`
}

EventLeaseClosed is triggered when a lease is closed. It contains all the information required to identify a lease.

func (*EventLeaseClosed) Descriptor

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

func (*EventLeaseClosed) Equal

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

func (*EventLeaseClosed) GetID

func (m *EventLeaseClosed) GetID() LeaseID

func (*EventLeaseClosed) GetReason

func (m *EventLeaseClosed) GetReason() LeaseClosedReason

func (*EventLeaseClosed) Marshal

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

func (*EventLeaseClosed) MarshalTo

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

func (*EventLeaseClosed) MarshalToSizedBuffer

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

func (*EventLeaseClosed) ProtoMessage

func (*EventLeaseClosed) ProtoMessage()

func (*EventLeaseClosed) Reset

func (m *EventLeaseClosed) Reset()

func (*EventLeaseClosed) Size

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

func (*EventLeaseClosed) String

func (m *EventLeaseClosed) String() string

func (*EventLeaseClosed) Unmarshal

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

func (*EventLeaseClosed) XXX_DiscardUnknown

func (m *EventLeaseClosed) XXX_DiscardUnknown()

func (*EventLeaseClosed) XXX_Marshal

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

func (*EventLeaseClosed) XXX_Merge

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

func (*EventLeaseClosed) XXX_Size

func (m *EventLeaseClosed) XXX_Size() int

func (*EventLeaseClosed) XXX_Unmarshal

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

type EventLeaseCreated

type EventLeaseCreated struct {
	// Id is the unique identifier of the Lease.
	ID LeaseID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"`
	// Price settled for the lease.
	Price types.DecCoin `protobuf:"bytes,3,opt,name=price,proto3" json:"price" yaml:"price"`
}

EventLeaseCreated is triggered when a lease is created. It contains all the information required to identify a lease.

func (*EventLeaseCreated) Descriptor

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

func (*EventLeaseCreated) Equal

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

func (*EventLeaseCreated) GetID

func (m *EventLeaseCreated) GetID() LeaseID

func (*EventLeaseCreated) GetPrice

func (m *EventLeaseCreated) GetPrice() types.DecCoin

func (*EventLeaseCreated) Marshal

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

func (*EventLeaseCreated) MarshalTo

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

func (*EventLeaseCreated) MarshalToSizedBuffer

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

func (*EventLeaseCreated) ProtoMessage

func (*EventLeaseCreated) ProtoMessage()

func (*EventLeaseCreated) Reset

func (m *EventLeaseCreated) Reset()

func (*EventLeaseCreated) Size

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

func (*EventLeaseCreated) String

func (m *EventLeaseCreated) String() string

func (*EventLeaseCreated) Unmarshal

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

func (*EventLeaseCreated) XXX_DiscardUnknown

func (m *EventLeaseCreated) XXX_DiscardUnknown()

func (*EventLeaseCreated) XXX_Marshal

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

func (*EventLeaseCreated) XXX_Merge

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

func (*EventLeaseCreated) XXX_Size

func (m *EventLeaseCreated) XXX_Size() int

func (*EventLeaseCreated) XXX_Unmarshal

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

type EventLeaseReclaimStarted added in v0.2.10

type EventLeaseReclaimStarted struct {
	// Id is the unique identifier of the Lease.
	ID LeaseID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"`
	// reason is the provider's stated reason for reclamation.
	Reason LeaseClosedReason `protobuf:"varint,2,opt,name=reason,proto3,enum=akash.market.v1.LeaseClosedReason" json:"reason" yaml:"reason"`
	// deadline is the unix timestamp when the reclamation window expires.
	Deadline int64 `protobuf:"varint,3,opt,name=deadline,proto3" json:"deadline" yaml:"deadline"`
}

EventLeaseReclaimStarted is triggered when a provider initiates reclamation on a lease.

func (*EventLeaseReclaimStarted) Descriptor added in v0.2.10

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

func (*EventLeaseReclaimStarted) Equal added in v0.2.10

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

func (*EventLeaseReclaimStarted) GetDeadline added in v0.2.10

func (m *EventLeaseReclaimStarted) GetDeadline() int64

func (*EventLeaseReclaimStarted) GetID added in v0.2.10

func (m *EventLeaseReclaimStarted) GetID() LeaseID

func (*EventLeaseReclaimStarted) GetReason added in v0.2.10

func (*EventLeaseReclaimStarted) Marshal added in v0.2.10

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

func (*EventLeaseReclaimStarted) MarshalTo added in v0.2.10

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

func (*EventLeaseReclaimStarted) MarshalToSizedBuffer added in v0.2.10

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

func (*EventLeaseReclaimStarted) ProtoMessage added in v0.2.10

func (*EventLeaseReclaimStarted) ProtoMessage()

func (*EventLeaseReclaimStarted) Reset added in v0.2.10

func (m *EventLeaseReclaimStarted) Reset()

func (*EventLeaseReclaimStarted) Size added in v0.2.10

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

func (*EventLeaseReclaimStarted) String added in v0.2.10

func (m *EventLeaseReclaimStarted) String() string

func (*EventLeaseReclaimStarted) Unmarshal added in v0.2.10

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

func (*EventLeaseReclaimStarted) XXX_DiscardUnknown added in v0.2.10

func (m *EventLeaseReclaimStarted) XXX_DiscardUnknown()

func (*EventLeaseReclaimStarted) XXX_Marshal added in v0.2.10

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

func (*EventLeaseReclaimStarted) XXX_Merge added in v0.2.10

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

func (*EventLeaseReclaimStarted) XXX_Size added in v0.2.10

func (m *EventLeaseReclaimStarted) XXX_Size() int

func (*EventLeaseReclaimStarted) XXX_Unmarshal added in v0.2.10

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

type EventOrderClosed

type EventOrderClosed struct {
	// Id is the unique identifier of the Order.
	ID OrderID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"`
}

EventOrderClosed is triggered when an order is closed. It contains all the information required to identify an order.

func (*EventOrderClosed) Descriptor

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

func (*EventOrderClosed) Equal

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

func (*EventOrderClosed) GetID

func (m *EventOrderClosed) GetID() OrderID

func (*EventOrderClosed) Marshal

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

func (*EventOrderClosed) MarshalTo

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

func (*EventOrderClosed) MarshalToSizedBuffer

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

func (*EventOrderClosed) ProtoMessage

func (*EventOrderClosed) ProtoMessage()

func (*EventOrderClosed) Reset

func (m *EventOrderClosed) Reset()

func (*EventOrderClosed) Size

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

func (*EventOrderClosed) String

func (m *EventOrderClosed) String() string

func (*EventOrderClosed) Unmarshal

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

func (*EventOrderClosed) XXX_DiscardUnknown

func (m *EventOrderClosed) XXX_DiscardUnknown()

func (*EventOrderClosed) XXX_Marshal

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

func (*EventOrderClosed) XXX_Merge

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

func (*EventOrderClosed) XXX_Size

func (m *EventOrderClosed) XXX_Size() int

func (*EventOrderClosed) XXX_Unmarshal

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

type EventOrderCreated

type EventOrderCreated struct {
	// Id is the unique identifier of the Order.
	ID OrderID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"`
}

EventOrderCreated is triggered when an order is created. It contains all the information required to identify an order.

func (*EventOrderCreated) Descriptor

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

func (*EventOrderCreated) Equal

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

func (*EventOrderCreated) GetID

func (m *EventOrderCreated) GetID() OrderID

func (*EventOrderCreated) Marshal

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

func (*EventOrderCreated) MarshalTo

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

func (*EventOrderCreated) MarshalToSizedBuffer

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

func (*EventOrderCreated) ProtoMessage

func (*EventOrderCreated) ProtoMessage()

func (*EventOrderCreated) Reset

func (m *EventOrderCreated) Reset()

func (*EventOrderCreated) Size

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

func (*EventOrderCreated) String

func (m *EventOrderCreated) String() string

func (*EventOrderCreated) Unmarshal

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

func (*EventOrderCreated) XXX_DiscardUnknown

func (m *EventOrderCreated) XXX_DiscardUnknown()

func (*EventOrderCreated) XXX_Marshal

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

func (*EventOrderCreated) XXX_Merge

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

func (*EventOrderCreated) XXX_Size

func (m *EventOrderCreated) XXX_Size() int

func (*EventOrderCreated) XXX_Unmarshal

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

type Lease

type Lease struct {
	// Id is the unique identifier of the Lease.
	ID LeaseID `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"`
	// State represents the state of the Lease.
	State Lease_State `protobuf:"varint,2,opt,name=state,proto3,enum=akash.market.v1.Lease_State" json:"state" yaml:"state"`
	// Price holds the settled price for the Lease.
	Price types.DecCoin `protobuf:"bytes,3,opt,name=price,proto3" json:"price" yaml:"price"`
	// CreatedAt is the block height at which the Lease was created.
	CreatedAt int64 `protobuf:"varint,4,opt,name=created_at,json=createdAt,proto3" json:"created_at" yaml:"created_at"`
	// ClosedOn is the block height at which the Lease was closed.
	ClosedOn int64             `protobuf:"varint,5,opt,name=closed_on,json=closedOn,proto3" json:"closed_on" yaml:"closed_on"`
	Reason   LeaseClosedReason `protobuf:"varint,6,opt,name=reason,proto3,enum=akash.market.v1.LeaseClosedReason" json:"reason" yaml:"reason"`
	// Reclamation holds reclamation configuration and state, if applicable.
	// Nil if reclamation is not configured for this lease.
	Reclamation *Reclamation `protobuf:"bytes,7,opt,name=reclamation,proto3" json:"reclamation,omitempty" yaml:"reclamation,omitempty"`
}

Lease stores LeaseID, state of lease and price. The Lease defines the terms under which the provider allocates resources to fulfill the tenant's deployment requirements. Leases are paid from the tenant to the provider through a deposit and withdraw mechanism and are priced in blocks.

func (*Lease) Descriptor

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

func (Lease) Filters

func (obj Lease) Filters(filters LeaseFilters, stateVal Lease_State) bool

Filters returns whether lease filters valid or not

func (*Lease) GetClosedOn

func (m *Lease) GetClosedOn() int64

func (*Lease) GetCreatedAt

func (m *Lease) GetCreatedAt() int64

func (*Lease) GetID

func (m *Lease) GetID() LeaseID

func (*Lease) GetPrice

func (m *Lease) GetPrice() types.DecCoin

func (*Lease) GetReason

func (m *Lease) GetReason() LeaseClosedReason

func (*Lease) GetReclamation added in v0.2.10

func (m *Lease) GetReclamation() *Reclamation

func (*Lease) GetState

func (m *Lease) GetState() Lease_State

func (*Lease) Marshal

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

func (*Lease) MarshalTo

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

func (*Lease) MarshalToSizedBuffer

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

func (*Lease) ProtoMessage

func (*Lease) ProtoMessage()

func (*Lease) Reset

func (m *Lease) Reset()

func (*Lease) Size

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

func (Lease) String

func (obj Lease) String() string

String implements the Stringer interface for a Lease object.

func (*Lease) Unmarshal

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

func (*Lease) XXX_DiscardUnknown

func (m *Lease) XXX_DiscardUnknown()

func (*Lease) XXX_Marshal

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

func (*Lease) XXX_Merge

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

func (*Lease) XXX_Size

func (m *Lease) XXX_Size() int

func (*Lease) XXX_Unmarshal

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

type LeaseClosedReason

type LeaseClosedReason int32

LeaseClosedReason indicates reason bid was closed

const (
	// LeaseClosedReasonInvalid represents the default zero value for LeaseClosedReason.
	// This value indicates an uninitialized or invalid lease closure reason and should not
	// be used
	LeaseClosedReasonInvalid LeaseClosedReason = 0
	// values between 1..9999 indicate owner‑initiated close
	LeaseClosedReasonOwner LeaseClosedReason = 1
	// values between 10000..19999 are indicating provider initiated close
	// lease_closed_reason_unstable lease workloads have been unstable
	LeaseClosedReasonUnstable LeaseClosedReason = 10000
	// lease_closed_reason_decommission provider is being decommissioned
	LeaseClosedReasonDecommissioned LeaseClosedReason = 10001
	// lease_closed_reason_unspecified provider did not specify reason
	LeaseClosedReasonUnspecified LeaseClosedReason = 10002
	// lease_closed_reason_manifest_timeout provider closed leases due to manifest not received
	LeaseClosedReasonManifestTimeout LeaseClosedReason = 10003
	// values between 20000..29999 indicate network‑initiated close
	LeaseClosedReasonInsufficientFunds LeaseClosedReason = 20000
)

func (LeaseClosedReason) EnumDescriptor

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

func (LeaseClosedReason) IsRange

func (LeaseClosedReason) String

func (x LeaseClosedReason) String() string

type LeaseClosedReasonRange

type LeaseClosedReasonRange int
const (
	LeaseClosedReasonRangeOwner LeaseClosedReasonRange = iota
	LeaseClosedReasonRangeProvider
	LeaseClosedReasonRangeNetwork
)

type LeaseFilters

type LeaseFilters 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"`
	// Dseq (deployment sequence number) is a unique numeric identifier for the deployment.
	// It is used to differentiate deployments created by the same owner.
	DSeq uint64 `protobuf:"varint,2,opt,name=dseq,proto3" json:"dseq" yaml:"dseq"`
	// Gseq (group sequence number) is a unique numeric identifier for the group.
	// It is used to differentiate groups created by the same owner in a deployment.
	GSeq uint32 `protobuf:"varint,3,opt,name=gseq,proto3" json:"gseq" yaml:"gseq"`
	// Oseq (order sequence) distinguishes multiple orders associated with a single deployment.
	// Oseq is incremented when a lease associated with an existing deployment is closed, and a new order is generated.
	OSeq uint32 `protobuf:"varint,4,opt,name=oseq,proto3" json:"oseq" yaml:"oseq"`
	// Provider is the account bech32 address of the provider making the bid.
	// It is a string representing a valid account bech32 address.
	//
	// Example:
	//   "akash1..."
	Provider string `protobuf:"bytes,5,opt,name=provider,proto3" json:"provider" yaml:"provider"`
	// State represents the state of the lease.
	State string `protobuf:"bytes,6,opt,name=state,proto3" json:"state" yaml:"state"`
	// BSeq (bid sequence) distinguishes multiple bids associated with a single deployment from same provider.
	BSeq uint32 `protobuf:"varint,7,opt,name=bseq,proto3" json:"bseq" yaml:"bseq"`
}

LeaseFilters defines flags for lease list filtering.

func (*LeaseFilters) Accept

func (filters *LeaseFilters) Accept(obj Lease, stateVal Lease_State) bool

Accept returns whether lease filters valid or not

func (*LeaseFilters) Descriptor

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

func (*LeaseFilters) GetBSeq

func (m *LeaseFilters) GetBSeq() uint32

func (*LeaseFilters) GetDSeq

func (m *LeaseFilters) GetDSeq() uint64

func (*LeaseFilters) GetGSeq

func (m *LeaseFilters) GetGSeq() uint32

func (*LeaseFilters) GetOSeq

func (m *LeaseFilters) GetOSeq() uint32

func (*LeaseFilters) GetOwner

func (m *LeaseFilters) GetOwner() string

func (*LeaseFilters) GetProvider

func (m *LeaseFilters) GetProvider() string

func (*LeaseFilters) GetState

func (m *LeaseFilters) GetState() string

func (*LeaseFilters) Marshal

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

func (*LeaseFilters) MarshalTo

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

func (*LeaseFilters) MarshalToSizedBuffer

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

func (*LeaseFilters) ProtoMessage

func (*LeaseFilters) ProtoMessage()

func (*LeaseFilters) Reset

func (m *LeaseFilters) Reset()

func (*LeaseFilters) Size

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

func (*LeaseFilters) String

func (m *LeaseFilters) String() string

func (*LeaseFilters) Unmarshal

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

func (*LeaseFilters) XXX_DiscardUnknown

func (m *LeaseFilters) XXX_DiscardUnknown()

func (*LeaseFilters) XXX_Marshal

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

func (*LeaseFilters) XXX_Merge

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

func (*LeaseFilters) XXX_Size

func (m *LeaseFilters) XXX_Size() int

func (*LeaseFilters) XXX_Unmarshal

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

type LeaseID

type LeaseID 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"`
	// Dseq (deployment sequence number) is a unique numeric identifier for the deployment.
	// It is used to differentiate deployments created by the same owner.
	DSeq uint64 `protobuf:"varint,2,opt,name=dseq,proto3" json:"dseq" yaml:"dseq"`
	// Gseq (group sequence number) is a unique numeric identifier for the group.
	// It is used to differentiate groups created by the same owner in a deployment.
	GSeq uint32 `protobuf:"varint,3,opt,name=gseq,proto3" json:"gseq" yaml:"gseq"`
	// Oseq (order sequence) distinguishes multiple orders associated with a single deployment.
	// Oseq is incremented when a lease associated with an existing deployment is closed, and a new order is generated.
	OSeq uint32 `protobuf:"varint,4,opt,name=oseq,proto3" json:"oseq" yaml:"oseq"`
	// Provider is the account bech32 address of the provider making the bid.
	// It is a string representing a valid account bech32 address.
	//
	// Example:
	//   "akash1..."
	Provider string `protobuf:"bytes,5,opt,name=provider,proto3" json:"provider" yaml:"provider"`
	// BSeq (bid sequence) distinguishes multiple bids associated with a single deployment from same provider.
	BSeq uint32 `protobuf:"varint,6,opt,name=bseq,proto3" json:"bseq" yaml:"bseq"`
}

LeaseID stores bid details of lease.

func LeaseIDFromPaymentID

func LeaseIDFromPaymentID(id ev1.Payment) (LeaseID, error)

func MakeLeaseID

func MakeLeaseID(id BidID) LeaseID

MakeLeaseID returns LeaseID instance with provided bid details

func ParseLeasePath

func ParseLeasePath(parts []string) (LeaseID, error)

ParseLeasePath returns leaseID details with provided queries, and return error if occurred due to wrong query

func (LeaseID) BidID

func (id LeaseID) BidID() BidID

BidID method returns BidID details with specific LeaseID

func (LeaseID) DeploymentID

func (id LeaseID) DeploymentID() dtypes.DeploymentID

DeploymentID method returns deployment details with specific lease details

func (*LeaseID) Descriptor

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

func (*LeaseID) Equal

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

func (LeaseID) Equals

func (id LeaseID) Equals(other LeaseID) bool

Equals method compares specific lease with provided lease

func (*LeaseID) GetBSeq

func (m *LeaseID) GetBSeq() uint32

func (*LeaseID) GetDSeq

func (m *LeaseID) GetDSeq() uint64

func (*LeaseID) GetGSeq

func (m *LeaseID) GetGSeq() uint32

func (*LeaseID) GetOSeq

func (m *LeaseID) GetOSeq() uint32

func (*LeaseID) GetOwner

func (m *LeaseID) GetOwner() string

func (*LeaseID) GetProvider

func (m *LeaseID) GetProvider() string

func (LeaseID) GroupID

func (id LeaseID) GroupID() dtypes.GroupID

GroupID method returns GroupID details with specific lease details

func (*LeaseID) Marshal

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

func (*LeaseID) MarshalTo

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

func (*LeaseID) MarshalToSizedBuffer

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

func (LeaseID) OrderID

func (id LeaseID) OrderID() OrderID

OrderID method returns OrderID details with specific lease details

func (*LeaseID) ProtoMessage

func (*LeaseID) ProtoMessage()

func (*LeaseID) Reset

func (m *LeaseID) Reset()

func (*LeaseID) Size

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

func (LeaseID) String

func (id LeaseID) String() string

String method provides human-readable representation of LeaseID.

func (LeaseID) ToEscrowPaymentID

func (id LeaseID) ToEscrowPaymentID() ev1.Payment

func (*LeaseID) Unmarshal

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

func (LeaseID) Validate

func (id LeaseID) Validate() error

Validate calls the BidID's validator and returns any error.

func (*LeaseID) XXX_DiscardUnknown

func (m *LeaseID) XXX_DiscardUnknown()

func (*LeaseID) XXX_Marshal

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

func (*LeaseID) XXX_Merge

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

func (*LeaseID) XXX_Size

func (m *LeaseID) XXX_Size() int

func (*LeaseID) XXX_Unmarshal

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

type Lease_State

type Lease_State int32

State is an enum which refers to state of lease.

const (
	// Prefix should start with 0 in enum. So declaring dummy state.
	LeaseStateInvalid Lease_State = 0
	// LeaseActive denotes state for lease active.
	LeaseActive Lease_State = 1
	// LeaseInsufficientFunds denotes state for lease insufficient_funds.
	LeaseInsufficientFunds Lease_State = 2
	// LeaseClosed denotes state for lease closed.
	LeaseClosed Lease_State = 3
	// LeaseReclaiming denotes a lease in reclamation (grace period before closure).
	LeaseReclaiming Lease_State = 4
)

func (Lease_State) EnumDescriptor

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

func (Lease_State) String

func (x Lease_State) String() string

type Leases

type Leases []Lease

Leases is a collection of Lease

func (Leases) String

func (l Leases) String() string

String implements the Stringer interface for a Leases object.

type OrderID

type OrderID 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"`
	// Dseq (deployment sequence number) is a unique numeric identifier for the deployment.
	// It is used to differentiate deployments created by the same owner.
	DSeq uint64 `protobuf:"varint,2,opt,name=dseq,proto3" json:"dseq" yaml:"dseq"`
	// Gseq (group sequence number) is a unique numeric identifier for the group.
	// It is used to differentiate groups created by the same owner in a deployment.
	GSeq uint32 `protobuf:"varint,3,opt,name=gseq,proto3" json:"gseq" yaml:"gseq"`
	// Oseq (order sequence) distinguishes multiple orders associated with a single deployment.
	// Oseq is incremented when a lease associated with an existing deployment is closed, and a new order is generated.
	OSeq uint32 `protobuf:"varint,4,opt,name=oseq,proto3" json:"oseq" yaml:"oseq"`
}

OrderId stores owner and all other seq numbers.

func MakeOrderID

func MakeOrderID(id dtypes.GroupID, oseq uint32) OrderID

MakeOrderID returns OrderID instance with provided groupID details and oseq

func ParseOrderPath added in v0.2.8

func ParseOrderPath(parts []string) (OrderID, error)

ParseOrderPath returns orderID details with provided queries, and return error if occurred due to wrong query

func (*OrderID) Descriptor

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

func (*OrderID) Equal

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

func (OrderID) Equals

func (id OrderID) Equals(other OrderID) bool

Equals method compares specific order with provided order

func (*OrderID) GetDSeq

func (m *OrderID) GetDSeq() uint64

func (*OrderID) GetGSeq

func (m *OrderID) GetGSeq() uint32

func (*OrderID) GetOSeq

func (m *OrderID) GetOSeq() uint32

func (*OrderID) GetOwner

func (m *OrderID) GetOwner() string

func (OrderID) GroupID

func (id OrderID) GroupID() dtypes.GroupID

GroupID method returns groupID details for specific order

func (*OrderID) Marshal

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

func (*OrderID) MarshalTo

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

func (*OrderID) MarshalToSizedBuffer

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

func (*OrderID) ProtoMessage

func (*OrderID) ProtoMessage()

func (*OrderID) Reset

func (m *OrderID) Reset()

func (*OrderID) Size

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

func (OrderID) String

func (id OrderID) String() string

String provides stringer interface to save reflected formatting.

func (*OrderID) Unmarshal

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

func (OrderID) Validate

func (id OrderID) Validate() error

Validate method for OrderID and returns nil

func (*OrderID) XXX_DiscardUnknown

func (m *OrderID) XXX_DiscardUnknown()

func (*OrderID) XXX_Marshal

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

func (*OrderID) XXX_Merge

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

func (*OrderID) XXX_Size

func (m *OrderID) XXX_Size() int

func (*OrderID) XXX_Unmarshal

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

type Reclamation added in v0.2.10

type Reclamation struct {
	// window is the negotiated reclamation window duration (from the winning bid).
	Window time.Duration `protobuf:"bytes,1,opt,name=window,proto3,stdduration" json:"window" yaml:"window"`
	// started_at is the block height at which reclamation was initiated.
	// Zero means reclamation has not been started yet.
	StartedAt int64 `protobuf:"varint,2,opt,name=started_at,json=startedAt,proto3" json:"started_at" yaml:"started_at"`
	// deadline is the unix timestamp at which the reclamation window expires.
	// Zero means reclamation has not been started yet.
	Deadline int64 `protobuf:"varint,3,opt,name=deadline,proto3" json:"deadline" yaml:"deadline"`
	// reason is the provider's stated reason for reclamation.
	Reason LeaseClosedReason `protobuf:"varint,4,opt,name=reason,proto3,enum=akash.market.v1.LeaseClosedReason" json:"reason" yaml:"reason"`
}

Reclamation defines the runtime reclamation state stored on a Lease.

func (*Reclamation) Descriptor added in v0.2.10

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

func (*Reclamation) GetDeadline added in v0.2.10

func (m *Reclamation) GetDeadline() int64

func (*Reclamation) GetReason added in v0.2.10

func (m *Reclamation) GetReason() LeaseClosedReason

func (*Reclamation) GetStartedAt added in v0.2.10

func (m *Reclamation) GetStartedAt() int64

func (*Reclamation) GetWindow added in v0.2.10

func (m *Reclamation) GetWindow() time.Duration

func (*Reclamation) Marshal added in v0.2.10

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

func (*Reclamation) MarshalTo added in v0.2.10

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

func (*Reclamation) MarshalToSizedBuffer added in v0.2.10

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

func (*Reclamation) ProtoMessage added in v0.2.10

func (*Reclamation) ProtoMessage()

func (*Reclamation) Reset added in v0.2.10

func (m *Reclamation) Reset()

func (*Reclamation) Size added in v0.2.10

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

func (*Reclamation) String added in v0.2.10

func (m *Reclamation) String() string

func (*Reclamation) Unmarshal added in v0.2.10

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

func (*Reclamation) XXX_DiscardUnknown added in v0.2.10

func (m *Reclamation) XXX_DiscardUnknown()

func (*Reclamation) XXX_Marshal added in v0.2.10

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

func (*Reclamation) XXX_Merge added in v0.2.10

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

func (*Reclamation) XXX_Size added in v0.2.10

func (m *Reclamation) XXX_Size() int

func (*Reclamation) XXX_Unmarshal added in v0.2.10

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

Jump to

Keyboard shortcuts

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