AutoDeleveraging

type AutoDeleveragingBuilder

type AutoDeleveragingBuilder struct {
	AccountId       AccountId
	SubAccountId    SubAccountId
	SubAccountNonce Nonce
	ContractPrices  []ContractPrice
	MarginPrices    []SpotPriceInfo
	AdlAccountId    AccountId
	PairId          PairId
	AdlSize         BigUint
	AdlPrice        BigUint
	Fee             BigUint
	FeeToken        TokenId
}

Builder that used to build AutoDeleveraging transaction.

type AutoDeleveraging

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

func NewAutoDeleveraging

Create a new AutoDeleveraging transaction.

func (*AutoDeleveraging) GetBytes

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

func (*AutoDeleveraging) TxHash

Get the transaction hash of the transaction.

func (*AutoDeleveraging) JsonStr

Get the json string of the transaction.

func (*AutoDeleveraging) IsValid

Check if the transaction is valid.

func (*AutoDeleveraging) CreateSignedTx

Create a new AutoDeleveraging transaction with L3 signature inside.

input:

func (*AutoDeleveraging) GetSignature

Get L3 signature of the transaction.

func (*AutoDeleveraging) IsSignatureValid

Check if the inside L3 signature is valid or not.

func *AutoDeleveraging) ToZklinkTx

Change the transaction to the ZkLinkTx

Last updated

Was this helpful?