hedge-web3 0.2.21 → 0.2.25
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.
- package/declarations/Constants.d.ts +25 -12
- package/declarations/idl/pyth.d.ts +44 -24
- package/declarations/idl/switchboard.d.ts +47 -0
- package/declarations/idl/vault.d.ts +905 -155
- package/declarations/index.d.ts +26 -20
- package/declarations/instructions/closeLiquidationPoolPosition.d.ts +2 -2
- package/declarations/instructions/createReferralAccount.d.ts +17 -0
- package/declarations/instructions/createUserReferralAccount.d.ts +5 -0
- package/declarations/instructions/depositLiquidationPool.d.ts +2 -2
- package/declarations/instructions/loanVault.d.ts +2 -2
- package/declarations/instructions/psmEditAccount.d.ts +12 -0
- package/declarations/instructions/psmMintUsh.d.ts +2 -2
- package/declarations/instructions/psmRedeemUsh.d.ts +2 -2
- package/declarations/instructions/referralClaimFees.d.ts +16 -0
- package/declarations/instructions/transferVault.d.ts +3 -17
- package/declarations/instructions/updateReferralAccount.d.ts +13 -0
- package/declarations/instructions/updateReferralState.d.ts +20 -0
- package/declarations/state/VaultAccount.d.ts +1 -1
- package/declarations/utils/getLinkedListAccounts.d.ts +2 -2
- package/lib/Constants.js +57 -28
- package/lib/idl/pyth.js +44 -24
- package/lib/idl/switchboard.js +49 -0
- package/lib/idl/vault.js +898 -148
- package/lib/index.js +26 -20
- package/lib/instructions/claimLiquidationPoolPosition.js +10 -7
- package/lib/instructions/claimStakingPoolPosition.js +5 -5
- package/lib/instructions/closeClaimedLiquidationPoolPosition.js +1 -1
- package/lib/instructions/closeLiquidationPoolPosition.js +25 -12
- package/lib/instructions/createReferralAccount.js +80 -0
- package/lib/instructions/createStakingPool.js +7 -7
- package/lib/instructions/createUserReferralAccount.js +61 -0
- package/lib/instructions/createVault.js +15 -15
- package/lib/instructions/depositLiquidationPool.js +21 -10
- package/lib/instructions/depositStakingPool.js +5 -5
- package/lib/instructions/depositVault.js +11 -9
- package/lib/instructions/initHedgeFoundation.js +8 -8
- package/lib/instructions/initHedgeFoundationTokens.js +5 -5
- package/lib/instructions/liquidateVault.js +8 -8
- package/lib/instructions/loanVault.js +23 -10
- package/lib/instructions/psmEditAccount.js +60 -0
- package/lib/instructions/psmMintUsh.js +24 -13
- package/lib/instructions/psmRedeemUsh.js +24 -13
- package/lib/instructions/redeemVault.js +7 -7
- package/lib/instructions/referralClaimFees.js +84 -0
- package/lib/instructions/refreshOraclePrice.js +3 -3
- package/lib/instructions/repayVault.js +9 -9
- package/lib/instructions/setHalted.js +1 -1
- package/lib/instructions/transferVault.js +10 -24
- package/lib/instructions/updateReferralAccount.js +50 -0
- package/lib/instructions/updateReferralState.js +57 -0
- package/lib/instructions/updateVaultType.js +1 -1
- package/lib/instructions/withdrawStakingPool.js +11 -11
- package/lib/instructions/withdrawVault.js +5 -5
- package/lib/state/VaultAccount.js +3 -1
- package/lib/utils/getLinkedListAccounts.js +2 -3
- package/package.json +1 -1
- package/src/Constants.ts +64 -63
- package/src/idl/pyth.ts +88 -48
- package/src/idl/switchboard.ts +93 -0
- package/src/idl/vault.ts +1851 -351
- package/src/index.ts +28 -24
- package/src/instructions/claimLiquidationPoolPosition.ts +31 -29
- package/src/instructions/claimStakingPoolPosition.ts +10 -15
- package/src/instructions/closeClaimedLiquidationPoolPosition.ts +4 -2
- package/src/instructions/closeLiquidationPoolPosition.ts +36 -18
- package/src/instructions/createReferralAccount.ts +115 -0
- package/src/instructions/createStakingPool.ts +11 -13
- package/src/instructions/createUserReferralAccount.ts +75 -0
- package/src/instructions/createVault.ts +44 -26
- package/src/instructions/depositLiquidationPool.ts +34 -21
- package/src/instructions/depositStakingPool.ts +18 -14
- package/src/instructions/depositVault.ts +23 -18
- package/src/instructions/initHedgeFoundation.ts +16 -14
- package/src/instructions/initHedgeFoundationTokens.ts +12 -14
- package/src/instructions/liquidateVault.ts +15 -20
- package/src/instructions/loanVault.ts +29 -19
- package/src/instructions/{psmEditAccount.rs → psmEditAccount.ts} +10 -18
- package/src/instructions/psmMintUsh.ts +35 -38
- package/src/instructions/psmRedeemUsh.ts +35 -40
- package/src/instructions/redeemVault.ts +12 -15
- package/src/instructions/referralClaimFees.ts +145 -0
- package/src/instructions/refreshOraclePrice.ts +6 -8
- package/src/instructions/repayVault.ts +18 -16
- package/src/instructions/setHalted.ts +5 -24
- package/src/instructions/transferVault.ts +57 -0
- package/src/instructions/updateReferralAccount.ts +70 -0
- package/src/instructions/updateReferralState.ts +86 -0
- package/src/instructions/updateVaultType.ts +9 -23
- package/src/instructions/withdrawStakingPool.ts +17 -21
- package/src/instructions/withdrawVault.ts +10 -16
- package/src/state/VaultAccount.ts +9 -10
- package/src/utils/getLinkedListAccounts.ts +4 -7
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
export type Switchboard = {
|
|
2
|
+
"version": "0.1.0",
|
|
3
|
+
"name": "switchboard",
|
|
4
|
+
"instructions": [
|
|
5
|
+
{
|
|
6
|
+
"name": "initialize",
|
|
7
|
+
"accounts": [
|
|
8
|
+
{
|
|
9
|
+
"name": "aggregator",
|
|
10
|
+
"isMut": true,
|
|
11
|
+
"isSigner": false
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"args": [
|
|
15
|
+
{
|
|
16
|
+
"name": "price",
|
|
17
|
+
"type": "u64"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "scale",
|
|
21
|
+
"type": "u16"
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "setPrice",
|
|
27
|
+
"accounts": [
|
|
28
|
+
{
|
|
29
|
+
"name": "aggregator",
|
|
30
|
+
"isMut": true,
|
|
31
|
+
"isSigner": false
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"args": [
|
|
35
|
+
{
|
|
36
|
+
"name": "price",
|
|
37
|
+
"type": "u64"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "scale",
|
|
41
|
+
"type": "u16"
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export const IDL: Switchboard = {
|
|
49
|
+
"version": "0.1.0",
|
|
50
|
+
"name": "switchboard",
|
|
51
|
+
"instructions": [
|
|
52
|
+
{
|
|
53
|
+
"name": "initialize",
|
|
54
|
+
"accounts": [
|
|
55
|
+
{
|
|
56
|
+
"name": "aggregator",
|
|
57
|
+
"isMut": true,
|
|
58
|
+
"isSigner": false
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"args": [
|
|
62
|
+
{
|
|
63
|
+
"name": "price",
|
|
64
|
+
"type": "u64"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "scale",
|
|
68
|
+
"type": "u16"
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"name": "setPrice",
|
|
74
|
+
"accounts": [
|
|
75
|
+
{
|
|
76
|
+
"name": "aggregator",
|
|
77
|
+
"isMut": true,
|
|
78
|
+
"isSigner": false
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"args": [
|
|
82
|
+
{
|
|
83
|
+
"name": "price",
|
|
84
|
+
"type": "u64"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "scale",
|
|
88
|
+
"type": "u16"
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
};
|