exported

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 20 Imported by: 3

Documentation

Index

Constants

View Source
const (
	// TypeUnrecognized means coin type is unrecognized
	TypeUnrecognized = iota
	// TypeGeneralMessage is a pure message
	TypeGeneralMessage
	// TypeGeneralMessageWithToken is a general message with token
	TypeGeneralMessageWithToken
	// TypeSendToken is a direct token transfer without link from a cosmos chain
	TypeSendToken
)
View Source
const ChainNameLengthMax = 20

ChainNameLengthMax bounds the max chain name length

Variables

View Source
var (
	ErrInvalidLengthTypes        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTypes          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
)
View Source
var GeneralMessage_Status_name = map[int32]string{
	0: "STATUS_UNSPECIFIED",
	1: "STATUS_APPROVED",
	2: "STATUS_PROCESSING",
	3: "STATUS_EXECUTED",
	4: "STATUS_FAILED",
}
View Source
var GeneralMessage_Status_value = map[string]int32{
	"STATUS_UNSPECIFIED": 0,
	"STATUS_APPROVED":    1,
	"STATUS_PROCESSING":  2,
	"STATUS_EXECUTED":    3,
	"STATUS_FAILED":      4,
}
View Source
var TransferDirection_name = map[int32]string{
	0: "TRANSFER_DIRECTION_UNSPECIFIED",
	1: "TRANSFER_DIRECTION_FROM",
	2: "TRANSFER_DIRECTION_TO",
}
View Source
var TransferDirection_value = map[string]int32{
	"TRANSFER_DIRECTION_UNSPECIFIED": 0,
	"TRANSFER_DIRECTION_FROM":        1,
	"TRANSFER_DIRECTION_TO":          2,
}
View Source
var TransferState_name = map[int32]string{
	0: "TRANSFER_STATE_UNSPECIFIED",
	1: "TRANSFER_STATE_PENDING",
	2: "TRANSFER_STATE_ARCHIVED",
	3: "TRANSFER_STATE_INSUFFICIENT_AMOUNT",
	4: "TRANSFER_STATE_FAILED",
}
View Source
var TransferState_value = map[string]int32{
	"TRANSFER_STATE_UNSPECIFIED":         0,
	"TRANSFER_STATE_PENDING":             1,
	"TRANSFER_STATE_ARCHIVED":            2,
	"TRANSFER_STATE_INSUFFICIENT_AMOUNT": 3,
	"TRANSFER_STATE_FAILED":              4,
}

Functions

func GetEscrowAddress added in v1.1.0

func GetEscrowAddress(denom string) sdk.AccAddress

GetEscrowAddress creates an address for the given denomination

Types

type AddressValidator added in v0.9.0

type AddressValidator func(ctx sdk.Context, address CrossChainAddress) error

AddressValidator defines a function that implements address verification upon a request to link addresses

type Asset added in v0.14.0

type Asset struct {
	Denom         string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"`
	IsNativeAsset bool   `protobuf:"varint,3,opt,name=is_native_asset,json=isNativeAsset,proto3" json:"is_native_asset,omitempty"`
}

func NewAsset added in v0.14.0

func NewAsset(denom string, isNative bool) Asset

NewAsset returns an asset struct

func (*Asset) Descriptor added in v0.14.0

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

func (*Asset) Marshal added in v0.14.0

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

func (*Asset) MarshalTo added in v0.14.0

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

func (*Asset) MarshalToSizedBuffer added in v0.14.0

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

func (*Asset) ProtoMessage added in v0.14.0

func (*Asset) ProtoMessage()

func (*Asset) Reset added in v0.14.0

func (m *Asset) Reset()

func (*Asset) Size added in v0.14.0

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

func (*Asset) String added in v0.14.0

func (m *Asset) String() string

func (*Asset) Unmarshal added in v0.14.0

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

func (Asset) Validate added in v0.14.0

func (m Asset) Validate() error

Validate checks the stateless validity of the asset

func (*Asset) XXX_DiscardUnknown added in v0.14.0

func (m *Asset) XXX_DiscardUnknown()

func (*Asset) XXX_Marshal added in v0.14.0

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

func (*Asset) XXX_Merge added in v0.14.0

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

func (*Asset) XXX_Size added in v0.14.0

func (m *Asset) XXX_Size() int

