flash-sdk 2.5.0 → 2.5.1

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.
@@ -424,7 +424,7 @@
424
424
  "targetCustody": "3j1xiP6GckKCzsTm6sni5iy6zrpZX5BWZGbKCq5buk4d",
425
425
  "collateralCustody": "9yANuRkTRxb9jjxnG1h3xcUz2kM8fJgDbdYJV4PfZ7dy",
426
426
  "side": "long",
427
- "maxLev": 200,
427
+ "maxLev": 100,
428
428
  "targetCustodyId": 1,
429
429
  "collateralCustodyId": 0,
430
430
  "targetMint": "XAUfcdPHmEBnj78YnZ5YxqdwBmgbwoY5VfrRwETnKuQ",
@@ -437,7 +437,7 @@
437
437
  "targetCustody": "3j1xiP6GckKCzsTm6sni5iy6zrpZX5BWZGbKCq5buk4d",
438
438
  "collateralCustody": "9yANuRkTRxb9jjxnG1h3xcUz2kM8fJgDbdYJV4PfZ7dy",
439
439
  "side": "short",
440
- "maxLev": 200,
440
+ "maxLev": 100,
441
441
  "targetCustodyId": 1,
442
442
  "collateralCustodyId": 0,
443
443
  "targetMint": "XAUfcdPHmEBnj78YnZ5YxqdwBmgbwoY5VfrRwETnKuQ",
@@ -450,7 +450,7 @@
450
450
  "targetCustody": "GMqeFJ8LG5BcrRtVgvfQuA7giBETcY76ikC8h5hPh59h",
451
451
  "collateralCustody": "9yANuRkTRxb9jjxnG1h3xcUz2kM8fJgDbdYJV4PfZ7dy",
452
452
  "side": "long",
453
- "maxLev": 200,
453
+ "maxLev": 100,
454
454
  "targetCustodyId": 2,
455
455
  "collateralCustodyId": 0,
456
456
  "targetMint": "XAGLictSZUYkCHgBWoPitFCDJECNZx1DVTzV74iM9dP",
@@ -463,7 +463,7 @@
463
463
  "targetCustody": "GMqeFJ8LG5BcrRtVgvfQuA7giBETcY76ikC8h5hPh59h",
464
464
  "collateralCustody": "9yANuRkTRxb9jjxnG1h3xcUz2kM8fJgDbdYJV4PfZ7dy",
465
465
  "side": "short",
466
- "maxLev": 200,
466
+ "maxLev": 100,
467
467
  "targetCustodyId": 2,
468
468
  "collateralCustodyId": 0,
469
469
  "targetMint": "XAGLictSZUYkCHgBWoPitFCDJECNZx1DVTzV74iM9dP",
@@ -476,7 +476,7 @@
476
476
  "targetCustody": "7WWSRZSgFmp7UDfD1KHWYJ2CqXVbpCdQ5cQfgBxjpFeL",
477
477
  "collateralCustody": "9yANuRkTRxb9jjxnG1h3xcUz2kM8fJgDbdYJV4PfZ7dy",
478
478
  "side": "long",
479
- "maxLev": 200,
479
+ "maxLev": 100,
480
480
  "targetCustodyId": 3,
481
481
  "collateralCustodyId": 0,
482
482
  "targetMint": "EURPnveVbdoJkGs7qYqsEWBcCH4ZHChKEBbDGaQx4rUK",
@@ -489,7 +489,7 @@
489
489
  "targetCustody": "7WWSRZSgFmp7UDfD1KHWYJ2CqXVbpCdQ5cQfgBxjpFeL",
490
490
  "collateralCustody": "9yANuRkTRxb9jjxnG1h3xcUz2kM8fJgDbdYJV4PfZ7dy",
491
491
  "side": "short",
492
- "maxLev": 200,
492
+ "maxLev": 100,
493
493
  "targetCustodyId": 3,
494
494
  "collateralCustodyId": 0,
495
495
  "targetMint": "EURPnveVbdoJkGs7qYqsEWBcCH4ZHChKEBbDGaQx4rUK",
@@ -502,7 +502,7 @@
502
502
  "targetCustody": "Ah1Kd146CtAexGvbVNWRMQ8aXJTJDf4AopNLQZKGfYck",
503
503
  "collateralCustody": "9yANuRkTRxb9jjxnG1h3xcUz2kM8fJgDbdYJV4PfZ7dy",
504
504
  "side": "long",
505
- "maxLev": 200,
505
+ "maxLev": 100,
506
506
  "targetCustodyId": 4,
