flash-sdk 11.11.5-alpha.0 → 11.11.6

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.
@@ -1,3 +1,4 @@
1
+ /// <reference types="bn.js" />
1
2
  import { BN } from "@coral-xyz/anchor";
2
3
  import { Pool, TokenRatios, StakeStats, CompoundingStats, Permissions } from "./types";
3
4
  import { PublicKey } from "@solana/web3.js";
@@ -393,9 +393,9 @@
393
393
  "targetCustody": "91yLwvTsWLyQ59hPKvXgKRLiTEWh9ZZnFqWPNbWGYxcf",
394
394
  "collateralCustody": "91yLwvTsWLyQ59hPKvXgKRLiTEWh9ZZnFqWPNbWGYxcf",
395
395
  "side": "long",
396
- "maxLev": 50,
397
- "degenMinLev": 50,
398
- "degenMaxLev": 50,
396
+ "maxLev": 10,
397
+ "degenMinLev": 10,
398
+ "degenMaxLev": 10,
399
399
  "targetCustodyId": 5,
400
400
  "collateralCustodyId": 5,
401
401
  "targetMint": "A7bdiYdS5GjqGFtxf17ppRHtDKPkkRqbKtR27dxvQXaS",
@@ -409,9 +409,9 @@
409
409
  "targetCustody": "91yLwvTsWLyQ59hPKvXgKRLiTEWh9ZZnFqWPNbWGYxcf",
410
410
  "collateralCustody": "5N2St2e1BdgWsJiXxfetwWKkHS1BYochAp1ruPFJUfgY",
411
411
  "side": "short",
412
- "maxLev": 50,
413
- "degenMinLev": 50,
414
- "degenMaxLev": 50,
412
+ "maxLev": 10,
413
+ "degenMinLev": 10,
414
+ "degenMaxLev": 10,
415
415
  "targetCustodyId": 5,
416
416
  "collateralCustodyId": 0,
417
417
  "targetMint": "A7bdiYdS5GjqGFtxf17ppRHtDKPkkRqbKtR27dxvQXaS",
@@ -581,6 +581,32 @@
581
581
  "pythTicker": "Crypto.XAUT/USD",
582
582
  "pythPriceId": "0x44465e17d2e9d390e70c999d5a11fda4f092847fcd2e3e5aa089d96c98a30e67",
583
583
  "isToken2022": false
584
+ },
585
+ {
586
+ "symbol": "USDJPY",
587
+ "mintKey": "JPYPFUBYnE9yBM1PD9A9MAVuw4Rnjh5VZE8DB6vmU84",
588
+ "decimals": 6,
589
+ "usdPrecision": 4,
590
+ "tokenPrecision": 4,
591
+ "isStable": false,
592
+ "isVirtual": true,
593
+ "lazerId": 340,
594
+ "pythTicker": "FX.USD/JPY",
595
+ "pythPriceId": "0xef2c98c804ba503c6a707e38be4dfbb16683775f195b091252bf24693042fd52",
596
+ "isToken2022": false
597
+ },
598
+ {
599
+ "symbol": "USDCNH",
600
+ "mintKey": "CNHShWxrWXp6V5M2mjLXuupZc3bmW9VezTfcVt1Zhcjr",
601
+ "decimals": 6,
602
+ "usdPrecision": 4,
603
+ "tokenPrecision": 4,
604
+ "isStable": false,
605
+ "isVirtual": true,
606
+ "lazerId": 1508,
607
+ "pythTicker": "FX.USD/CNH",
608
+ "pythPriceId": "0xeef52e09c878ad41f6a81803e3640fe04dceea727de894edd4ea117e2e332e66",
609
+ "isToken2022": false
584
610
  }
585
611
  ],