func (*Asset) XXX_Unmarshal added in v0.14.0

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

type Chain

type Chain struct {
	Name                  ChainName        `protobuf:"bytes,1,opt,name=name,proto3,casttype=ChainName" json:"name,omitempty"`
	SupportsForeignAssets bool             `` /* 127-byte string literal not displayed */
	KeyType               exported.KeyType `protobuf:"varint,4,opt,name=key_type,json=keyType,proto3,enum=axelar.tss.exported.v1beta1.KeyType" json:"key_type,omitempty"`
	Module                string           `protobuf:"bytes,5,opt,name=module,proto3" json:"module,omitempty"`
}

Chain represents the properties of a registered blockchain

func (*Chain) Descriptor

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

func (Chain) GetName added in v0.19.4

func (m Chain) GetName() ChainName

GetName returns the chain name

func (Chain) IsFrom added in v0.31.0

func (m Chain) IsFrom(module string) bool

IsFrom returns true if the chain registered under the module

func (*Chain) Marshal

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

func (*Chain) MarshalTo

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

func (*Chain) MarshalToSizedBuffer

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

func (*Chain) ProtoMessage

func (*Chain) ProtoMessage()

func (*Chain) Reset

func (m *Chain) Reset()

func (*Chain) Size

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

func (*Chain) String

func (m *Chain) String() string

func (*Chain) Unmarshal

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

func (Chain) Validate

func (m Chain) Validate() error

Validate performs a stateless check to ensure the Chain object has been initialized correctly

func (*Chain) XXX_DiscardUnknown

func (m *Chain) XXX_DiscardUnknown()

func (*Chain) XXX_Marshal

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

func (*Chain) XXX_Merge

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

func (*Chain) XXX_Size

func (m *Chain) XXX_Size() int

func (*Chain) XXX_Unmarshal

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

type ChainName added in v0.18.0

type ChainName string

ChainName ensures a correctly formatted EVM chain name

func (ChainName) Equals added in v0.18.0

func (c ChainName) Equals(c2 ChainName) bool

Equals returns boolean for whether two chain names are case-insensitive equal

func (ChainName) String added in v0.18.0

func (c ChainName) String() string

func (ChainName) Validate added in v0.18.0

func (c ChainName) Validate() error

Validate returns an error, if the chain name is empty or too long

type CrossChainAddress

type CrossChainAddress struct {
	Chain   Chain  `protobuf:"bytes,1,opt,name=chain,proto3" json:"chain"`
	Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
}

CrossChainAddress represents a generalized address on any registered chain

func (*CrossChainAddress) Descriptor

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

func (*CrossChainAddress) Marshal

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

func (*CrossChainAddress) MarshalTo

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

func (*CrossChainAddress) MarshalToSizedBuffer

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

func (*CrossChainAddress) ProtoMessage

func (*CrossChainAddress) ProtoMessage()

func (*CrossChainAddress) Reset

func (m *CrossChainAddress) Reset()

func (*CrossChainAddress) Size

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

func (*CrossChainAddress) String

func (m *CrossChainAddress) String() string

func (*CrossChainAddress) Unmarshal

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

func (CrossChainAddress) Validate added in v0.9.0

func (m CrossChainAddress) Validate() error

Validate validates the CrossChainAddress

func (*CrossChainAddress) XXX_DiscardUnknown

func (m *CrossChainAddress) XXX_DiscardUnknown()

func (*CrossChainAddress) XXX_Marshal

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

func (*CrossChainAddress) XXX_Merge

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

func (*CrossChainAddress) XXX_Size

func (m *CrossChainAddress) XXX_Size() int

func (*CrossChainAddress) XXX_Unmarshal

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

type CrossChainTransfer

type CrossChainTransfer struct {
	Recipient CrossChainAddress `protobuf:"bytes,1,opt,name=recipient,proto3" json:"recipient"`
	Asset     types.Coin        `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset"`
	ID        TransferID        `protobuf:"varint,3,opt,name=id,proto3,casttype=TransferID" json:"id,omitempty"`
	State     TransferState     `protobuf:"varint,4,opt,name=state,proto3,enum=axelar.nexus.exported.v1beta1.TransferState" json:"state,omitempty"`
}

CrossChainTransfer represents a generalized transfer of some asset to a registered blockchain

func NewCrossChainTransfer added in v0.15.0

