hedge-web3 0.1.29 → 0.1.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/declarations/idl/vault.d.ts +99 -99
  2. package/declarations/index.d.ts +1 -0
  3. package/declarations/instructions/claimLiquidationPoolPosition.d.ts +3 -2
  4. package/declarations/instructions/claimStakingPoolPosition.d.ts +3 -2
  5. package/declarations/instructions/closeLiquidationPoolPosition.d.ts +3 -2
  6. package/declarations/instructions/createStakingPool.d.ts +3 -2
  7. package/declarations/instructions/createVault.d.ts +6 -5
  8. package/declarations/instructions/depositLiquidationPool.d.ts +3 -2
  9. package/declarations/instructions/depositStakingPool.d.ts +3 -2
  10. package/declarations/instructions/depositVault.d.ts +3 -2
  11. package/declarations/instructions/initHedgeFoundation.d.ts +3 -2
  12. package/declarations/instructions/liquidateVault.d.ts +3 -2
  13. package/declarations/instructions/loanVault.d.ts +3 -2
  14. package/declarations/instructions/redeemVault.d.ts +3 -2
  15. package/declarations/instructions/refreshOraclePrice.d.ts +3 -2
  16. package/declarations/instructions/repayVault.d.ts +3 -2
  17. package/declarations/instructions/setHalted.d.ts +3 -2
  18. package/declarations/instructions/setVaultTypeStatus.d.ts +3 -2
  19. package/declarations/instructions/withdrawStakingPool.d.ts +3 -2
  20. package/declarations/instructions/withdrawVault.d.ts +3 -2
  21. package/declarations/state/VaultAccount.d.ts +1 -1
  22. package/declarations/utils/getLinkedListAccounts.d.ts +3 -1
  23. package/lib/idl/vault.js +99 -99
  24. package/lib/index.js +1 -0
  25. package/lib/instructions/claimLiquidationPoolPosition.js +19 -22
  26. package/lib/instructions/claimStakingPoolPosition.js +19 -19
  27. package/lib/instructions/closeLiquidationPoolPosition.js +22 -22
  28. package/lib/instructions/createStakingPool.js +17 -18
  29. package/lib/instructions/createVault.js +28 -31
  30. package/lib/instructions/depositLiquidationPool.js +17 -18
  31. package/lib/instructions/depositStakingPool.js +16 -18
  32. package/lib/instructions/depositVault.js +25 -27
  33. package/lib/instructions/initHedgeFoundation.js +17 -19
  34. package/lib/instructions/initHedgeFoundationTokens.js +15 -15
  35. package/lib/instructions/liquidateVault.js +32 -33
  36. package/lib/instructions/loanVault.js +23 -23
  37. package/lib/instructions/redeemVault.js +24 -24
  38. package/lib/instructions/refreshOraclePrice.js +17 -17
  39. package/lib/instructions/repayVault.js +23 -23
  40. package/lib/instructions/setHalted.js +8 -9
  41. package/lib/instructions/setVaultTypeStatus.js +9 -10
  42. package/lib/instructions/withdrawStakingPool.js +22 -24
  43. package/lib/instructions/withdrawVault.js +23 -23
  44. package/lib/state/LiquidationPoolEra.js +3 -1
  45. package/lib/state/LiquidationPosition.js +0 -7
  46. package/lib/state/StakingPool.js +3 -4
  47. package/lib/state/VaultAccount.js +2 -5
  48. package/lib/utils/getLinkedListAccounts.js +24 -16
  49. package/package.json +2 -2
  50. package/src/idl/vault.ts +198 -198
  51. package/src/index.ts +1 -0
  52. package/src/instructions/claimLiquidationPoolPosition.ts +39 -29
  53. package/src/instructions/claimStakingPoolPosition.ts +45 -25
  54. package/src/instructions/closeLiquidationPoolPosition.ts +62 -32
  55. package/src/instructions/createStakingPool.ts +37 -35
  56. package/src/instructions/createVault.ts +81 -125
  57. package/src/instructions/depositLiquidationPool.ts +45 -26
  58. package/src/instructions/depositStakingPool.ts +32 -24
  59. package/src/instructions/depositVault.ts +57 -86
  60. package/src/instructions/initHedgeFoundation.ts +42 -43
  61. package/src/instructions/initHedgeFoundationTokens.ts +38 -39
  62. package/src/instructions/liquidateVault.ts +42 -65
  63. package/src/instructions/loanVault.ts +51 -69
  64. package/src/instructions/redeemVault.ts +83 -47
  65. package/src/instructions/refreshOraclePrice.ts +41 -32
  66. package/src/instructions/repayVault.ts +45 -65
  67. package/src/instructions/setHalted.ts +32 -24
  68. package/src/instructions/setVaultTypeStatus.ts +32 -24
  69. package/src/instructions/withdrawStakingPool.ts +44 -30
  70. package/src/instructions/withdrawVault.ts +58 -82
  71. package/src/state/LiquidationPoolEra.ts +4 -3
  72. package/src/state/LiquidationPosition.ts +0 -27
  73. package/src/state/StakingPool.ts +4 -7
  74. package/src/state/StakingPoolPosition.ts +2 -3
  75. package/src/state/VaultAccount.ts +9 -28
  76. package/src/state/VaultHistoryEvent.ts +1 -2
  77. package/src/utils/getLinkedListAccounts.ts +31 -30
