UNPKG

@terminusbet/stake-vote-sdk

Version:

A simple SDK for interacting with terminusbet governance

34 lines 1.34 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.StakePoolState = void 0; const borsh_1 = require("@coral-xyz/borsh"); class StakePoolState { discriminator; stakePeriod; rewardGrowBy; growReduceBy; decimal; rewardGrowMinBy; constructor(discriminator, stakePeriod, rewardGrowBy, growReduceBy, decimal, rewardGrowMinBy) { this.discriminator = discriminator; this.stakePeriod = stakePeriod; this.rewardGrowBy = rewardGrowBy; this.growReduceBy = growReduceBy; this.decimal = decimal; this.rewardGrowMinBy = rewardGrowMinBy; } static fromBuffer(buffer) { const structure = (0, borsh_1.struct)([ (0, borsh_1.u64)("discriminator"), (0, borsh_1.u64)("stakePeriod"), (0, borsh_1.u64)("rewardGrowBy"), (0, borsh_1.u64)("growReduceBy"), (0, borsh_1.u64)("decimal"), (0, borsh_1.u64)("rewardGrowMinBy") ]); let value = structure.decode(buffer); return new StakePoolState(BigInt(value.discriminator), BigInt(value.stakePeriod), BigInt(value.rewardGrowBy), BigInt(value.growReduceBy), BigInt(value.decimal), BigInt(value.rewardGrowMinBy)); } } exports.StakePoolState = StakePoolState; //# sourceMappingURL=stakePoolState.js.map