@chainstream-io/sdk 0.1.18 → 0.1.20
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/README.md +2 -2
- package/dist/{index-BFUtqtnx.d.ts → index-8REU_oTW.d.ts} +46 -6
- package/dist/{index-BOKG4I08.d.cts → index-Rg3zipzv.d.cts} +46 -6
- package/dist/index.cjs +295 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +294 -19
- package/dist/index.mjs.map +1 -1
- package/dist/stream/index.cjs +294 -18
- package/dist/stream/index.cjs.map +1 -1
- package/dist/stream/index.d.cts +1 -1
- package/dist/stream/index.d.ts +1 -1
- package/dist/stream/index.mjs +293 -18
- package/dist/stream/index.mjs.map +1 -1
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @chainstream-io/sdk@0.1.
|
|
1
|
+
## @chainstream-io/sdk@0.1.20
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install @chainstream-io/sdk@0.1.
|
|
39
|
+
npm install @chainstream-io/sdk@0.1.19 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -96,15 +96,54 @@ interface TokenStat {
|
|
|
96
96
|
interface TokenHolder {
|
|
97
97
|
tokenAddress: string;
|
|
98
98
|
holders?: number;
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
top100HoldersAmount?: string;
|
|
100
|
+
top50HoldersAmount?: string;
|
|
101
|
+
top10HoldersAmount?: string;
|
|
101
102
|
top100Holders?: number;
|
|
103
|
+
top50Holders?: number;
|
|
102
104
|
top10Holders?: number;
|
|
103
|
-
|
|
104
|
-
|
|
105
|
+
top100HoldersRatio?: string;
|
|
106
|
+
top50HoldersRatio?: string;
|
|
107
|
+
top10HoldersRatio?: string;
|
|
105
108
|
creatorsHolders?: number;
|
|
106
109
|
creatorsAmount?: string;
|
|
107
110
|
creatorsRatio?: string;
|
|
111
|
+
balanceTagFreshHolders?: number;
|
|
112
|
+
balanceTagFreshAmount?: string;
|
|
113
|
+
balanceTagFreshRatio?: string;
|
|
114
|
+
balanceTagSandwichHolders?: number;
|
|
115
|
+
balanceTagSandwichAmount?: string;
|
|
116
|
+
balanceTagSandwichRatio?: string;
|
|
117
|
+
balanceTagBundleHolders?: number;
|
|
118
|
+
balanceTagBundleAmount?: string;
|
|
119
|
+
balanceTagBundleRatio?: string;
|
|
120
|
+
balanceTagSniperHolders?: number;
|
|
121
|
+
balanceTagSniperAmount?: string;
|
|
122
|
+
balanceTagSniperRatio?: string;
|
|
123
|
+
balanceTagDevHolders?: number;
|
|
124
|
+
balanceTagDevAmount?: string;
|
|
125
|
+
balanceTagDevRatio?: string;
|
|
126
|
+
balanceTagProHolders?: number;
|
|
127
|
+
balanceTagProAmount?: string;
|
|
128
|
+
balanceTagProRatio?: string;
|
|
129
|
+
balanceTagInsiderHolders?: number;
|
|
130
|
+
balanceTagInsiderAmount?: string;
|
|
131
|
+
balanceTagInsiderRatio?: string;
|
|
132
|
+
balanceTagSmartHolders?: number;
|
|
133
|
+
balanceTagSmartAmount?: string;
|
|
134
|
+
balanceTagSmartRatio?: string;
|
|
135
|
+
balanceTagKolHolders?: number;
|
|
136
|
+
balanceTagKolAmount?: string;
|
|
137
|
+
balanceTagKolRatio?: string;
|
|
138
|
+
balanceTagPhishingHolders?: number;
|
|
139
|
+
balanceTagPhishingAmount?: string;
|
|
140
|
+
balanceTagPhishingRatio?: string;
|
|
141
|
+
balanceTagBluechipHolders?: number;
|
|
142
|
+
balanceTagBluechipAmount?: string;
|
|
143
|
+
balanceTagBluechipRatio?: string;
|
|
144
|
+
balanceTagRatHolders?: number;
|
|
145
|
+
balanceTagRatAmount?: string;
|
|
146
|
+
balanceTagRatRatio?: string;
|
|
108
147
|
timestamp: number;
|
|
109
148
|
}
|
|
110
149
|
interface WalletBalance {
|
|
@@ -281,8 +320,9 @@ interface Unsubscrible {
|
|
|
281
320
|
declare class StreamApi {
|
|
282
321
|
private realtimeClient;
|
|
283
322
|
private listenersMap;
|
|
323
|
+
private getTokenValue;
|
|
284
324
|
constructor(context: DexRequestContext);
|
|
285
|
-
connect(): void
|
|
325
|
+
connect(): Promise<void>;
|
|
286
326
|
/**
|
|
287
327
|
* Start batching commands for efficient bulk operations
|
|
288
328
|
* All subscription commands after this call will be batched until stopBatching is called
|
|
@@ -428,7 +468,7 @@ interface DexAggregatorOptions {
|
|
|
428
468
|
serverUrl?: string;
|
|
429
469
|
streamUrl?: string;
|
|
430
470
|
}
|
|
431
|
-
declare const LIB_VERSION = "0.1.
|
|
471
|
+
declare const LIB_VERSION = "0.1.20";
|
|
432
472
|
declare class DexClient {
|
|
433
473
|
readonly requestCtx: DexRequestContext;
|
|
434
474
|
readonly _configuration: Configuration;
|
|
@@ -96,15 +96,54 @@ interface TokenStat {
|
|
|
96
96
|
interface TokenHolder {
|
|
97
97
|
tokenAddress: string;
|
|
98
98
|
holders?: number;
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
top100HoldersAmount?: string;
|
|
100
|
+
top50HoldersAmount?: string;
|
|
101
|
+
top10HoldersAmount?: string;
|
|
101
102
|
top100Holders?: number;
|
|
103
|
+
top50Holders?: number;
|
|
102
104
|
top10Holders?: number;
|
|
103
|
-
|
|
104
|
-
|
|
105
|
+
top100HoldersRatio?: string;
|
|
106
|
+
top50HoldersRatio?: string;
|
|
107
|
+
top10HoldersRatio?: string;
|
|
105
108
|
creatorsHolders?: number;
|
|
106
109
|
creatorsAmount?: string;
|
|
107
110
|
creatorsRatio?: string;
|
|
111
|
+
balanceTagFreshHolders?: number;
|
|
112
|
+
balanceTagFreshAmount?: string;
|
|
113
|
+
balanceTagFreshRatio?: string;
|
|
114
|
+
balanceTagSandwichHolders?: number;
|
|
115
|
+
balanceTagSandwichAmount?: string;
|
|
116
|
+
balanceTagSandwichRatio?: string;
|
|
117
|
+
balanceTagBundleHolders?: number;
|
|
118
|
+
balanceTagBundleAmount?: string;
|
|
119
|
+
balanceTagBundleRatio?: string;
|
|
120
|
+
balanceTagSniperHolders?: number;
|
|
121
|
+
balanceTagSniperAmount?: string;
|
|
122
|
+
balanceTagSniperRatio?: string;
|
|
123
|
+
balanceTagDevHolders?: number;
|
|
124
|
+
balanceTagDevAmount?: string;
|
|
125
|
+
balanceTagDevRatio?: string;
|
|
126
|
+
balanceTagProHolders?: number;
|
|
127
|
+
balanceTagProAmount?: string;
|
|
128
|
+
balanceTagProRatio?: string;
|
|
129
|
+
balanceTagInsiderHolders?: number;
|
|
130
|
+
balanceTagInsiderAmount?: string;
|
|
131
|
+
balanceTagInsiderRatio?: string;
|
|
132
|
+
balanceTagSmartHolders?: number;
|
|
133
|
+
balanceTagSmartAmount?: string;
|
|
134
|
+
balanceTagSmartRatio?: string;
|
|
135
|
+
balanceTagKolHolders?: number;
|
|
136
|
+
balanceTagKolAmount?: string;
|
|
137
|
+
balanceTagKolRatio?: string;
|
|
138
|
+
balanceTagPhishingHolders?: number;
|
|
139
|
+
balanceTagPhishingAmount?: string;
|
|
140
|
+
balanceTagPhishingRatio?: string;
|
|
141
|
+
balanceTagBluechipHolders?: number;
|
|
142
|
+
balanceTagBluechipAmount?: string;
|
|
143
|
+
balanceTagBluechipRatio?: string;
|
|
144
|
+
balanceTagRatHolders?: number;
|
|
145
|
+
balanceTagRatAmount?: string;
|
|
146
|
+
balanceTagRatRatio?: string;
|
|
108
147
|
timestamp: number;
|
|
109
148
|
}
|
|
110
149
|
interface WalletBalance {
|
|
@@ -281,8 +320,9 @@ interface Unsubscrible {
|
|
|
281
320
|
declare class StreamApi {
|
|
282
321
|
private realtimeClient;
|
|
283
322
|
private listenersMap;
|
|
323
|
+
private getTokenValue;
|
|
284
324
|
constructor(context: DexRequestContext);
|
|
285
|
-
connect(): void
|
|
325
|
+
connect(): Promise<void>;
|
|
286
326
|
/**
|
|
287
327
|
* Start batching commands for efficient bulk operations
|
|
288
328
|
* All subscription commands after this call will be batched until stopBatching is called
|
|
@@ -428,7 +468,7 @@ interface DexAggregatorOptions {
|
|
|
428
468
|
serverUrl?: string;
|
|
429
469
|
streamUrl?: string;
|
|
430
470
|
}
|
|
431
|
-
declare const LIB_VERSION = "0.1.
|
|
471
|
+
declare const LIB_VERSION = "0.1.20";
|
|
432
472
|
declare class DexClient {
|
|
433
473
|
readonly requestCtx: DexRequestContext;
|
|
434
474
|
readonly _configuration: Configuration;
|
package/dist/index.cjs
CHANGED
|
@@ -29,6 +29,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
29
29
|
|
|
30
30
|
// src/stream/stream.ts
|
|
31
31
|
var import_centrifuge = require("@chainstream-io/centrifuge");
|
|
32
|
+
var import_module = require("module");
|
|
32
33
|
|
|
33
34
|
// src/stream/stream.fields.ts
|
|
34
35
|
var CEL_FIELD_MAPPINGS = {
|
|
@@ -124,12 +125,54 @@ var CEL_FIELD_MAPPINGS = {
|
|
|
124
125
|
"subscribeTokenHolders": {
|
|
125
126
|
"tokenAddress": "a",
|
|
126
127
|
"holders": "h",
|
|
127
|
-
"
|
|
128
|
-
"
|
|
128
|
+
"top100HoldersAmount": "t100a",
|
|
129
|
+
"top50HoldersAmount": "t50a",
|
|
130
|
+
"top10HoldersAmount": "t10a",
|
|
129
131
|
"top100Holders": "t100h",
|
|
132
|
+
"top50Holders": "t50h",
|
|
130
133
|
"top10Holders": "t10h",
|
|
131
|
-
"
|
|
132
|
-
"
|
|
134
|
+
"top100HoldersRatio": "t100r",
|
|
135
|
+
"top50HoldersRatio": "t50r",
|
|
136
|
+
"top10HoldersRatio": "t10r",
|
|
137
|
+
"creatorsHolders": "ch",
|
|
138
|
+
"creatorsAmount": "ca",
|
|
139
|
+
"creatorsRatio": "cr",
|
|
140
|
+
"balanceTagFreshHolders": "btfh",
|
|
141
|
+
"balanceTagFreshAmount": "btfa",
|
|
142
|
+
"balanceTagFreshRatio": "btfr",
|
|
143
|
+
"balanceTagSandwichHolders": "btsh",
|
|
144
|
+
"balanceTagSandwichAmount": "btsa",
|
|
145
|
+
"balanceTagSandwichRatio": "btsr",
|
|
146
|
+
"balanceTagBundleHolders": "btbh",
|
|
147
|
+
"balanceTagBundleAmount": "btba",
|
|
148
|
+
"balanceTagBundleRatio": "btbr",
|
|
149
|
+
"balanceTagSniperHolders": "btsnh",
|
|
150
|
+
"balanceTagSniperAmount": "btsna",
|
|
151
|
+
"balanceTagSniperRatio": "btsnr",
|
|
152
|
+
"balanceTagDevHolders": "btdh",
|
|
153
|
+
"balanceTagDevAmount": "btda",
|
|
154
|
+
"balanceTagDevRatio": "btdr",
|
|
155
|
+
"balanceTagProHolders": "btph",
|
|
156
|
+
"balanceTagProAmount": "btpa",
|
|
157
|
+
"balanceTagProRatio": "btpr",
|
|
158
|
+
"balanceTagInsiderHolders": "btih",
|
|
159
|
+
"balanceTagInsiderAmount": "btia",
|
|
160
|
+
"balanceTagInsiderRatio": "btir",
|
|
161
|
+
"balanceTagSmartHolders": "btsmh",
|
|
162
|
+
"balanceTagSmartAmount": "btsma",
|
|
163
|
+
"balanceTagSmartRatio": "btsmr",
|
|
164
|
+
"balanceTagKolHolders": "btkh",
|
|
165
|
+
"balanceTagKolAmount": "btka",
|
|
166
|
+
"balanceTagKolRatio": "btkr",
|
|
167
|
+
"balanceTagPhishingHolders": "btphh",
|
|
168
|
+
"balanceTagPhishingAmount": "btpha",
|
|
169
|
+
"balanceTagPhishingRatio": "btphr",
|
|
170
|
+
"balanceTagBluechipHolders": "btblh",
|
|
171
|
+
"balanceTagBluechipAmount": "btbla",
|
|
172
|
+
"balanceTagBluechipRatio": "btblr",
|
|
173
|
+
"balanceTagRatHolders": "btrh",
|
|
174
|
+
"balanceTagRatAmount": "btra",
|
|
175
|
+
"balanceTagRatRatio": "btrr",
|
|
133
176
|
"timestamp": "ts"
|
|
134
177
|
},
|
|
135
178
|
// New token subscription fields
|
|
@@ -243,14 +286,36 @@ function replaceFilterFields(filter, methodName) {
|
|
|
243
286
|
}
|
|
244
287
|
|
|
245
288
|
// src/stream/stream.ts
|
|
289
|
+
var import_meta = {};
|
|
246
290
|
var StreamApi = class {
|
|
247
291
|
constructor(context) {
|
|
248
292
|
__publicField(this, "realtimeClient");
|
|
249
293
|
__publicField(this, "listenersMap");
|
|
294
|
+
__publicField(this, "getTokenValue");
|
|
250
295
|
const realtimeEndpoint = context.streamUrl;
|
|
296
|
+
this.getTokenValue = async () => {
|
|
297
|
+
return typeof context.accessToken === "string" ? context.accessToken : await context.accessToken.getToken();
|
|
298
|
+
};
|
|
299
|
+
let wsImpl = void 0;
|
|
300
|
+
if (typeof process !== "undefined" && process.versions?.node) {
|
|
301
|
+
try {
|
|
302
|
+
const require2 = (0, import_module.createRequire)(import_meta.url);
|
|
303
|
+
wsImpl = require2("ws");
|
|
304
|
+
} catch {
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
if (!wsImpl && typeof WebSocket !== "undefined") {
|
|
308
|
+
wsImpl = WebSocket;
|
|
309
|
+
}
|
|
251
310
|
this.realtimeClient = new import_centrifuge.Centrifuge(realtimeEndpoint, {
|
|
311
|
+
...wsImpl && { websocket: wsImpl },
|
|
252
312
|
getToken: async (_ctx) => {
|
|
253
|
-
|
|
313
|
+
const token = await this.getTokenValue();
|
|
314
|
+
this.realtimeClient.setHttpHeaders({
|
|
315
|
+
Authorization: `Bearer ${token}`,
|
|
316
|
+
"User-Agent": `chainstream-io/sdk/javascript`
|
|
317
|
+
});
|
|
318
|
+
return token;
|
|
254
319
|
}
|
|
255
320
|
});
|
|
256
321
|
this.realtimeClient.on("connected", () => {
|
|
@@ -262,7 +327,11 @@ var StreamApi = class {
|
|
|
262
327
|
});
|
|
263
328
|
this.listenersMap = /* @__PURE__ */ new Map();
|
|
264
329
|
}
|
|
265
|
-
connect() {
|
|
330
|
+
async connect() {
|
|
331
|
+
const token = await this.getTokenValue();
|
|
332
|
+
this.realtimeClient.setHttpHeaders({
|
|
333
|
+
Authorization: `Bearer ${token}`
|
|
334
|
+
});
|
|
266
335
|
this.realtimeClient.connect();
|
|
267
336
|
}
|
|
268
337
|
/**
|
|
@@ -463,15 +532,54 @@ var StreamApi = class {
|
|
|
463
532
|
return this.subscribe(channel, (data) => callback({
|
|
464
533
|
tokenAddress: data.a,
|
|
465
534
|
holders: data.h,
|
|
466
|
-
|
|
467
|
-
|
|
535
|
+
top100HoldersAmount: this.formatScientificNotation(data.t100a),
|
|
536
|
+
top50HoldersAmount: this.formatScientificNotation(data.t50a),
|
|
537
|
+
top10HoldersAmount: this.formatScientificNotation(data.t10a),
|
|
468
538
|
top100Holders: data.t100h,
|
|
539
|
+
top50Holders: data.t50h,
|
|
469
540
|
top10Holders: data.t10h,
|
|
470
|
-
|
|
471
|
-
|
|
541
|
+
top100HoldersRatio: this.formatScientificNotation(data.t100r),
|
|
542
|
+
top50HoldersRatio: this.formatScientificNotation(data.t50r),
|
|
543
|
+
top10HoldersRatio: this.formatScientificNotation(data.t10r),
|
|
472
544
|
creatorsHolders: data.ch,
|
|
473
545
|
creatorsAmount: this.formatScientificNotation(data.ca),
|
|
474
546
|
creatorsRatio: this.formatScientificNotation(data.cr),
|
|
547
|
+
balanceTagFreshHolders: data.btfh,
|
|
548
|
+
balanceTagFreshAmount: this.formatScientificNotation(data.btfa),
|
|
549
|
+
balanceTagFreshRatio: this.formatScientificNotation(data.btfr),
|
|
550
|
+
balanceTagSandwichHolders: data.btsh,
|
|
551
|
+
balanceTagSandwichAmount: this.formatScientificNotation(data.btsa),
|
|
552
|
+
balanceTagSandwichRatio: this.formatScientificNotation(data.btsr),
|
|
553
|
+
balanceTagBundleHolders: data.btbh,
|
|
554
|
+
balanceTagBundleAmount: this.formatScientificNotation(data.btba),
|
|
555
|
+
balanceTagBundleRatio: this.formatScientificNotation(data.btbr),
|
|
556
|
+
balanceTagSniperHolders: data.btsnh,
|
|
557
|
+
balanceTagSniperAmount: this.formatScientificNotation(data.btsna),
|
|
558
|
+
balanceTagSniperRatio: this.formatScientificNotation(data.btsnr),
|
|
559
|
+
balanceTagDevHolders: data.btdh,
|
|
560
|
+
balanceTagDevAmount: this.formatScientificNotation(data.btda),
|
|
561
|
+
balanceTagDevRatio: this.formatScientificNotation(data.btdr),
|
|
562
|
+
balanceTagProHolders: data.btph,
|
|
563
|
+
balanceTagProAmount: this.formatScientificNotation(data.btpa),
|
|
564
|
+
balanceTagProRatio: this.formatScientificNotation(data.btpr),
|
|
565
|
+
balanceTagInsiderHolders: data.btih,
|
|
566
|
+
balanceTagInsiderAmount: this.formatScientificNotation(data.btia),
|
|
567
|
+
balanceTagInsiderRatio: this.formatScientificNotation(data.btir),
|
|
568
|
+
balanceTagSmartHolders: data.btsmh,
|
|
569
|
+
balanceTagSmartAmount: this.formatScientificNotation(data.btsma),
|
|
570
|
+
balanceTagSmartRatio: this.formatScientificNotation(data.btsmr),
|
|
571
|
+
balanceTagKolHolders: data.btkh,
|
|
572
|
+
balanceTagKolAmount: this.formatScientificNotation(data.btka),
|
|
573
|
+
balanceTagKolRatio: this.formatScientificNotation(data.btkr),
|
|
574
|
+
balanceTagPhishingHolders: data.btphh,
|
|
575
|
+
balanceTagPhishingAmount: this.formatScientificNotation(data.btpha),
|
|
576
|
+
balanceTagPhishingRatio: this.formatScientificNotation(data.btphr),
|
|
577
|
+
balanceTagBluechipHolders: data.btblh,
|
|
578
|
+
balanceTagBluechipAmount: this.formatScientificNotation(data.btbla),
|
|
579
|
+
balanceTagBluechipRatio: this.formatScientificNotation(data.btblr),
|
|
580
|
+
balanceTagRatHolders: data.btrh,
|
|
581
|
+
balanceTagRatAmount: this.formatScientificNotation(data.btra),
|
|
582
|
+
balanceTagRatRatio: this.formatScientificNotation(data.btrr),
|
|
475
583
|
timestamp: data.ts
|
|
476
584
|
}), filter, "subscribeTokenHolders");
|
|
477
585
|
}
|
|
@@ -760,22 +868,148 @@ var StreamApi = class {
|
|
|
760
868
|
result.holder.holders = item.h.h;
|
|
761
869
|
}
|
|
762
870
|
if (item.h.t100a) {
|
|
763
|
-
result.holder.
|
|
871
|
+
result.holder.top100HoldersAmount = this.formatScientificNotation(item.h.t100a);
|
|
872
|
+
}
|
|
873
|
+
if (item.h.t50a) {
|
|
874
|
+
result.holder.top50HoldersAmount = this.formatScientificNotation(item.h.t50a);
|
|
764
875
|
}
|
|
765
876
|
if (item.h.t10a) {
|
|
766
|
-
result.holder.
|
|
877
|
+
result.holder.top10HoldersAmount = this.formatScientificNotation(item.h.t10a);
|
|
767
878
|
}
|
|
768
879
|
if (item.h.t100h) {
|
|
769
880
|
result.holder.top100Holders = item.h.t100h;
|
|
770
881
|
}
|
|
882
|
+
if (item.h.t50h) {
|
|
883
|
+
result.holder.top50Holders = item.h.t50h;
|
|
884
|
+
}
|
|
771
885
|
if (item.h.t10h) {
|
|
772
886
|
result.holder.top10Holders = item.h.t10h;
|
|
773
887
|
}
|
|
774
888
|
if (item.h.t100r) {
|
|
775
|
-
result.holder.
|
|
889
|
+
result.holder.top100HoldersRatio = this.formatScientificNotation(item.h.t100r);
|
|
890
|
+
}
|
|
891
|
+
if (item.h.t50r) {
|
|
892
|
+
result.holder.top50HoldersRatio = this.formatScientificNotation(item.h.t50r);
|
|
776
893
|
}
|
|
777
894
|
if (item.h.t10r) {
|
|
778
|
-
result.holder.
|
|
895
|
+
result.holder.top10HoldersRatio = this.formatScientificNotation(item.h.t10r);
|
|
896
|
+
}
|
|
897
|
+
if (item.h.ch) {
|
|
898
|
+
result.holder.creatorsHolders = item.h.ch;
|
|
899
|
+
}
|
|
900
|
+
if (item.h.ca) {
|
|
901
|
+
result.holder.creatorsAmount = this.formatScientificNotation(item.h.ca);
|
|
902
|
+
}
|
|
903
|
+
if (item.h.cr) {
|
|
904
|
+
result.holder.creatorsRatio = this.formatScientificNotation(item.h.cr);
|
|
905
|
+
}
|
|
906
|
+
if (item.h.btfh) {
|
|
907
|
+
result.holder.balanceTagFreshHolders = item.h.btfh;
|
|
908
|
+
}
|
|
909
|
+
if (item.h.btfa) {
|
|
910
|
+
result.holder.balanceTagFreshAmount = this.formatScientificNotation(item.h.btfa);
|
|
911
|
+
}
|
|
912
|
+
if (item.h.btfr) {
|
|
913
|
+
result.holder.balanceTagFreshRatio = this.formatScientificNotation(item.h.btfr);
|
|
914
|
+
}
|
|
915
|
+
if (item.h.btsh) {
|
|
916
|
+
result.holder.balanceTagSandwichHolders = item.h.btsh;
|
|
917
|
+
}
|
|
918
|
+
if (item.h.btsa) {
|
|
919
|
+
result.holder.balanceTagSandwichAmount = this.formatScientificNotation(item.h.btsa);
|
|
920
|
+
}
|
|
921
|
+
if (item.h.btsr) {
|
|
922
|
+
result.holder.balanceTagSandwichRatio = this.formatScientificNotation(item.h.btsr);
|
|
923
|
+
}
|
|
924
|
+
if (item.h.btbh) {
|
|
925
|
+
result.holder.balanceTagBundleHolders = item.h.btbh;
|
|
926
|
+
}
|
|
927
|
+
if (item.h.btba) {
|
|
928
|
+
result.holder.balanceTagBundleAmount = this.formatScientificNotation(item.h.btba);
|
|
929
|
+
}
|
|
930
|
+
if (item.h.btbr) {
|
|
931
|
+
result.holder.balanceTagBundleRatio = this.formatScientificNotation(item.h.btbr);
|
|
932
|
+
}
|
|
933
|
+
if (item.h.btsnh) {
|
|
934
|
+
result.holder.balanceTagSniperHolders = item.h.btsnh;
|
|
935
|
+
}
|
|
936
|
+
if (item.h.btsna) {
|
|
937
|
+
result.holder.balanceTagSniperAmount = this.formatScientificNotation(item.h.btsna);
|
|
938
|
+
}
|
|
939
|
+
if (item.h.btsnr) {
|
|
940
|
+
result.holder.balanceTagSniperRatio = this.formatScientificNotation(item.h.btsnr);
|
|
941
|
+
}
|
|
942
|
+
if (item.h.btdh) {
|
|
943
|
+
result.holder.balanceTagDevHolders = item.h.btdh;
|
|
944
|
+
}
|
|
945
|
+
if (item.h.btda) {
|
|
946
|
+
result.holder.balanceTagDevAmount = this.formatScientificNotation(item.h.btda);
|
|
947
|
+
}
|
|
948
|
+
if (item.h.btdr) {
|
|
949
|
+
result.holder.balanceTagDevRatio = this.formatScientificNotation(item.h.btdr);
|
|
950
|
+
}
|
|
951
|
+
if (item.h.btph) {
|
|
952
|
+
result.holder.balanceTagProHolders = item.h.btph;
|
|
953
|
+
}
|
|
954
|
+
if (item.h.btpa) {
|
|
955
|
+
result.holder.balanceTagProAmount = this.formatScientificNotation(item.h.btpa);
|
|
956
|
+
}
|
|
957
|
+
if (item.h.btpr) {
|
|
958
|
+
result.holder.balanceTagProRatio = this.formatScientificNotation(item.h.btpr);
|
|
959
|
+
}
|
|
960
|
+
if (item.h.btih) {
|
|
961
|
+
result.holder.balanceTagInsiderHolders = item.h.btih;
|
|
962
|
+
}
|
|
963
|
+
if (item.h.btia) {
|
|
964
|
+
result.holder.balanceTagInsiderAmount = this.formatScientificNotation(item.h.btia);
|
|
965
|
+
}
|
|
966
|
+
if (item.h.btir) {
|
|
967
|
+
result.holder.balanceTagInsiderRatio = this.formatScientificNotation(item.h.btir);
|
|
968
|
+
}
|
|
969
|
+
if (item.h.btsmh) {
|
|
970
|
+
result.holder.balanceTagSmartHolders = item.h.btsmh;
|
|
971
|
+
}
|
|
972
|
+
if (item.h.btsma) {
|
|
973
|
+
result.holder.balanceTagSmartAmount = this.formatScientificNotation(item.h.btsma);
|
|
974
|
+
}
|
|
975
|
+
if (item.h.btsmr) {
|
|
976
|
+
result.holder.balanceTagSmartRatio = this.formatScientificNotation(item.h.btsmr);
|
|
977
|
+
}
|
|
978
|
+
if (item.h.btkh) {
|
|
979
|
+
result.holder.balanceTagKolHolders = item.h.btkh;
|
|
980
|
+
}
|
|
981
|
+
if (item.h.btka) {
|
|
982
|
+
result.holder.balanceTagKolAmount = this.formatScientificNotation(item.h.btka);
|
|
983
|
+
}
|
|
984
|
+
if (item.h.btkr) {
|
|
985
|
+
result.holder.balanceTagKolRatio = this.formatScientificNotation(item.h.btkr);
|
|
986
|
+
}
|
|
987
|
+
if (item.h.btphh) {
|
|
988
|
+
result.holder.balanceTagPhishingHolders = item.h.btphh;
|
|
989
|
+
}
|
|
990
|
+
if (item.h.btpha) {
|
|
991
|
+
result.holder.balanceTagPhishingAmount = this.formatScientificNotation(item.h.btpha);
|
|
992
|
+
}
|
|
993
|
+
if (item.h.btphr) {
|
|
994
|
+
result.holder.balanceTagPhishingRatio = this.formatScientificNotation(item.h.btphr);
|
|
995
|
+
}
|
|
996
|
+
if (item.h.btblh) {
|
|
997
|
+
result.holder.balanceTagBluechipHolders = item.h.btblh;
|
|
998
|
+
}
|
|
999
|
+
if (item.h.btbla) {
|
|
1000
|
+
result.holder.balanceTagBluechipAmount = this.formatScientificNotation(item.h.btbla);
|
|
1001
|
+
}
|
|
1002
|
+
if (item.h.btblr) {
|
|
1003
|
+
result.holder.balanceTagBluechipRatio = this.formatScientificNotation(item.h.btblr);
|
|
1004
|
+
}
|
|
1005
|
+
if (item.h.btrh) {
|
|
1006
|
+
result.holder.balanceTagRatHolders = item.h.btrh;
|
|
1007
|
+
}
|
|
1008
|
+
if (item.h.btra) {
|
|
1009
|
+
result.holder.balanceTagRatAmount = this.formatScientificNotation(item.h.btra);
|
|
1010
|
+
}
|
|
1011
|
+
if (item.h.btrr) {
|
|
1012
|
+
result.holder.balanceTagRatRatio = this.formatScientificNotation(item.h.btrr);
|
|
779
1013
|
}
|
|
780
1014
|
}
|
|
781
1015
|
if (item.s) {
|
|
@@ -1088,12 +1322,54 @@ var StreamApi = class {
|
|
|
1088
1322
|
(it) => ({
|
|
1089
1323
|
tokenAddress: it.a,
|
|
1090
1324
|
holders: it.h,
|
|
1091
|
-
|
|
1092
|
-
|
|
1325
|
+
top100HoldersAmount: this.formatScientificNotation(it.t100a),
|
|
1326
|
+
top50HoldersAmount: this.formatScientificNotation(it.t50a),
|
|
1327
|
+
top10HoldersAmount: this.formatScientificNotation(it.t10a),
|
|
1093
1328
|
top100Holders: it.t100h,
|
|
1329
|
+
top50Holders: it.t50h,
|
|
1094
1330
|
top10Holders: it.t10h,
|
|
1095
|
-
|
|
1096
|
-
|
|
1331
|
+
top100HoldersRatio: this.formatScientificNotation(it.t100r),
|
|
1332
|
+
top50HoldersRatio: this.formatScientificNotation(it.t50r),
|
|
1333
|
+
top10HoldersRatio: this.formatScientificNotation(it.t10r),
|
|
1334
|
+
creatorsHolders: it.ch,
|
|
1335
|
+
creatorsAmount: this.formatScientificNotation(it.ca),
|
|
1336
|
+
creatorsRatio: this.formatScientificNotation(it.cr),
|
|
1337
|
+
balanceTagFreshHolders: it.btfh,
|
|
1338
|
+
balanceTagFreshAmount: this.formatScientificNotation(it.btfa),
|
|
1339
|
+
balanceTagFreshRatio: this.formatScientificNotation(it.btfr),
|
|
1340
|
+
balanceTagSandwichHolders: it.btsh,
|
|
1341
|
+
balanceTagSandwichAmount: this.formatScientificNotation(it.btsa),
|
|
1342
|
+
balanceTagSandwichRatio: this.formatScientificNotation(it.btsr),
|
|
1343
|
+
balanceTagBundleHolders: it.btbh,
|
|
1344
|
+
balanceTagBundleAmount: this.formatScientificNotation(it.btba),
|
|
1345
|
+
balanceTagBundleRatio: this.formatScientificNotation(it.btbr),
|
|
1346
|
+
balanceTagSniperHolders: it.btsnh,
|
|
1347
|
+
balanceTagSniperAmount: this.formatScientificNotation(it.btsna),
|
|
1348
|
+
balanceTagSniperRatio: this.formatScientificNotation(it.btsnr),
|
|
1349
|
+
balanceTagDevHolders: it.btdh,
|
|
1350
|
+
balanceTagDevAmount: this.formatScientificNotation(it.btda),
|
|
1351
|
+
balanceTagDevRatio: this.formatScientificNotation(it.btdr),
|
|
1352
|
+
balanceTagProHolders: it.btph,
|
|
1353
|
+
balanceTagProAmount: this.formatScientificNotation(it.btpa),
|
|
1354
|
+
balanceTagProRatio: this.formatScientificNotation(it.btpr),
|
|
1355
|
+
balanceTagInsiderHolders: it.btih,
|
|
1356
|
+
balanceTagInsiderAmount: this.formatScientificNotation(it.btia),
|
|
1357
|
+
balanceTagInsiderRatio: this.formatScientificNotation(it.btir),
|
|
1358
|
+
balanceTagSmartHolders: it.btsmh,
|
|
1359
|
+
balanceTagSmartAmount: this.formatScientificNotation(it.btsma),
|
|
1360
|
+
balanceTagSmartRatio: this.formatScientificNotation(it.btsmr),
|
|
1361
|
+
balanceTagKolHolders: it.btkh,
|
|
1362
|
+
balanceTagKolAmount: this.formatScientificNotation(it.btka),
|
|
1363
|
+
balanceTagKolRatio: this.formatScientificNotation(it.btkr),
|
|
1364
|
+
balanceTagPhishingHolders: it.btphh,
|
|
1365
|
+
balanceTagPhishingAmount: this.formatScientificNotation(it.btpha),
|
|
1366
|
+
balanceTagPhishingRatio: this.formatScientificNotation(it.btphr),
|
|
1367
|
+
balanceTagBluechipHolders: it.btblh,
|
|
1368
|
+
balanceTagBluechipAmount: this.formatScientificNotation(it.btbla),
|
|
1369
|
+
balanceTagBluechipRatio: this.formatScientificNotation(it.btblr),
|
|
1370
|
+
balanceTagRatHolders: it.btrh,
|
|
1371
|
+
balanceTagRatAmount: this.formatScientificNotation(it.btra),
|
|
1372
|
+
balanceTagRatRatio: this.formatScientificNotation(it.btrr),
|
|
1097
1373
|
timestamp: it.ts
|
|
1098
1374
|
})
|
|
1099
1375
|
)
|
|
@@ -7913,7 +8189,7 @@ var WatchlistApi = class extends BaseAPI {
|
|
|
7913
8189
|
|
|
7914
8190
|
// src/index.ts
|
|
7915
8191
|
var import_event_source_polyfill = require("event-source-polyfill");
|
|
7916
|
-
var LIB_VERSION = "0.1.
|
|
8192
|
+
var LIB_VERSION = "0.1.20";
|
|
7917
8193
|
var UserAgentMiddleware = class {
|
|
7918
8194
|
async pre(context) {
|
|
7919
8195
|
if (!context.init.headers) {
|