hedge-web3 0.2.22 → 0.2.24

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 (43) hide show
  1. package/declarations/Constants.d.ts +15 -0
  2. package/declarations/idl/vault.d.ts +832 -179
  3. package/declarations/index.d.ts +26 -21
  4. package/declarations/instructions/closeLiquidationPoolPosition.d.ts +2 -2
  5. package/declarations/instructions/createReferralAccount.d.ts +17 -0
  6. package/declarations/instructions/createUserReferralAccount.d.ts +5 -0
  7. package/declarations/instructions/depositLiquidationPool.d.ts +2 -2
  8. package/declarations/instructions/loanVault.d.ts +2 -2
  9. package/declarations/instructions/psmEditAccount.d.ts +12 -0
  10. package/declarations/instructions/psmMintUsh.d.ts +2 -2
  11. package/declarations/instructions/psmRedeemUsh.d.ts +2 -2
  12. package/declarations/instructions/referralClaimFees.d.ts +16 -0
  13. package/declarations/instructions/updateReferralAccount.d.ts +13 -0
  14. package/declarations/instructions/updateReferralState.d.ts +20 -0
  15. package/lib/Constants.js +36 -1
  16. package/lib/idl/vault.js +830 -177
  17. package/lib/index.js +26 -21
  18. package/lib/instructions/closeLiquidationPoolPosition.js +16 -3
  19. package/lib/instructions/createReferralAccount.js +80 -0
  20. package/lib/instructions/createUserReferralAccount.js +61 -0
  21. package/lib/instructions/depositLiquidationPool.js +16 -5
  22. package/lib/instructions/loanVault.js +16 -3
  23. package/lib/instructions/psmEditAccount.js +60 -0
  24. package/lib/instructions/psmMintUsh.js +14 -3
  25. package/lib/instructions/psmRedeemUsh.js +14 -3
  26. package/lib/instructions/referralClaimFees.js +84 -0
  27. package/lib/instructions/updateReferralAccount.js +50 -0
  28. package/lib/instructions/updateReferralState.js +57 -0
  29. package/package.json +1 -1
  30. package/src/Constants.ts +42 -0
  31. package/src/idl/vault.ts +1845 -539
  32. package/src/index.ts +28 -21
  33. package/src/instructions/closeLiquidationPoolPosition.ts +25 -1
  34. package/src/instructions/createReferralAccount.ts +127 -0
  35. package/src/instructions/createUserReferralAccount.ts +86 -0
  36. package/src/instructions/depositLiquidationPool.ts +24 -4
  37. package/src/instructions/loanVault.ts +20 -1
  38. package/src/instructions/{psmEditAccount.rs → psmEditAccount.ts} +0 -0
  39. package/src/instructions/psmMintUsh.ts +20 -1
  40. package/src/instructions/psmRedeemUsh.ts +20 -1
  41. package/src/instructions/referralClaimFees.ts +159 -0
  42. package/src/instructions/updateReferralAccount.ts +77 -0
  43. package/src/instructions/updateReferralState.ts +93 -0
@@ -23,6 +23,21 @@ export declare function getUshMintPublicKey(): Promise<PublicKey>;
23
23
  * @returns The Vault System State public key
24
24
  */
25
25
  export declare function getVaultSystemStatePublicKey(): Promise<PublicKey>;
26
+ /**
27
+ *
28
+ * @returns The Referral State public key
29
+ */
30
+ export declare function getReferralStatePublicKey(): Promise<PublicKey>;
31
+ /**
32
+ *
33
+ * @returns The Referral State public key based off the owner's public key
34
+ */
35
+ export declare function getReferralAccountPublicKey(ownerPublicKey: PublicKey): Promise<PublicKey>;
36
+ /**
37
+ *
38
+ * @returns The user referral account public key based off the user's public key
39
+ */
40
+ export declare function getUserReferralAccountPublicKey(ownerPublicKey: PublicKey): Promise<PublicKey>;
26
41
  /**
27
42
  *
28
43
  * @returns The HDG mint public key