serialize method

  1. @override
Map<String, dynamic> serialize()
override

Serializes the object to a map.

Implementation

@override
Map<String, dynamic> serialize() {
  return {
    "accountType": accountType.value,
    "manager": manager,
    "staker": staker,
    "stakeDepositAuthority": stakeDepositAuthority,
    "stakeWithdrawBumpSeed": stakeWithdrawBumpSeed,
    "validatorList": validatorList,
    "reserveStake": reserveStake,
    "poolMint": poolMint,
    "managerFeeAccount": managerFeeAccount,
    "tokenProgramId": tokenProgramId,
    "totalLamports": totalLamports,
    "poolTokenSupply": poolTokenSupply,
    "lastUpdateEpoch": lastUpdateEpoch,
    "lockup": lockup.serialize(),
    "epochFee": epochFee.serialize(),
    "nextEpochFee": nextEpochFee?.serialize(),
    "preferredDepositValidatorVoteAddress":
        preferredDepositValidatorVoteAddress,
    "preferredWithdrawValidatorVoteAddress":
        preferredWithdrawValidatorVoteAddress,
    "stakeDepositFee": stakeDepositFee.serialize(),
    "stakeWithdrawalFee": stakeWithdrawalFee.serialize(),
    "nextStakeWithdrawalFee": nextStakeWithdrawalFee?.serialize(),
    "stakeReferralFee": stakeReferralFee,
    "solDepositAuthority": solDepositAuthority,
    "solDepositFee": solDepositFee.serialize(),
    "solReferralFee": solReferralFee,
    "solWithdrawAuthority": solWithdrawAuthority,
    "solWithdrawalFee": solWithdrawalFee.serialize(),
    "nextSolWithdrawalFee": nextSolWithdrawalFee?.serialize(),
    "lastEpochPoolTokenSupply": lastEpochPoolTokenSupply,
    "lastEpochTotalLamports": lastEpochTotalLamports
  };
}