@@ -19,7 +19,7 @@ function withdrawStakingPool(program, provider, payer, poolPositionPublicKey, st
19
19
  return __awaiter(this, void 0, void 0, function* () {
20
20
  const poolPosition = web3_js_1.Keypair.generate();
21
21
  const transaction = new web3_js_1.Transaction().add(yield withdrawStakingPoolInstruction(program, payer.publicKey, poolPositionPublicKey, stakedTokenMintPublicKey, overrideStartTime));
22
- yield (0, web3_js_1.sendAndConfirmTransaction)(provider.connection, transaction, [payer], provider.opts).catch(Errors_1.parseAnchorErrors);
22
+ yield (0, web3_js_1.sendAndConfirmTransaction)(provider.connection, transaction, [payer]).catch(Errors_1.parseAnchorErrors);
23
23
  return poolPosition.publicKey;
24
24
  });
25
25
  }
@@ -36,29 +36,27 @@ function withdrawStakingPoolInstruction(program, payerPublicKey, poolPositionPub
36
36
  const payerAssociatedHedgeAccount = yield (0, Constants_1.findAssociatedTokenAddress)(payerPublicKey, hedgeMintPublickey);
37
37
  const payerAssociatedUshAccount = yield (0, Constants_1.findAssociatedTokenAddress)(payerPublicKey, ushMintPublickey);
38
38
  const communityHedgeTokenAccount = yield (0, Constants_1.findAssociatedTokenAddress)(vaultSystemStatePublicKey, hedgeMintPublickey);
39
- return program.instruction.withdrawStakingPool(new anchor_1.BN(overrideStartTime !== null && overrideStartTime !== void 0 ? overrideStartTime : Math.floor(Date.now() / 1000)), // override current time
40
- {
41
- accounts: {
42
- payer: payerPublicKey,
43
- vaultSystemState: vaultSystemStatePublicKey,
44
- pool: poolPublickey,
45
- poolPosition: poolPositionPublicKey,
46
- poolAssociatedStakedTokenAccount: poolAssociatedStakedTokenAccount,
47
- poolAssociatedUshTokenAccount: poolAssociatedUshTokenAccount,
48
- payerAssociatedStakedTokenAccount: payerAssociatedStakedTokenAccount,
49
- payerAssociatedHedgeAccount: payerAssociatedHedgeAccount,
50
- payerAssociatedUshAccount: payerAssociatedUshAccount,
51
- communityAssociatedHedgeTokenAccount: communityHedgeTokenAccount,
52
- hedgeMint: hedgeMintPublickey,
53
- stakedTokenMint: stakedTokenMintPublicKey,
54
- ushMint: ushMintPublickey,
55
- rent: web3_js_1.SYSVAR_RENT_PUBKEY,
56
- tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
57
- associatedTokenProgram: spl_token_1.ASSOCIATED_TOKEN_PROGRAM_ID,
58
- systemProgram: web3_js_1.SystemProgram.programId
59
- },
60
- signers: []
61
- });
39
+ return yield program.methods
40
+ .withdrawStakingPool(new anchor_1.BN(overrideStartTime !== null && overrideStartTime !== void 0 ? overrideStartTime : Math.floor(Date.now() / 1000)) // override current time
41
+ )
42
+ .accounts({
43
+ payer: payerPublicKey,
44
+ vaultSystemState: vaultSystemStatePublicKey,
45
+ pool: poolPublickey,
46
+ poolPosition: poolPositionPublicKey,
47
+ poolAssociatedStakedTokenAccount: poolAssociatedStakedTokenAccount,
48
+ poolAssociatedUshTokenAccount: poolAssociatedUshTokenAccount,
49
+ payerAssociatedStakedTokenAccount: payerAssociatedStakedTokenAccount,
50
+ payerAssociatedHedgeAccount: payerAssociatedHedgeAccount,
51
+ payerAssociatedUshAccount: payerAssociatedUshAccount,
52
+ communityAssociatedHedgeTokenAccount: communityHedgeTokenAccount,
53
+ hedgeMint: hedgeMintPublickey,
54
+ stakedTokenMint: stakedTokenMintPublicKey,
55
+ ushMint: ushMintPublickey,
56
+ tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
57
+ systemProgram: web3_js_1.SystemProgram.programId,
58
+ })
59
+ .instruction();
62
60
  });
