assetv1alpha1

package
v2.5.2 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthAsset        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowAsset          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupAsset = fmt.Errorf("proto: unexpected end of group")
)

Functions

This section is empty.

Types

type AssetId

type AssetId struct {
	// The bytes of the asset ID.
	Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"`
	// Alternatively, a Bech32m-encoded string representation of the `inner`
	// bytes.
	//
	// NOTE: implementations are not required to support parsing this field.
	// Implementations should prefer to encode the `inner` bytes in all messages they
	// produce. Implementations must not accept messages with both `inner` and
	// `alt_bech32m` set.  This field exists for convenience of RPC users.
	AltBech32M string `protobuf:"bytes,2,opt,name=alt_bech32m,json=altBech32m,proto3" json:"alt_bech32m,omitempty"`
	// Alternatively, a base denomination string which should be hashed to obtain the asset ID.
	//
	// NOTE: implementations are not required to support parsing this field.
	// Implementations should prefer to encode the bytes in all messages they
	// produce. Implementations must not accept messages with both `inner` and
	// `alt_base_denom` set.  This field exists for convenience of RPC users.
	AltBaseDenom string `protobuf:"bytes,3,opt,name=alt_base_denom,json=altBaseDenom,proto3" json:"alt_base_denom,omitempty"`
}

A Penumbra asset ID.

func (*AssetId) Descriptor

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

func (*AssetId) GetAltBaseDenom

func (m *AssetId) GetAltBaseDenom() string

func (*AssetId) GetAltBech32M

func (m *AssetId) GetAltBech32M() string

func (*AssetId) GetInner

func (m *AssetId) GetInner() []byte

func (*AssetId) Marshal

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

func (*AssetId) MarshalTo

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

func (*AssetId) MarshalToSizedBuffer

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

func (*AssetId) ProtoMessage

func (*AssetId) ProtoMessage()

func (*AssetId) Reset

func (m *AssetId) Reset()

func (*AssetId) Size

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

func (*AssetId) String

func (m *AssetId) String() string

func (*AssetId) Unmarshal

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

func (*AssetId) XXX_DiscardUnknown

func (m *AssetId) XXX_DiscardUnknown()

func (*AssetId) XXX_Marshal

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

func (*AssetId) XXX_Merge

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

func (*AssetId) XXX_Size

func (m *AssetId) XXX_Size() int

func (*AssetId) XXX_Unmarshal

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

type BalanceCommitment

type BalanceCommitment struct {
	Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"`
}

func (*BalanceCommitment) Descriptor

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

func (*BalanceCommitment) GetInner

func (m *BalanceCommitment) GetInner() []byte

func (*BalanceCommitment) Marshal

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

func (*BalanceCommitment) MarshalTo

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

func (*BalanceCommitment) MarshalToSizedBuffer

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

func (*BalanceCommitment) ProtoMessage

func (*BalanceCommitment) ProtoMessage()

func (*BalanceCommitment) Reset

func (m *BalanceCommitment) Reset()

func (*BalanceCommitment) Size

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

func (*BalanceCommitment) String

func (m *BalanceCommitment) String() string

func (*BalanceCommitment) Unmarshal

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

func (*BalanceCommitment) XXX_DiscardUnknown

func (m *BalanceCommitment) XXX_DiscardUnknown()

func (*BalanceCommitment) XXX_Marshal

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

func (*BalanceCommitment) XXX_Merge

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

func (*BalanceCommitment) XXX_Size

func (m *BalanceCommitment) XXX_Size() int

func (*BalanceCommitment) XXX_Unmarshal

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

type Denom

type Denom struct {
	Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"`
}

func (*Denom) Descriptor

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

func (*Denom) GetDenom

func (m *Denom) GetDenom() string

func (*Denom) Marshal

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

func (*Denom) MarshalTo

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

func (*Denom) MarshalToSizedBuffer

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

func (*Denom) ProtoMessage

func (*Denom) ProtoMessage()

func (*Denom) Reset

func (m *Denom) Reset()

func (*Denom) Size

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

func (*Denom) String

func (m *Denom) String() string

func (*Denom) Unmarshal

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

func (*Denom) XXX_DiscardUnknown

func (m *Denom) XXX_DiscardUnknown()

func (*Denom) XXX_Marshal

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