586
612
  "custodies": [
@@ -702,6 +728,40 @@
702
728
  "lazerId": 172,
703
729
  "pythTicker": "Crypto.XAUT/USD",
704
730
  "pythPriceId": "0x44465e17d2e9d390e70c999d5a11fda4f092847fcd2e3e5aa089d96c98a30e67"
731
+ },
732
+ {
733
+ "custodyId": 8,
734
+ "custodyAccount": "ERiMNq88WEByvDUKsPsvkJRnvsDrPPhbWedn59cDfvXY",
735
+ "tokenAccount": "6eQm6RZwxn4hVPLA6158amHGFhTZSvcBuyzZyTGBqqJR",
736
+ "symbol": "USDJPY",
737
+ "mintKey": "JPYPFUBYnE9yBM1PD9A9MAVuw4Rnjh5VZE8DB6vmU84",
738
+ "decimals": 6,
739
+ "usdPrecision": 4,
740
+ "tokenPrecision": 6,
741
+ "isStable": false,
742
+ "isVirtual": true,
743
+ "intOracleAddress": "9qKsKbncqbf4Veq2wxCVieTXEQhNQ7zvEEWtHfvYEiuD",
744
+ "extOracleAddress": "AMpTDXYcq8WaDR4FG8JW239vuwzAGqeS4fJSqGZi9V2P",
745
+ "lazerId": 340,
746
+ "pythTicker": "FX.USD/JPY",
747
+ "pythPriceId": "0xef2c98c804ba503c6a707e38be4dfbb16683775f195b091252bf24693042fd52"
748
+ },
749
+ {
750
+ "custodyId": 9,
751
+ "custodyAccount": "2zB3Uv3SoFGe17UiGjPGrwBRA7edH3YRwtHWQES7KkqP",
752
+ "tokenAccount": "7t2ttZHJEZx92QuzKKTZfTSCjpYkvTqppzHa7pYH86K5",
753
+ "symbol": "USDCNH",
754
+ "mintKey": "CNHShWxrWXp6V5M2mjLXuupZc3bmW9VezTfcVt1Zhcjr",
755
+ "decimals": 6,
756
+ "usdPrecision": 4,
757
+ "tokenPrecision": 6,
758
+ "isStable": false,
759
+ "isVirtual": true,
760
+ "intOracleAddress": "7tUpJSdng3w75S1FzHscnYTGofpCCQmrnbipMdHbf4nr",
761
+ "extOracleAddress": "CBh4vU47hYJPDL7gAQLWiQdy6UYAR5z5k2JEvuyZXqYt",
762
+ "lazerId": 1508,
763
+ "pythTicker": "FX.USD/CNH",
764
+ "pythPriceId": "0xeef52e09c878ad41f6a81803e3640fe04dceea727de894edd4ea117e2e332e66"
705
765
  }
706
766
  ],