63
61
  }
64
62
  exports.withdrawStakingPoolInstruction = withdrawStakingPoolInstruction;
@@ -33,35 +33,35 @@ function withdrawVault(program, provider, payer, vaultPublicKey, withdrawAmount,
33
33
  const hedgeStakingPoolAssociatedUshTokenAccount = yield (0, Constants_1.findAssociatedTokenAddress)(hedgeStakingPoolPublicKey, ushMintPublickey);
34
34
  const [oldSmallerPublicKey, newSmallerPublicKey, newLargerPublicKey] = yield (0, getLinkedListAccounts_1.getLinkedListAccounts)(program, provider, vaultTypeAccountPublicKey, vaultPublicKey, withdrawAmount * -1, 0, false, false);
35
35
  const transaction = new web3_js_1.Transaction().add(yield withdrawVaultInstruction(program, vaultSystemStatePublicKey, payer.publicKey, destinationTokenAccount.address, vaultPublicKey, vaultAssociatedCollateralAccount.address, vaultTypeAccountPublicKey, vaultTypeAssociatedTokenAccount.address, hedgeStakingPoolPublicKey, hedgeStakingPoolAssociatedUshTokenAccount, ushMintPublickey, history.publicKey, oldSmallerPublicKey, newSmallerPublicKey, newLargerPublicKey, withdrawAmount, overrideTime));
36
- yield (0, web3_js_1.sendAndConfirmTransaction)(provider.connection, transaction, [payer, history], provider.opts);
36
+ yield (0, web3_js_1.sendAndConfirmTransaction)(provider.connection, transaction, [payer, history]);
37
37
  return vaultPublicKey;
38
38
  });
39
39
  }
40
40
  exports.withdrawVault = withdrawVault;