func (*Denom) XXX_Merge

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

func (*Denom) XXX_Size

func (m *Denom) XXX_Size() int

func (*Denom) XXX_Unmarshal

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

type DenomMetadata

type DenomMetadata struct {
	Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
	// denom_units represents the list of DenomUnit's for a given coin
	DenomUnits []*DenomUnit `protobuf:"bytes,2,rep,name=denom_units,json=denomUnits,proto3" json:"denom_units,omitempty"`
	// base represents the base denom (should be the DenomUnit with exponent = 0).
	Base string `protobuf:"bytes,3,opt,name=base,proto3" json:"base,omitempty"`
	// display indicates the suggested denom that should be
	// displayed in clients.
	Display string `protobuf:"bytes,4,opt,name=display,proto3" json:"display,omitempty"`
	// name defines the name of the token (eg: Cosmos Atom)
	Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"`
	// symbol is the token symbol usually shown on exchanges (eg: ATOM). This can
	// be the same as the display.
	Symbol string `protobuf:"bytes,6,opt,name=symbol,proto3" json:"symbol,omitempty"`
	// URI to a document (on or off-chain) that contains additional information. Optional.
	Uri string `protobuf:"bytes,7,opt,name=uri,proto3" json:"uri,omitempty"`
	// URIHash is a sha256 hash of a document pointed by URI. It's used to verify that
	// the document didn't change. Optional.
	UriHash string `protobuf:"bytes,8,opt,name=uri_hash,json=uriHash,proto3" json:"uri_hash,omitempty"`
	// the asset ID on Penumbra for this denomination.
	PenumbraAssetId *AssetId `protobuf:"bytes,1984,opt,name=penumbra_asset_id,json=penumbraAssetId,proto3" json:"penumbra_asset_id,omitempty"`
}

DenomMetadata represents a struct that describes a basic token.

func (*DenomMetadata) Descriptor

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

func (*DenomMetadata) GetBase

func (m *DenomMetadata) GetBase() string

func (*DenomMetadata) GetDenomUnits

func (m *DenomMetadata) GetDenomUnits() []*DenomUnit

func (*DenomMetadata) GetDescription

func (m *DenomMetadata) GetDescription() string

func (*DenomMetadata) GetDisplay

func (m *DenomMetadata) GetDisplay() string

func (*DenomMetadata) GetName

func (m *DenomMetadata) GetName() string

func (*DenomMetadata) GetPenumbraAssetId

func (m *DenomMetadata) GetPenumbraAssetId() *AssetId

func (*DenomMetadata) GetSymbol

func (m *DenomMetadata) GetSymbol() string

func (*DenomMetadata) GetUri

func (m *DenomMetadata) GetUri() string

func (*DenomMetadata) GetUriHash

func (m *DenomMetadata) GetUriHash() string

func (*DenomMetadata) Marshal

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

func (*DenomMetadata) MarshalTo

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

func (*DenomMetadata) MarshalToSizedBuffer

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

func (*DenomMetadata) ProtoMessage

func (*DenomMetadata) ProtoMessage()

func (*DenomMetadata) Reset

func (m *DenomMetadata) Reset()

func (*DenomMetadata) Size

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

func (*DenomMetadata) String

func (m *DenomMetadata) String() string

func (*DenomMetadata) Unmarshal

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

func (*DenomMetadata) XXX_DiscardUnknown

func (m *DenomMetadata) XXX_DiscardUnknown()

func (*DenomMetadata) XXX_Marshal

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

func (*DenomMetadata) XXX_Merge

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

func (*DenomMetadata) XXX_Size

func (m *DenomMetadata) XXX_Size() int

func (*DenomMetadata) XXX_Unmarshal

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

type DenomUnit

type DenomUnit struct {
	// denom represents the string name of the given denom unit (e.g uatom).
	Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"`
	// exponent represents power of 10 exponent that one must
	// raise the base_denom to in order to equal the given DenomUnit's denom
	// 1 denom = 10^exponent base_denom
	// (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with
	// exponent = 6, thus: 1 atom = 10^6 uatom).
	Exponent uint32 `protobuf:"varint,2,opt,name=exponent,proto3" json:"exponent,omitempty"`
	// aliases is a list of string aliases for the given denom
	Aliases []string `protobuf:"bytes,3,rep,name=aliases,proto3" json:"aliases,omitempty"`
}