507
507
  "collateralCustodyId": 0,
508
508
  "targetMint": "GBPvXsT3uQVBmipvhhU5NW1JfhMJ2maYqLAbPzUq5NnY",
@@ -515,7 +515,7 @@
515
515
  "targetCustody": "Ah1Kd146CtAexGvbVNWRMQ8aXJTJDf4AopNLQZKGfYck",
516
516
  "collateralCustody": "9yANuRkTRxb9jjxnG1h3xcUz2kM8fJgDbdYJV4PfZ7dy",
517
517
  "side": "short",
518
- "maxLev": 200,
518
+ "maxLev": 100,
519
519
  "targetCustodyId": 4,
520
520
  "collateralCustodyId": 0,
521
521
  "targetMint": "GBPvXsT3uQVBmipvhhU5NW1JfhMJ2maYqLAbPzUq5NnY",
@@ -528,7 +528,7 @@
528
528
  "targetCustody": "AFrALLNuCbBBnhUvEjxrK96e8yjComh2xuTak1y5TEJL",
529
529
  "collateralCustody": "9yANuRkTRxb9jjxnG1h3xcUz2kM8fJgDbdYJV4PfZ7dy",
530
530
  "side": "long",
531
- "maxLev": 200,
531
+ "maxLev": 100,
532
532
  "targetCustodyId": 5,
533
533
  "collateralCustodyId": 0,
534
534
  "targetMint": "AUDdbsJZpT1pFErezhe9pvcf97XnvD8oo8etZbeFbBX",
@@ -541,7 +541,7 @@
541
541
  "targetCustody": "AFrALLNuCbBBnhUvEjxrK96e8yjComh2xuTak1y5TEJL",
542
542
  "collateralCustody": "9yANuRkTRxb9jjxnG1h3xcUz2kM8fJgDbdYJV4PfZ7dy",
543
543
  "side": "short",
544
- "maxLev": 200,
544
+ "maxLev": 100,
545
545
  "targetCustodyId": 5,
546
546
  "collateralCustodyId": 0,
547
547
  "targetMint": "AUDdbsJZpT1pFErezhe9pvcf97XnvD8oo8etZbeFbBX",
@@ -1540,6 +1540,17 @@
1540
1540
  "isVirtual": false,
1541
1541
  "pythTicker": "Crypto.W/USD",
1542
1542
  "pythPriceId": "0xeff7446475e218517566ea99e72a4abec2e1bd8498b43b7d8331e29dcb059389"
1543
+ },
1544
+ {
1545
+ "symbol": "RAY",
1546
+ "mintKey": "ray4PVwCwoM4ADM3qKar3Wy6v7eA2zcMtHWv7LAPGe8",
1547
+ "decimals": 6,
1548
+ "usdPrecision": 4,
1549
+ "tokenPrecision": 4,
1550
+ "isStable": false,
1551
+ "isVirtual": false,
1552
+ "pythTicker": "Crypto.RAY/USD",
1553
+ "pythPriceId": "0x91568baa8beb53db23eb3fb7f22c6e8bd303d103919e19733f2bb642d3e7987a"
1543
1554
  }
1544
1555
  ],
1545
1556
  "custodies": [
@@ -1622,6 +1633,22 @@
1622
1633
  "customOracleAddress": "BEMsCSQEGi2kwPA4mKnGjxnreijhMki7L4eeb96ypzF9",
1623
1634
  "pythTicker": "Crypto.W/USD",
1624
1635
  "pythPriceId": "0xeff7446475e218517566ea99e72a4abec2e1bd8498b43b7d8331e29dcb059389"
1636
+ },
1637
+ {
1638
+ "custodyId": 5,
1639
+ "custodyAccount": "4t4CxpF8cjtgdiVKNgpsM5i7K3C1zUpvUcbG4hCToNfD",
1640
+ "tokenAccount": "7nrpffKQc34xvzZu1e1TEzoHE9jnP1d2DDnERP77SGsk",
1641
+ "symbol": "RAY",
1642
+ "mintKey": "ray4PVwCwoM4ADM3qKar3Wy6v7eA2zcMtHWv7LAPGe8",
1643
+ "decimals": 6,
1644
+ "usdPrecision": 4,
1645
+ "tokenPrecision": 4,
1646
+ "isStable": false,
1647
+ "isVirtual": false,
1648
+ "oracleAddress": "Hhipna3EoWR7u8pDruUg8RxhP5F6XLh6SEHMVDmZhWi8",
1649
+ "customOracleAddress": "Hhipna3EoWR7u8pDruUg8RxhP5F6XLh6SEHMVDmZhWi8",
1650
+ "pythTicker": "Crypto.RAY/USD",
1651
+ "pythPriceId": "0x91568baa8beb53db23eb3fb7f22c6e8bd303d103919e19733f2bb642d3e7987a"
1625
1652
  }
