Documentation
¶
Index ¶
- Variables
- type Asset
- func (*Asset) Descriptor() ([]byte, []int)deprecated
- func (x *Asset) GetDenom() string
- func (x *Asset) GetFromAddress() string
- func (x *Asset) GetLiquidToken() string
- func (x *Asset) GetStakingToken() Coin
- func (*Asset) ProtoMessage()
- func (x *Asset) ProtoReflect() protoreflect.Message
- func (x *Asset) Reset()
- func (x *Asset) String() string
- type Blockchain
- type Coin
- type Input
- func (*Input) Descriptor() ([]byte, []int)deprecated
- func (x *Input) GetAction() isInput_Action
- func (x *Input) GetBlockchain() Blockchain
- func (x *Input) GetProtocol() Protocol
- func (x *Input) GetSmartContractAddress() string
- func (x *Input) GetStake() *Stake
- func (x *Input) GetUnstake() *Unstake
- func (x *Input) GetWithdraw() *Withdraw
- func (*Input) ProtoMessage()
- func (x *Input) ProtoReflect() protoreflect.Message
- func (x *Input) Reset()
- func (x *Input) String() string
- type Input_Stake
- type Input_Unstake
- type Input_Withdraw
- type Output
- func (*Output) Descriptor() ([]byte, []int)deprecated
- func (x *Output) GetAptos() *aptos.SigningInput
- func (x *Output) GetCosmos() *cosmos.SigningInput
- func (x *Output) GetEthereum() *ethereum.SigningInput
- func (x *Output) GetSigningInputOneof() isOutput_SigningInputOneof
- func (x *Output) GetStatus() *Status
- func (*Output) ProtoMessage()
- func (x *Output) ProtoReflect() protoreflect.Message
- func (x *Output) Reset()
- func (x *Output) String() string
- type Output_Aptos
- type Output_Cosmos
- type Output_Ethereum
- type Protocol
- type Stake
- type Status
- type StatusCode
- type Unstake
- func (*Unstake) Descriptor() ([]byte, []int)deprecated
- func (x *Unstake) GetAmount() string
- func (x *Unstake) GetAsset() *Asset
- func (x *Unstake) GetReceiverAddress() string
- func (x *Unstake) GetReceiverChainId() string
- func (*Unstake) ProtoMessage()
- func (x *Unstake) ProtoReflect() protoreflect.Message
- func (x *Unstake) Reset()
- func (x *Unstake) String() string
- type Withdraw
- func (*Withdraw) Descriptor() ([]byte, []int)deprecated
- func (x *Withdraw) GetAmount() string
- func (x *Withdraw) GetAsset() *Asset
- func (x *Withdraw) GetIdx() string
- func (*Withdraw) ProtoMessage()
- func (x *Withdraw) ProtoReflect() protoreflect.Message
- func (x *Withdraw) Reset()
- func (x *Withdraw) String() string
Constants ¶
This section is empty.
Variables ¶
var ( Coin_name = map[int32]string{ 0: "POL", 1: "ATOM", 2: "BNB", 3: "APT", 4: "ETH", } Coin_value = map[string]int32{ "POL": 0, "ATOM": 1, "BNB": 2, "APT": 3, "ETH": 4, } )
Enum value maps for Coin.
var ( Blockchain_name = map[int32]string{ 0: "ETHEREUM", 1: "POLYGON", 2: "STRIDE", 3: "BNB_BSC", 4: "APTOS", } Blockchain_value = map[string]int32{ "ETHEREUM": 0, "POLYGON": 1, "STRIDE": 2, "BNB_BSC": 3, "APTOS": 4, } )
Enum value maps for Blockchain.
var ( Protocol_name = map[int32]string{ 0: "Strader", 1: "Stride", 2: "Tortuga", 3: "Lido", } Protocol_value = map[string]int32{ "Strader": 0, "Stride": 1, "Tortuga": 2, "Lido": 3, } )
Enum value maps for Protocol.
var ( StatusCode_name = map[int32]string{ 0: "OK", 1: "ERROR_ACTION_NOT_SET", 2: "ERROR_TARGETED_BLOCKCHAIN_NOT_SUPPORTED_BY_PROTOCOL", 3: "ERROR_SMART_CONTRACT_ADDRESS_NOT_SET", 4: "ERROR_INPUT_PROTO_DESERIALIZATION", 5: "ERROR_OPERATION_NOT_SUPPORTED_BY_PROTOCOL", } StatusCode_value = map[string]int32{ "OK": 0, "ERROR_ACTION_NOT_SET": 1, "ERROR_TARGETED_BLOCKCHAIN_NOT_SUPPORTED_BY_PROTOCOL": 2, "ERROR_SMART_CONTRACT_ADDRESS_NOT_SET": 3, "ERROR_INPUT_PROTO_DESERIALIZATION": 4, "ERROR_OPERATION_NOT_SUPPORTED_BY_PROTOCOL": 5, } )
Enum value maps for StatusCode.
var File_LiquidStaking_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Asset ¶
type Asset struct { // Coin to be staked StakingToken Coin `` /* 131-byte string literal not displayed */ // Optional, liquid_token to be manipulated: unstake, claim rewards LiquidToken string `protobuf:"bytes,2,opt,name=liquid_token,json=liquidToken,proto3" json:"liquid_token,omitempty"` // Denom of the asset to be manipulated, required by some liquid staking protocols Denom string `protobuf:"bytes,3,opt,name=denom,proto3" json:"denom,omitempty"` // Address for building the appropriate input FromAddress string `protobuf:"bytes,4,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` // contains filtered or unexported fields }
Message to represent the asset for staking operations
func (*Asset) Descriptor
deprecated
func (*Asset) GetFromAddress ¶
func (*Asset) GetLiquidToken ¶
func (*Asset) GetStakingToken ¶
func (*Asset) ProtoMessage ¶
func (*Asset) ProtoMessage()
func (*Asset) ProtoReflect ¶
func (x *Asset) ProtoReflect() protoreflect.Message
type Blockchain ¶
type Blockchain int32
Enum for supported target blockchains for liquid staking
const ( Blockchain_ETHEREUM Blockchain = 0 Blockchain_POLYGON Blockchain = 1 Blockchain_STRIDE Blockchain = 2 Blockchain_BNB_BSC Blockchain = 3 Blockchain_APTOS Blockchain = 4 )
func (Blockchain) Descriptor ¶
func (Blockchain) Descriptor() protoreflect.EnumDescriptor
func (Blockchain) Enum ¶
func (x Blockchain) Enum() *Blockchain
func (Blockchain) EnumDescriptor
deprecated
func (Blockchain) EnumDescriptor() ([]byte, []int)
Deprecated: Use Blockchain.Descriptor instead.
func (Blockchain) Number ¶
func (x Blockchain) Number() protoreflect.EnumNumber
func (Blockchain) String ¶
func (x Blockchain) String() string
func (Blockchain) Type ¶
func (Blockchain) Type() protoreflect.EnumType
type Coin ¶
type Coin int32
Enum for supported coins for liquid staking
func (Coin) Descriptor ¶
func (Coin) Descriptor() protoreflect.EnumDescriptor
func (Coin) EnumDescriptor
deprecated
func (Coin) Number ¶
func (x Coin) Number() protoreflect.EnumNumber
func (Coin) Type ¶
func (Coin) Type() protoreflect.EnumType
type Input ¶
type Input struct { // Oneof field to specify the action: stake, unstake or withdraw // // Types that are valid to be assigned to Action: // // *Input_Stake // *Input_Unstake // *Input_Withdraw Action isInput_Action `protobuf_oneof:"action"` // Optional smart contract address for EVM-based chains SmartContractAddress string `protobuf:"bytes,4,opt,name=smart_contract_address,json=smartContractAddress,proto3" json:"smart_contract_address,omitempty"` // Protocol to be used for liquid staking Protocol Protocol `protobuf:"varint,5,opt,name=protocol,proto3,enum=TW.LiquidStaking.Proto.Protocol" json:"protocol,omitempty"` // Target blockchain for the liquid staking operation Blockchain Blockchain `protobuf:"varint,6,opt,name=blockchain,proto3,enum=TW.LiquidStaking.Proto.Blockchain" json:"blockchain,omitempty"` // contains filtered or unexported fields }
Message to represent the input for a liquid staking operation
func (*Input) Descriptor
deprecated
func (*Input) GetBlockchain ¶
func (x *Input) GetBlockchain() Blockchain
func (*Input) GetProtocol ¶
func (*Input) GetSmartContractAddress ¶
func (*Input) GetUnstake ¶
func (*Input) GetWithdraw ¶
func (*Input) ProtoMessage ¶
func (*Input) ProtoMessage()
func (*Input) ProtoReflect ¶
func (x *Input) ProtoReflect() protoreflect.Message
type Input_Stake ¶
type Input_Stake struct {
Stake *Stake `protobuf:"bytes,1,opt,name=stake,proto3,oneof"`
}
type Input_Unstake ¶
type Input_Unstake struct {
Unstake *Unstake `protobuf:"bytes,2,opt,name=unstake,proto3,oneof"`
}
type Input_Withdraw ¶
type Input_Withdraw struct {
Withdraw *Withdraw `protobuf:"bytes,3,opt,name=withdraw,proto3,oneof"`
}
type Output ¶
type Output struct { // Status of the liquid staking operation Status *Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` // Unsigned transaction input - needs to be completed and signed // // Types that are valid to be assigned to SigningInputOneof: // // *Output_Ethereum // *Output_Cosmos // *Output_Aptos SigningInputOneof isOutput_SigningInputOneof `protobuf_oneof:"signing_input_oneof"` // contains filtered or unexported fields }
Message to represent the output of a liquid staking operation
func (*Output) Descriptor
deprecated
func (*Output) GetAptos ¶
func (x *Output) GetAptos() *aptos.SigningInput
func (*Output) GetCosmos ¶
func (x *Output) GetCosmos() *cosmos.SigningInput
func (*Output) GetEthereum ¶
func (x *Output) GetEthereum() *ethereum.SigningInput
func (*Output) GetSigningInputOneof ¶
func (x *Output) GetSigningInputOneof() isOutput_SigningInputOneof
func (*Output) ProtoMessage ¶
func (*Output) ProtoMessage()
func (*Output) ProtoReflect ¶
func (x *Output) ProtoReflect() protoreflect.Message
type Output_Aptos ¶
type Output_Aptos struct {
Aptos *aptos.SigningInput `protobuf:"bytes,4,opt,name=aptos,proto3,oneof"`
}
type Output_Cosmos ¶
type Output_Cosmos struct {
Cosmos *cosmos.SigningInput `protobuf:"bytes,3,opt,name=cosmos,proto3,oneof"`
}
type Output_Ethereum ¶
type Output_Ethereum struct {
Ethereum *ethereum.SigningInput `protobuf:"bytes,2,opt,name=ethereum,proto3,oneof"`
}
type Protocol ¶
type Protocol int32
Enum for supported liquid staking protocols
func (Protocol) Descriptor ¶
func (Protocol) Descriptor() protoreflect.EnumDescriptor
func (Protocol) EnumDescriptor
deprecated
func (Protocol) Number ¶
func (x Protocol) Number() protoreflect.EnumNumber
func (Protocol) Type ¶
func (Protocol) Type() protoreflect.EnumType
type Stake ¶
type Stake struct { Asset *Asset `protobuf:"bytes,1,opt,name=asset,proto3" json:"asset,omitempty"` Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` // contains filtered or unexported fields }
Message to represent a stake operation
func (*Stake) Descriptor
deprecated
func (*Stake) ProtoMessage ¶
func (*Stake) ProtoMessage()
func (*Stake) ProtoReflect ¶
func (x *Stake) ProtoReflect() protoreflect.Message
type Status ¶
type Status struct { // Status code of the operation Code StatusCode `protobuf:"varint,1,opt,name=code,proto3,enum=TW.LiquidStaking.Proto.StatusCode" json:"code,omitempty"` // Optional error message, populated in case of error Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
Message to represent the status of an operation
func (*Status) Descriptor
deprecated
func (*Status) GetCode ¶
func (x *Status) GetCode() StatusCode
func (*Status) GetMessage ¶
func (*Status) ProtoMessage ¶
func (*Status) ProtoMessage()
func (*Status) ProtoReflect ¶
func (x *Status) ProtoReflect() protoreflect.Message
type StatusCode ¶
type StatusCode int32
Enum for status codes to indicate the result of an operation
const ( StatusCode_OK StatusCode = 0 StatusCode_ERROR_ACTION_NOT_SET StatusCode = 1 StatusCode_ERROR_TARGETED_BLOCKCHAIN_NOT_SUPPORTED_BY_PROTOCOL StatusCode = 2 StatusCode_ERROR_SMART_CONTRACT_ADDRESS_NOT_SET StatusCode = 3 StatusCode_ERROR_INPUT_PROTO_DESERIALIZATION StatusCode = 4 StatusCode_ERROR_OPERATION_NOT_SUPPORTED_BY_PROTOCOL StatusCode = 5 )
func (StatusCode) Descriptor ¶
func (StatusCode) Descriptor() protoreflect.EnumDescriptor
func (StatusCode) Enum ¶
func (x StatusCode) Enum() *StatusCode
func (StatusCode) EnumDescriptor
deprecated
func (StatusCode) EnumDescriptor() ([]byte, []int)
Deprecated: Use StatusCode.Descriptor instead.
func (StatusCode) Number ¶
func (x StatusCode) Number() protoreflect.EnumNumber
func (StatusCode) String ¶
func (x StatusCode) String() string
func (StatusCode) Type ¶
func (StatusCode) Type() protoreflect.EnumType
type Unstake ¶
type Unstake struct { Asset *Asset `protobuf:"bytes,1,opt,name=asset,proto3" json:"asset,omitempty"` Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` // Some cross-chain protocols propose u to setup a receiver_address ReceiverAddress string `protobuf:"bytes,3,opt,name=receiver_address,json=receiverAddress,proto3" json:"receiver_address,omitempty"` // Some cross-chain protocols propose u to set the receiver chain_id, it allows auto-claim after probation period ReceiverChainId string `protobuf:"bytes,4,opt,name=receiver_chain_id,json=receiverChainId,proto3" json:"receiver_chain_id,omitempty"` // contains filtered or unexported fields }
Message to represent an unstake operation
func (*Unstake) Descriptor
deprecated
func (*Unstake) GetReceiverAddress ¶
func (*Unstake) GetReceiverChainId ¶
func (*Unstake) ProtoMessage ¶
func (*Unstake) ProtoMessage()
func (*Unstake) ProtoReflect ¶
func (x *Unstake) ProtoReflect() protoreflect.Message
type Withdraw ¶
type Withdraw struct { Asset *Asset `protobuf:"bytes,1,opt,name=asset,proto3" json:"asset,omitempty"` Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` // Sometimes withdraw is just the index of a request, amount is already known by the SC Idx string `protobuf:"bytes,3,opt,name=idx,proto3" json:"idx,omitempty"` // contains filtered or unexported fields }
Message to represent a withdraw operation
func (*Withdraw) Descriptor
deprecated
func (*Withdraw) ProtoMessage ¶
func (*Withdraw) ProtoMessage()
func (*Withdraw) ProtoReflect ¶
func (x *Withdraw) ProtoReflect() protoreflect.Message