liquidstaking

package
v0.0.1-gowrapper-test Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
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.

View Source
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.

View Source
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.

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Asset.ProtoReflect.Descriptor instead.

func (*Asset) GetDenom

func (x *Asset) GetDenom() string

func (*Asset) GetFromAddress

func (x *Asset) GetFromAddress() string

func (*Asset) GetLiquidToken

func (x *Asset) GetLiquidToken() string

func (*Asset) GetStakingToken

func (x *Asset) GetStakingToken() Coin

func (*Asset) ProtoMessage

func (*Asset) ProtoMessage()

func (*Asset) ProtoReflect

func (x *Asset) ProtoReflect() protoreflect.Message

func (*Asset) Reset

func (x *Asset) Reset()

func (*Asset) String

func (x *Asset) String() string

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

type Coin

type Coin int32

Enum for supported coins for liquid staking

const (
	// Previously, MATIC.
	Coin_POL  Coin = 0
	Coin_ATOM Coin = 1
	Coin_BNB  Coin = 2
	Coin_APT  Coin = 3
	Coin_ETH  Coin = 4
)

func (Coin) Descriptor

func (Coin) Descriptor() protoreflect.EnumDescriptor

func (Coin) Enum

func (x Coin) Enum() *Coin

func (Coin) EnumDescriptor deprecated

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

Deprecated: Use Coin.Descriptor instead.

func (Coin) Number

func (x Coin) Number() protoreflect.EnumNumber

func (Coin) String

func (x Coin) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Input.ProtoReflect.Descriptor instead.

func (*Input) GetAction

func (x *Input) GetAction() isInput_Action

func (*Input) GetBlockchain

func (x *Input) GetBlockchain() Blockchain

func (*Input) GetProtocol

func (x *Input) GetProtocol() Protocol

func (*Input) GetSmartContractAddress

func (x *Input) GetSmartContractAddress() string

func (*Input) GetStake

func (x *Input) GetStake() *Stake

func (*Input) GetUnstake

func (x *Input) GetUnstake() *Unstake

func (*Input) GetWithdraw

func (x *Input) GetWithdraw() *Withdraw

func (*Input) ProtoMessage

func (*Input) ProtoMessage()

func (*Input) ProtoReflect

func (x *Input) ProtoReflect() protoreflect.Message

func (*Input) Reset

func (x *Input) Reset()

func (*Input) String

func (x *Input) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Output.ProtoReflect.Descriptor instead.

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

func (x *Output) GetStatus() *Status

func (*Output) ProtoMessage

func (*Output) ProtoMessage()

func (*Output) ProtoReflect

func (x *Output) ProtoReflect() protoreflect.Message

func (*Output) Reset

func (x *Output) Reset()

func (*Output) String

func (x *Output) String() string

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

const (
	Protocol_Strader Protocol = 0
	Protocol_Stride  Protocol = 1
	Protocol_Tortuga Protocol = 2
	Protocol_Lido    Protocol = 3
)

func (Protocol) Descriptor

func (Protocol) Descriptor() protoreflect.EnumDescriptor

func (Protocol) Enum

func (x Protocol) Enum() *Protocol

func (Protocol) EnumDescriptor deprecated

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

Deprecated: Use Protocol.Descriptor instead.

func (Protocol) Number

func (x Protocol) Number() protoreflect.EnumNumber

func (Protocol) String

func (x Protocol) String() string

func (Protocol) Type

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) Descriptor() ([]byte, []int)

Deprecated: Use Stake.ProtoReflect.Descriptor instead.

func (*Stake) GetAmount

func (x *Stake) GetAmount() string

func (*Stake) GetAsset

func (x *Stake) GetAsset() *Asset

func (*Stake) ProtoMessage

func (*Stake) ProtoMessage()

func (*Stake) ProtoReflect

func (x *Stake) ProtoReflect() protoreflect.Message

func (*Stake) Reset

func (x *Stake) Reset()

func (*Stake) String

func (x *Stake) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Status.ProtoReflect.Descriptor instead.

func (*Status) GetCode

func (x *Status) GetCode() StatusCode

func (*Status) GetMessage

func (x *Status) GetMessage() string

func (*Status) ProtoMessage

func (*Status) ProtoMessage()

func (*Status) ProtoReflect

func (x *Status) ProtoReflect() protoreflect.Message

func (*Status) Reset

func (x *Status) Reset()

func (*Status) String

func (x *Status) String() string

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

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) Descriptor() ([]byte, []int)

Deprecated: Use Unstake.ProtoReflect.Descriptor instead.

func (*Unstake) GetAmount

func (x *Unstake) GetAmount() string

func (*Unstake) GetAsset

func (x *Unstake) GetAsset() *Asset

func (*Unstake) GetReceiverAddress

func (x *Unstake) GetReceiverAddress() string

func (*Unstake) GetReceiverChainId

func (x *Unstake) GetReceiverChainId() string

func (*Unstake) ProtoMessage

func (*Unstake) ProtoMessage()

func (*Unstake) ProtoReflect

func (x *Unstake) ProtoReflect() protoreflect.Message

func (*Unstake) Reset

func (x *Unstake) Reset()

func (*Unstake) String

func (x *Unstake) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Withdraw.ProtoReflect.Descriptor instead.

func (*Withdraw) GetAmount

func (x *Withdraw) GetAmount() string

func (*Withdraw) GetAsset

func (x *Withdraw) GetAsset() *Asset

func (*Withdraw) GetIdx

func (x *Withdraw) GetIdx() string

func (*Withdraw) ProtoMessage

func (*Withdraw) ProtoMessage()

func (*Withdraw) ProtoReflect

func (x *Withdraw) ProtoReflect() protoreflect.Message

func (*Withdraw) Reset

func (x *Withdraw) Reset()

func (*Withdraw) String

func (x *Withdraw) String() string

Jump to

Keyboard shortcuts

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