1626
1653
  ],
1627
1654
  "markets": [
@@ -1704,7 +1731,7 @@
1704
1731
  "collateralMint": "Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr"
1705
1732
  },
1706
1733
  {
1707
- "marketId": 5,
1734
+ "marketId": 6,
1708
1735
  "marketAccount": "9zvixTyYoxSeiEW1Acb3aScdi6HUPbSGQqTLa1PinAZb",
1709
1736
  "pool": "FpRXePeSYyPZrBKrCSvLNSQGYT6gkgZXGDCBWVVRkNRT",
1710
1737
  "targetCustody": "7DLv5QVuRizNG4P5ak8jZRdn9PeSETSeGogzPMh6p3WU",
@@ -1717,7 +1744,7 @@
1717
1744
  "collateralMint": "wda4XRBjGzP2kbCuapvfseNnH49WNkTqLw5szmjjxDG"
1718
1745
  },
1719
1746
  {
1720
- "marketId": 6,
1747
+ "marketId": 7,
1721
1748
  "marketAccount": "7AcT3XJsLT97MeXUpai71zEuFGdg5QetbTDTQheWMqFT",
1722
1749
  "pool": "FpRXePeSYyPZrBKrCSvLNSQGYT6gkgZXGDCBWVVRkNRT",
1723
1750
  "targetCustody": "7DLv5QVuRizNG4P5ak8jZRdn9PeSETSeGogzPMh6p3WU",
@@ -1728,6 +1755,32 @@
1728
1755
  "collateralCustodyId": 0,
1729
1756
  "targetMint": "wda4XRBjGzP2kbCuapvfseNnH49WNkTqLw5szmjjxDG",
1730
1757
  "collateralMint": "Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr"
1758
+ },
1759
+ {
1760
+ "marketId": 8,
1761
+ "marketAccount": "CmKDkRzjB4sGiVqui7JPKL5wARFjcryPNFTbwDgPNxzB",
1762
+ "pool": "FpRXePeSYyPZrBKrCSvLNSQGYT6gkgZXGDCBWVVRkNRT",
1763
+ "targetCustody": "4t4CxpF8cjtgdiVKNgpsM5i7K3C1zUpvUcbG4hCToNfD",
1764
+ "collateralCustody": "4t4CxpF8cjtgdiVKNgpsM5i7K3C1zUpvUcbG4hCToNfD",
1765
+ "side": "long",
1766
+ "maxLev": 50,
1767
+ "targetCustodyId": 5,
1768
+ "collateralCustodyId": 5,
1769
+ "targetMint": "ray4PVwCwoM4ADM3qKar3Wy6v7eA2zcMtHWv7LAPGe8",
1770
+ "collateralMint": "ray4PVwCwoM4ADM3qKar3Wy6v7eA2zcMtHWv7LAPGe8"
1771
+ },
1772
+ {
1773
+ "marketId": 9,
1774
+ "marketAccount": "8nY84A5Pmw4DVkrAUXMsSQ7QgzWFw68tzsZnJrMqZohb",
1775
+ "pool": "FpRXePeSYyPZrBKrCSvLNSQGYT6gkgZXGDCBWVVRkNRT",
1776
+ "targetCustody": "4t4CxpF8cjtgdiVKNgpsM5i7K3C1zUpvUcbG4hCToNfD",
1777
+ "collateralCustody": "4BwjABgU78jqjKeyCemyCCLwEtFdZ8JSeP9ogPMQS8Zg",
1778
+ "side": "short",
1779
+ "maxLev": 50,
1780
+ "targetCustodyId": 5,
1781
+ "collateralCustodyId": 0,
1782
+ "targetMint": "ray4PVwCwoM4ADM3qKar3Wy6v7eA2zcMtHWv7LAPGe8",
1783
+ "collateralMint": "Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr"
1731
1784
  }
1732
1785
  ]
1733
1786
  },