DenomUnit represents a struct that describes a given denomination unit of the basic token.

func (*DenomUnit) Descriptor

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

func (*DenomUnit) GetAliases

func (m *DenomUnit) GetAliases() []string

func (*DenomUnit) GetDenom

func (m *DenomUnit) GetDenom() string

func (*DenomUnit) GetExponent

func (m *DenomUnit) GetExponent() uint32

func (*DenomUnit) Marshal

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

func (*DenomUnit) MarshalTo

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

func (*DenomUnit) MarshalToSizedBuffer

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

func (*DenomUnit) ProtoMessage

func (*DenomUnit) ProtoMessage()

func (*DenomUnit) Reset

func (m *DenomUnit) Reset()

func (*DenomUnit) Size

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

func (*DenomUnit) String

func (m *DenomUnit) String() string

func (*DenomUnit) Unmarshal

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

func (*DenomUnit) XXX_DiscardUnknown

func (m *DenomUnit) XXX_DiscardUnknown()

func (*DenomUnit) XXX_Marshal

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

func (*DenomUnit) XXX_Merge

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

func (*DenomUnit) XXX_Size

func (m *DenomUnit) XXX_Size() int

func (*DenomUnit) XXX_Unmarshal

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

type Value

type Value struct {
	Amount  *v1alpha1.Amount `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"`
	AssetId *AssetId         `protobuf:"bytes,2,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"`
}

func (*Value) Descriptor

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

func (*Value) GetAmount

func (m *Value) GetAmount() *v1alpha1.Amount

func (*Value) GetAssetId

func (m *Value) GetAssetId() *AssetId

func (*Value) Marshal

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

func (*Value) MarshalTo

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

func (*Value) MarshalToSizedBuffer

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

func (*Value) ProtoMessage

func (*Value) ProtoMessage()

func (*Value) Reset

func (m *Value) Reset()

func (*Value) Size

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

func (*Value) String

func (m *Value) String() string

func (*Value) Unmarshal

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

func (*Value) XXX_DiscardUnknown

func (m *Value) XXX_DiscardUnknown()

func (*Value) XXX_Marshal

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

func (*Value) XXX_Merge

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

func (*Value) XXX_Size

func (m *Value) XXX_Size() int

func (*Value) XXX_Unmarshal

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

type ValueView

type ValueView struct {
	// Types that are valid to be assigned to ValueView:
	//
	//	*ValueView_KnownDenom_
	//	*ValueView_UnknownDenom_
	ValueView isValueView_ValueView `protobuf_oneof:"value_view"`
}

Represents a value of a known or unknown denomination.

Note: unlike some other View types, we don't just store the underlying `Value` message together with an additional `Denom`. Instead, we record either an `Amount` and `Denom` (only) or an `Amount` and `AssetId`. This is because we don't want to allow a situation where the supplied `Denom` doesn't match the `AssetId`, and a consumer of the API that doesn't check is tricked. This way, the `Denom` will always match, because the consumer is forced to recompute it themselves if they want it.

func (*ValueView) Descriptor

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

func (*ValueView) GetKnownDenom

func (m *ValueView) GetKnownDenom() *ValueView_KnownDenom

func (*ValueView) GetUnknownDenom

func (m *ValueView) GetUnknownDenom() *ValueView_UnknownDenom

func (*ValueView) GetValueView

func (m *ValueView) GetValueView() isValueView_ValueView

func (*ValueView) Marshal

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

func (*ValueView) MarshalTo

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

func (*ValueView) MarshalToSizedBuffer

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

func (*ValueView) ProtoMessage

func (*ValueView) ProtoMessage()

func (*ValueView) Reset

func (m *ValueView) Reset()

func (*ValueView) Size

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

func (*ValueView) String

func (m *ValueView) String() string

func (*ValueView) Unmarshal

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

func (*ValueView) XXX_DiscardUnknown

func (m *ValueView) XXX_DiscardUnknown()

func (*ValueView) XXX_Marshal

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

func (*ValueView) XXX_Merge

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

func (*ValueView) XXX_OneofWrappers

func (*ValueView) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*ValueView) XXX_Size

func (m *ValueView) XXX_Size() int

func (*ValueView) XXX_Unmarshal

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

