flash-sdk 2.3.12 → 2.3.16
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/OraclePrice.d.ts +1 -1
- package/dist/OraclePrice.js +8 -17
- package/dist/PerpetualsClient.d.ts +6 -5
- package/dist/PerpetualsClient.js +194 -232
- package/dist/PoolConfig.json +15 -229
- package/dist/PoolDataClient.js +3 -3
- package/dist/constants/index.d.ts +0 -1
- package/dist/constants/index.js +1 -2
- package/dist/idl/perpetuals.d.ts +14 -420
- package/dist/idl/perpetuals.js +14 -420
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/index.d.ts +5 -14
- package/package.json +4 -2
- package/readme.md +1 -0
package/dist/PoolConfig.json
CHANGED
@@ -815,113 +815,6 @@
|
|
815
815
|
}
|
816
816
|
]
|
817
817
|
},
|
818
|
-
{
|
819
|
-
"programId": "FLASH6Lo6h3iasJKWDs2F8TkW2UKf3s15C8PMGuVfgBn",
|
820
|
-
"perpComposibilityProgramId": "FSWAPViR8ny5K96hezav8jynVubP2dJ2L7SbKzds2hwm",
|
821
|
-
"fbNftRewardProgramId": "FBRWDXSLysNbFQk64MQJcpkXP8e4fjezsGabV8jV7d7o",
|
822
|
-
"cluster": "mainnet-beta",
|
823
|
-
"poolName": "Community.1",
|
824
|
-
"poolAddress": "6HukhSeVVLQekKaGJYkwztBacjhKLKywVPrmcvccaYMz",
|
825
|
-
"lpTokenMint": "GnxdTsSQNQ3FF72nTyWo4SUt59Tt1MqDkRRfoPtKjMvJ",
|
826
|
-
"flpTokenAccount": "So11111111111111111111111111111111111111112",
|
827
|
-
"metadataAccount": "8HPm3sNXqFxNkEDYBMwX1BnXxxfn4XY6Jt5b8ikv6m7b",
|
828
|
-
"lpDecimals": 6,
|
829
|
-
"lpTokenSymbol": "FLP.4",
|
830
|
-
"perpetuals": "7DWCtB5Z8rPiyBMKUwqyC95R9tJpbhoQhLM9LbK3Z5QZ",
|
831
|
-
"transferAuthority": "81xGAvJ27ZeRThU2JEfKAUeT4Fx6qCCd8WHZpujZbiiG",
|
832
|
-
"multisig": "3FqKnAQrvr6G6AqCAWKdqg9fVe6ceAk3A5Y1ibeQqV2V",
|
833
|
-
"addressLookupTableAddresses": [
|
834
|
-
"4E5u7DBVrJp6tVaWkH1sr6r9hhkFwGWmhEHrHeTNDdnP"
|
835
|
-
],
|
836
|
-
"backupOracle": "AjAubETeBLhebBxLcErmzbavZfqF9bCxkpRAdyJtoi9G",
|
837
|
-
"nftCollectionAddress": "H4EQ8pcE7PQSQGG1WYW4hAA1nizU6ULYipHZcYk9b64u",
|
838
|
-
"tokens": [
|
839
|
-
{
|
840
|
-
"symbol": "USDC",
|
841
|
-
"mintKey": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
|
842
|
-
"decimals": 6,
|
843
|
-
"usdPrecision": 2,
|
844
|
-
"tokenPrecision": 4,
|
845
|
-
"isStable": true,
|
846
|
-
"isVirtual": false,
|
847
|
-
"pythTicker": "Crypto.USDC/USD",
|
848
|
-
"pythPriceId": "0xeaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a"
|
849
|
-
},
|
850
|
-
{
|
851
|
-
"symbol": "BONK",
|
852
|
-
"mintKey": "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263",
|
853
|
-
"decimals": 5,
|
854
|
-
"usdPrecision": 8,
|
855
|
-
"tokenPrecision": 4,
|
856
|
-
"isStable": false,
|
857
|
-
"isVirtual": false,
|
858
|
-
"pythTicker": "Crypto.BONK/USD",
|
859
|
-
"pythPriceId": "0x72b021217ca3fe68922a19aaf990109cb9d84e9ad004b4d2025ad6f529314419"
|
860
|
-
}
|
861
|
-
],
|
862
|
-
"custodies": [
|
863
|
-
{
|
864
|
-
"custodyId": 0,
|
865
|
-
"custodyAccount": "qFFbK8PHbNt4433AUTHHDsmDuQGTQhixc8t4sCzugG4",
|
866
|
-
"tokenAccount": "FNC4jkJLqxFdL7xhujj5TGhnSAbS1ZJSrNqs6MhPGpn1",
|
867
|
-
"symbol": "USDC",
|
868
|
-
"mintKey": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
|
869
|
-
"decimals": 6,
|
870
|
-
"usdPrecision": 2,
|
871
|
-
"tokenPrecision": 2,
|
872
|
-
"isStable": true,
|
873
|
-
"isVirtual": false,
|
874
|
-
"oracleAddress": "Gnt27xtC473ZT2Mw5u8wZ68Z3gULkSTb5DuxJy7eJotD",
|
875
|
-
"customOracleAddress": "Dpw1EAVrSB1ibxiDQyTAW6Zip3J4Btk2x4SgApQCeFbX",
|
876
|
-
"pythTicker": "Crypto.USDC/USD",
|
877
|
-
"pythPriceId": "0xeaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a"
|
878
|
-
},
|
879
|
-
{
|
880
|
-
"custodyId": 1,
|
881
|
-
"custodyAccount": "7gfDTeMREaKcg3SMfrgVP7fjrstmrzzAeYCAcVaHTV9h",
|
882
|
-
"tokenAccount": "9FY4Fcb5rE5xvNhewkFCU8beh1CJPn4G5tfh6okhS71T",
|
883
|
-
"symbol": "BONK",
|
884
|
-
"mintKey": "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263",
|
885
|
-
"decimals": 5,
|
886
|
-
"usdPrecision": 8,
|
887
|
-
"tokenPrecision": 4,
|
888
|
-
"isStable": false,
|
889
|
-
"isVirtual": false,
|
890
|
-
"oracleAddress": "8ihFLu5FimgTQ1Unh4dVyEHUGodJ5gJQCrQf4KUVB9bN",
|
891
|
-
"customOracleAddress": "DBE3N8uNjhKPRHfANdwGvCZghWXyLPdqdSbEW2XFwBiX",
|
892
|
-
"pythTicker": "Crypto.BONK/USD",
|
893
|
-
"pythPriceId": "0x72b021217ca3fe68922a19aaf990109cb9d84e9ad004b4d2025ad6f529314419"
|
894
|
-
}
|
895
|
-
],
|
896
|
-
"markets": [
|
897
|
-
{
|
898
|
-
"marketId": 0,
|
899
|
-
"marketAccount": "DvvnSEZueicT9UN9WMvfYP3B4NQDgiNjjtbKLenLakxv",
|
900
|
-
"pool": "6HukhSeVVLQekKaGJYkwztBacjhKLKywVPrmcvccaYMz",
|
901
|
-
"targetCustody": "7gfDTeMREaKcg3SMfrgVP7fjrstmrzzAeYCAcVaHTV9h",
|
902
|
-
"collateralCustody": "7gfDTeMREaKcg3SMfrgVP7fjrstmrzzAeYCAcVaHTV9h",
|
903
|
-
"side": "long",
|
904
|
-
"maxLev": 10,
|
905
|
-
"targetCustodyId": 1,
|
906
|
-
"collateralCustodyId": 1,
|
907
|
-
"targetMint": "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263",
|
908
|
-
"collateralMint": "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263"
|
909
|
-
},
|
910
|
-
{
|
911
|
-
"marketId": 1,
|
912
|
-
"marketAccount": "3EYDn8VkY19QBStG4QtvLAdPScReLS7kuchhterF7ADP",
|
913
|
-
"pool": "6HukhSeVVLQekKaGJYkwztBacjhKLKywVPrmcvccaYMz",
|
914
|
-
"targetCustody": "7gfDTeMREaKcg3SMfrgVP7fjrstmrzzAeYCAcVaHTV9h",
|
915
|
-
"collateralCustody": "qFFbK8PHbNt4433AUTHHDsmDuQGTQhixc8t4sCzugG4",
|
916
|
-
"side": "short",
|
917
|
-
"maxLev": 10,
|
918
|
-
"targetCustodyId": 1,
|
919
|
-
"collateralCustodyId": 0,
|
920
|
-
"targetMint": "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263",
|
921
|
-
"collateralMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
|
922
|
-
}
|
923
|
-
]
|
924
|
-
},
|
925
818
|
{
|
926
819
|
"programId": "FTN6rgbaaxwT8mpRuC55EFTwpHB3BwnHJ91Lqv4ZVCfW",
|
927
820
|
"perpComposibilityProgramId": "SWAP4AE4N1if9qKD7dgfQgmRBRv1CtWG8xDs4HP14ST",
|
@@ -1011,7 +904,7 @@
|
|
1011
904
|
"tokenPrecision": 4,
|
1012
905
|
"isStable": true,
|
1013
906
|
"isVirtual": false,
|
1014
|
-
"oracleAddress": "
|
907
|
+
"oracleAddress": "Gnt27xtC473ZT2Mw5u8wZ68Z3gULkSTb5DuxJy7eJotD",
|
1015
908
|
"customOracleAddress": "Dpw1EAVrSB1ibxiDQyTAW6Zip3J4Btk2x4SgApQCeFbX",
|
1016
909
|
"pythTicker": "Crypto.USDC/USD",
|
1017
910
|
"pythPriceId": "0xeaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a"
|
@@ -1027,7 +920,7 @@
|
|
1027
920
|
"tokenPrecision": 4,
|
1028
921
|
"isStable": false,
|
1029
922
|
"isVirtual": false,
|
1030
|
-
"oracleAddress": "
|
923
|
+
"oracleAddress": "H6ARHf6YXhGYeQfUzQNGk6rDNnLBQKrenN712K4AQJEG",
|
1031
924
|
"customOracleAddress": "7UVimffxr9ow1uXYxsr4LHAcV58mLzhmwaeKvJ1pjLiE",
|
1032
925
|
"pythTicker": "Crypto.SOL/USD",
|
1033
926
|
"pythPriceId": "0xef0d8b6fda2ceba41da15d4095d1da392a0d2f8ed0c6c7bc0f4cfac8c280b56d"
|
@@ -1043,7 +936,7 @@
|
|
1043
936
|
"tokenPrecision": 6,
|
1044
937
|
"isStable": false,
|
1045
938
|
"isVirtual": false,
|
1046
|
-
"oracleAddress": "
|
939
|
+
"oracleAddress": "GVXRSBjFk6e6J3NbVPXohDJetcTjaeeuykUpbQF8UoMU",
|
1047
940
|
"customOracleAddress": "4cSM2e6rvbGQUFiJbqytoVMi5GgghSMr8LwVrT9VPSPo",
|
1048
941
|
"pythTicker": "Crypto.BTC/USD",
|
1049
942
|
"pythPriceId": "0xe62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43"
|
@@ -1059,7 +952,7 @@
|
|
1059
952
|
"tokenPrecision": 4,
|
1060
953
|
"isStable": false,
|
1061
954
|
"isVirtual": false,
|
1062
|
-
"oracleAddress": "
|
955
|
+
"oracleAddress": "JBu1AL4obBcCMqKBBxhpWCNUt136ijcuMZLFvTP7iWdB",
|
1063
956
|
"customOracleAddress": "42amVS4KgzR9rA28tkVYqVXjq9Qa8dcZQMbH5EYFX6XC",
|
1064
957
|
"pythTicker": "Crypto.ETH/USD",
|
1065
958
|
"pythPriceId": "0xff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace"
|
@@ -1246,7 +1139,7 @@
|
|
1246
1139
|
"tokenPrecision": 4,
|
1247
1140
|
"isStable": true,
|
1248
1141
|
"isVirtual": false,
|
1249
|
-
"oracleAddress": "
|
1142
|
+
"oracleAddress": "Gnt27xtC473ZT2Mw5u8wZ68Z3gULkSTb5DuxJy7eJotD",
|
1250
1143
|
"customOracleAddress": "Dpw1EAVrSB1ibxiDQyTAW6Zip3J4Btk2x4SgApQCeFbX",
|
1251
1144
|
"pythTicker": "Crypto.USDC/USD",
|
1252
1145
|
"pythPriceId": "0xeaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a"
|
@@ -1262,7 +1155,7 @@
|
|
1262
1155
|
"tokenPrecision": 4,
|
1263
1156
|
"isStable": false,
|
1264
1157
|
"isVirtual": true,
|
1265
|
-
"oracleAddress": "
|
1158
|
+
"oracleAddress": "8y3WWjvmSmVGWVKH1rCA7VTRmuU7QbJ9axafSsBX5FcD",
|
1266
1159
|
"customOracleAddress": "2uPQGpm8X4ZkxMHxrAW1QuhXcse1AHEgPih6Xp9NuEWW",
|
1267
1160
|
"pythTicker": "Metal.XAU/USD",
|
1268
1161
|
"pythPriceId": "0x765d2ba906dbc32ca17cc11f5310a89e9ee1f6420508c63861f2f8ba4ee34bb2"
|
@@ -1278,7 +1171,7 @@
|
|
1278
1171
|
"tokenPrecision": 4,
|
1279
1172
|
"isStable": false,
|
1280
1173
|
"isVirtual": true,
|
1281
|
-
"oracleAddress": "
|
1174
|
+
"oracleAddress": "HMVfAm6uuwnPnHRzaqfMhLNyrYHxaczKTbzeDcjBvuDo",
|
1282
1175
|
"customOracleAddress": "H9JxsWwtDZxjSL6m7cdCVsWibj3JBMD9sxqLjadoZnot",
|
1283
1176
|
"pythTicker": "Metal.XAG/USD",
|
1284
1177
|
"pythPriceId": "0xf2fb02c32b055c805e7238d628e5e9dadef274376114eb1f012337cabe93871e"
|
@@ -1294,7 +1187,7 @@
|
|
1294
1187
|
"tokenPrecision": 4,
|
1295
1188
|
"isStable": false,
|
1296
1189
|
"isVirtual": true,
|
1297
|
-
"oracleAddress": "
|
1190
|
+
"oracleAddress": "CQzPyC5xVhkuBfWFJiPCvPEnBshmRium4xxUxnX1ober",
|
1298
1191
|
"customOracleAddress": "Fu76ChamBDjE8UuGLV6GP2AcPPSU6gjhkNhAyuoPm7ny",
|
1299
1192
|
"pythTicker": "FX.EUR/USD",
|
1300
1193
|
"pythPriceId": "0xa995d00bb36a63cef7fd2c287dc105fc8f3d93779f062f09551b0af3e81ec30b"
|
@@ -1310,7 +1203,7 @@
|
|
1310
1203
|
"tokenPrecision": 4,
|
1311
1204
|
"isStable": false,
|
1312
1205
|
"isVirtual": true,
|
1313
|
-
"oracleAddress": "
|
1206
|
+
"oracleAddress": "9wFA8FYZwvBbhE22uvYBZniTXi1KJiN8iNQsegkTWZqS",
|
1314
1207
|
"customOracleAddress": "G25Tm7UkVruTJ7mcbCxFm45XGWwsH72nJKNGcHEQw1tU",
|
1315
1208
|
"pythTicker": "FX.GBP/USD",
|
1316
1209
|
"pythPriceId": "0x84c2dde9633d93d1bcad84e7dc41c9d56578b7ec52fabedc1f335d673df0a7c1"
|
@@ -1326,7 +1219,7 @@
|
|
1326
1219
|
"tokenPrecision": 4,
|
1327
1220
|
"isStable": false,
|
1328
1221
|
"isVirtual": true,
|
1329
|
-
"oracleAddress": "
|
1222
|
+
"oracleAddress": "7ycfa1ENNT5dVVoMtiMjsgVbkWKFJbu6nF2h1UVT18Cf",
|
1330
1223
|
"customOracleAddress": "6pPXqXcgFFoLEcXfedWJy3ypNZVJ1F3mgipaDFsvZ1co",
|
1331
1224
|
"pythTicker": "FX.AUD/USD",
|
1332
1225
|
"pythPriceId": "0x67a6f93030420c1c9e3fe37c1ab6b77966af82f995944a9fefce357a22854a80"
|
@@ -1554,7 +1447,7 @@
|
|
1554
1447
|
"tokenPrecision": 4,
|
1555
1448
|
"isStable": true,
|
1556
1449
|
"isVirtual": false,
|
1557
|
-
"oracleAddress": "
|
1450
|
+
"oracleAddress": "Gnt27xtC473ZT2Mw5u8wZ68Z3gULkSTb5DuxJy7eJotD",
|
1558
1451
|
"customOracleAddress": "Dpw1EAVrSB1ibxiDQyTAW6Zip3J4Btk2x4SgApQCeFbX",
|
1559
1452
|
"pythTicker": "Crypto.USDC/USD",
|
1560
1453
|
"pythPriceId": "0xeaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a"
|
@@ -1570,7 +1463,7 @@
|
|
1570
1463
|
"tokenPrecision": 4,
|
1571
1464
|
"isStable": false,
|
1572
1465
|
"isVirtual": false,
|
1573
|
-
"oracleAddress": "
|
1466
|
+
"oracleAddress": "g6eRCbboSwK4tSWngn773RCMexr1APQr4uA9bGZBYfo",
|
1574
1467
|
"customOracleAddress": "7dbob1psH1iZBS7qPsm3Kwbf5DzSXK8Jyg31CTgTnxH5",
|
1575
1468
|
"pythTicker": "Crypto.JUP/USD",
|
1576
1469
|
"pythPriceId": "0x0a0408d619e9380abad35060f9192039ed5042fa6f82301d0e48bb52be830996"
|
@@ -1586,7 +1479,7 @@
|
|
1586
1479
|
"tokenPrecision": 4,
|
1587
1480
|
"isStable": false,
|
1588
1481
|
"isVirtual": false,
|
1589
|
-
"oracleAddress": "
|
1482
|
+
"oracleAddress": "nrYkQQQur7z8rYTST3G9GqATviK5SxTDkrqd21MW6Ue",
|
1590
1483
|
"customOracleAddress": "8vjchtMuJNY4oFQdTi8yCe6mhCaNBFaUbktT482TpLPS",
|
1591
1484
|
"pythTicker": "Crypto.PYTH/USD",
|
1592
1485
|
"pythPriceId": "0x0bbf28e9a841a1cc788f6a361b17ca072d0ea3098a1e5df1c3922d06719579ff"
|
@@ -1602,7 +1495,7 @@
|
|
1602
1495
|
"tokenPrecision": 4,
|
1603
1496
|
"isStable": false,
|
1604
1497
|
"isVirtual": false,
|
1605
|
-
"oracleAddress": "
|
1498
|
+
"oracleAddress": "D8UUgr8a3aR3yUeHLu7v8FWK7E8Y5sSU7qrYBXUJXBQ5",
|
1606
1499
|
"customOracleAddress": "7ajR2zA4MGMMTqRAVjghTKqPPn4kbrj3pYkAVRVwTGzP",
|
1607
1500
|
"pythTicker": "Crypto.JTO/USD",
|
1608
1501
|
"pythPriceId": "0xb43660a5f790c69354b0729a5ef9d50d68f1df92107540210b9cccba1f947cc2"
|
@@ -1618,7 +1511,7 @@
|
|
1618
1511
|
"tokenPrecision": 4,
|
1619
1512
|
"isStable": false,
|
1620
1513
|
"isVirtual": false,
|
1621
|
-
"oracleAddress": "
|
1514
|
+
"oracleAddress": "H9j8CT1bFiWHaZUPMooEaxMRHdWdJ5T9CzFn41z96JHW",
|
1622
1515
|
"customOracleAddress": "BEMsCSQEGi2kwPA4mKnGjxnreijhMki7L4eeb96ypzF9",
|
1623
1516
|
"pythTicker": "Crypto.W/USD",
|
1624
1517
|
"pythPriceId": "0xeff7446475e218517566ea99e72a4abec2e1bd8498b43b7d8331e29dcb059389"
|
@@ -1730,113 +1623,6 @@
|
|
1730
1623
|
"collateralMint": "Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr"
|
1731
1624
|
}
|
1732
1625
|
]
|
1733
|
-
},
|
1734
|
-
{
|
1735
|
-
"programId": "FTN6rgbaaxwT8mpRuC55EFTwpHB3BwnHJ91Lqv4ZVCfW",
|
1736
|
-
"perpComposibilityProgramId": "SWAP4AE4N1if9qKD7dgfQgmRBRv1CtWG8xDs4HP14ST",
|
1737
|
-
"fbNftRewardProgramId": "FB8mxzFuW99ExD1B14hFqoeWWS1UdbuK6iY2PVPpKFQi",
|
1738
|
-
"cluster": "devnet",
|
1739
|
-
"poolName": "devnet.4",
|
1740
|
-
"poolAddress": "2SLfjsonPtdBugZke3UJzQ8s7DcHQHJxqUuVN1wrthnc",
|
1741
|
-
"lpTokenMint": "58YkJCFQZ3htRUtkHMdUZNfdpEcjGTFi1jx3DceZvd6N",
|
1742
|
-
"flpTokenAccount": "5HYrb2rKjF2b2ye5EiZAYeBYNeNEUzCct3N2rBmVjzLu",
|
1743
|
-
"metadataAccount": "Hm6oanS5hrcu3QMC4jumKq2U5aUaJrfasE1sQ2Lct3zF",
|
1744
|
-
"lpDecimals": 6,
|
1745
|
-
"lpTokenSymbol": "FLP.4",
|
1746
|
-
"perpetuals": "445GcRLAJ64DcxSRbvQTkbwXgWUyubAxzQUQ2wL73KLS",
|
1747
|
-
"transferAuthority": "EPyHAAHUYnFATwd8CJ7owLnozFeS8pFsr3RNJD1eueYq",
|
1748
|
-
"multisig": "Eu3cBFRo18AeN9BFb5ndzk2PEmBT7yWEhh3VkG21pyGo",
|
1749
|
-
"addressLookupTableAddresses": [
|
1750
|
-
"Ejc8FEVsREUim6wb7Xwgf7nai3T3AWNCBWBM7pbWdbJa"
|
1751
|
-
],
|
1752
|
-
"backupOracle": "AHaKsRB4tsGSzFfFqAxUpfRRmsUj5EhwHSxSXK2UGRp5",
|
1753
|
-
"nftCollectionAddress": "3rkRzHdN7dXy5CQfX3Lz6UBBJ2F9n58VEpvDSmbaVHt9",
|
1754
|
-
"tokens": [
|
1755
|
-
{
|
1756
|
-
"symbol": "USDC",
|
1757
|
-
"mintKey": "Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr",
|
1758
|
-
"decimals": 6,
|
1759
|
-
"usdPrecision": 2,
|
1760
|
-
"tokenPrecision": 4,
|
1761
|
-
"isStable": true,
|
1762
|
-
"isVirtual": false,
|
1763
|
-
"pythTicker": "Crypto.USDC/USD",
|
1764
|
-
"pythPriceId": "0xeaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a"
|
1765
|
-
},
|
1766
|
-
{
|
1767
|
-
"symbol": "BONK",
|
1768
|
-
"mintKey": "bonkmzC5QamYYD9LE73evR6UH49ojDxsFt9Juwqsx7h",
|
1769
|
-
"decimals": 5,
|
1770
|
-
"usdPrecision": 8,
|
1771
|
-
"tokenPrecision": 4,
|
1772
|
-
"isStable": false,
|
1773
|
-
"isVirtual": false,
|
1774
|
-
"pythTicker": "Crypto.BONK/USD",
|
1775
|
-
"pythPriceId": "0x72b021217ca3fe68922a19aaf990109cb9d84e9ad004b4d2025ad6f529314419"
|
1776
|
-
}
|
1777
|
-
],
|
1778
|
-
"custodies": [
|
1779
|
-
{
|
1780
|
-
"custodyId": 0,
|
1781
|
-
"custodyAccount": "9ikjiYhjcNhGF7t6zfsDpXh2MwCT2ydm5rFsB4yN3XEs",
|
1782
|
-
"tokenAccount": "3RP193kSDd3q1gFuLD2EwX5vAsqRhfTXttehNyjqVrSY",
|
1783
|
-
"symbol": "USDC",
|
1784
|
-
"mintKey": "Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr",
|
1785
|
-
"decimals": 6,
|
1786
|
-
"usdPrecision": 2,
|
1787
|
-
"tokenPrecision": 4,
|
1788
|
-
"isStable": true,
|
1789
|
-
"isVirtual": false,
|
1790
|
-
"oracleAddress": "5SSkXsEKQepHHAewytPVwdej4epN1nxgLVM84L4KXgy7",
|
1791
|
-
"customOracleAddress": "Dpw1EAVrSB1ibxiDQyTAW6Zip3J4Btk2x4SgApQCeFbX",
|
1792
|
-
"pythTicker": "Crypto.USDC/USD",
|
1793
|
-
"pythPriceId": "0xeaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a"
|
1794
|
-
},
|
1795
|
-
{
|
1796
|
-
"custodyId": 1,
|
1797
|
-
"custodyAccount": "DtmPaayiEidB5VQEZXCv5g54F5aaTguCQXck13wfE7Sp",
|
1798
|
-
"tokenAccount": "2iNWe4jjHowqZcKZwcV8oRXt5wWs1dQw7FX1vLiLa3un",
|
1799
|
-
"symbol": "BONK",
|
1800
|
-
"mintKey": "bonkmzC5QamYYD9LE73evR6UH49ojDxsFt9Juwqsx7h",
|
1801
|
-
"decimals": 5,
|
1802
|
-
"usdPrecision": 8,
|
1803
|
-
"tokenPrecision": 4,
|
1804
|
-
"isStable": false,
|
1805
|
-
"isVirtual": false,
|
1806
|
-
"oracleAddress": "6bquU99ktV1VRiHDr8gMhDFt3kMfhCQo5nfNrg2Urvsn",
|
1807
|
-
"customOracleAddress": "DBE3N8uNjhKPRHfANdwGvCZghWXyLPdqdSbEW2XFwBiX",
|
1808
|
-
"pythTicker": "Crypto.BONK/USD",
|
1809
|
-
"pythPriceId": "0x72b021217ca3fe68922a19aaf990109cb9d84e9ad004b4d2025ad6f529314419"
|
1810
|
-
}
|
1811
|
-
],
|
1812
|
-
"markets": [
|
1813
|
-
{
|
1814
|
-
"marketId": 0,
|
1815
|
-
"marketAccount": "GfSgg8DkT7GQwAcbnvwokuy2rzDR6X9Zdc13JtTdTGyw",
|
1816
|
-
"pool": "2SLfjsonPtdBugZke3UJzQ8s7DcHQHJxqUuVN1wrthnc",
|
1817
|
-
"targetCustody": "DtmPaayiEidB5VQEZXCv5g54F5aaTguCQXck13wfE7Sp",
|
1818
|
-
"collateralCustody": "DtmPaayiEidB5VQEZXCv5g54F5aaTguCQXck13wfE7Sp",
|
1819
|
-
"side": "long",
|
1820
|
-
"maxLev": 10,
|
1821
|
-
"targetCustodyId": 1,
|
1822
|
-
"collateralCustodyId": 1,
|
1823
|
-
"targetMint": "bonkmzC5QamYYD9LE73evR6UH49ojDxsFt9Juwqsx7h",
|
1824
|
-
"collateralMint": "bonkmzC5QamYYD9LE73evR6UH49ojDxsFt9Juwqsx7h"
|
1825
|
-
},
|
1826
|
-
{
|
1827
|
-
"marketId": 1,
|
1828
|
-
"marketAccount": "6KaEvCmhy3YwqikB2MsmzTKWR7HJsSmmmPaoaYRTxg71",
|
1829
|
-
"pool": "2SLfjsonPtdBugZke3UJzQ8s7DcHQHJxqUuVN1wrthnc",
|
1830
|
-
"targetCustody": "DtmPaayiEidB5VQEZXCv5g54F5aaTguCQXck13wfE7Sp",
|
1831
|
-
"collateralCustody": "9ikjiYhjcNhGF7t6zfsDpXh2MwCT2ydm5rFsB4yN3XEs",
|
1832
|
-
"side": "short",
|
1833
|
-
"maxLev": 10,
|
1834
|
-
"targetCustodyId": 1,
|
1835
|
-
"collateralCustodyId": 0,
|
1836
|
-
"targetMint": "bonkmzC5QamYYD9LE73evR6UH49ojDxsFt9Juwqsx7h",
|
1837
|
-
"collateralMint": "Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr"
|
1838
|
-
}
|
1839
|
-
]
|
1840
1626
|
}
|
1841
1627
|
]
|
1842
1628
|
}
|
package/dist/PoolDataClient.js
CHANGED
@@ -32,7 +32,7 @@ var PoolDataClient = (function () {
|
|
32
32
|
return "continue";
|
33
33
|
var custodyAccount = this_1.custodies.find(function (t) { return t.mint.toBase58() === custodyConfig.mintKey.toBase58(); });
|
34
34
|
if (custodyAccount) {
|
35
|
-
var priceBnUi = new bignumber_js_1.default(pricesMap.get(custodyConfig.symbol).price.toUiPrice(
|
35
|
+
var priceBnUi = new bignumber_js_1.default(pricesMap.get(custodyConfig.symbol).price.toUiPrice(constants_1.USD_DECIMALS));
|
36
36
|
var ownedBnUi = new bignumber_js_1.default(custodyAccount.assets.owned.toString()).dividedBy(Math.pow(10, custodyConfig.decimals));
|
37
37
|
var ownedUsdBnUi = ownedBnUi.multipliedBy(priceBnUi);
|
38
38
|
if (custodyAccount.isStable) {
|
@@ -74,7 +74,7 @@ var PoolDataClient = (function () {
|
|
74
74
|
var custodyAccount = this_2.custodies.find(function (t) { return t.mint.toBase58() === custodyConfig.mintKey.toBase58(); });
|
75
75
|
if (!custodyAccount)
|
76
76
|
return "continue";
|
77
|
-
var priceBnUi = new bignumber_js_1.default(pricesMap.get(custodyConfig.symbol).price.toUiPrice(
|
77
|
+
var priceBnUi = new bignumber_js_1.default(pricesMap.get(custodyConfig.symbol).price.toUiPrice(constants_1.USD_DECIMALS));
|
78
78
|
var ownedBnUi = new bignumber_js_1.default(custodyAccount.assets.owned.toString()).dividedBy(Math.pow(10, custodyConfig.decimals));
|
79
79
|
var ownedUsdBnUi = ownedBnUi.multipliedBy(priceBnUi);
|
80
80
|
var lockedBnUi = new bignumber_js_1.default(custodyAccount.assets.locked.toString()).dividedBy(Math.pow(10, custodyConfig.decimals));
|
@@ -98,7 +98,7 @@ var PoolDataClient = (function () {
|
|
98
98
|
if (custodyAccount && tokenRatio) {
|
99
99
|
custodyDetails.push({
|
100
100
|
symbol: custodyConfig.symbol,
|
101
|
-
priceUi: pricesMap.get(custodyConfig.symbol).price.toUiPrice(
|
101
|
+
priceUi: pricesMap.get(custodyConfig.symbol).price.toUiPrice(2),
|
102
102
|
minRatio: tokenRatio.min,
|
103
103
|
minRatioUi: (0, utils_1.nativeToUiDecimals)(tokenRatio.min, 2, 2),
|
104
104
|
maxRatio: tokenRatio.max,
|
@@ -7,7 +7,6 @@ export declare const BPS_POWER: number;
|
|
7
7
|
export declare const LP_DECIMALS = 6;
|
8
8
|
export declare const RATE_DECIMALS = 9;
|
9
9
|
export declare const RATE_POWER: number;
|
10
|
-
export declare const ORACLE_EXPONENT = 9;
|
11
10
|
export declare const BN_ZERO: import("bn.js");
|
12
11
|
export declare const BN_ONE: import("bn.js");
|
13
12
|
export declare const METAPLEX_PROGRAM_ID: PublicKey;
|
package/dist/constants/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.METAPLEX_PROGRAM_ID = exports.BN_ONE = exports.BN_ZERO = exports.
|
3
|
+
exports.METAPLEX_PROGRAM_ID = exports.BN_ONE = exports.BN_ZERO = exports.RATE_POWER = exports.RATE_DECIMALS = exports.LP_DECIMALS = exports.BPS_POWER = exports.BPS_DECIMALS = exports.USD_DECIMALS = exports.PERCENTAGE_DECIMALS = void 0;
|
4
4
|
var web3_js_1 = require("@solana/web3.js");
|
5
5
|
var bn_js_1 = require("bn.js");
|
6
6
|
exports.PERCENTAGE_DECIMALS = 4;
|
@@ -10,7 +10,6 @@ exports.BPS_POWER = Math.pow(10, (exports.BPS_DECIMALS));
|
|
10
10
|
exports.LP_DECIMALS = exports.USD_DECIMALS;
|
11
11
|
exports.RATE_DECIMALS = 9;
|
12
12
|
exports.RATE_POWER = Math.pow(10, (exports.RATE_DECIMALS));
|
13
|
-
exports.ORACLE_EXPONENT = 9;
|
14
13
|
exports.BN_ZERO = new bn_js_1.BN(0);
|
15
14
|
exports.BN_ONE = new bn_js_1.BN(1);
|
16
15
|
exports.METAPLEX_PROGRAM_ID = new web3_js_1.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s");
|