func NewCrossChainTransfer(id uint64, recipient CrossChainAddress, asset sdk.Coin, state TransferState) CrossChainTransfer

NewCrossChainTransfer returns a CrossChainTransfer

func NewPendingCrossChainTransfer added in v0.9.0

func NewPendingCrossChainTransfer(id uint64, recipient CrossChainAddress, asset sdk.Coin) CrossChainTransfer

NewPendingCrossChainTransfer returns a pending CrossChainTransfer

func (*CrossChainTransfer) Descriptor

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

func (*CrossChainTransfer) Marshal

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

func (*CrossChainTransfer) MarshalTo

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

func (*CrossChainTransfer) MarshalToSizedBuffer

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

func (*CrossChainTransfer) ProtoMessage

func (*CrossChainTransfer) ProtoMessage()

func (*CrossChainTransfer) Reset

func (m *CrossChainTransfer) Reset()

func (*CrossChainTransfer) Size

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

func (*CrossChainTransfer) String

func (m *CrossChainTransfer) String() string

func (*CrossChainTransfer) Unmarshal

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

func (CrossChainTransfer) Validate added in v0.9.0

func (m CrossChainTransfer) Validate() error

Validate validates the CrossChainTransfer

func (*CrossChainTransfer) XXX_DiscardUnknown

func (m *CrossChainTransfer) XXX_DiscardUnknown()

func (*CrossChainTransfer) XXX_Marshal

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

func (*CrossChainTransfer) XXX_Merge

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

func (*CrossChainTransfer) XXX_Size

func (m *CrossChainTransfer) XXX_Size() int

func (*CrossChainTransfer) XXX_Unmarshal

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

type FeeInfo added in v0.15.0

type FeeInfo struct {
	Chain   ChainName                              `protobuf:"bytes,1,opt,name=chain,proto3,casttype=ChainName" json:"chain,omitempty"`
	Asset   string                                 `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset,omitempty"`
	FeeRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=fee_rate,json=feeRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"fee_rate"`
	MinFee  github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=min_fee,json=minFee,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"min_fee"`
	MaxFee  github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=max_fee,json=maxFee,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"max_fee"`
}

func NewFeeInfo added in v0.15.0

func NewFeeInfo(chain ChainName, asset string, feeRate sdk.Dec, minFee sdk.Int, maxFee sdk.Int) FeeInfo

NewFeeInfo returns a FeeInfo struct

func ZeroFeeInfo added in v0.15.0

func ZeroFeeInfo(chain ChainName, asset string) FeeInfo

ZeroFeeInfo returns a FeeInfo struct with zero fees

func (*FeeInfo) Descriptor added in v0.15.0

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

func (*FeeInfo) Marshal added in v0.15.0

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

func (*FeeInfo) MarshalTo added in v0.15.0

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

func (*FeeInfo) MarshalToSizedBuffer added in v0.15.0

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

func (*FeeInfo) ProtoMessage added in v0.15.0

func (*FeeInfo) ProtoMessage()

func (*FeeInfo) Reset added in v0.15.0

func (m *FeeInfo) Reset()

func (*FeeInfo) Size added in v0.15.0

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

func (*FeeInfo) String added in v0.15.0

func (m *FeeInfo) String() string

func (*FeeInfo) Unmarshal added in v0.15.0

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

func (FeeInfo) Validate added in v0.15.0

func (m FeeInfo) Validate() error

Validate checks the stateless validity of fee info

func (*FeeInfo) XXX_DiscardUnknown added in v0.15.0

func (m *FeeInfo) XXX_DiscardUnknown()

func (*FeeInfo) XXX_Marshal added in v0.15.0

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

func (*FeeInfo) XXX_Merge added in v0.15.0

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

func (*FeeInfo) XXX_Size added in v0.15.0

func (m *FeeInfo) XXX_Size() int

func (*FeeInfo) XXX_Unmarshal added in v0.15.0

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

type GeneralMessage added in v0.31.0

type GeneralMessage struct {
	ID            string                `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Sender        CrossChainAddress     `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender"`
	Recipient     CrossChainAddress     `protobuf:"bytes,3,opt,name=recipient,proto3" json:"recipient"`
	PayloadHash   []byte                `protobuf:"bytes,4,opt,name=payload_hash,json=payloadHash,proto3" json:"payload_hash,omitempty"`
	Status        GeneralMessage_Status `protobuf:"varint,5,opt,name=status,proto3,enum=axelar.nexus.exported.v1beta1.GeneralMessage_Status" json:"status,omitempty"`
	Asset         *types.Coin           `protobuf:"bytes,6,opt,name=asset,proto3" json:"asset,omitempty"`
	SourceTxID    []byte                `protobuf:"bytes,7,opt,name=source_tx_id,json=sourceTxId,proto3" json:"source_tx_id,omitempty"`
	SourceTxIndex uint64                `protobuf:"varint,8,opt,name=source_tx_index,json=sourceTxIndex,proto3" json:"source_tx_index,omitempty"`
}