@@ -10,9 +10,11 @@ export declare class TradingAccount implements Trading {
10
10
  isInitialized: boolean;
11
11
  level: number;
12
12
  bump: number;
13
+ counter: BN;
13
14
  voltagePoints: BN;
14
15
  stats: VoltageStats;
15
16
  snapshot: VoltageStats;
17
+ timestamp: BN;
16
18
  padding: BN[];
17
19
  constructor(publicKey: PublicKey, parseData: Trading);
18
20
  static from(publicKey: PublicKey, parseData: Trading): TradingAccount;
@@ -10,4 +10,5 @@ export declare const RATE_POWER: number;
10
10
  export declare const ORACLE_EXPONENT = 9;
11
11
  export declare const BN_ZERO: import("bn.js");
12
12
  export declare const BN_ONE: import("bn.js");
13
+ export declare const DAY_SECONDS: import("bn.js");
13
14
  export declare const METAPLEX_PROGRAM_ID: PublicKey;
@@ -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.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;
3
+ exports.METAPLEX_PROGRAM_ID = exports.DAY_SECONDS = 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;
@@ -13,4 +13,5 @@ exports.RATE_POWER = Math.pow(10, (exports.RATE_DECIMALS));
13
13
  exports.ORACLE_EXPONENT = 9;
14
14
  exports.BN_ZERO = new bn_js_1.BN(0);
15
15
  exports.BN_ONE = new bn_js_1.BN(1);
16
+ exports.DAY_SECONDS = new bn_js_1.BN(86400);
16
17
  exports.METAPLEX_PROGRAM_ID = new web3_js_1.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s");
@@ -468,6 +468,75 @@ export type Perpetuals = {
468
468
  ];
469
469
  "returns": "u8";
470
470
  },
471
+ {
472
+ "name": "reimburse";
473
+ "accounts": [
474
+ {
475
+ "name": "admin";
476
+ "isMut": false;
477
+ "isSigner": true;
478
+ },
479
+ {
480
+ "name": "multisig";
481
+ "isMut": true;
482
+ "isSigner": false;
483
+ },
484
+ {
485
+ "name": "fundingAccount";
486
+ "isMut": true;
487
+ "isSigner": false;
488
+ },
489
+ {
490
+ "name": "perpetuals";
491
+ "isMut": false;
492
+ "isSigner": false;
493
+ },
494
+ {
495
+ "name": "pool";
496
+ "isMut": true;
497
+ "isSigner": false;
498
+ },
499
+ {
500
+ "name": "custody";
501
+ "isMut": true;
502
+ "isSigner": false;
503
+ },
504
+ {
505
+ "name": "custodyOracleAccount";
506
+ "isMut": false;
507
+ "isSigner": false;
508
+ },
509
+ {
510
+ "name": "custodyTokenAccount";
511
+ "isMut": true;
512
+ "isSigner": false;
513
+ },
514
+ {
515
+ "name": "tokenProgram";
516
+ "isMut": false;
517
+ "isSigner": false;
518
+ },
519
+ {
520
+ "name": "program";
521
+ "isMut": false;
522
+ "isSigner": false;
523
+ },
524
+ {
525
+ "name": "ixSysvar";
526
+ "isMut": false;
527
+ "isSigner": false;
528
+ }
529
+ ];
530
+ "args": [
531
+ {
532
+ "name": "params";
533
+ "type": {
534
+ "defined": "ReimburseParams";
535
+ };
536
+ }
537
+ ];
538
+ "returns": "u8";
539
+ },
471
540
  {
472
541
  "name": "setAdminSigners";
473
542
  "accounts": [
@@ -3576,6 +3645,14 @@ export type Perpetuals = {
3576
3645
  {
3577
3646
  "name": "perpetualsBump";
3578
3647
  "type": "u8";
3648
+ },
3649
+ {
3650
+ "name": "tradeLimit";
3651
+ "type": "u16";
3652
+ },
3653
+ {
3654
+ "name": "rebateLimitUsd";
3655
+ "type": "u32";
3579
3656
  }
3580
3657
  ];
3581
3658
  };
@@ -3668,24 +3745,6 @@ export type Perpetuals = {
3668
3745
  {
3669
3746
  "name": "vpVolumeFactor";
3670
3747
  "type": "u8";
3671
- },
3672
- {
3673
- "name": "padding";
3674
- "type": {
3675
- "array": [
3676
- "u8",
3677
- 4
3678
- ];
3679
- };
3680
- },
3681
- {
3682
- "name": "stakingFeeBoostBps";
3683
- "type": {
3684
- "array": [
3685
- "u64",
3686
- 6
3687
- ];
3688
- };
3689
3748
  }
3690
3749
  ];
3691
3750
  };
