flash-sdk 2.3.16 → 2.3.17
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 +17 -8
- package/dist/PerpetualsClient.d.ts +5 -6
- package/dist/PerpetualsClient.js +231 -193
- package/dist/PoolConfig.json +229 -15
- package/dist/PoolDataClient.js +3 -3
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.js +2 -1
- package/dist/idl/perpetuals.d.ts +420 -14
- package/dist/idl/perpetuals.js +420 -14
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/index.d.ts +14 -5
- package/package.json +1 -1
package/dist/PoolConfig.json
CHANGED
@@ -815,6 +815,113 @@
|
|
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
|
+
},
|
818
925
|
{
|
819
926
|
"programId": "FTN6rgbaaxwT8mpRuC55EFTwpHB3BwnHJ91Lqv4ZVCfW",
|
820
927
|
"perpComposibilityProgramId": "SWAP4AE4N1if9qKD7dgfQgmRBRv1CtWG8xDs4HP14ST",
|
@@ -904,7 +1011,7 @@
|
|
904
1011
|
"tokenPrecision": 4,
|
905
1012
|
"isStable": true,
|
906
1013
|
"isVirtual": false,
|
907
|
-
"oracleAddress": "
|
1014
|
+
"oracleAddress": "5SSkXsEKQepHHAewytPVwdej4epN1nxgLVM84L4KXgy7",
|
908
1015
|
"customOracleAddress": "Dpw1EAVrSB1ibxiDQyTAW6Zip3J4Btk2x4SgApQCeFbX",
|
909
1016
|
"pythTicker": "Crypto.USDC/USD",
|
910
1017
|
"pythPriceId": "0xeaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a"
|
@@ -920,7 +1027,7 @@
|
|
920
1027
|
"tokenPrecision": 4,
|
921
1028
|
"isStable": false,
|
922
1029
|
"isVirtual": false,
|
923
|
-
"oracleAddress": "
|
1030
|
+
"oracleAddress": "J83w4HKfqxwcq3BEMMkPFSppX3gqekLyLJBexebFVkix",
|
924
1031
|
"customOracleAddress": "7UVimffxr9ow1uXYxsr4LHAcV58mLzhmwaeKvJ1pjLiE",
|
925
1032
|
"pythTicker": "Crypto.SOL/USD",
|
926
1033
|
"pythPriceId": "0xef0d8b6fda2ceba41da15d4095d1da392a0d2f8ed0c6c7bc0f4cfac8c280b56d"
|
@@ -936,7 +1043,7 @@
|
|
936
1043
|
"tokenPrecision": 6,
|
937
1044
|
"isStable": false,
|
938
1045
|
"isVirtual": false,
|
939
|
-
"oracleAddress": "
|
1046
|
+
"oracleAddress": "HovQMDrbAgAYPCmHVSrezcSmkMtXSSUsLDFANExrZh2J",
|
940
1047
|
"customOracleAddress": "4cSM2e6rvbGQUFiJbqytoVMi5GgghSMr8LwVrT9VPSPo",
|
941
1048
|
"pythTicker": "Crypto.BTC/USD",
|
942
1049
|
"pythPriceId": "0xe62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43"
|
@@ -952,7 +1059,7 @@
|
|
952
1059
|
"tokenPrecision": 4,
|
953
1060
|
"isStable": false,
|
954
1061
|
"isVirtual": false,
|
955
|
-
"oracleAddress": "
|
1062
|
+
"oracleAddress": "EdVCmQ9FSPcVe5YySXDPCRmc8aDQLKJ9xvYBMZPie1Vw",
|
956
1063
|
"customOracleAddress": "42amVS4KgzR9rA28tkVYqVXjq9Qa8dcZQMbH5EYFX6XC",
|
957
1064
|
"pythTicker": "Crypto.ETH/USD",
|
958
1065
|
"pythPriceId": "0xff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace"
|
@@ -1139,7 +1246,7 @@
|
|
1139
1246
|
"tokenPrecision": 4,
|
1140
1247
|
"isStable": true,
|
1141
1248
|
"isVirtual": false,
|
1142
|
-
"oracleAddress": "
|
1249
|
+
"oracleAddress": "5SSkXsEKQepHHAewytPVwdej4epN1nxgLVM84L4KXgy7",
|
1143
1250
|
"customOracleAddress": "Dpw1EAVrSB1ibxiDQyTAW6Zip3J4Btk2x4SgApQCeFbX",
|
1144
1251
|
"pythTicker": "Crypto.USDC/USD",
|
1145
1252
|
"pythPriceId": "0xeaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a"
|
@@ -1155,7 +1262,7 @@
|
|
1155
1262
|
"tokenPrecision": 4,
|
1156
1263
|
"isStable": false,
|
1157
1264
|
"isVirtual": true,
|
1158
|
-
"oracleAddress": "
|
1265
|
+
"oracleAddress": "4GqTjGm686yihQ1m1YdTsSvfm4mNfadv6xskzgCYWNC5",
|
1159
1266
|
"customOracleAddress": "2uPQGpm8X4ZkxMHxrAW1QuhXcse1AHEgPih6Xp9NuEWW",
|
1160
1267
|
"pythTicker": "Metal.XAU/USD",
|
1161
1268
|
"pythPriceId": "0x765d2ba906dbc32ca17cc11f5310a89e9ee1f6420508c63861f2f8ba4ee34bb2"
|
@@ -1171,7 +1278,7 @@
|
|
1171
1278
|
"tokenPrecision": 4,
|
1172
1279
|
"isStable": false,
|
1173
1280
|
"isVirtual": true,
|
1174
|
-
"oracleAddress": "
|
1281
|
+
"oracleAddress": "4NbqLAy4LjhZ7imWbyTuHo4EMSAVWTVDFS6Kpwz15Kyc",
|
1175
1282
|
"customOracleAddress": "H9JxsWwtDZxjSL6m7cdCVsWibj3JBMD9sxqLjadoZnot",
|
1176
1283
|
"pythTicker": "Metal.XAG/USD",
|
1177
1284
|
"pythPriceId": "0xf2fb02c32b055c805e7238d628e5e9dadef274376114eb1f012337cabe93871e"
|
@@ -1187,7 +1294,7 @@
|
|
1187
1294
|
"tokenPrecision": 4,
|
1188
1295
|
"isStable": false,
|
1189
1296
|
"isVirtual": true,
|
1190
|
-
"oracleAddress": "
|
1297
|
+
"oracleAddress": "E36MyBbavhYKHVLWR79GiReNNnBDiHj6nWA7htbkNZbh",
|
1191
1298
|
"customOracleAddress": "Fu76ChamBDjE8UuGLV6GP2AcPPSU6gjhkNhAyuoPm7ny",
|
1192
1299
|
"pythTicker": "FX.EUR/USD",
|
1193
1300
|
"pythPriceId": "0xa995d00bb36a63cef7fd2c287dc105fc8f3d93779f062f09551b0af3e81ec30b"
|
@@ -1203,7 +1310,7 @@
|
|
1203
1310
|
"tokenPrecision": 4,
|
1204
1311
|
"isStable": false,
|
1205
1312
|
"isVirtual": true,
|
1206
|
-
"oracleAddress": "
|
1313
|
+
"oracleAddress": "DhmUMEyq1hmEAGpifaH8HzfG1NqipvrVhBZgBog7NCb6",
|
1207
1314
|
"customOracleAddress": "G25Tm7UkVruTJ7mcbCxFm45XGWwsH72nJKNGcHEQw1tU",
|
1208
1315
|
"pythTicker": "FX.GBP/USD",
|
1209
1316
|
"pythPriceId": "0x84c2dde9633d93d1bcad84e7dc41c9d56578b7ec52fabedc1f335d673df0a7c1"
|
@@ -1219,7 +1326,7 @@
|
|
1219
1326
|
"tokenPrecision": 4,
|
1220
1327
|
"isStable": false,
|
1221
1328
|
"isVirtual": true,
|
1222
|
-
"oracleAddress": "
|
1329
|
+
"oracleAddress": "3aR6kTksEFb2GsCHGBNtpvUpUJ1XzeA41RTnS4APD8oG",
|
1223
1330
|
"customOracleAddress": "6pPXqXcgFFoLEcXfedWJy3ypNZVJ1F3mgipaDFsvZ1co",
|
1224
1331
|
"pythTicker": "FX.AUD/USD",
|
1225
1332
|
"pythPriceId": "0x67a6f93030420c1c9e3fe37c1ab6b77966af82f995944a9fefce357a22854a80"
|
@@ -1447,7 +1554,7 @@
|
|
1447
1554
|
"tokenPrecision": 4,
|
1448
1555
|
"isStable": true,
|
1449
1556
|
"isVirtual": false,
|
1450
|
-
"oracleAddress": "
|
1557
|
+
"oracleAddress": "5SSkXsEKQepHHAewytPVwdej4epN1nxgLVM84L4KXgy7",
|
1451
1558
|
"customOracleAddress": "Dpw1EAVrSB1ibxiDQyTAW6Zip3J4Btk2x4SgApQCeFbX",
|
1452
1559
|
"pythTicker": "Crypto.USDC/USD",
|
1453
1560
|
"pythPriceId": "0xeaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a"
|
@@ -1463,7 +1570,7 @@
|
|
1463
1570
|
"tokenPrecision": 4,
|
1464
1571
|
"isStable": false,
|
1465
1572
|
"isVirtual": false,
|
1466
|
-
"oracleAddress": "
|
1573
|
+
"oracleAddress": "Gh9hscza9YaCzr84tNV1NZQfpqoL3csYnWDygDkQmBU2",
|
1467
1574
|
"customOracleAddress": "7dbob1psH1iZBS7qPsm3Kwbf5DzSXK8Jyg31CTgTnxH5",
|
1468
1575
|
"pythTicker": "Crypto.JUP/USD",
|
1469
1576
|
"pythPriceId": "0x0a0408d619e9380abad35060f9192039ed5042fa6f82301d0e48bb52be830996"
|
@@ -1479,7 +1586,7 @@
|
|
1479
1586
|
"tokenPrecision": 4,
|
1480
1587
|
"isStable": false,
|
1481
1588
|
"isVirtual": false,
|
1482
|
-
"oracleAddress": "
|
1589
|
+
"oracleAddress": "ELF78ZhSr8u4SCixA7YSpjdZHZoSNrAhcyysbavpC2kA",
|
1483
1590
|
"customOracleAddress": "8vjchtMuJNY4oFQdTi8yCe6mhCaNBFaUbktT482TpLPS",
|
1484
1591
|
"pythTicker": "Crypto.PYTH/USD",
|
1485
1592
|
"pythPriceId": "0x0bbf28e9a841a1cc788f6a361b17ca072d0ea3098a1e5df1c3922d06719579ff"
|
@@ -1495,7 +1602,7 @@
|
|
1495
1602
|
"tokenPrecision": 4,
|
1496
1603
|
"isStable": false,
|
1497
1604
|
"isVirtual": false,
|
1498
|
-
"oracleAddress": "
|
1605
|
+
"oracleAddress": "29xQnTzyyuRtgJ7RtSKEgBWwRzZqtrrKmyQQ5m3x629f",
|
1499
1606
|
"customOracleAddress": "7ajR2zA4MGMMTqRAVjghTKqPPn4kbrj3pYkAVRVwTGzP",
|
1500
1607
|
"pythTicker": "Crypto.JTO/USD",
|
1501
1608
|
"pythPriceId": "0xb43660a5f790c69354b0729a5ef9d50d68f1df92107540210b9cccba1f947cc2"
|
@@ -1511,7 +1618,7 @@
|
|
1511
1618
|
"tokenPrecision": 4,
|
1512
1619
|
"isStable": false,
|
1513
1620
|
"isVirtual": false,
|
1514
|
-
"oracleAddress": "
|
1621
|
+
"oracleAddress": "A9665pJk2GAm7m3gA4f5qu99cWX8kDisDZtoSA9J4a3F",
|
1515
1622
|
"customOracleAddress": "BEMsCSQEGi2kwPA4mKnGjxnreijhMki7L4eeb96ypzF9",
|
1516
1623
|
"pythTicker": "Crypto.W/USD",
|
1517
1624
|
"pythPriceId": "0xeff7446475e218517566ea99e72a4abec2e1bd8498b43b7d8331e29dcb059389"
|
@@ -1623,6 +1730,113 @@
|
|
1623
1730
|
"collateralMint": "Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr"
|
1624
1731
|
}
|
1625
1732
|
]
|
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
|
+
]
|
1626
1840
|
}
|
1627
1841
|
]
|
1628
1842
|
}
|
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(8));
|
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(8));
|
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(custodyConfig.usdPrecision),
|
102
102
|
minRatio: tokenRatio.min,
|
103
103
|
minRatioUi: (0, utils_1.nativeToUiDecimals)(tokenRatio.min, 2, 2),
|
104
104
|
maxRatio: tokenRatio.max,
|
@@ -7,6 +7,7 @@ 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;
|
10
11
|
export declare const BN_ZERO: import("bn.js");
|
11
12
|
export declare const BN_ONE: import("bn.js");
|
12
13
|
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.RATE_POWER = exports.RATE_DECIMALS = exports.LP_DECIMALS = exports.BPS_POWER = exports.BPS_DECIMALS = exports.USD_DECIMALS = exports.PERCENTAGE_DECIMALS = void 0;
|
3
|
+
exports.METAPLEX_PROGRAM_ID = exports.BN_ONE = exports.BN_ZERO = exports.ORACLE_EXPONENT = 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,6 +10,7 @@ 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;
|
13
14
|
exports.BN_ZERO = new bn_js_1.BN(0);
|
14
15
|
exports.BN_ONE = new bn_js_1.BN(1);
|
15
16
|
exports.METAPLEX_PROGRAM_ID = new web3_js_1.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s");
|