707
767
  "markets": [
@@ -745,9 +805,9 @@
745
805
  "targetCustody": "7WWSRZSgFmp7UDfD1KHWYJ2CqXVbpCdQ5cQfgBxjpFeL",
746
806
  "collateralCustody": "9yANuRkTRxb9jjxnG1h3xcUz2kM8fJgDbdYJV4PfZ7dy",
747
807
  "side": "long",
748
- "maxLev": 100,
808
+ "maxLev": 500,
749
809
  "degenMinLev": 1,
750
- "degenMaxLev": 100,
810
+ "degenMaxLev": 500,
751
811
  "targetCustodyId": 3,
752
812
  "collateralCustodyId": 0,
753
813
  "targetMint": "EURPnveVbdoJkGs7qYqsEWBcCH4ZHChKEBbDGaQx4rUK",
@@ -761,9 +821,9 @@
761
821
  "targetCustody": "7WWSRZSgFmp7UDfD1KHWYJ2CqXVbpCdQ5cQfgBxjpFeL",
762
822
  "collateralCustody": "9yANuRkTRxb9jjxnG1h3xcUz2kM8fJgDbdYJV4PfZ7dy",
763
823
  "side": "short",
764
- "maxLev": 100,
824
+ "maxLev": 500,
765
825
  "degenMinLev": 1,
766
- "degenMaxLev": 100,
826
+ "degenMaxLev": 500,
767
827
  "targetCustodyId": 3,
768
828
  "collateralCustodyId": 0,
769
829
  "targetMint": "EURPnveVbdoJkGs7qYqsEWBcCH4ZHChKEBbDGaQx4rUK",
@@ -777,9 +837,9 @@
777
837
  "targetCustody": "Ah1Kd146CtAexGvbVNWRMQ8aXJTJDf4AopNLQZKGfYck",
778
838
  "collateralCustody": "9yANuRkTRxb9jjxnG1h3xcUz2kM8fJgDbdYJV4PfZ7dy",
779
839
  "side": "long",
780
- "maxLev": 100,
840
+ "maxLev": 500,
781
841
  "degenMinLev": 1,
782
- "degenMaxLev": 100,
842
+ "degenMaxLev": 500,
783
843
  "targetCustodyId": 4,
784
844
  "collateralCustodyId": 0,
785
845
  "targetMint": "GBPvXsT3uQVBmipvhhU5NW1JfhMJ2maYqLAbPzUq5NnY",
@@ -793,9 +853,9 @@
793
853
  "targetCustody": "Ah1Kd146CtAexGvbVNWRMQ8aXJTJDf4AopNLQZKGfYck",
794
854
  "collateralCustody": "9yANuRkTRxb9jjxnG1h3xcUz2kM8fJgDbdYJV4PfZ7dy",
795
855
  "side": "short",
796
- "maxLev": 100,
856
+ "maxLev": 500,
797
857
  "degenMinLev": 1,
798
- "degenMaxLev": 100,
858
+ "degenMaxLev": 500,
799
859
  "targetCustodyId": 4,
800
860
  "collateralCustodyId": 0,
801
861
  "targetMint": "GBPvXsT3uQVBmipvhhU5NW1JfhMJ2maYqLAbPzUq5NnY",
@@ -864,6 +924,70 @@
864
924
  "collateralCustodyId": 7,
865
925
  "targetMint": "XAGLictSZUYkCHgBWoPitFCDJECNZx1DVTzV74iM9dP",
866
926
  "collateralMint": "AymATz4TCL9sWNEEV9Kvyz45CHVhDZ6kUgjTJPzLpU9P"
927
+ },
928
+ {
929
+ "marketId": 14,
930
+ "marketAccount": "3ErjFstaRkw2zyTCso3ZtPVG58YVSorRZyD2H3J3ad4o",
931
+ "marketCorrelation": false,
932
+ "pool": "KwhpybQPe9xuZFmAfcjLHj3ukownWex1ratyascAC1X",
933
+ "targetCustody": "ERiMNq88WEByvDUKsPsvkJRnvsDrPPhbWedn59cDfvXY",
934
+ "collateralCustody": "9yANuRkTRxb9jjxnG1h3xcUz2kM8fJgDbdYJV4PfZ7dy",
935
+ "side": "long",
936
+ "maxLev": 500,
937
+ "degenMinLev": 1,
938
+ "degenMaxLev": 500,
939
+ "targetCustodyId": 8,
940
+ "collateralCustodyId": 0,
941
+ "targetMint": "JPYPFUBYnE9yBM1PD9A9MAVuw4Rnjh5VZE8DB6vmU84",
942
+ "collateralMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
943
+ },
944
+ {
945
+ "marketId": 15,
946
+ "marketAccount": "FKAU386yuiXRniJcLuZBtiVWUrpS1gKZqYTNVTdKFysn",
947
+ "marketCorrelation": false,
948
+ "pool": "KwhpybQPe9xuZFmAfcjLHj3ukownWex1ratyascAC1X",
949
+ "targetCustody": "ERiMNq88WEByvDUKsPsvkJRnvsDrPPhbWedn59cDfvXY",
950
+ "collateralCustody": "9yANuRkTRxb9jjxnG1h3xcUz2kM8fJgDbdYJV4PfZ7dy",
951
+ "side": "short",
952
+ "maxLev": 500,
953
+ "degenMinLev": 1,
954
+ "degenMaxLev": 500,
955
+ "targetCustodyId": 8,
956
+ "collateralCustodyId": 0,
957
+ "targetMint": "JPYPFUBYnE9yBM1PD9A9MAVuw4Rnjh5VZE8DB6vmU84",
958
+ "collateralMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
959
+ },
960
+ {
961
+ "marketId": 16,
962
+ "marketAccount": "amojU3JR9LrtjMvmLPsHfwH86GhGSjSSX3H3FzeAMQY",
963
+ "marketCorrelation": false,
964
+ "pool": "KwhpybQPe9xuZFmAfcjLHj3ukownWex1ratyascAC1X",
965
+ "targetCustody": "2zB3Uv3SoFGe17UiGjPGrwBRA7edH3YRwtHWQES7KkqP",
966
+ "collateralCustody": "9yANuRkTRxb9jjxnG1h3xcUz2kM8fJgDbdYJV4PfZ7dy",
967
+ "side": "long",
968
+ "maxLev": 500,
969
+ "degenMinLev": 1,
970
+ "degenMaxLev": 500,
971
+ "targetCustodyId": 9,
972
+ "collateralCustodyId": 0,
973
+ "targetMint": "CNHShWxrWXp6V5M2mjLXuupZc3bmW9VezTfcVt1Zhcjr",
974
+ "collateralMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
975
+ },
976
+ {
977
+ "marketId": 17,
978
+ "marketAccount": "Ha6AXRVteMUv9QX3xrhvSYzppEvN57M5oorUbxpLnqEs",
979
+ "marketCorrelation": false,
980
+ "pool": "KwhpybQPe9xuZFmAfcjLHj3ukownWex1ratyascAC1X",
981
+ "targetCustody": "2zB3Uv3SoFGe17UiGjPGrwBRA7edH3YRwtHWQES7KkqP",
982
+ "collateralCustody": "9yANuRkTRxb9jjxnG1h3xcUz2kM8fJgDbdYJV4PfZ7dy",
983
+ "side": "short",
984
+ "maxLev": 500,
985
+ "degenMinLev": 1,
986
+ "degenMaxLev": 500,
987
+ "targetCustodyId": 9,
988
+ "collateralCustodyId": 0,
989
+ "targetMint": "CNHShWxrWXp6V5M2mjLXuupZc3bmW9VezTfcVt1Zhcjr",
990
+ "collateralMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
867
991
  }