func NewGeneralMessage added in v0.31.0

func NewGeneralMessage(id string, sender CrossChainAddress, recipient CrossChainAddress, payloadHash []byte, sourceTxID []byte, sourceTxIndex uint64, asset *sdk.Coin) GeneralMessage

NewGeneralMessage returns a GeneralMessage struct with status set to approved

func (*GeneralMessage) Descriptor added in v0.31.0

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

func (GeneralMessage) GetDestinationAddress added in v0.32.0

func (m GeneralMessage) GetDestinationAddress() string

GetDestinationAddress returns the destination address

func (GeneralMessage) GetDestinationChain added in v0.32.0

func (m GeneralMessage) GetDestinationChain() ChainName

GetDestinationChain returns the destination chain name

func (GeneralMessage) GetSourceAddress added in v0.32.0

func (m GeneralMessage) GetSourceAddress() string

GetSourceAddress returns the source address

func (GeneralMessage) GetSourceChain added in v0.32.0

func (m GeneralMessage) GetSourceChain() ChainName

GetSourceChain returns the source chain name

func (GeneralMessage) Is added in v0.32.0

Is returns true if status matches

func (*GeneralMessage) Marshal added in v0.31.0

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

func (*GeneralMessage) MarshalTo added in v0.31.0

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

func (*GeneralMessage) MarshalToSizedBuffer added in v0.31.0

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

func (GeneralMessage) Match added in v0.32.0

func (m GeneralMessage) Match(payload []byte) bool

Match returns true if hash of payload matches the expected

func (*GeneralMessage) ProtoMessage added in v0.31.0

func (*GeneralMessage) ProtoMessage()

func (*GeneralMessage) Reset added in v0.31.0

func (m *GeneralMessage) Reset()

func (*GeneralMessage) Size added in v0.31.0

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

func (*GeneralMessage) String added in v0.31.0

func (m *GeneralMessage) String() string

func (GeneralMessage) Type added in v0.32.0

func (m GeneralMessage) Type() MessageType

Type returns the type of the message

func (*GeneralMessage) Unmarshal added in v0.31.0

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

func (GeneralMessage) ValidateBasic added in v0.31.0

func (m GeneralMessage) ValidateBasic() error

ValidateBasic validates the general message

func (*GeneralMessage) XXX_DiscardUnknown added in v0.31.0

func (m *GeneralMessage) XXX_DiscardUnknown()

func (*GeneralMessage) XXX_Marshal added in v0.31.0

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

func (*GeneralMessage) XXX_Merge added in v0.31.0

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

func (*GeneralMessage) XXX_Size added in v0.31.0

func (m *GeneralMessage) XXX_Size() int

func (*GeneralMessage) XXX_Unmarshal added in v0.31.0

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

type GeneralMessage_Status added in v0.31.0

type GeneralMessage_Status int32
const (
	NonExistent GeneralMessage_Status = 0
	Approved    GeneralMessage_Status = 1
	Processing  GeneralMessage_Status = 2
	Executed    GeneralMessage_Status = 3
	Failed      GeneralMessage_Status = 4
)

func (GeneralMessage_Status) EnumDescriptor added in v0.31.0

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

func (GeneralMessage_Status) String added in v0.31.0

func (x GeneralMessage_Status) String() string

type IsChainRegisteredRequest added in v1.1.0

type IsChainRegisteredRequest struct {
	Chain string `json:"chain"`
}

type LockableAsset added in v1.1.0

