@sonarwatch/portfolio-plugins 0.14.42 → 0.14.44
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.
- package/CHANGELOG.md +8 -0
- package/package.json +1 -1
- package/src/plugins/drift/perpHelpers/pyth.js +2 -2
- package/src/plugins/drift/perpHelpers/pyth.js.map +1 -1
- package/src/plugins/flash/index.js +5 -2
- package/src/plugins/flash/index.js.map +1 -1
- package/src/plugins/flash/perpetualFetcher.js +10 -4
- package/src/plugins/flash/perpetualFetcher.js.map +1 -1
- package/src/plugins/flash/structs.d.ts +9 -0
- package/src/plugins/flash/structs.js +9 -1
- package/src/plugins/flash/structs.js.map +1 -1
- package/src/plugins/jupiter/types.d.ts +1 -1
- package/src/plugins/pyth/pricingJob.js +142 -9
- package/src/plugins/pyth/pricingJob.js.map +1 -1
- package/src/plugins/symmetry/basketsJob.js +0 -15
- package/src/plugins/symmetry/basketsJob.js.map +1 -1
- package/src/plugins/symmetry/structs.d.ts +5 -2
- package/src/plugins/symmetry/structs.js +4 -1
- package/src/plugins/symmetry/structs.js.map +1 -1
- package/src/utils/solana/pyth/helpers.d.ts +0 -11
- package/src/utils/solana/pyth/helpers.js +7 -232
- package/src/utils/solana/pyth/helpers.js.map +1 -1
- package/src/utils/solana/pyth/helpersOld.d.ts +3 -0
- package/src/utils/solana/pyth/helpersOld.js +154 -0
- package/src/utils/solana/pyth/helpersOld.js.map +1 -0
- package/src/utils/solana/pyth/structs.d.ts +26 -95
- package/src/utils/solana/pyth/structs.js +27 -32
- package/src/utils/solana/pyth/structs.js.map +1 -1
- package/src/utils/solana/pyth/structsOld.d.ts +97 -0
- package/src/utils/solana/pyth/structsOld.js +35 -0
- package/src/utils/solana/pyth/structsOld.js.map +1 -0
@@ -9,237 +9,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
9
9
|
});
|
10
10
|
};
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
exports.getPythTokenPriceSources = exports.getPythPrice = exports.getPythPrices = exports.getPythPricesAsMap =
|
13
|
-
const web3_js_1 = require("@solana/web3.js");
|
14
|
-
const structs_1 = require("./structs");
|
15
|
-
const readBig_1 = require("./readBig");
|
16
|
-
const getMultipleAccountsInfoSafe_1 = require("../getMultipleAccountsInfoSafe");
|
12
|
+
exports.getPythTokenPriceSources = exports.getPythPrice = exports.getPythPrices = exports.getPythPricesAsMap = void 0;
|
17
13
|
const constants_1 = require("../../../plugins/tokens/constants");
|
18
|
-
|
19
|
-
|
20
|
-
exports.Version = exports.Version2;
|
21
|
-
/** Number of slots that can pass before a publisher's price is no longer included in the aggregate. */
|
22
|
-
exports.MAX_SLOT_DIFFERENCE = 25;
|
23
|
-
const empty32Buffer = Buffer.alloc(32);
|
24
|
-
const PKorNull = (data) => data.equals(empty32Buffer) ? null : new web3_js_1.PublicKey(data);
|
25
|
-
function parseBaseData(data) {
|
26
|
-
// data is too short to have the magic number.
|
27
|
-
if (data.byteLength < 4) {
|
28
|
-
return undefined;
|
29
|
-
}
|
30
|
-
const magic = data.readUInt32LE(0);
|
31
|
-
if (magic === exports.Magic) {
|
32
|
-
// program version
|
33
|
-
const version = data.readUInt32LE(4);
|
34
|
-
// account type
|
35
|
-
const type = data.readUInt32LE(8);
|
36
|
-
// account used size
|
37
|
-
const size = data.readUInt32LE(12);
|
38
|
-
return { magic, version, type, size };
|
39
|
-
}
|
40
|
-
return undefined;
|
41
|
-
}
|
42
|
-
exports.parseBaseData = parseBaseData;
|
43
|
-
const parseMappingData = (data) => {
|
44
|
-
// pyth magic number
|
45
|
-
const magic = data.readUInt32LE(0);
|
46
|
-
// program version
|
47
|
-
const version = data.readUInt32LE(4);
|
48
|
-
// account type
|
49
|
-
const type = data.readUInt32LE(8);
|
50
|
-
// account used size
|
51
|
-
const size = data.readUInt32LE(12);
|
52
|
-
// number of product accounts
|
53
|
-
const numProducts = data.readUInt32LE(16);
|
54
|
-
// unused
|
55
|
-
// const unused = accountInfo.data.readUInt32LE(20)
|
56
|
-
// next mapping account (if any)
|
57
|
-
const nextMappingAccount = PKorNull(data.slice(24, 56));
|
58
|
-
// read each symbol account
|
59
|
-
let offset = 56;
|
60
|
-
const productAccountKeys = [];
|
61
|
-
for (let i = 0; i < numProducts; i++) {
|
62
|
-
const productAccountBytes = data.slice(offset, offset + 32);
|
63
|
-
const productAccountKey = new web3_js_1.PublicKey(productAccountBytes);
|
64
|
-
offset += 32;
|
65
|
-
productAccountKeys.push(productAccountKey);
|
66
|
-
}
|
67
|
-
return {
|
68
|
-
magic,
|
69
|
-
version,
|
70
|
-
type,
|
71
|
-
size,
|
72
|
-
nextMappingAccount,
|
73
|
-
productAccountKeys,
|
74
|
-
};
|
75
|
-
};
|
76
|
-
exports.parseMappingData = parseMappingData;
|
77
|
-
const parsePriceInfo = (data, exponent) => {
|
78
|
-
// aggregate price
|
79
|
-
const priceComponent = (0, readBig_1.readBigInt64LE)(data, 0);
|
80
|
-
const price = Number(priceComponent) * Math.pow(10, exponent);
|
81
|
-
// aggregate confidence
|
82
|
-
const confidenceComponent = (0, readBig_1.readBigUInt64LE)(data, 8);
|
83
|
-
const confidence = Number(confidenceComponent) * Math.pow(10, exponent);
|
84
|
-
// aggregate status
|
85
|
-
const status = data.readUInt32LE(16);
|
86
|
-
// aggregate corporate action
|
87
|
-
const corporateAction = data.readUInt32LE(20);
|
88
|
-
// aggregate publish slot. It is converted to number to be consistent with Solana's library interface (Slot there is number)
|
89
|
-
const publishSlot = Number((0, readBig_1.readBigUInt64LE)(data, 24));
|
90
|
-
return {
|
91
|
-
priceComponent,
|
92
|
-
price,
|
93
|
-
confidenceComponent,
|
94
|
-
confidence,
|
95
|
-
status,
|
96
|
-
corporateAction,
|
97
|
-
publishSlot,
|
98
|
-
};
|
99
|
-
};
|
100
|
-
const parseEma = (data, exponent) => {
|
101
|
-
// current value of ema
|
102
|
-
const valueComponent = (0, readBig_1.readBigInt64LE)(data, 0);
|
103
|
-
const value = Number(valueComponent) * Math.pow(10, exponent);
|
104
|
-
// numerator state for next update
|
105
|
-
const numerator = (0, readBig_1.readBigInt64LE)(data, 8);
|
106
|
-
// denominator state for next update
|
107
|
-
const denominator = (0, readBig_1.readBigInt64LE)(data, 16);
|
108
|
-
return { valueComponent, value, numerator, denominator };
|
109
|
-
};
|
110
|
-
// Provide currentSlot when available to allow status to consider the case when price goes stale. It is optional because
|
111
|
-
// it requires an extra request to get it when it is not available which is not always efficient.
|
112
|
-
const parsePriceData = (data, currentSlot) => {
|
113
|
-
// pyth magic number
|
114
|
-
const magic = data.readUInt32LE(0);
|
115
|
-
// program version
|
116
|
-
const version = data.readUInt32LE(4);
|
117
|
-
// account type
|
118
|
-
const type = data.readUInt32LE(8);
|
119
|
-
// price account size
|
120
|
-
const size = data.readUInt32LE(12);
|
121
|
-
// price or calculation type
|
122
|
-
const priceType = data.readUInt32LE(16);
|
123
|
-
// price exponent
|
124
|
-
const exponent = data.readInt32LE(20);
|
125
|
-
// number of component prices
|
126
|
-
const numComponentPrices = data.readUInt32LE(24);
|
127
|
-
// number of quoters that make up aggregate
|
128
|
-
const numQuoters = data.readUInt32LE(28);
|
129
|
-
// slot of last valid (not unknown) aggregate price
|
130
|
-
const lastSlot = (0, readBig_1.readBigUInt64LE)(data, 32);
|
131
|
-
// valid on-chain slot of aggregate price
|
132
|
-
const validSlot = (0, readBig_1.readBigUInt64LE)(data, 40);
|
133
|
-
// exponential moving average price
|
134
|
-
const emaPrice = parseEma(data.slice(48, 72), exponent);
|
135
|
-
// exponential moving average confidence interval
|
136
|
-
const emaConfidence = parseEma(data.slice(72, 96), exponent);
|
137
|
-
// timestamp of the current price
|
138
|
-
const timestamp = (0, readBig_1.readBigInt64LE)(data, 96);
|
139
|
-
// minimum number of publishers for status to be TRADING
|
140
|
-
const minPublishers = data.readUInt8(104);
|
141
|
-
// space for future derived values
|
142
|
-
const drv2 = data.readInt8(105);
|
143
|
-
// space for future derived values
|
144
|
-
const drv3 = data.readInt16LE(106);
|
145
|
-
// space for future derived values
|
146
|
-
const drv4 = data.readInt32LE(108);
|
147
|
-
// product id / reference account
|
148
|
-
const productAccountKey = new web3_js_1.PublicKey(data.slice(112, 144));
|
149
|
-
// next price account in list
|
150
|
-
const nextPriceAccountKey = PKorNull(data.slice(144, 176));
|
151
|
-
// valid slot of previous update
|
152
|
-
const previousSlot = (0, readBig_1.readBigUInt64LE)(data, 176);
|
153
|
-
// aggregate price of previous update
|
154
|
-
const previousPriceComponent = (0, readBig_1.readBigInt64LE)(data, 184);
|
155
|
-
const previousPrice = Number(previousPriceComponent) * Math.pow(10, exponent);
|
156
|
-
// confidence interval of previous update
|
157
|
-
const previousConfidenceComponent = (0, readBig_1.readBigUInt64LE)(data, 192);
|
158
|
-
const previousConfidence = Number(previousConfidenceComponent) * Math.pow(10, exponent);
|
159
|
-
// space for future derived values
|
160
|
-
const previousTimestamp = (0, readBig_1.readBigInt64LE)(data, 200);
|
161
|
-
const aggregate = parsePriceInfo(data.slice(208, 240), exponent);
|
162
|
-
let { status } = aggregate;
|
163
|
-
if (currentSlot && status === structs_1.PriceStatus.Trading) {
|
164
|
-
if (currentSlot - aggregate.publishSlot > exports.MAX_SLOT_DIFFERENCE) {
|
165
|
-
status = structs_1.PriceStatus.Unknown;
|
166
|
-
}
|
167
|
-
}
|
168
|
-
let price;
|
169
|
-
let confidence;
|
170
|
-
if (status === structs_1.PriceStatus.Trading) {
|
171
|
-
price = aggregate.price;
|
172
|
-
confidence = aggregate.confidence;
|
173
|
-
}
|
174
|
-
// price components - up to 32
|
175
|
-
const priceComponents = [];
|
176
|
-
let offset = 240;
|
177
|
-
while (priceComponents.length < numComponentPrices) {
|
178
|
-
const publisher = new web3_js_1.PublicKey(data.slice(offset, offset + 32));
|
179
|
-
offset += 32;
|
180
|
-
const componentAggregate = parsePriceInfo(data.slice(offset, offset + 32), exponent);
|
181
|
-
offset += 32;
|
182
|
-
const latest = parsePriceInfo(data.slice(offset, offset + 32), exponent);
|
183
|
-
offset += 32;
|
184
|
-
priceComponents.push({ publisher, aggregate: componentAggregate, latest });
|
185
|
-
}
|
186
|
-
return {
|
187
|
-
magic,
|
188
|
-
version,
|
189
|
-
type,
|
190
|
-
size,
|
191
|
-
priceType,
|
192
|
-
exponent,
|
193
|
-
numComponentPrices,
|
194
|
-
numQuoters,
|
195
|
-
lastSlot,
|
196
|
-
validSlot,
|
197
|
-
emaPrice,
|
198
|
-
emaConfidence,
|
199
|
-
timestamp,
|
200
|
-
minPublishers,
|
201
|
-
drv2,
|
202
|
-
drv3,
|
203
|
-
drv4,
|
204
|
-
productAccountKey,
|
205
|
-
nextPriceAccountKey,
|
206
|
-
previousSlot,
|
207
|
-
previousPriceComponent,
|
208
|
-
previousPrice,
|
209
|
-
previousConfidenceComponent,
|
210
|
-
previousConfidence,
|
211
|
-
previousTimestamp,
|
212
|
-
aggregate,
|
213
|
-
priceComponents,
|
214
|
-
price,
|
215
|
-
confidence,
|
216
|
-
status,
|
217
|
-
};
|
218
|
-
};
|
219
|
-
exports.parsePriceData = parsePriceData;
|
220
|
-
const parsePermissionData = (data) => {
|
221
|
-
// pyth magic number
|
222
|
-
const magic = data.readUInt32LE(0);
|
223
|
-
// program version
|
224
|
-
const version = data.readUInt32LE(4);
|
225
|
-
// account type
|
226
|
-
const type = data.readUInt32LE(8);
|
227
|
-
// price account size
|
228
|
-
const size = data.readUInt32LE(12);
|
229
|
-
const masterAuthority = new web3_js_1.PublicKey(data.slice(16, 48));
|
230
|
-
const dataCurationAuthority = new web3_js_1.PublicKey(data.slice(48, 80));
|
231
|
-
const securityAuthority = new web3_js_1.PublicKey(data.slice(80, 112));
|
232
|
-
return {
|
233
|
-
magic,
|
234
|
-
version,
|
235
|
-
type,
|
236
|
-
size,
|
237
|
-
masterAuthority,
|
238
|
-
dataCurationAuthority,
|
239
|
-
securityAuthority,
|
240
|
-
};
|
241
|
-
};
|
242
|
-
exports.parsePermissionData = parsePermissionData;
|
14
|
+
const getParsedMultipleAccountsInfo_1 = require("../getParsedMultipleAccountsInfo");
|
15
|
+
const structs_1 = require("./structs");
|
243
16
|
function getPythPricesAsMap(connection, feedAddresses) {
|
244
17
|
return __awaiter(this, void 0, void 0, function* () {
|
245
18
|
const prices = yield getPythPrices(connection, feedAddresses);
|
@@ -255,11 +28,13 @@ function getPythPricesAsMap(connection, feedAddresses) {
|
|
255
28
|
exports.getPythPricesAsMap = getPythPricesAsMap;
|
256
29
|
function getPythPrices(connection, feedAddresses) {
|
257
30
|
return __awaiter(this, void 0, void 0, function* () {
|
258
|
-
const accounts = yield (0,
|
31
|
+
const accounts = yield (0, getParsedMultipleAccountsInfo_1.getParsedMultipleAccountsInfo)(connection, structs_1.priceUpdateV2Struct, feedAddresses);
|
259
32
|
return accounts.map((acc) => {
|
260
33
|
if (!acc)
|
261
34
|
return null;
|
262
|
-
return
|
35
|
+
return acc.priceMessage.price
|
36
|
+
.times(Math.pow(10, acc.priceMessage.exponent))
|
37
|
+
.toNumber();
|
263
38
|
});
|
264
39
|
});
|
265
40
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/utils/solana/pyth/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/utils/solana/pyth/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,iEAAyE;AACzE,oFAAiF;AACjF,uCAAgD;AAEhD,SAAsB,kBAAkB,CACtC,UAAwB,EACxB,aAA0B;;QAE1B,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;QAC9D,MAAM,QAAQ,GAAwB,IAAI,GAAG,EAAE,CAAC;QAChD,aAAa,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC,EAAE,EAAE;YACvC,MAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YACxB,IAA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O,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;gBACrC,OAAO,EAAE,KAAK,CAAC,IAAI;gBACnB,EAAE,EAAE,aAAa,QAAQ,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE;gBAC9C,QAAQ,EAAE,KAAK,CAAC,QAAQ;gBACxB,SAAS,EAAE,KAAK,CAAC,UAAU;gBAC3B,UAAU,EAAE,KAAK,CAAC,UAAU,IAAI,gCAAoB,CAAC,EAAE;gBACvD,KAAK;gBACL,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;gBACrB,MAAM,EAAE,GAAG;aACZ,CAAC,CAAC,CAAC;QACN,CAAC,CAAC;aACD,IAAI,EAAE,CAAC;IACZ,CAAC;CAAA;AA1BD,4DA0BC"}
|
@@ -0,0 +1,154 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.parsePriceData = void 0;
|
4
|
+
const web3_js_1 = require("@solana/web3.js");
|
5
|
+
const structsOld_1 = require("./structsOld");
|
6
|
+
const readBig_1 = require("./readBig");
|
7
|
+
/** Number of slots that can pass before a publisher's price is no longer included in the aggregate. */
|
8
|
+
const MAX_SLOT_DIFFERENCE = 25;
|
9
|
+
const empty32Buffer = Buffer.alloc(32);
|
10
|
+
const PKorNull = (data) => data.equals(empty32Buffer) ? null : new web3_js_1.PublicKey(data);
|
11
|
+
const parsePriceInfo = (data, exponent) => {
|
12
|
+
// aggregate price
|
13
|
+
const priceComponent = (0, readBig_1.readBigInt64LE)(data, 0);
|
14
|
+
const price = Number(priceComponent) * Math.pow(10, exponent);
|
15
|
+
// aggregate confidence
|
16
|
+
const confidenceComponent = (0, readBig_1.readBigUInt64LE)(data, 8);
|
17
|
+
const confidence = Number(confidenceComponent) * Math.pow(10, exponent);
|
18
|
+
// aggregate status
|
19
|
+
const status = data.readUInt32LE(16);
|
20
|
+
// aggregate corporate action
|
21
|
+
const corporateAction = data.readUInt32LE(20);
|
22
|
+
// aggregate publish slot. It is converted to number to be consistent with Solana's library interface (Slot there is number)
|
23
|
+
const publishSlot = Number((0, readBig_1.readBigUInt64LE)(data, 24));
|
24
|
+
return {
|
25
|
+
priceComponent,
|
26
|
+
price,
|
27
|
+
confidenceComponent,
|
28
|
+
confidence,
|
29
|
+
status,
|
30
|
+
corporateAction,
|
31
|
+
publishSlot,
|
32
|
+
};
|
33
|
+
};
|
34
|
+
const parseEma = (data, exponent) => {
|
35
|
+
// current value of ema
|
36
|
+
const valueComponent = (0, readBig_1.readBigInt64LE)(data, 0);
|
37
|
+
const value = Number(valueComponent) * Math.pow(10, exponent);
|
38
|
+
// numerator state for next update
|
39
|
+
const numerator = (0, readBig_1.readBigInt64LE)(data, 8);
|
40
|
+
// denominator state for next update
|
41
|
+
const denominator = (0, readBig_1.readBigInt64LE)(data, 16);
|
42
|
+
return { valueComponent, value, numerator, denominator };
|
43
|
+
};
|
44
|
+
// Provide currentSlot when available to allow status to consider the case when price goes stale. It is optional because
|
45
|
+
// it requires an extra request to get it when it is not available which is not always efficient.
|
46
|
+
const parsePriceData = (data, currentSlot) => {
|
47
|
+
// pyth magic number
|
48
|
+
const magic = data.readUInt32LE(0);
|
49
|
+
// program version
|
50
|
+
const version = data.readUInt32LE(4);
|
51
|
+
// account type
|
52
|
+
const type = data.readUInt32LE(8);
|
53
|
+
// price account size
|
54
|
+
const size = data.readUInt32LE(12);
|
55
|
+
// price or calculation type
|
56
|
+
const priceType = data.readUInt32LE(16);
|
57
|
+
// price exponent
|
58
|
+
const exponent = data.readInt32LE(20);
|
59
|
+
// number of component prices
|
60
|
+
const numComponentPrices = data.readUInt32LE(24);
|
61
|
+
// number of quoters that make up aggregate
|
62
|
+
const numQuoters = data.readUInt32LE(28);
|
63
|
+
// slot of last valid (not unknown) aggregate price
|
64
|
+
const lastSlot = (0, readBig_1.readBigUInt64LE)(data, 32);
|
65
|
+
// valid on-chain slot of aggregate price
|
66
|
+
const validSlot = (0, readBig_1.readBigUInt64LE)(data, 40);
|
67
|
+
// exponential moving average price
|
68
|
+
const emaPrice = parseEma(data.slice(48, 72), exponent);
|
69
|
+
// exponential moving average confidence interval
|
70
|
+
const emaConfidence = parseEma(data.slice(72, 96), exponent);
|
71
|
+
// timestamp of the current price
|
72
|
+
const timestamp = (0, readBig_1.readBigInt64LE)(data, 96);
|
73
|
+
// minimum number of publishers for status to be TRADING
|
74
|
+
const minPublishers = data.readUInt8(104);
|
75
|
+
// space for future derived values
|
76
|
+
const drv2 = data.readInt8(105);
|
77
|
+
// space for future derived values
|
78
|
+
const drv3 = data.readInt16LE(106);
|
79
|
+
// space for future derived values
|
80
|
+
const drv4 = data.readInt32LE(108);
|
81
|
+
// product id / reference account
|
82
|
+
const productAccountKey = new web3_js_1.PublicKey(data.slice(112, 144));
|
83
|
+
// next price account in list
|
84
|
+
const nextPriceAccountKey = PKorNull(data.slice(144, 176));
|
85
|
+
// valid slot of previous update
|
86
|
+
const previousSlot = (0, readBig_1.readBigUInt64LE)(data, 176);
|
87
|
+
// aggregate price of previous update
|
88
|
+
const previousPriceComponent = (0, readBig_1.readBigInt64LE)(data, 184);
|
89
|
+
const previousPrice = Number(previousPriceComponent) * Math.pow(10, exponent);
|
90
|
+
// confidence interval of previous update
|
91
|
+
const previousConfidenceComponent = (0, readBig_1.readBigUInt64LE)(data, 192);
|
92
|
+
const previousConfidence = Number(previousConfidenceComponent) * Math.pow(10, exponent);
|
93
|
+
// space for future derived values
|
94
|
+
const previousTimestamp = (0, readBig_1.readBigInt64LE)(data, 200);
|
95
|
+
const aggregate = parsePriceInfo(data.slice(208, 240), exponent);
|
96
|
+
let { status } = aggregate;
|
97
|
+
if (currentSlot && status === structsOld_1.PriceStatus.Trading) {
|
98
|
+
if (currentSlot - aggregate.publishSlot > MAX_SLOT_DIFFERENCE) {
|
99
|
+
status = structsOld_1.PriceStatus.Unknown;
|
100
|
+
}
|
101
|
+
}
|
102
|
+
let price;
|
103
|
+
let confidence;
|
104
|
+
if (status === structsOld_1.PriceStatus.Trading) {
|
105
|
+
price = aggregate.price;
|
106
|
+
confidence = aggregate.confidence;
|
107
|
+
}
|
108
|
+
// price components - up to 32
|
109
|
+
const priceComponents = [];
|
110
|
+
let offset = 240;
|
111
|
+
while (priceComponents.length < numComponentPrices) {
|
112
|
+
const publisher = new web3_js_1.PublicKey(data.slice(offset, offset + 32));
|
113
|
+
offset += 32;
|
114
|
+
const componentAggregate = parsePriceInfo(data.slice(offset, offset + 32), exponent);
|
115
|
+
offset += 32;
|
116
|
+
const latest = parsePriceInfo(data.slice(offset, offset + 32), exponent);
|
117
|
+
offset += 32;
|
118
|
+
priceComponents.push({ publisher, aggregate: componentAggregate, latest });
|
119
|
+
}
|
120
|
+
return {
|
121
|
+
magic,
|
122
|
+
version,
|
123
|
+
type,
|
124
|
+
size,
|
125
|
+
priceType,
|
126
|
+
exponent,
|
127
|
+
numComponentPrices,
|
128
|
+
numQuoters,
|
129
|
+
lastSlot,
|
130
|
+
validSlot,
|
131
|
+
emaPrice,
|
132
|
+
emaConfidence,
|
133
|
+
timestamp,
|
134
|
+
minPublishers,
|
135
|
+
drv2,
|
136
|
+
drv3,
|
137
|
+
drv4,
|
138
|
+
productAccountKey,
|
139
|
+
nextPriceAccountKey,
|
140
|
+
previousSlot,
|
141
|
+
previousPriceComponent,
|
142
|
+
previousPrice,
|
143
|
+
previousConfidenceComponent,
|
144
|
+
previousConfidence,
|
145
|
+
previousTimestamp,
|
146
|
+
aggregate,
|
147
|
+
priceComponents,
|
148
|
+
price,
|
149
|
+
confidence,
|
150
|
+
status,
|
151
|
+
};
|
152
|
+
};
|
153
|
+
exports.parsePriceData = parsePriceData;
|
154
|
+
//# sourceMappingURL=helpersOld.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"helpersOld.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/utils/solana/pyth/helpersOld.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAC5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AK,CAAC,MAAM,EAAE,MAAM,GAAG,EAAE,CAAC,EAC/B,QAAQ,CACT,CAAC;QACF,MAAM,IAAI,EAAE,CAAC;QACb,MAAM,MAAM,GAAG,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC;QACzE,MAAM,IAAI,EAAE,CAAC;QACb,eAAe,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED,OAAO;QACL,KAAK;QACL,OAAO;QACP,IAAI;QACJ,IAAI;QACJ,SAAS;QACT,QAAQ;QACR,kBAAkB;QAClB,UAAU;QACV,QAAQ;QACR,SAAS;QACT,QAAQ;QACR,aAAa;QACb,SAAS;QACT,aAAa;QACb,IAAI;QACJ,IAAI;QACJ,IAAI;QACJ,iBAAiB;QACjB,mBAAmB;QACnB,YAAY;QACZ,sBAAsB;QACtB,aAAa;QACb,2BAA2B;QAC3B,kBAAkB;QAClB,iBAAiB;QACjB,SAAS;QACT,eAAe;QACf,KAAK;QACL,UAAU;QACV,MAAM;KACP,CAAC;AACJ,CAAC,CAAC;AAtHW,QAAA,cAAc,kBAsHzB"}
|
@@ -1,97 +1,28 @@
|
|
1
|
+
/// <reference types="node" />
|
2
|
+
import { BeetStruct } from '@metaplex-foundation/beet';
|
3
|
+
import BigNumber from 'bignumber.js';
|
1
4
|
import { PublicKey } from '@solana/web3.js';
|
2
|
-
export
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
Ignored = 4
|
8
|
-
}
|
9
|
-
export declare enum CorpAction {
|
10
|
-
NoCorpAct = 0
|
11
|
-
}
|
12
|
-
export declare enum PriceType {
|
13
|
-
Unknown = 0,
|
14
|
-
Price = 1
|
15
|
-
}
|
16
|
-
export declare enum DeriveType {
|
17
|
-
Unknown = 0,
|
18
|
-
Volatility = 1
|
19
|
-
}
|
20
|
-
export declare enum AccountType {
|
21
|
-
Unknown = 0,
|
22
|
-
Mapping = 1,
|
23
|
-
Product = 2,
|
24
|
-
Price = 3,
|
25
|
-
Test = 4,
|
26
|
-
Permission = 5
|
27
|
-
}
|
28
|
-
export type Base = {
|
29
|
-
magic: number;
|
30
|
-
version: number;
|
31
|
-
type: AccountType;
|
32
|
-
size: number;
|
33
|
-
};
|
34
|
-
export type MappingData = Base & {
|
35
|
-
nextMappingAccount: PublicKey | null;
|
36
|
-
productAccountKeys: PublicKey[];
|
37
|
-
};
|
38
|
-
export type Product = {
|
39
|
-
[index: string]: string;
|
40
|
-
};
|
41
|
-
export type ProductData = Base & {
|
42
|
-
priceAccountKey: PublicKey | null;
|
43
|
-
product: Product;
|
44
|
-
};
|
45
|
-
export type Price = {
|
46
|
-
priceComponent: bigint;
|
47
|
-
price: number;
|
48
|
-
confidenceComponent: bigint;
|
49
|
-
confidence: number;
|
50
|
-
status: PriceStatus;
|
51
|
-
corporateAction: CorpAction;
|
52
|
-
publishSlot: number;
|
53
|
-
};
|
54
|
-
export type PriceComponent = {
|
55
|
-
publisher: PublicKey;
|
56
|
-
aggregate: Price;
|
57
|
-
latest: Price;
|
58
|
-
};
|
59
|
-
export type Ema = {
|
60
|
-
valueComponent: bigint;
|
61
|
-
value: number;
|
62
|
-
numerator: bigint;
|
63
|
-
denominator: bigint;
|
64
|
-
};
|
65
|
-
export type PriceData = Base & {
|
66
|
-
priceType: PriceType;
|
5
|
+
export type PriceFeedMessage = {
|
6
|
+
buffer: Buffer;
|
7
|
+
feedId: number[];
|
8
|
+
price: BigNumber;
|
9
|
+
conf: BigNumber;
|
67
10
|
exponent: number;
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
previousTimestamp: bigint;
|
87
|
-
priceComponents: PriceComponent[];
|
88
|
-
aggregate: Price;
|
89
|
-
price: number | undefined;
|
90
|
-
confidence: number | undefined;
|
91
|
-
status: PriceStatus;
|
92
|
-
};
|
93
|
-
export type PermissionData = Base & {
|
94
|
-
masterAuthority: PublicKey;
|
95
|
-
dataCurationAuthority: PublicKey;
|
96
|
-
securityAuthority: PublicKey;
|
97
|
-
};
|
11
|
+
publishTime: BigNumber;
|
12
|
+
prevPublishTime: BigNumber;
|
13
|
+
emaPrice: BigNumber;
|
14
|
+
emaConf: BigNumber;
|
15
|
+
};
|
16
|
+
export declare const priceFeedMessageStruct: BeetStruct<PriceFeedMessage, Partial<PriceFeedMessage>>;
|
17
|
+
export declare enum VerificationLevel {
|
18
|
+
Partial = 0,
|
19
|
+
Full = 1
|
20
|
+
}
|
21
|
+
export type PriceUpdateV2 = {
|
22
|
+
writeAuthority: PublicKey;
|
23
|
+
verificationLevel: VerificationLevel;
|
24
|
+
priceMessage: PriceFeedMessage;
|
25
|
+
postedSlot: BigNumber;
|
26
|
+
overlapAmount: BigNumber;
|
27
|
+
};
|
28
|
+
export declare const priceUpdateV2Struct: BeetStruct<PriceUpdateV2, Partial<PriceUpdateV2>>;
|
@@ -1,35 +1,30 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
AccountType[AccountType["Product"] = 2] = "Product";
|
31
|
-
AccountType[AccountType["Price"] = 3] = "Price";
|
32
|
-
AccountType[AccountType["Test"] = 4] = "Test";
|
33
|
-
AccountType[AccountType["Permission"] = 5] = "Permission";
|
34
|
-
})(AccountType || (exports.AccountType = AccountType = {}));
|
3
|
+
exports.priceUpdateV2Struct = exports.VerificationLevel = exports.priceFeedMessageStruct = void 0;
|
4
|
+
const beet_1 = require("@metaplex-foundation/beet");
|
5
|
+
const beet_solana_1 = require("@metaplex-foundation/beet-solana");
|
6
|
+
const numbers_1 = require("../beets/numbers");
|
7
|
+
const buffers_1 = require("../beets/buffers");
|
8
|
+
exports.priceFeedMessageStruct = new beet_1.BeetStruct([
|
9
|
+
['buffer', (0, buffers_1.blob)(8)],
|
10
|
+
['feedId', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 32)],
|
11
|
+
['price', numbers_1.i64],
|
12
|
+
['conf', numbers_1.u64],
|
13
|
+
['exponent', beet_1.i32],
|
14
|
+
['publishTime', numbers_1.i64],
|
15
|
+
['prevPublishTime', numbers_1.i64],
|
16
|
+
['emaPrice', numbers_1.i64],
|
17
|
+
['emaConf', numbers_1.u64],
|
18
|
+
], (args) => args);
|
19
|
+
var VerificationLevel;
|
20
|
+
(function (VerificationLevel) {
|
21
|
+
VerificationLevel[VerificationLevel["Partial"] = 0] = "Partial";
|
22
|
+
VerificationLevel[VerificationLevel["Full"] = 1] = "Full";
|
23
|
+
})(VerificationLevel || (exports.VerificationLevel = VerificationLevel = {}));
|
24
|
+
exports.priceUpdateV2Struct = new beet_1.BeetStruct([
|
25
|
+
['writeAuthority', beet_solana_1.publicKey],
|
26
|
+
['verificationLevel', beet_1.u8],
|
27
|
+
['priceMessage', exports.priceFeedMessageStruct],
|
28
|
+
['postedSlot', numbers_1.u64],
|
29
|
+
], (args) => args);
|
35
30
|
//# sourceMappingURL=structs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/utils/solana/pyth/structs.ts"],"names":[],"mappings":";;;
|
1
|
+
{"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/utils/solana/pyth/structs.ts"],"names":[],"mappings":";;;AAAA,oDAKmC;AAGnC,kEAA6D;AAC7D,8CAA4C;AAC5C,8CAAwC;AAc3B,QAAA,sBAAsB,GAAG,IAAI,iBAAU,CAClD;IACE,CAAC,QAAQ,EAAE,IAAA,cAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,QAAQ,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,EAAE,CAAC,CAAC;IACzC,CAAC,OAAO,EAAE,aAAG,CAAC;IACd,CAAC,MAAM,EAAE,aAAG,CAAC;IACb,CAAC,UAAU,EAAE,UAAG,CAAC;IACjB,CAAC,aAAa,EAAE,aAAG,CAAC;IACpB,CAAC,iBAAiB,EAAE,aAAG,CAAC;IACxB,CAAC,UAAU,EAAE,aAAG,CAAC;IACjB,CAAC,SAAS,EAAE,aAAG,CAAC;CACjB,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAwB,CACnC,CAAC;AAEF,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,+DAAO,CAAA;IACP,yDAAI,CAAA;AACN,CAAC,EAHW,iBAAiB,iCAAjB,iBAAiB,QAG5B;AAUY,QAAA,mBAAmB,GAAG,IAAI,iBAAU,CAC/C;IACE,CAAC,gBAAgB,EAAE,uBAAS,CAAC;IAC7B,CAAC,mBAAmB,EAAE,SAAE,CAAC;IACzB,CAAC,cAAc,EAAE,8BAAsB,CAAC;IACxC,CAAC,YAAY,EAAE,aAAG,CAAC;CACpB,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAqB,CAChC,CAAC"}
|