41
41
  function withdrawVaultInstruction(program, vaultSystemStatePublicKey, payerPublicKey, destinationTokenAccount, vaultPublickey, vaultAssociatedCollateralPublicKey, vaultTypeAccount, vaultTypeAssociatedTokenAccount, hedgeStakingPoolPublicKey, hedgeStakingPoolAssociatedUshTokenAccount, ushMint, historyPublicKey, oldSmallerPublicKey, newSmallerPublicKey, newLargerPublicKey, withdrawAmount, overrideTime) {
42
42
  return __awaiter(this, void 0, void 0, function* () {
43
- return program.instruction.withdrawVault(new anchor_1.BN(withdrawAmount), new anchor_1.BN(overrideTime !== null && overrideTime !== void 0 ? overrideTime : Math.floor(Date.now() / 1000)), // override override time
44
- {
45
- accounts: {
46
- vaultSystemState: vaultSystemStatePublicKey,
47
- vaultTypeAccount: vaultTypeAccount,
48
- vaultTypeAssociatedTokenAccount: vaultTypeAssociatedTokenAccount,
49
- vault: vaultPublickey,
50
- vaultAssociatedTokenAccount: vaultAssociatedCollateralPublicKey,
51
- feePool: hedgeStakingPoolPublicKey,
52
- feePoolAssociatedUshTokenAccount: hedgeStakingPoolAssociatedUshTokenAccount,
53
- ushMint: ushMint,
54
- history: historyPublicKey,
55
- vaultOwner: payerPublicKey,
56
- destinationTokenAccount: destinationTokenAccount,
57
- oldSmallerVaultInfo: oldSmallerPublicKey,
58
- newSmallerVaultInfo: newSmallerPublicKey,
59
- newLargerVaultInfo: newLargerPublicKey,
60
- tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
61
- systemProgram: web3_js_1.SystemProgram.programId,
62
- },
63
- signers: [],
64
- });
43
+ return yield program.methods
44
+ .withdrawVault(new anchor_1.BN(withdrawAmount), new anchor_1.BN(overrideTime !== null && overrideTime !== void 0 ? overrideTime : Math.floor(Date.now() / 1000)) // override override time
45
+ )
46
+ .accounts({
47
+ vaultSystemState: vaultSystemStatePublicKey,
48
+ vaultTypeAccount: vaultTypeAccount,
49
+ vaultTypeAssociatedTokenAccount: vaultTypeAssociatedTokenAccount,
50
+ vault: vaultPublickey,
51
+ vaultAssociatedTokenAccount: vaultAssociatedCollateralPublicKey,
52
+ feePool: hedgeStakingPoolPublicKey,
53
+ feePoolAssociatedUshTokenAccount: hedgeStakingPoolAssociatedUshTokenAccount,
54
+ ushMint: ushMint,
55
+ history: historyPublicKey,
56
+ vaultOwner: payerPublicKey,
57
+ destinationTokenAccount: destinationTokenAccount,
58
+ oldSmallerVaultInfo: oldSmallerPublicKey,
59
+ newSmallerVaultInfo: newSmallerPublicKey,
60
+ newLargerVaultInfo: newLargerPublicKey,
61
+ tokenProgram: spl_token_1.TOKEN_PROGRAM_ID,
62
+ systemProgram: web3_js_1.SystemProgram.programId,
63
+ })
64
+ .instruction();
65
65
  });
66
66
  }
67
67
  exports.withdrawVaultInstruction = withdrawVaultInstruction;
@@ -11,7 +11,9 @@ class LiquidationPoolEra {
11
11
  this.liquidyPoolEra = liquidyPoolEra;
12
12
  this.totalDeposits = liquidyPoolEra.totalDeposits.toNumber();
13
13
  this.product = (0, HedgeDecimal_1.DecimalFromU128)(liquidyPoolEra.productBytes);
14
- this.sum = liquidyPoolEra.sumBytes.map((sumBytes) => { return (0, HedgeDecimal_1.DecimalFromU128)(sumBytes); });
14
+ this.sum = liquidyPoolEra.sumBytes.map((sumBytes) => {
15
+ return (0, HedgeDecimal_1.DecimalFromU128)(sumBytes);
16
+ });
15
17
  this.hedgeRewardsAccumulator = (0, HedgeDecimal_1.DecimalFromU128)(liquidyPoolEra.hedgeRewardsAccumulatorBytes);
16
18
  this.hedgeRewardsTimestamp = liquidyPoolEra.hedgeRewardsTimestamp.toNumber();
17
19
  }
@@ -31,10 +31,3 @@ class LiquidationPosition {
31
31
  }
32
32
  }
33
33
  exports.LiquidationPosition = LiquidationPosition;