type LockableAsset interface {
	// GetAsset returns a sdk.Coin using the nexus registered asset as the denom
	GetAsset() sdk.Coin
	// GetCoin returns a sdk.Coin with the actual denom used by x/bank (e.g. ICS20 coins)
	GetCoin(ctx sdk.Context) sdk.Coin
	LockFrom(ctx sdk.Context, fromAddr sdk.AccAddress) error
	UnlockTo(ctx sdk.Context, toAddr sdk.AccAddress) error
}

LockableAsset defines a nexus registered asset that can be locked and unlocked

type MaintainerState added in v0.25.0

type MaintainerState interface {
	codec.ProtoMarshaler
	MarkMissingVote(missingVote bool)
	MarkIncorrectVote(incorrectVote bool)
	CountMissingVotes(window int) uint64
	CountIncorrectVotes(window int) uint64
	GetAddress() sdk.ValAddress
}

MaintainerState allows to record status of chain maintainer

type MessageRoute added in v0.35.0

type MessageRoute func(ctx sdk.Context, routingCtx RoutingContext, msg GeneralMessage) error

MessageRoute defines a function that implements message routing

type MessageType added in v0.32.0

type MessageType int

MessageType on can be TypeGeneralMessage or TypeGeneralMessageWithToken

type RoutingContext added in v0.35.0

type RoutingContext struct {
	Sender     sdk.AccAddress
	FeeGranter sdk.AccAddress
	Payload    []byte
}

type TransferDirection added in v0.27.0

type TransferDirection int32
const (
	Unspecified           TransferDirection = 0
	TransferDirectionFrom TransferDirection = 1
	TransferDirectionTo   TransferDirection = 2
)

func (TransferDirection) EnumDescriptor added in v0.27.0

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

func (TransferDirection) String added in v0.27.0

func (x TransferDirection) String() string

func (TransferDirection) ValidateBasic added in v0.27.0

func (m TransferDirection) ValidateBasic() error

ValidateBasic validates the transfer direction

type TransferFee added in v0.11.1

type TransferFee struct {
	Coins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=coins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coins"`
}

TransferFee represents accumulated fees generated by the network

func (*TransferFee) Descriptor added in v0.11.1

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

func (*TransferFee) Marshal added in v0.11.1

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

func (*TransferFee) MarshalTo added in v0.11.1

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

func (*TransferFee) MarshalToSizedBuffer added in v0.11.1

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

func (*TransferFee) ProtoMessage added in v0.11.1

func (*TransferFee) ProtoMessage()

func (*TransferFee) Reset added in v0.11.1

func (m *TransferFee) Reset()

func (*TransferFee) Size added in v0.11.1

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

func (*TransferFee) String added in v0.11.1

func (m *TransferFee) String() string

func (*TransferFee) Unmarshal added in v0.11.1

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

func (*TransferFee) XXX_DiscardUnknown added in v0.11.1

func (m *TransferFee) XXX_DiscardUnknown()

func (*TransferFee) XXX_Marshal added in v0.11.1

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

func (*TransferFee) XXX_Merge added in v0.11.1

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

func (*TransferFee) XXX_Size added in v0.11.1

func (m *TransferFee) XXX_Size() int

func (*TransferFee) XXX_Unmarshal added in v0.11.1

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

type TransferID added in v0.13.0

type TransferID uint64

TransferID represents the unique cross transfer identifier

func (TransferID) Bytes added in v0.13.0

func (t TransferID) Bytes() []byte

Bytes returns the byte array of TransferID

func (TransferID) String added in v0.13.0

func (t TransferID) String() string

String returns a string representation of TransferID

type TransferState

type TransferState int32
const (
	TRANSFER_STATE_UNSPECIFIED TransferState = 0
	Pending                    TransferState = 1
	Archived                   TransferState = 2
	InsufficientAmount         TransferState = 3
	TransferFailed             TransferState = 4
)

func TransferStateFromString added in v0.13.1

func TransferStateFromString(s string) TransferState

TransferStateFromString converts a describing state string to the corresponding TransferState

func (TransferState) EnumDescriptor

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

func (TransferState) String

func (x TransferState) String() string

func (TransferState) Validate added in v0.9.0

func (m TransferState) Validate() error

Validate validates the TransferState

type WasmBytes added in v0.35.0

type WasmBytes []byte

WasmBytes is a wrapper around []byte that gets JSON marshalized as an array of numbers instead of base64-encoded string

func (WasmBytes) MarshalJSON added in v0.35.0

