flash-sdk 10.8.0 → 10.8.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.
@@ -1,3 +1,4 @@
1
+ /// <reference types="bn.js" />
1
2
  import { BN } from "@coral-xyz/anchor";
2
3
  import { ContractOraclePrice } from "./types";
3
4
  export declare class OraclePrice {
@@ -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 { LimitOrder, Order, TriggerOrder } from "./types";
@@ -1,3 +1,5 @@
1
+ /// <reference types="bn.js" />
2
+ /// <reference types="node" />
1
3
  import { Program, AnchorProvider, BN } from "@coral-xyz/anchor";
2
4
  import { PublicKey, TransactionInstruction, Commitment, Signer, AddressLookupTableAccount, VersionedTransaction } from "@solana/web3.js";
3
5
  import { PoolAccount } from "./PoolAccount";
@@ -20,8 +20,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
20
20
  });
21
21
  };
22
22
  var __generator = (this && this.__generator) || function (thisArg, body) {
23
- 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);
24
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
23
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
24
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
25
25
  function verb(n) { return function (v) { return step([n, v]); }; }
26
26
  function step(op) {
27
27
  if (f) throw new TypeError("Generator is already executing.");
@@ -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";
@@ -3758,6 +3758,110 @@
3758
3758
  "pythPriceId": "0xeff7446475e218517566ea99e72a4abec2e1bd8498b43b7d8331e29dcb059389",
3759
3759
  "isToken2022": false
3760
3760
  },