34
- // function hedgeRewardsDecay (supply: number, birthTime: number, timeIn: number, timeOut: number, halfLifeInDays: number): number {
35
- // const timeInOffsetStart = timeIn - birthTime
36
- // const timeOutOffsetStart = timeOut - birthTime
37
- // const halfLife = -1 * Math.log(2) / (halfLifeInDays * 60 * 60 * 24)
38
- // const awardedTokens = supply * (Math.pow(Math.E, halfLife * timeInOffsetStart) - Math.pow(Math.E, halfLife * timeOutOffsetStart))
39
- // return awardedTokens
40
- // }
@@ -7,16 +7,15 @@ class StakingPool {
7
7
  this.poolInfo = poolInfo;
8
8
  this.publicKey = publicKey;
9
9
  this.deposits = poolInfo.deposits.toNumber();
10
- // this.totalFeesNow = poolInfo.totalFeesNow.toNumber()
11
- // this.totalFeesPrevious = poolInfo.totalFeesPrevious.toNumber()
12
10
  this.lastTransactionTime = poolInfo.lastTransactionTime.toNumber();
13
11
  this.startTime = poolInfo.startTime.toNumber();
14
12
  this.halfLifeInDays = poolInfo.halfLifeInDays.toNumber();
15
13
  this.totalHedgeReward = poolInfo.totalHedgeReward.toNumber();
16
14
  this.hedgeRewardAccumulator = (0, HedgeDecimal_1.DecimalFromU128)(poolInfo.hedgeRewardAccumulator);
17
15
  this.ushFeeAccumulator = (0, HedgeDecimal_1.DecimalFromU128)(poolInfo.ushFeeAccumulator);
18
- this.collateralFeeAccumulator = poolInfo.collateralFeeAccumulator.map((sum) => { return (0, HedgeDecimal_1.DecimalFromU128)(sum); });
19
- // this.currentRewardsPerDay = DecimalFromU128(poolInfo.currentRewardsPerDay)
16
+ this.collateralFeeAccumulator = poolInfo.collateralFeeAccumulator.map((sum) => {
17
+ return (0, HedgeDecimal_1.DecimalFromU128)(sum);
18
+ });
20
19
  }
21
20
  }
22
21
  exports.StakingPool = StakingPool;
@@ -75,7 +75,7 @@ class VaultAccount {
75
75
  this.denormalizedDebt = 0;
76
76
  this.vaultStatus = 'liquidated';
77
77
  }