func (bz WasmBytes) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*WasmBytes) UnmarshalJSON added in v0.35.0

func (bz *WasmBytes) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler

type WasmMessage added in v0.35.0

type WasmMessage struct {
	SourceChain        ChainName                                     `protobuf:"bytes,1,opt,name=source_chain,json=sourceChain,proto3,casttype=ChainName" json:"source_chain,omitempty"`
	SourceAddress      string                                        `protobuf:"bytes,2,opt,name=source_address,json=sourceAddress,proto3" json:"source_address,omitempty"`
	DestinationChain   ChainName                                     `` /* 128-byte string literal not displayed */
	DestinationAddress string                                        `protobuf:"bytes,4,opt,name=destination_address,json=destinationAddress,proto3" json:"destination_address,omitempty"`
	PayloadHash        WasmBytes                                     `protobuf:"bytes,5,opt,name=payload_hash,json=payloadHash,proto3,casttype=WasmBytes" json:"payload_hash,omitempty"`
	SourceTxID         WasmBytes                                     `protobuf:"bytes,6,opt,name=source_tx_id,json=sourceTxId,proto3,casttype=WasmBytes" json:"source_tx_id,omitempty"`
	SourceTxIndex      uint64                                        `protobuf:"varint,7,opt,name=source_tx_index,json=sourceTxIndex,proto3" json:"source_tx_index"`
	Sender             github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,8,opt,name=sender,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"sender,omitempty"`
	ID                 string                                        `protobuf:"bytes,9,opt,name=id,proto3" json:"id,omitempty"`
}

func FromGeneralMessage added in v0.35.0

func FromGeneralMessage(msg GeneralMessage) WasmMessage

FromGeneralMessage returns a WasmMessage from a GeneralMessage

func (*WasmMessage) Descriptor added in v0.35.0

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

func (WasmMessage) GetSigners added in v0.35.0

func (m WasmMessage) GetSigners() []sdk.AccAddress

GetSigners implements sdk.Msg. There is no signer for wasm generated messages, so this returns an empty slice.

func (*WasmMessage) Marshal added in v0.35.0

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

func (*WasmMessage) MarshalTo added in v0.35.0

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

func (*WasmMessage) MarshalToSizedBuffer added in v0.35.0

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

func (*WasmMessage) ProtoMessage added in v0.35.0

func (*WasmMessage) ProtoMessage()

func (*WasmMessage) Reset added in v0.35.0

func (m *WasmMessage) Reset()

func (*WasmMessage) Size added in v0.35.0

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

func (*WasmMessage) String added in v0.35.0

func (m *WasmMessage) String() string

func (*WasmMessage) Unmarshal added in v0.35.0

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

func (WasmMessage) ValidateBasic added in v0.35.0

func (m WasmMessage) ValidateBasic() error

ValidateBasic implements sdk.Msg

func (*WasmMessage) XXX_DiscardUnknown added in v0.35.0

func (m *WasmMessage) XXX_DiscardUnknown()

func (*WasmMessage) XXX_Marshal added in v0.35.0

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

func (*WasmMessage) XXX_Merge added in v0.35.0

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

func (*WasmMessage) XXX_Size added in v0.35.0

func (m *WasmMessage) XXX_Size() int

func (*WasmMessage) XXX_Unmarshal added in v0.35.0

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

type WasmQueryIsChainRegisteredResponse added in v1.1.0

type WasmQueryIsChainRegisteredResponse struct {
	IsRegistered bool `json:"is_registered"`
}

type WasmQueryRequest added in v1.1.0

type WasmQueryRequest struct {
	TxHashAndNonce    *struct{}                 `json:"tx_hash_and_nonce,omitempty"`
	IsChainRegistered *IsChainRegisteredRequest `json:"is_chain_registered,omitempty"`
}

WasmQueryRequest is the request for wasm contracts to query

type WasmQueryTxHashAndNonceResponse added in v1.1.0

type WasmQueryTxHashAndNonceResponse struct {
	TxHash [32]byte `json:"tx_hash,omitempty"` // the hash of the current transaction
	Nonce  uint64   `json:"nonce,omitempty"`   // the nonce of the current execution, which increments with each entry of any wasm execution
}

WasmQueryTxHashAndNonceResponse is the response for the TxHashAndNonce query

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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