868
992
  ],
869
993
  "marketsDeprecated": [
@@ -3048,6 +3172,32 @@
3048
3172
  "pythTicker": "Crypto.XAUT/USD",
3049
3173
  "pythPriceId": "0x44465e17d2e9d390e70c999d5a11fda4f092847fcd2e3e5aa089d96c98a30e67",
3050
3174
  "isToken2022": false
3175
+ },
3176
+ {
3177
+ "symbol": "USDJPY",
3178
+ "mintKey": "jpyXSWbgTtftQm2GP7msvgZfpWKu7fkazLeHavAJ6rz",
3179
+ "decimals": 6,
3180
+ "usdPrecision": 4,
3181
+ "tokenPrecision": 4,
3182
+ "isStable": false,
3183
+ "isVirtual": true,
3184
+ "lazerId": 340,
3185
+ "pythTicker": "FX.USD/JPY",
3186
+ "pythPriceId": "0xef2c98c804ba503c6a707e38be4dfbb16683775f195b091252bf24693042fd52",
3187
+ "isToken2022": false
3188
+ },
3189
+ {
3190
+ "symbol": "USDCNH",
3191
+ "mintKey": "cnh6N23RChjE9tsvW32Deuc1m1eqdq3zj7AQEUJUTYA",
3192
+ "decimals": 6,
3193
+ "usdPrecision": 4,
3194
+ "tokenPrecision": 4,
3195
+ "isStable": false,
3196
+ "isVirtual": true,
3197
+ "lazerId": 1508,
3198
+ "pythTicker": "FX.USD/CNH",
3199
+ "pythPriceId": "0xeef52e09c878ad41f6a81803e3640fe04dceea727de894edd4ea117e2e332e66",
3200
+ "isToken2022": false
3051
3201
  }
3052
3202
  ],
