Liquidation

type LiquidationBuilder

type LiquidationBuilder struct {
    AccountId            AccountId
    SubAccountId         SubAccountId
    SubAccountNonce      Nonce
    ContractPrices       []ContractPrice
    MarginPrices         []SpotPriceInfo
    LiquidationAccountId AccountId
    Fee                  BigUint
    FeeToken             TokenId
}

The builder used to create the Liquidation transaction.

type Liquidation

Liquidation transaction type, it's a opaque data type.

func NewLiquidation(builder LiquidationBuilder)

func NewLiquidation(builder LiquidationBuilder) *Liquidation

Create a new Liquidation transaction.

func (*Liquidation) GetBytes

Get the encoded bytes to create the L3 signature. See more in Private Key and Signature

func (*Liquidation) TxHash

Get the transaction hash of the transaction.

func (*Liquidation) JsonStr

Get the json string of the transaction.

func (*Liquidation) IsValid

Check if the transaction is valid.

func (*Liquidation) CreateSignedTx

Create a new Liquidation transaction with L3 signature inside. input:

func (*Liquidation) GetSignature

Get L3 signature of the transaction.

func (*Liquidation) IsSignatureValid

Check if the inside L3 signature is valid or not.

func (*Liquidation) ToZklinkTx

Change the transaction to the ZkLinkTx

Last updated

Was this helpful?