type ValueView_KnownDenom

type ValueView_KnownDenom struct {
	Amount *v1alpha1.Amount `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"`
	Denom  *DenomMetadata   `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"`
}

A value whose asset ID has a known denomination.

func (*ValueView_KnownDenom) Descriptor

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

func (*ValueView_KnownDenom) GetAmount

func (m *ValueView_KnownDenom) GetAmount() *v1alpha1.Amount

func (*ValueView_KnownDenom) GetDenom

func (m *ValueView_KnownDenom) GetDenom() *DenomMetadata

func (*ValueView_KnownDenom) Marshal

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

func (*ValueView_KnownDenom) MarshalTo

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

func (*ValueView_KnownDenom) MarshalToSizedBuffer

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

func (*ValueView_KnownDenom) ProtoMessage

func (*ValueView_KnownDenom) ProtoMessage()

func (*ValueView_KnownDenom) Reset

func (m *ValueView_KnownDenom) Reset()

func (*ValueView_KnownDenom) Size

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

func (*ValueView_KnownDenom) String

func (m *ValueView_KnownDenom) String() string

func (*ValueView_KnownDenom) Unmarshal

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

func (*ValueView_KnownDenom) XXX_DiscardUnknown

func (m *ValueView_KnownDenom) XXX_DiscardUnknown()

func (*ValueView_KnownDenom) XXX_Marshal

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

func (*ValueView_KnownDenom) XXX_Merge

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

func (*ValueView_KnownDenom) XXX_Size

func (m *ValueView_KnownDenom) XXX_Size() int

func (*ValueView_KnownDenom) XXX_Unmarshal

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

type ValueView_KnownDenom_

type ValueView_KnownDenom_ struct {
	KnownDenom *ValueView_KnownDenom `protobuf:"bytes,1,opt,name=known_denom,json=knownDenom,proto3,oneof" json:"known_denom,omitempty"`
}

func (*ValueView_KnownDenom_) MarshalTo

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

func (*ValueView_KnownDenom_) MarshalToSizedBuffer

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

func (*ValueView_KnownDenom_) Size

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

type ValueView_UnknownDenom

type ValueView_UnknownDenom struct {
	Amount  *v1alpha1.Amount `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"`
	AssetId *AssetId         `protobuf:"bytes,2,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"`
}

func (*ValueView_UnknownDenom) Descriptor

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

func (*ValueView_UnknownDenom) GetAmount

func (m *ValueView_UnknownDenom) GetAmount() *v1alpha1.Amount

func (*ValueView_UnknownDenom) GetAssetId

func (m *ValueView_UnknownDenom) GetAssetId() *AssetId

func (*ValueView_UnknownDenom) Marshal

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

func (*ValueView_UnknownDenom) MarshalTo

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

func (*ValueView_UnknownDenom) MarshalToSizedBuffer

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

func (*ValueView_UnknownDenom) ProtoMessage

func (*ValueView_UnknownDenom) ProtoMessage()

func (*ValueView_UnknownDenom) Reset

func (m *ValueView_UnknownDenom) Reset()

func (*ValueView_UnknownDenom) Size

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

func (*ValueView_UnknownDenom) String

func (m *ValueView_UnknownDenom) String() string

func (*ValueView_UnknownDenom) Unmarshal

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

func (*ValueView_UnknownDenom) XXX_DiscardUnknown

func (m *ValueView_UnknownDenom) XXX_DiscardUnknown()

func (*ValueView_UnknownDenom) XXX_Marshal

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

func (*ValueView_UnknownDenom) XXX_Merge

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

func (*ValueView_UnknownDenom) XXX_Size

func (m *ValueView_UnknownDenom) XXX_Size() int

func (*ValueView_UnknownDenom) XXX_Unmarshal

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

type ValueView_UnknownDenom_

type ValueView_UnknownDenom_ struct {
	UnknownDenom *ValueView_UnknownDenom `protobuf:"bytes,2,opt,name=unknown_denom,json=unknownDenom,proto3,oneof" json:"unknown_denom,omitempty"`
}

func (*ValueView_UnknownDenom_) MarshalTo

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

func (*ValueView_UnknownDenom_) MarshalToSizedBuffer

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

func (*ValueView_UnknownDenom_) Size

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

Jump to

Keyboard shortcuts

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