3053
3203
  "custodies": [
@@ -3165,10 +3315,44 @@
3165
3315
  "isStable": false,
3166
3316
  "isVirtual": false,
3167
3317
  "intOracleAddress": "6fCDXgCYMnY29RENXKE2yGxvtMVUCMU59kkmS212MjMc",
3168
- "extOracleAddress": "2uPQGpm8X4ZkxMHxrAW1QuhXcse1AHEgPih6Xp9NuEWW",
3318
+ "extOracleAddress": "6aLRPrkf5SM4mZdQCbb23YMZirN8bX7pqbbk1mZfb1s9",
3169
3319
  "lazerId": 172,
3170
3320
  "pythTicker": "Crypto.XAUT/USD",
3171
3321
  "pythPriceId": "0x44465e17d2e9d390e70c999d5a11fda4f092847fcd2e3e5aa089d96c98a30e67"
3322
+ },
3323
+ {
3324
+ "custodyId": 8,
3325
+ "custodyAccount": "2buaqoBnH4XBkGzHkxJneMwtFfKxywzjNLdEvApRBA4r",
3326
+ "tokenAccount": "JDxmMRA4RaagJTUguvzwu8LDgotyjyKiBABEw5DbnxiU",
3327
+ "symbol": "USDJPY",
3328
+ "mintKey": "jpyXSWbgTtftQm2GP7msvgZfpWKu7fkazLeHavAJ6rz",
3329
+ "decimals": 6,
3330
+ "usdPrecision": 4,
3331
+ "tokenPrecision": 4,
3332
+ "isStable": false,
3333
+ "isVirtual": true,
3334
+ "intOracleAddress": "HfgdkPeCctZSQ8G6aeqRwkANz4KTRB47iFwgcgkCu5vW",
3335
+ "extOracleAddress": "AMpTDXYcq8WaDR4FG8JW239vuwzAGqeS4fJSqGZi9V2P",
3336
+ "lazerId": 340,
3337
+ "pythTicker": "FX.USD/JPY",
3338
+ "pythPriceId": "0xef2c98c804ba503c6a707e38be4dfbb16683775f195b091252bf24693042fd52"
3339
+ },
3340
+ {
3341
+ "custodyId": 9,
3342
+ "custodyAccount": "5jiVGUF7X12ykcEiLz3oTWe6Zk8W4iYWhDMSQWZmwKN6",
3343
+ "tokenAccount": "5vCxM8hcSuoXErYobc4FicT9NCQBhpP6SmqqbYvCwFBi",
3344
+ "symbol": "USDCNH",
3345
+ "mintKey": "cnh6N23RChjE9tsvW32Deuc1m1eqdq3zj7AQEUJUTYA",
3346
+ "decimals": 6,
3347
+ "usdPrecision": 4,
3348
+ "tokenPrecision": 4,
3349
+ "isStable": false,
3350
+ "isVirtual": true,
3351
+ "intOracleAddress": "E8bpiKL1UbboeUyX9L1ey4vZ6kRRzy38cWvgEKTDcWVh",
3352
+ "extOracleAddress": "CBh4vU47hYJPDL7gAQLWiQdy6UYAR5z5k2JEvuyZXqYt",
3353
+ "lazerId": 1508,
3354
+ "pythTicker": "FX.USD/CNH",
3355
+ "pythPriceId": "0xeef52e09c878ad41f6a81803e3640fe04dceea727de894edd4ea117e2e332e66"
3172
3356
  }
3173
3357
  ],