78
- redistribution(vaultTypeAccuntData) {
78
+ updateDebtAndCollateral(vaultTypeAccuntData) {
79
79
  const debtProductCurrent = (0, HedgeDecimal_1.DecimalFromU128)(vaultTypeAccuntData.debtRedistributionProduct);
80
80
  const collateralAccumulatorCurrent = (0, HedgeDecimal_1.DecimalFromU128)(vaultTypeAccuntData.collateralRedistributionAccumulator);
81
81
  this.denormalizedDebt = debtProductCurrent
@@ -83,10 +83,7 @@ class VaultAccount {
83
83
  .mul(new decimal_js_1.default(this.denormalizedDebt))
84
84
  // .add(new Decimal(vaultTypeAccuntData.debtRedistributionError))
85
85
  .toNumber();
86
- const extraCollateralDeposited = this.denormalizedDebt *
87
- collateralAccumulatorCurrent
88
- .sub(this.collateralAccumulatorSnapshotBytes)
89
- .toNumber();
86
+ const extraCollateralDeposited = this.denormalizedDebt * collateralAccumulatorCurrent.sub(this.collateralAccumulatorSnapshotBytes).toNumber();
90
87
  this.deposited += extraCollateralDeposited;
91
88
  this.collateralAccumulatorSnapshotBytes = collateralAccumulatorCurrent;
92
89
  this.debtProductSnapshotBytes = debtProductCurrent;
@@ -17,7 +17,7 @@ const underscore_1 = __importDefault(require("underscore"));
17
17
  const HedgeDecimal_1 = require("../HedgeDecimal");
18
18
  const VaultAccount_1 = require("../state/VaultAccount");
19
19
  const decimal_js_1 = __importDefault(require("decimal.js"));
20
- function getLinkedListAccounts(program, provider, vaultTypeAccountPublicKey, vaultPublicKey, depositAmount, loanAmount, redeem, liquidate) {
20
+ function getLinkedListAccounts(program, provider, vaultTypeAccountPublicKey, vaultPublicKey, depositAmount, loanAmount, redeem, liquidate, cachedVaults) {
21
21
  return __awaiter(this, void 0, void 0, function* () {
22
22
  const vaultTypeAccount = yield program.account.vaultType.fetch(vaultTypeAccountPublicKey);
23
23
  // Default for null is the vault itself, so set them all to this vault
@@ -27,19 +27,27 @@ function getLinkedListAccounts(program, provider, vaultTypeAccountPublicKey, vau
27
27
  const thisVaultData = yield program.account.vault.fetch(vaultPublicKey);
28
28
  const thisVault = new VaultAccount_1.VaultAccount(thisVaultData, vaultPublicKey);
29
29
  // Load all the vaults
30
- let allVaults = (yield program.account.vault
31
- .all([
32
- // {
33
- // memcmp: { bytes: bs58.encode(inputCollateralType), offset: 8 + 32 + 8 },
34
- // },
35
- ])
36
- .catch((error) => {
37
- console.log('error', error);
38
- })) || [];
39
- // Load them into our account objects
40
- let vaults = allVaults.map((vault) => {
41
- return new VaultAccount_1.VaultAccount(vault.account, vault.publicKey);
42
- });
30
+ let vaults;
31
+ if (cachedVaults) {
32
+ vaults = cachedVaults;
33
+ }
34
+ else {
35
+ let allVaults = cachedVaults
36
+ ? cachedVaults
37
+ : (yield program.account.vault
38
+ .all([
39
+ // {
40
+ // memcmp: { bytes: bs58.encode(inputCollateralType), offset: 8 + 32 + 8 },
41
+ // },
42
+ ])
43
+ .catch((error) => {
44
+ console.log('error', error);
45
+ })) || [];
46
+ // Load them into our account objects
47
+ vaults = allVaults.map((vault) => {
48
+ return new VaultAccount_1.VaultAccount(vault.account, vault.publicKey);
49
+ });
50
+ }
43
51
  // Filter out the account that are not the same vault type
44
52
  vaults = underscore_1.default.filter(vaults, (vault) => {
45
53
  return vault.collateralType === vaultTypeAccount.collateralType;
@@ -75,6 +83,7 @@ function getLinkedListAccounts(program, provider, vaultTypeAccountPublicKey, vau
75
83
  // this vault with the opeation we're going to apply
76
84
  const newNormalizedDebt = new decimal_js_1.default(loanAmount);
77
85
  const vaultTypeCompoundedInterest = (0, HedgeDecimal_1.DecimalFromU128)(vaultTypeAccount.cumulativeRate.toString());
86
+ vaults[indexBefore].updateDebtAndCollateral(vaultTypeAccount);
78
87
  vaults[indexBefore].addDebt(newNormalizedDebt, vaultTypeCompoundedInterest);
79
88
  vaults[indexBefore].addDeposit(depositAmount);
80
89
  if (liquidate) {
@@ -83,7 +92,6 @@ function getLinkedListAccounts(program, provider, vaultTypeAccountPublicKey, vau
83
92
  if (redeem) {
84
93
  vaults[indexBefore].redeem();
85
94
  }
86
- vaults[indexBefore].redistribution(vaultTypeAccount);
87
95
  if (vaults[indexBefore].denormalizedDebt === 0) {
88
96
  vaults.splice(indexBefore, 1);
89
97
  }
@@ -115,7 +123,7 @@ function getLinkedListAccounts(program, provider, vaultTypeAccountPublicKey, vau
115
123
  // console.log('oldSmallerPublicKey', oldSmallerPublicKey.toString())
116
124
  // console.log('newSmallerPublicKey', newSmallerPublicKey.toString())
117
125
  // console.log('newLargerPublicKey', newLargerPublicKey.toString())
118
- return [oldSmallerPublicKey, newSmallerPublicKey, newLargerPublicKey];
126
+ return [oldSmallerPublicKey, newSmallerPublicKey, newLargerPublicKey, vaults];
119
127
  });
120
128
  }
121
129
  exports.getLinkedListAccounts = getLinkedListAccounts;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hedge-web3",
3
- "version": "0.1.29",
3
+ "version": "0.1.31",
4
4
  "description": "Hedge Javascript Web3 API",
5
5
  "main": "lib/index.js",
6
6
  "types": "declarations/index.d.ts",
@@ -14,7 +14,7 @@
14
14
  "author": "Chris Coudron <coudron@hedge.so>",
15
15
  "license": "ISC",
16
16
  "dependencies": {
17
- "@project-serum/anchor": "^0.23.0",
17
+ "@project-serum/anchor": "^0.24.1",
18
18
  "@project-serum/serum": "^0.13.61",
19
19
  "@rollup/plugin-typescript": "^8.3.0",
20
20
  "@solana/buffer-layout": "^4.0.0",