@@ -3805,16 +3864,12 @@ export type Perpetuals = {
3805
3864
  "name": "refererTradingAccount";
3806
3865
  "type": "publicKey";
3807
3866
  },
3808
- {
3809
- "name": "refererBoosterAccount";
3810
- "type": "publicKey";
3811
- },
3812
3867
  {
3813
3868
  "name": "padding";
3814
3869
  "type": {
3815
3870
  "array": [
3816
3871
  "u64",
3817
- 4
3872
+ 8
3818
3873
  ];
3819
3874
  };
3820
3875
  }
@@ -3866,12 +3921,20 @@ export type Perpetuals = {
3866
3921
  "defined": "VoltageStats";
3867
3922
  };
3868
3923
  },
3924
+ {
3925
+ "name": "timestamp";
3926
+ "type": "i64";
3927
+ },
3928
+ {
3929
+ "name": "counter";
3930
+ "type": "u64";
3931
+ },
3869
3932
  {
3870
3933
  "name": "padding";
3871
3934
  "type": {
3872
3935
  "array": [
3873
3936
  "u64",
3874
- 8
3937
+ 6
3875
3938
  ];
3876
3939
  };
3877
3940
  }
@@ -4392,6 +4455,18 @@ export type Perpetuals = {
4392
4455
  "fields": [];
4393
4456
  };
4394
4457
  },
4458
+ {
4459
+ "name": "ReimburseParams";
4460
+ "type": {
4461
+ "kind": "struct";
4462
+ "fields": [
4463
+ {
4464
+ "name": "amountIn";
4465
+ "type": "u64";
4466
+ }
4467
+ ];
4468
+ };
4469
+ },
4395
4470
  {
4396
4471
  "name": "RemoveCollateralParams";
4397
4472
  "type": {
@@ -4640,6 +4715,14 @@ export type Perpetuals = {
4640
4715
  "type": {
4641
4716
  "defined": "VoltageMultiplier";
4642
4717
  };
4718
+ },
4719
+ {
4720
+ "name": "tradeLimit";
4721
+ "type": "u16";
4722
+ },
4723
+ {
4724
+ "name": "rebateLimitUsd";
4725
+ "type": "u32";
4643
4726
  }
4644
4727
  ];
4645
4728
  };
@@ -4670,15 +4753,6 @@ export type Perpetuals = {
4670
4753
  {
4671
4754
  "name": "vpVolumeFactor";
4672
4755
  "type": "u8";
4673
- },
4674
- {
4675
- "name": "stakingFeeBoostBps";
4676
- "type": {
4677
- "array": [
4678
- "u64",
4679
- 6
4680
- ];
4681
- };
4682
4756
  }
4683
4757
  ];
4684
4758
  };
@@ -4795,16 +4869,7 @@ export type Perpetuals = {
4795
4869
  "name": "UpdateTradingAccountParams";
4796
4870
  "type": {
4797
4871
  "kind": "struct";
4798
- "fields": [
4799
- {
4800
- "name": "updateReferer";
4801
- "type": "bool";
4802
- },
4803
- {
4804
- "name": "updateBooster";
4805
- "type": "bool";
4806
- }
4807
- ];
4872
+ "fields": [];
4808
4873
  };
4809
4874
  },
4810
4875
  {
@@ -5624,6 +5689,9 @@ export type Perpetuals = {
5624
5689
  {
5625
5690
  "name": "RemoveCustody";
5626
5691
  },
5692
+ {
5693
+ "name": "Reimburse";
5694
+ },
5627
5695
  {
5628
5696
  "name": "AddMarket";
5629
5697
  },
@@ -5938,36 +6006,6 @@ export type Perpetuals = {
5938
6006
  }
5939
6007
  ];
5940
6008
  },
5941
- {
5942
- "name": "CollectStakeRewardLogV2";
5943
- "fields": [
5944
- {
5945
- "name": "owner";
5946
- "type": "publicKey";
5947
- "index": false;
5948
- },
5949
- {
5950
- "name": "poolName";
5951
- "type": "string";
5952
- "index": false;
5953
- },
5954
- {
5955
- "name": "rewardAmount";
5956
- "type": "u64";
5957
- "index": false;
5958
- },
5959
- {
5960
- "name": "rewardMint";
5961
- "type": "publicKey";
5962
- "index": false;
5963
- },
5964
- {
5965
- "name": "rewardShare";
5966
- "type": "u64";
5967
- "index": false;
5968
- }
5969
- ];
5970
- },
5971
6009
  {
5972
6010
  "name": "DecreaseSizeLog";
5973
6011
  "fields": [