3174
3358
  "markets": [
@@ -3212,9 +3396,9 @@
3212
3396
  "targetCustody": "4gkBUNVfVn3wxxYTGuCGTqepv1bW78q4wgDdUhUsw6R4",
3213
3397
  "collateralCustody": "4nkiPSMJb4hpLhpaXbebkYF73Ub5vjeked8mWkPafMBm",
3214
3398
  "side": "long",
3215
- "maxLev": 100,
3399
+ "maxLev": 500,
3216
3400
  "degenMinLev": 1,
3217
- "degenMaxLev": 100,
3401
+ "degenMaxLev": 500,
3218
3402
  "targetCustodyId": 3,
3219
3403
  "collateralCustodyId": 0,
3220
3404
  "targetMint": "eurExbEMAz5jq8r31EGc3gg9ddu7ftBJWg8A6hYsvng",
@@ -3228,9 +3412,9 @@
3228
3412
  "targetCustody": "4gkBUNVfVn3wxxYTGuCGTqepv1bW78q4wgDdUhUsw6R4",
3229
3413
  "collateralCustody": "4nkiPSMJb4hpLhpaXbebkYF73Ub5vjeked8mWkPafMBm",
3230
3414
  "side": "short",
3231
- "maxLev": 100,
3415
+ "maxLev": 500,
3232
3416
  "degenMinLev": 1,
3233
- "degenMaxLev": 100,
3417
+ "degenMaxLev": 500,
3234
3418
  "targetCustodyId": 3,
3235
3419
  "collateralCustodyId": 0,
3236
3420
  "targetMint": "eurExbEMAz5jq8r31EGc3gg9ddu7ftBJWg8A6hYsvng",
@@ -3244,9 +3428,9 @@
3244
3428
  "targetCustody": "EnoJSvppBuF2Lhhyv558jbZWTjaLtPMj6BUkhpUsmYqb",
3245
3429
  "collateralCustody": "4nkiPSMJb4hpLhpaXbebkYF73Ub5vjeked8mWkPafMBm",
3246
3430
  "side": "long",
3247
- "maxLev": 100,
3431
+ "maxLev": 500,
3248
3432
  "degenMinLev": 1,
3249
- "degenMaxLev": 100,
3433
+ "degenMaxLev": 500,
3250
3434
  "targetCustodyId": 4,
3251
3435
  "collateralCustodyId": 0,
3252
3436
  "targetMint": "gbpLV6AqxQGSMFsuSfcutvWnfjLUqKq63GoXLAHXXKV",
@@ -3260,9 +3444,9 @@
3260
3444
  "targetCustody": "EnoJSvppBuF2Lhhyv558jbZWTjaLtPMj6BUkhpUsmYqb",
3261
3445
  "collateralCustody": "4nkiPSMJb4hpLhpaXbebkYF73Ub5vjeked8mWkPafMBm",
3262
3446
  "side": "short",
3263
- "maxLev": 100,
3447
+ "maxLev": 500,
3264
3448
  "degenMinLev": 1,
3265
- "degenMaxLev": 100,
3449
+ "degenMaxLev": 500,
3266
3450
  "targetCustodyId": 4,
3267
3451
  "collateralCustodyId": 0,
3268
3452
  "targetMint": "gbpLV6AqxQGSMFsuSfcutvWnfjLUqKq63GoXLAHXXKV",
@@ -3331,6 +3515,70 @@
3331
3515
  "collateralCustodyId": 7,
3332
3516
  "targetMint": "xagGMhSCG8WDsf3zFep6sGtvyY1D78roKCHTJtEWg4Z",
3333
3517
  "collateralMint": "xaut1dB1uihYCwjReVgwZ4mBBJzwkXn4picqqmk4v2H"
3518
+ },
3519
+ {
3520
+ "marketId": 14,
3521
+ "marketAccount": "HKVqLfRqJqRFXW27vncvUZD1aqng1HqrCsUScmnjgrnG",
3522
+ "marketCorrelation": false,
3523
+ "pool": "Ar7yp9PJkRpvXasLB4NYdbDHnuvAZ1gDA8ALnkPKivbb",
3524
+ "targetCustody": "2buaqoBnH4XBkGzHkxJneMwtFfKxywzjNLdEvApRBA4r",
3525
+ "collateralCustody": "4nkiPSMJb4hpLhpaXbebkYF73Ub5vjeked8mWkPafMBm",
3526
+ "side": "long",
3527
+ "maxLev": 500,
3528
+ "degenMinLev": 1,
3529
+ "degenMaxLev": 500,
3530
+ "targetCustodyId": 8,
3531
+ "collateralCustodyId": 0,
3532
+ "targetMint": "jpyXSWbgTtftQm2GP7msvgZfpWKu7fkazLeHavAJ6rz",
3533
+ "collateralMint": "Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr"
3534
+ },
3535
+ {
3536
+ "marketId": 15,
3537
+ "marketAccount": "8EZQTKVyC8U6j1BozubKhZ6hf3MNizBmgmrkpggqAftX",
3538
+ "marketCorrelation": false,
3539
+ "pool": "Ar7yp9PJkRpvXasLB4NYdbDHnuvAZ1gDA8ALnkPKivbb",
3540
+ "targetCustody": "2buaqoBnH4XBkGzHkxJneMwtFfKxywzjNLdEvApRBA4r",
3541
+ "collateralCustody": "4nkiPSMJb4hpLhpaXbebkYF73Ub5vjeked8mWkPafMBm",
3542
+ "side": "short",
3543
+ "maxLev": 500,
3544
+ "degenMinLev": 1,
3545
+ "degenMaxLev": 500,
3546
+ "targetCustodyId": 8,
3547
+ "collateralCustodyId": 0,
3548
+ "targetMint": "jpyXSWbgTtftQm2GP7msvgZfpWKu7fkazLeHavAJ6rz",
3549
+ "collateralMint": "Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr"
3550
+ },
3551
+ {
3552
+ "marketId": 16,
3553
+ "marketAccount": "F43DP3i4BiVAT5hgRysC4uuUc2AWDYyf9QbWw8RAXDL7",
3554
+ "marketCorrelation": false,
3555
+ "pool": "Ar7yp9PJkRpvXasLB4NYdbDHnuvAZ1gDA8ALnkPKivbb",
3556
+ "targetCustody": "5jiVGUF7X12ykcEiLz3oTWe6Zk8W4iYWhDMSQWZmwKN6",
3557
+ "collateralCustody": "4nkiPSMJb4hpLhpaXbebkYF73Ub5vjeked8mWkPafMBm",
3558
+ "side": "long",
3559
+ "maxLev": 500,
3560
+ "degenMinLev": 1,
3561
+ "degenMaxLev": 500,
3562
+ "targetCustodyId": 9,
3563
+ "collateralCustodyId": 0,
3564
+ "targetMint": "cnh6N23RChjE9tsvW32Deuc1m1eqdq3zj7AQEUJUTYA",
3565
+ "collateralMint": "Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr"
3566
+ },
3567
+ {
3568
+ "marketId": 17,
3569
+ "marketAccount": "Gc4n9qN8empM12jMysw7zBWfiU3fumcEZThQ2ZFpYo1D",
3570
+ "marketCorrelation": false,
3571
+ "pool": "Ar7yp9PJkRpvXasLB4NYdbDHnuvAZ1gDA8ALnkPKivbb",
3572
+ "targetCustody": "5jiVGUF7X12ykcEiLz3oTWe6Zk8W4iYWhDMSQWZmwKN6",
3573
+ "collateralCustody": "4nkiPSMJb4hpLhpaXbebkYF73Ub5vjeked8mWkPafMBm",
3574
+ "side": "short",
3575
+ "maxLev": 500,
3576
+ "degenMinLev": 1,
3577
+ "degenMaxLev": 500,
3578
+ "targetCustodyId": 9,
3579
+ "collateralCustodyId": 0,
3580
+ "targetMint": "cnh6N23RChjE9tsvW32Deuc1m1eqdq3zj7AQEUJUTYA",
3581
+ "collateralMint": "Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr"
3334
3582
  }