3761
+ {
3762
+ "symbol": "FARTCOIN",
3763
+ "mintKey": "fartpRHniUMJ2dG3AFkFcmvDHptBSqBbttYwE3hKv5t",
3764
+ "decimals": 6,
3765
+ "usdPrecision": 4,
3766
+ "tokenPrecision": 4,
3767
+ "isStable": false,
3768
+ "isVirtual": false,
3769
+ "lazerId": 182,
3770
+ "pythTicker": "Crypto.FARTCOIN/USD",
3771
+ "pythPriceId": "0x58cd29ef0e714c5affc44f269b2c1899a52da4169d7acc147b9da692e6953608",
3772
+ "isToken2022": false
3773
+ },
3774
+ {
3775
+ "symbol": "JUP",
3776
+ "mintKey": "jupFZJoi1GKLMyt2J2Ui13BNTNh47XQtYPpNucbMAF4",
3777
+ "decimals": 6,
3778
+ "usdPrecision": 4,
3779
+ "tokenPrecision": 4,
3780
+ "isStable": false,
3781
+ "isVirtual": false,
3782
+ "lazerId": 92,
3783
+ "pythTicker": "Crypto.JUP/USD",
3784
+ "pythPriceId": "0x0a0408d619e9380abad35060f9192039ed5042fa6f82301d0e48bb52be830996",
3785
+ "isToken2022": false
3786
+ },
3787
+ {
3788
+ "symbol": "PYTH",
3789
+ "mintKey": "pythwankpPj8tfCtBEW6BBE6oVC6ZFWF8tjyLPRSr45",
3790
+ "decimals": 6,
3791
+ "usdPrecision": 4,
3792
+ "tokenPrecision": 4,
3793
+ "isStable": false,
3794
+ "isVirtual": false,
3795
+ "lazerId": 3,
3796
+ "pythTicker": "Crypto.PYTH/USD",
3797
+ "pythPriceId": "0x0bbf28e9a841a1cc788f6a361b17ca072d0ea3098a1e5df1c3922d06719579ff",
3798
+ "isToken2022": false
3799
+ },
3800
+ {
3801
+ "symbol": "JTO",
3802
+ "mintKey": "jtoLsU5JqXTYzPzRwGK7UmsNgy1EN6BwNRr6KMJKcXi",
3803
+ "decimals": 6,
3804
+ "usdPrecision": 4,
3805
+ "tokenPrecision": 4,
3806
+ "isStable": false,
3807
+ "isVirtual": false,
3808
+ "lazerId": 91,
3809
+ "pythTicker": "Crypto.JTO/USD",
3810
+ "pythPriceId": "0xb43660a5f790c69354b0729a5ef9d50d68f1df92107540210b9cccba1f947cc2",
3811
+ "isToken2022": false
3812
+ },
3813
+ {
3814
+ "symbol": "RAY",
3815
+ "mintKey": "ray4PVwCwoM4ADM3qKar3Wy6v7eA2zcMtHWv7LAPGe8",
3816
+ "decimals": 6,
3817
+ "usdPrecision": 4,
3818
+ "tokenPrecision": 4,
3819
+ "isStable": false,
3820
+ "isVirtual": false,
3821
+ "lazerId": 54,
3822
+ "pythTicker": "Crypto.RAY/USD",
3823
+ "pythPriceId": "0x91568baa8beb53db23eb3fb7f22c6e8bd303d103919e19733f2bb642d3e7987a",
3824
+ "isToken2022": false
3825
+ },
3826
+ {
3827
+ "symbol": "KMNO",
3828
+ "mintKey": "kmnooU2T6dYeVvPcwFjtNwDdgfNtAY6qs8tnxacZQxb",
3829
+ "decimals": 6,
3830
+ "usdPrecision": 4,
3831
+ "tokenPrecision": 4,
3832
+ "isStable": false,
3833
+ "isVirtual": false,
3834
+ "lazerId": 464,
3835
+ "pythTicker": "Crypto.KMNO/USD",
3836
+ "pythPriceId": "0xb17e5bc5de742a8a378b54c9c75442b7d51e30ada63f28d9bd28d3c0e26511a0",
3837
+ "isToken2022": false
3838
+ },
3839
+ {
3840
+ "symbol": "2Z",
3841
+ "mintKey": "2zRoPBHuDHcwHym3aeAtZZhWbpzHUXJSe3H8Rnsh3SL3",
3842
+ "decimals": 8,
3843
+ "usdPrecision": 4,
3844
+ "tokenPrecision": 4,
3845
+ "isStable": false,
3846
+ "isVirtual": false,
3847
+ "lazerId": 2316,
3848
+ "pythTicker": "Crypto.2Z/USD",
3849
+ "pythPriceId": "0xf2b3ab1c49e35e881003c3c0482d18b181a1560b697b844c24c8f85aba1cab95",
3850
+ "isToken2022": false
3851
+ },
3852
+ {
3853
+ "symbol": "MET",
3854
+ "mintKey": "met2Hm6WYJaN27BkDVAuNefdk4BzkRpy5HqDrXVgDVH",
3855
+ "decimals": 6,
3856
+ "usdPrecision": 4,
3857
+ "tokenPrecision": 4,
3858
+ "isStable": false,
3859
+ "isVirtual": false,
3860
+ "lazerId": 102,
3861
+ "pythTicker": "Crypto.W/USD",
3862
+ "pythPriceId": "0xeff7446475e218517566ea99e72a4abec2e1bd8498b43b7d8331e29dcb059389",
3863
+ "isToken2022": false
3864
+ },
3761
3865
  {
3762
3866
  "symbol": "FARTCOIN",
3763
3867
  "mintKey": "fartpRHniUMJ2dG3AFkFcmvDHptBSqBbttYwE3hKv5t",
@@ -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";
@@ -1,3 +1,4 @@
1
+ /// <reference types="bn.js" />
1
2
  import { BN } from "@coral-xyz/anchor";
2
3
  import { Trading, VoltageStats } from "./types";
3
4
  import { PublicKey } from "@solana/web3.js";
@@ -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.");
@@ -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 = exports.API_ENDPOINT = void 0;
44
- exports.createBackupOracleInstruction = createBackupOracleInstruction;
43
+ exports.createBackupOracleInstruction = exports.getBackupOracleInstruction = exports.getPythnetOraclePrices = exports.pythPriceServiceConnection = exports.API_ENDPOINT = 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;
@@ -2,206 +2,6 @@ export type Perpetuals = {
2
2
  "version": "0.1.0";
3
3
  "name": "perpetuals";
4
4
  "instructions": [
5
- {
6
- "name": "aaaSetCustody";
7
- "accounts": [
8
- {
9
- "name": "payer";
10
- "isMut": true;
11
- "isSigner": true;
12
- },
13
- {
14
- "name": "transferAuthority";
15
- "isMut": false;
16
- "isSigner": false;
17
- },
18
- {
19
- "name": "pool";
20
- "isMut": false;
21
- "isSigner": false;
22
- },
23
- {
24
- "name": "custody";
25
- "isMut": true;
26
- "isSigner": false;
27
- },
28
- {
29
- "name": "custodyTokenAccount";
30
- "isMut": true;
31
- "isSigner": false;
32
- },
33
- {
34
- "name": "intOracleAccount";
35
- "isMut": true;
36
- "isSigner": false;
37
- },
38
- {
39
- "name": "custodyTokenMint";
40
- "isMut": false;
41
- "isSigner": false;
42
- },
43
- {
44
- "name": "systemProgram";
45
- "isMut": false;
46
- "isSigner": false;
47
- },
48
- {
49
- "name": "tokenProgram";
50
- "isMut": false;
51
- "isSigner": false;
52
- }
53
- ];
54
- "args": [
55
- {
56
- "name": "params";
57
- "type": {
58
- "defined": "AaaSetCustodyParams";
59
- };
60
- }
61
- ];
62
- },
63
- {
64
- "name": "aaaSetMarket";
65
- "accounts": [
66
- {
67
- "name": "payer";
68
- "isMut": true;
69
- "isSigner": true;
70
- },
71
- {
72
- "name": "pool";
73
- "isMut": false;
74
- "isSigner": false;
75
- },
76
- {
77
- "name": "market";
78
- "isMut": true;
79
- "isSigner": false;
80
- },
81
- {
82
- "name": "targetCustody";
83
- "isMut": false;
84
- "isSigner": false;
85
- },
86
- {
87
- "name": "collateralCustody";
88
- "isMut": false;
89
- "isSigner": false;
90
- }
91
- ];
92
- "args": [
93
- {
94
- "name": "params";
95
- "type": {
96
- "defined": "AaaSetMarketParams";
97
- };
98
- }
99
- ];
100
- },
101
- {
102
- "name": "aaaMintClp";
103
- "accounts": [
104
- {
105
- "name": "owner";
106
- "isMut": true;
107
- "isSigner": true;
108
- },
109
- {
110
- "name": "compoundingTokenAccount";
111
- "isMut": true;
112
- "isSigner": false;
113
- },
114
- {
115
- "name": "lpTokenAccount";
116
- "isMut": true;
117
- "isSigner": false;
118
- },
119
- {
120
- "name": "transferAuthority";
121
- "isMut": false;
122
- "isSigner": false;
123
- },
124
- {
125
- "name": "perpetuals";
126
- "isMut": false;
127
- "isSigner": false;
128
- },
129
- {
130
- "name": "pool";
131
- "isMut": true;
132
- "isSigner": false;
133
- },
134
- {
135
- "name": "lpTokenMint";
136
- "isMut": true;
137
- "isSigner": false;
138
- },
139
- {
140
- "name": "compoundingTokenMint";
141
- "isMut": true;
142
- "isSigner": false;
143
- },
144
- {
145
- "name": "tokenProgram";
146
- "isMut": false;
147
- "isSigner": false;
148
- },
149
- {
150
- "name": "systemProgram";
151
- "isMut": false;
152
- "isSigner": false;
153
- },
154
- {
155
- "name": "associatedTokenProgram";
156
- "isMut": false;
157
- "isSigner": false;
158
- }
159
- ];
160
- "args": [
161
- {
162
- "name": "params";
163
- "type": {
164
- "defined": "AaaMintClpParams";
165
- };
166
- }
167
- ];
168
- },
169
- {
170
- "name": "aaaCopy";
171
- "accounts": [
172
- {
173
- "name": "payer";
174
- "isMut": true;
175
- "isSigner": true;
176
- },
177
- {
178
- "name": "source";
179
- "isMut": false;
180
- "isSigner": false;
181
- },
182
- {
183
- "name": "destination";
184
- "isMut": true;
185
- "isSigner": false;
186
- },
187
- {
188
- "name": "target";
189
- "isMut": false;
190
- "isSigner": false;
191
- },
192
- {
193
- "name": "collateral";
194
- "isMut": false;
195
- "isSigner": false;
196
- },
197
- {
198
- "name": "systemProgram";
199
- "isMut": false;
200
- "isSigner": false;
201
- }
202
- ];
203
- "args": [];
204
- },
205
5
  {
206
6
  "name": "init";
207
7
  "accounts": [
@@ -8356,46 +8156,6 @@ export type Perpetuals = {
8356
8156
  }
8357
8157
  ];
8358
8158
  "types": [
8359
- {
8360
- "name": "AaaMintClpParams";
8361
- "type": {
8362
- "kind": "struct";
8363
- "fields": [
8364
- {
8365
- "name": "lpAmount";
8366
- "type": "u64";
8367
- },
8368
- {
8369
- "name": "cAmount";
8370
- "type": "u64";
8371
- }
8372
- ];
8373
- };
8374
- },
8375
- {
8376
- "name": "AaaSetCustodyParams";
8377
- "type": {
8378
- "kind": "struct";
8379
- "fields": [
8380
- {
8381
- "name": "rand";
8382
- "type": "u8";
8383
- }
8384
- ];
8385
- };
8386
- },
8387
- {
8388
- "name": "AaaSetMarketParams";
8389
- "type": {
8390
- "kind": "struct";
8391
- "fields": [
8392
- {
8393
- "name": "rand";
8394
- "type": "u8";
8395
- }
8396
- ];
8397
- };
8398
- },
8399
8159
  {
8400
8160
  "name": "AddCollateralParams";
8401
8161
  "type": {