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
func NewAutoDeleveraging(builder AutoDeleveragingBuilder) *AutoDeleveragingCreate a new AutoDeleveraging transaction.
func (*AutoDeleveraging) GetBytes
func (*AutoDeleveraging) GetBytes() []uint8Get the encoded bytes to create the L3 signature. See more in Private Key and Signature
func (*AutoDeleveraging) TxHash
func (*AutoDeleveraging) TxHash() []uint8Get the transaction hash of the transaction.
func (*AutoDeleveraging) JsonStr
func (*AutoDeleveraging) JsonStr() stringGet the json string of the transaction.
func (*AutoDeleveraging) IsValid
func (*AutoDeleveraging) IsValid() boolCheck if the transaction is valid.
func (*AutoDeleveraging) CreateSignedTx
func (*AutoDeleveraging) CreateSignedTx(signer *ZkLinkSigner) (*AutoDeleveraging, error)Create a new AutoDeleveraging transaction with L3 signature inside.
input:
signer: ZkLinkSigner
func (*AutoDeleveraging) GetSignature
func (*AutoDeleveraging) GetSignature() ZkLinkSignatureGet L3 signature of the transaction.
func (*AutoDeleveraging) IsSignatureValid
func (*AutoDeleveraging) IsSignatureValid() boolCheck if the inside L3 signature is valid or not.
func *AutoDeleveraging) ToZklinkTx
func (*AutoDeleveraging) ToZklinkTx() ZkLinkTxChange the transaction to the ZkLinkTx
Last updated
Was this helpful?