3335
3583
  ],
3336
3584
  "marketsDeprecated": [
@@ -1,3 +1,4 @@
1
+ /// <reference types="bn.js" />
1
2
  import { BN } from "@coral-xyz/anchor";
2
3
  import { Mint } from "@solana/spl-token";
3
4
  import { CustodyAccount } from "./CustodyAccount";
@@ -1,3 +1,4 @@
1
+ /// <reference types="bn.js" />
1
2
  import { BN } from "@coral-xyz/anchor";
2
3
  import { PublicKey } from "@solana/web3.js";
3
4
  import { ContractOraclePrice, Position } from "./types";
@@ -1,3 +1,4 @@
1
+ /// <reference types="bn.js" />
1
2
  import { TokenStake, WithdrawStakeLog } from "./types";
2
3
  import { BN } from "@coral-xyz/anchor";
3
4
  import { PublicKey } from "@solana/web3.js";
@@ -1,3 +1,4 @@
1
+ /// <reference types="bn.js" />
1
2
  import { BN } from "@coral-xyz/anchor";
2
3
  import { PublicKey } from "@solana/web3.js";
3
4
  import { TokenVault } from "./types";
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
@@ -44,14 +44,11 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
44
44
  }
45
45
  return to.concat(ar || Array.prototype.slice.call(from));
