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
transaction type, it's a opaque data type.
func NewAutoDeleveraging
func NewAutoDeleveraging(builder AutoDeleveragingBuilder) *AutoDeleveraging
Create a new AutoDeleveraging transaction.
func (*AutoDeleveraging) GetBytes
func (*AutoDeleveraging) GetBytes() []uint8
func (*AutoDeleveraging) TxHash
func (*AutoDeleveraging) TxHash() []uint8
Get the transaction hash of the transaction.
func (*AutoDeleveraging) JsonStr
func (*AutoDeleveraging) JsonStr() string
Get the json string of the transaction.
func (*AutoDeleveraging) IsValid
func (*AutoDeleveraging) IsValid() bool
Check 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:
func (*AutoDeleveraging) GetSignature
func (*AutoDeleveraging) GetSignature() ZkLinkSignature
Get L3 signature of the transaction.
func (*AutoDeleveraging) IsSignatureValid
func (*AutoDeleveraging) IsSignatureValid() bool
Check if the inside L3 signature is valid or not.
func *AutoDeleveraging) ToZklinkTx
func (*AutoDeleveraging) ToZklinkTx() ZkLinkTx