46
46
  };
47
- var __importDefault = (this && this.__importDefault) || function (mod) {
48
- return (mod && mod.__esModule) ? mod : { "default": mod };
49
- };
50
47
  Object.defineProperty(exports, "__esModule", { value: true });
51
48
  exports.ViewHelper = void 0;
52
49
  var web3_js_1 = require("@solana/web3.js");
53
50
  var base64_1 = require("@coral-xyz/anchor/dist/cjs/utils/bytes/base64");
54
- var perpetuals_json_1 = __importDefault(require("./idl/perpetuals.json"));
51
+ var perpetuals_1 = require("./idl/perpetuals");
55
52
  var IdlCoder_1 = require("./utils/IdlCoder");
56
53
  var ViewHelper = (function () {
57
54
  function ViewHelper(client) {
@@ -68,11 +65,11 @@ var ViewHelper = (function () {
68
65
  throw new Error('View expected return log');
69
66
  }
70
67
  var returnData = (0, base64_1.decode)(returnLog.slice(returnPrefix_1.length));
71
- var returnType = perpetuals_json_1.default.instructions[instructionNumber].returns;
68
+ var returnType = perpetuals_1.IDL.instructions[instructionNumber].returns;
72
69
  if (!returnType) {
73
70
  throw new Error('View expected return type');
74
71
  }
75
- var coder = IdlCoder_1.IdlCoder.fieldLayout({ type: returnType }, Array.from(__spreadArray(__spreadArray([], ((_a = perpetuals_json_1.default.accounts) !== null && _a !== void 0 ? _a : []), true), ((_b = perpetuals_json_1.default.types) !== null && _b !== void 0 ? _b : []), true)));
72
+ var coder = IdlCoder_1.IdlCoder.fieldLayout({ type: returnType }, Array.from(__spreadArray(__spreadArray([], ((_a = perpetuals_1.IDL.accounts) !== null && _a !== void 0 ? _a : []), true), ((_b = perpetuals_1.IDL.types) !== null && _b !== void 0 ? _b : []), true)));
76
73
  return coder.decode(returnData);
77
74
  }
78
75
  else {
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
@@ -40,8 +40,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
40
40
  };
41
41
  var _a;
42
42
  Object.defineProperty(exports, "__esModule", { value: true });
43
- exports.getBackupOracleInstruction = exports.getPythnetOraclePrices = exports.pythPriceServiceConnection = void 0;
44
- exports.createBackupOracleInstruction = createBackupOracleInstruction;
43
+ exports.createBackupOracleInstruction = exports.getBackupOracleInstruction = exports.getPythnetOraclePrices = exports.pythPriceServiceConnection = void 0;
45
44
  var price_service_client_1 = require("@pythnetwork/price-service-client");
46
45
  var web3_js_1 = require("@solana/web3.js");
47
46
  var bn_js_1 = __importDefault(require("bn.js"));
@@ -157,3 +156,4 @@ function createBackupOracleInstruction(poolAddress_1) {
157
156
  });
158
157
  });
159
158
  }
159
+ exports.createBackupOracleInstruction = createBackupOracleInstruction;
@@ -1,3 +1,4 @@
1
+ /// <reference types="bn.js" />
1
2
  import { PublicKey } from '@solana/web3.js';
2
3
  export declare const PERCENTAGE_DECIMALS = 4;
3
4
  export declare const USD_DECIMALS = 6;