defade 0.1.0
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/LICENSE +21 -0
- package/README.md +105 -0
- package/index.cjs +155 -0
- package/index.d.ts +77 -0
- package/index.mjs +4 -0
- package/package.json +53 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 DeFade Ltd
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# DeFade SDK
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/defade)
|
|
4
|
+
[](https://github.com/DeFadeLtd/defade-sdk/actions)
|
|
5
|
+
[](./LICENSE)
|
|
6
|
+
|
|
7
|
+
Official JavaScript/TypeScript client for the [DeFade API](https://defade.org/api-docs) — rug pull risk scores and on-chain behavioral forensics for tokens on **Solana, Ethereum, Base and Robinhood Chain**: launch-block bundle detection, multi-hop funding-origin tracing, deployer history, insider networks, sniper bots, smart-money flow, liquidity verification.
|
|
8
|
+
|
|
9
|
+
DeFade answers a different question than contract scanners. Not "does this token's code look wrong?" but "did the wallets behind this launch behave like ruggers?" — [99.9% of confirmed Solana rugs had mint authority revoked and 72.9% had locked LP](https://defade.org/blog/state-of-solana-rugs-2026), so token state alone no longer separates safe from staged.
|
|
10
|
+
|
|
11
|
+
- **Zero dependencies.** Node 18+ (uses global `fetch`). CJS and ESM.
|
|
12
|
+
- **Thin by design.** Responses are the API's JSON, unmodified. `client.get()` reaches any endpoint the SDK hasn't wrapped yet.
|
|
13
|
+
- **Also an MCP server** — Claude and ChatGPT can run real scans through the same API. [See below](#mcp-connector-scan-from-claude--chatgpt).
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install defade
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Get an API key at **[defade.org/developers](https://defade.org/developers)** (keys start with `df_`).
|
|
22
|
+
|
|
23
|
+
## Quickstart
|
|
24
|
+
|
|
25
|
+
```js
|
|
26
|
+
import DeFade from 'defade';
|
|
27
|
+
|
|
28
|
+
const client = new DeFade({ apiKey: process.env.DEFADE_API_KEY });
|
|
29
|
+
|
|
30
|
+
// Full multi-module scan — returns a SAFETY score (100 = clean)
|
|
31
|
+
const scan = await client.analyze('6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN');
|
|
32
|
+
|
|
33
|
+
// Rug pull probability (100 = dangerous) with the evidence behind it
|
|
34
|
+
const risk = await client.rugScore('6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN');
|
|
35
|
+
|
|
36
|
+
// Any endpoint takes ?chain= — omitted means solana
|
|
37
|
+
const eth = await client.holders('0x6982508145454ce325ddbe47a25d4ec3d2311933', { chain: 'ethereum' });
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
> [!WARNING]
|
|
41
|
+
> **The two scores point in opposite directions.** `analyze()` returns a **safety score** — 100 is clean. `rugScore()` returns a **rug pull probability** — 100 is dangerous. Reading a 90 safety score as "90% chance of rug" produces exactly the wrong answer. Every method's JSDoc restates this.
|
|
42
|
+
|
|
43
|
+
## Endpoints
|
|
44
|
+
|
|
45
|
+
All token methods take `(address, { chain? })` and return the API's parsed JSON.
|
|
46
|
+
|
|
47
|
+
| Group | Methods |
|
|
48
|
+
|---|---|
|
|
49
|
+
| Scan & scores | `analyze`, `rugScore` |
|
|
50
|
+
| Token state | `tokenPrice`, `holders`, `liquidity`, `socials` |
|
|
51
|
+
| Launch forensics | `bundles`, `bundlesPro`, `historicalBundles`, `snipers`, `devTracker`, `feeFingerprint` |
|
|
52
|
+
| Wallet networks | `insiderNetwork`, `fundingOrigin`, `fundingGraph`, `sybilCluster` |
|
|
53
|
+
| Money flow | `whales`, `smartMoney`, `copyTraders`, `kol` |
|
|
54
|
+
| Cross-token | `holderOverlap(mints[])`, `trending` |
|
|
55
|
+
| Account | `usage` |
|
|
56
|
+
| Escape hatch | `get(path, params)` — any `/v1` path |
|
|
57
|
+
|
|
58
|
+
The API describes itself at [`GET https://api.defade.org/v1`](https://api.defade.org/v1) — endpoint list, plans, unit costs, rate limits and supported chains, always current. From code: `await DeFade.discover()`.
|
|
59
|
+
|
|
60
|
+
## Chains
|
|
61
|
+
|
|
62
|
+
`solana` (default), `ethereum`, `base`, `robinhood`. Pass `{ chain: 'base' }` on any token method. EVM chains require an All-Chains plan; a few EVM modules that walk funding graphs cost more units than a standard request — [the discovery document](https://api.defade.org/v1) lists which, and [defade.org/developers](https://defade.org/developers) has current pricing.
|
|
63
|
+
|
|
64
|
+
## Errors
|
|
65
|
+
|
|
66
|
+
Every failure throws `DeFadeError` with `.status` (HTTP status, `0` for network/timeout) and `.body` (the API's error JSON when present). Rate-limited calls throw with status `429`; `client.usage()` shows your remaining units and limits. Full scans can take tens of seconds on fresh tokens — the default timeout is 120s, configurable via `timeoutMs`.
|
|
67
|
+
|
|
68
|
+
```js
|
|
69
|
+
import DeFade, { DeFadeError } from 'defade';
|
|
70
|
+
|
|
71
|
+
try {
|
|
72
|
+
await client.analyze(mint);
|
|
73
|
+
} catch (e) {
|
|
74
|
+
if (e instanceof DeFadeError && e.status === 429) {
|
|
75
|
+
// back off; e.body has details
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## MCP connector: scan from Claude & ChatGPT
|
|
81
|
+
|
|
82
|
+
The same API is exposed as a remote [MCP](https://modelcontextprotocol.io) server, so AI assistants can run real scans in-conversation instead of recalling stale training data:
|
|
83
|
+
|
|
84
|
+
- **URL:** `https://api.defade.org/mcp` (transport: `streamable-http`)
|
|
85
|
+
- **Auth:** `x-api-key` header, or `?api_key=YOUR_KEY` for clients that can't set headers
|
|
86
|
+
- **Registry:** published as [`org.defade/defade`](https://registry.modelcontextprotocol.io/v0/servers?search=defade) in the official MCP Registry
|
|
87
|
+
|
|
88
|
+
Add it to **Claude Code**:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
claude mcp add --transport http defade "https://api.defade.org/mcp?api_key=YOUR_KEY"
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
In **Claude** or **ChatGPT**, add a custom connector with the URL above. Tool calls are metered against your key exactly like REST calls. Full instructions: [defade.org/api-docs#mcp](https://defade.org/api-docs#mcp).
|
|
95
|
+
|
|
96
|
+
## Links
|
|
97
|
+
|
|
98
|
+
- [API docs](https://defade.org/api-docs) · [get a key](https://defade.org/developers) · [live API self-description](https://api.defade.org/v1)
|
|
99
|
+
- [The State of Solana Rugs, 2026](https://defade.org/blog/state-of-solana-rugs-2026) — what 18,884 flagged tokens reveal
|
|
100
|
+
- [Why tokens with perfect safety scores still rug](https://defade.org/blog/why-tokens-with-good-scores-still-rug)
|
|
101
|
+
- [defade.org](https://defade.org) — the web scanner (free tier, no key needed)
|
|
102
|
+
|
|
103
|
+
## License
|
|
104
|
+
|
|
105
|
+
MIT © DeFade Ltd. This SDK is open source; the DeFade API it talks to is a hosted commercial service with a free tier.
|
package/index.cjs
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Thin client for the DeFade API (https://defade.org) — multi-chain memecoin
|
|
4
|
+
// risk analysis. Zero dependencies; Node 18+ (global fetch).
|
|
5
|
+
//
|
|
6
|
+
// The hosted API is the product; this file only shapes requests. Endpoint
|
|
7
|
+
// list, plans and limits are served live at https://api.defade.org/v1 —
|
|
8
|
+
// call DeFade.discover() to read them rather than trusting anything baked
|
|
9
|
+
// into an SDK release.
|
|
10
|
+
|
|
11
|
+
const DEFAULT_BASE_URL = 'https://api.defade.org';
|
|
12
|
+
const DEFAULT_TIMEOUT_MS = 120_000; // full scans walk funding graphs; they are not instant
|
|
13
|
+
|
|
14
|
+
class DeFadeError extends Error {
|
|
15
|
+
constructor(message, status, body) {
|
|
16
|
+
super(message);
|
|
17
|
+
this.name = 'DeFadeError';
|
|
18
|
+
this.status = status; // HTTP status, or 0 for network/timeout failures
|
|
19
|
+
this.body = body; // parsed JSON error body when the API sent one
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
class DeFade {
|
|
24
|
+
/**
|
|
25
|
+
* @param {object} opts
|
|
26
|
+
* @param {string} opts.apiKey DeFade API key (df_…) — https://defade.org/developers
|
|
27
|
+
* @param {string} [opts.baseUrl] Override the API origin (testing/proxies).
|
|
28
|
+
* @param {number} [opts.timeoutMs] Per-request timeout. Default 120000.
|
|
29
|
+
* @param {typeof fetch} [opts.fetch] Injectable fetch (testing).
|
|
30
|
+
*/
|
|
31
|
+
constructor(opts = {}) {
|
|
32
|
+
if (!opts.apiKey || typeof opts.apiKey !== 'string') {
|
|
33
|
+
throw new DeFadeError('apiKey is required — get one at https://defade.org/developers', 0, null);
|
|
34
|
+
}
|
|
35
|
+
this.apiKey = opts.apiKey;
|
|
36
|
+
this.baseUrl = (opts.baseUrl || DEFAULT_BASE_URL).replace(/\/+$/, '');
|
|
37
|
+
this.timeoutMs = opts.timeoutMs || DEFAULT_TIMEOUT_MS;
|
|
38
|
+
this._fetch = opts.fetch || globalThis.fetch;
|
|
39
|
+
if (!this._fetch) {
|
|
40
|
+
throw new DeFadeError('global fetch not found — Node 18+ required, or pass {fetch}', 0, null);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Raw GET against any /v1 path. The typed methods below all route through
|
|
46
|
+
* here, so an endpoint added server-side is reachable before an SDK update.
|
|
47
|
+
* @param {string} path e.g. '/v1/analyze/So11111111111111111111111111111111111111112'
|
|
48
|
+
* @param {object} [params] Query parameters (chain, mints, …).
|
|
49
|
+
*/
|
|
50
|
+
async get(path, params) {
|
|
51
|
+
const url = new URL(this.baseUrl + path);
|
|
52
|
+
for (const [k, v] of Object.entries(params || {})) {
|
|
53
|
+
if (v !== undefined && v !== null) url.searchParams.set(k, String(v));
|
|
54
|
+
}
|
|
55
|
+
const ctrl = new AbortController();
|
|
56
|
+
const timer = setTimeout(() => ctrl.abort(), this.timeoutMs);
|
|
57
|
+
let res;
|
|
58
|
+
try {
|
|
59
|
+
res = await this._fetch(url, {
|
|
60
|
+
headers: { 'x-api-key': this.apiKey, accept: 'application/json' },
|
|
61
|
+
signal: ctrl.signal,
|
|
62
|
+
});
|
|
63
|
+
} catch (e) {
|
|
64
|
+
throw new DeFadeError(
|
|
65
|
+
e.name === 'AbortError'
|
|
66
|
+
? `request timed out after ${this.timeoutMs}ms (full scans can be slow — raise timeoutMs)`
|
|
67
|
+
: `network error: ${e.message}`,
|
|
68
|
+
0, null);
|
|
69
|
+
} finally {
|
|
70
|
+
clearTimeout(timer);
|
|
71
|
+
}
|
|
72
|
+
let body = null;
|
|
73
|
+
try { body = await res.json(); } catch { /* non-JSON body; keep null */ }
|
|
74
|
+
if (!res.ok) {
|
|
75
|
+
const msg = (body && (body.error || body.message)) || `HTTP ${res.status}`;
|
|
76
|
+
throw new DeFadeError(
|
|
77
|
+
res.status === 429 ? `${msg} — rate limited; check client.usage() for your plan's limits` : msg,
|
|
78
|
+
res.status, body);
|
|
79
|
+
}
|
|
80
|
+
return body;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
_token(endpoint, mint, opts) {
|
|
84
|
+
// Validation failures reject rather than throw, so every failure mode of
|
|
85
|
+
// an SDK call arrives through the same promise channel.
|
|
86
|
+
if (!mint) return Promise.reject(new DeFadeError(`${endpoint}: token address is required`, 0, null));
|
|
87
|
+
return this.get(`/v1/${endpoint}/${encodeURIComponent(mint)}`,
|
|
88
|
+
opts && opts.chain ? { chain: opts.chain } : undefined);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// --- full scan + scores -------------------------------------------------
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Full token analysis. NOTE: analyze() returns a SAFETY score (100 = clean).
|
|
95
|
+
* rugScore() returns a rug pull PROBABILITY (100 = dangerous). The two
|
|
96
|
+
* scales point in opposite directions — do not mix them up.
|
|
97
|
+
*/
|
|
98
|
+
analyze(mint, opts) { return this._token('analyze', mint, opts); }
|
|
99
|
+
|
|
100
|
+
/** Rug pull probability 0–100 — HIGHER IS MORE DANGEROUS (see analyze()). */
|
|
101
|
+
rugScore(mint, opts) { return this._token('rug-score', mint, opts); }
|
|
102
|
+
|
|
103
|
+
// --- token state --------------------------------------------------------
|
|
104
|
+
|
|
105
|
+
tokenPrice(mint, opts) { return this._token('token-price', mint, opts); }
|
|
106
|
+
holders(mint, opts) { return this._token('holders', mint, opts); }
|
|
107
|
+
liquidity(mint, opts) { return this._token('liquidity', mint, opts); }
|
|
108
|
+
socials(mint, opts) { return this._token('socials', mint, opts); }
|
|
109
|
+
|
|
110
|
+
// --- behavioral forensics ----------------------------------------------
|
|
111
|
+
|
|
112
|
+
whales(mint, opts) { return this._token('whales', mint, opts); }
|
|
113
|
+
bundles(mint, opts) { return this._token('bundles', mint, opts); }
|
|
114
|
+
bundlesPro(mint, opts) { return this._token('bundles-pro', mint, opts); }
|
|
115
|
+
historicalBundles(mint, opts) { return this._token('historical-bundles', mint, opts); }
|
|
116
|
+
insiderNetwork(mint, opts) { return this._token('insider-network', mint, opts); }
|
|
117
|
+
smartMoney(mint, opts) { return this._token('smart-money', mint, opts); }
|
|
118
|
+
snipers(mint, opts) { return this._token('snipers', mint, opts); }
|
|
119
|
+
devTracker(mint, opts) { return this._token('dev-tracker', mint, opts); }
|
|
120
|
+
copyTraders(mint, opts) { return this._token('copy-traders', mint, opts); }
|
|
121
|
+
fundingOrigin(mint, opts) { return this._token('funding-origin', mint, opts); }
|
|
122
|
+
fundingGraph(mint, opts) { return this._token('funding-graph', mint, opts); }
|
|
123
|
+
sybilCluster(mint, opts) { return this._token('sybil-cluster', mint, opts); }
|
|
124
|
+
feeFingerprint(mint, opts) { return this._token('fee-fingerprint', mint, opts); }
|
|
125
|
+
kol(mint, opts) { return this._token('kol', mint, opts); }
|
|
126
|
+
|
|
127
|
+
// --- cross-token + account ----------------------------------------------
|
|
128
|
+
|
|
129
|
+
/** Shared holders across 2+ tokens. @param {string[]} mints */
|
|
130
|
+
holderOverlap(mints, opts) {
|
|
131
|
+
if (!Array.isArray(mints) || mints.length < 2) {
|
|
132
|
+
return Promise.reject(new DeFadeError('holderOverlap: pass an array of 2+ token addresses', 0, null));
|
|
133
|
+
}
|
|
134
|
+
const params = { mints: mints.join(',') };
|
|
135
|
+
if (opts && opts.chain) params.chain = opts.chain;
|
|
136
|
+
return this.get('/v1/holder-overlap', params);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
trending(opts) { return this.get('/v1/trending', opts && opts.chain ? { chain: opts.chain } : undefined); }
|
|
140
|
+
|
|
141
|
+
/** Remaining units, rate limits and plan for this key. Free to call. */
|
|
142
|
+
usage() { return this.get('/v1/usage'); }
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* The live API self-description: endpoint list, plans, unit costs, chains,
|
|
146
|
+
* MCP connector details. No API key required.
|
|
147
|
+
*/
|
|
148
|
+
static async discover(baseUrl) {
|
|
149
|
+
const res = await fetch((baseUrl || DEFAULT_BASE_URL).replace(/\/+$/, '') + '/v1');
|
|
150
|
+
if (!res.ok) throw new DeFadeError(`discovery failed: HTTP ${res.status}`, res.status, null);
|
|
151
|
+
return res.json();
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
module.exports = { DeFade, DeFadeError };
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/** Chain id accepted by every token endpoint. Omitted means "solana". */
|
|
2
|
+
export type Chain = 'solana' | 'ethereum' | 'base' | 'robinhood' | (string & {});
|
|
3
|
+
|
|
4
|
+
export interface DeFadeOptions {
|
|
5
|
+
/** DeFade API key (df_…) — https://defade.org/developers */
|
|
6
|
+
apiKey: string;
|
|
7
|
+
/** Override the API origin. Default: https://api.defade.org */
|
|
8
|
+
baseUrl?: string;
|
|
9
|
+
/** Per-request timeout in ms. Default 120000 — full scans are not instant. */
|
|
10
|
+
timeoutMs?: number;
|
|
11
|
+
/** Injectable fetch implementation (testing). */
|
|
12
|
+
fetch?: typeof fetch;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface TokenCallOptions {
|
|
16
|
+
/** Target chain. EVM chains require an All-Chains API plan. */
|
|
17
|
+
chain?: Chain;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export declare class DeFadeError extends Error {
|
|
21
|
+
name: 'DeFadeError';
|
|
22
|
+
/** HTTP status, or 0 for network/timeout/client-side failures. */
|
|
23
|
+
status: number;
|
|
24
|
+
/** Parsed JSON error body when the API returned one. */
|
|
25
|
+
body: unknown;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Thin client for the DeFade API. Responses are returned as parsed JSON
|
|
30
|
+
* exactly as the API sends them — the API's own /v1 discovery document
|
|
31
|
+
* (DeFade.discover()) is the source of truth for shapes and limits.
|
|
32
|
+
*/
|
|
33
|
+
export declare class DeFade {
|
|
34
|
+
constructor(opts: DeFadeOptions);
|
|
35
|
+
|
|
36
|
+
/** Raw GET against any /v1 path — escape hatch for endpoints newer than the SDK. */
|
|
37
|
+
get(path: string, params?: Record<string, string | number | boolean | undefined>): Promise<any>;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Full token analysis. Returns a SAFETY score where 100 = clean.
|
|
41
|
+
* Opposite direction from rugScore() — do not mix the two scales.
|
|
42
|
+
*/
|
|
43
|
+
analyze(mint: string, opts?: TokenCallOptions): Promise<any>;
|
|
44
|
+
/** Rug pull probability 0–100 where HIGHER = MORE DANGEROUS. */
|
|
45
|
+
rugScore(mint: string, opts?: TokenCallOptions): Promise<any>;
|
|
46
|
+
|
|
47
|
+
tokenPrice(mint: string, opts?: TokenCallOptions): Promise<any>;
|
|
48
|
+
holders(mint: string, opts?: TokenCallOptions): Promise<any>;
|
|
49
|
+
liquidity(mint: string, opts?: TokenCallOptions): Promise<any>;
|
|
50
|
+
socials(mint: string, opts?: TokenCallOptions): Promise<any>;
|
|
51
|
+
|
|
52
|
+
whales(mint: string, opts?: TokenCallOptions): Promise<any>;
|
|
53
|
+
bundles(mint: string, opts?: TokenCallOptions): Promise<any>;
|
|
54
|
+
bundlesPro(mint: string, opts?: TokenCallOptions): Promise<any>;
|
|
55
|
+
historicalBundles(mint: string, opts?: TokenCallOptions): Promise<any>;
|
|
56
|
+
insiderNetwork(mint: string, opts?: TokenCallOptions): Promise<any>;
|
|
57
|
+
smartMoney(mint: string, opts?: TokenCallOptions): Promise<any>;
|
|
58
|
+
snipers(mint: string, opts?: TokenCallOptions): Promise<any>;
|
|
59
|
+
devTracker(mint: string, opts?: TokenCallOptions): Promise<any>;
|
|
60
|
+
copyTraders(mint: string, opts?: TokenCallOptions): Promise<any>;
|
|
61
|
+
fundingOrigin(mint: string, opts?: TokenCallOptions): Promise<any>;
|
|
62
|
+
fundingGraph(mint: string, opts?: TokenCallOptions): Promise<any>;
|
|
63
|
+
sybilCluster(mint: string, opts?: TokenCallOptions): Promise<any>;
|
|
64
|
+
feeFingerprint(mint: string, opts?: TokenCallOptions): Promise<any>;
|
|
65
|
+
kol(mint: string, opts?: TokenCallOptions): Promise<any>;
|
|
66
|
+
|
|
67
|
+
/** Shared holders across 2 or more tokens. */
|
|
68
|
+
holderOverlap(mints: string[], opts?: TokenCallOptions): Promise<any>;
|
|
69
|
+
trending(opts?: TokenCallOptions): Promise<any>;
|
|
70
|
+
/** Remaining units, rate limits and plan for this key. */
|
|
71
|
+
usage(): Promise<any>;
|
|
72
|
+
|
|
73
|
+
/** Live API self-description (endpoints, plans, chains, MCP). No key needed. */
|
|
74
|
+
static discover(baseUrl?: string): Promise<any>;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export default DeFade;
|
package/index.mjs
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "defade",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Official SDK for the DeFade API — rug pull risk scores and on-chain forensics (bundles, funding traces, deployer history) for tokens on Solana, Ethereum, Base and Robinhood Chain.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "DeFade Ltd (https://defade.org)",
|
|
7
|
+
"homepage": "https://defade.org/api-docs",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/DeFadeLtd/defade-sdk.git"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/DeFadeLtd/defade-sdk/issues"
|
|
14
|
+
},
|
|
15
|
+
"main": "./index.cjs",
|
|
16
|
+
"types": "./index.d.ts",
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./index.d.ts",
|
|
20
|
+
"import": "./index.mjs",
|
|
21
|
+
"require": "./index.cjs"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"index.cjs",
|
|
26
|
+
"index.mjs",
|
|
27
|
+
"index.d.ts",
|
|
28
|
+
"README.md",
|
|
29
|
+
"LICENSE"
|
|
30
|
+
],
|
|
31
|
+
"engines": {
|
|
32
|
+
"node": ">=18"
|
|
33
|
+
},
|
|
34
|
+
"scripts": {
|
|
35
|
+
"test": "node --test test/client.test.js"
|
|
36
|
+
},
|
|
37
|
+
"keywords": [
|
|
38
|
+
"defade",
|
|
39
|
+
"rug pull",
|
|
40
|
+
"rug checker",
|
|
41
|
+
"solana",
|
|
42
|
+
"ethereum",
|
|
43
|
+
"base",
|
|
44
|
+
"memecoin",
|
|
45
|
+
"token security",
|
|
46
|
+
"rug score",
|
|
47
|
+
"bundle detection",
|
|
48
|
+
"insider detection",
|
|
49
|
+
"wallet forensics",
|
|
50
|
+
"mcp",
|
|
51
|
+
"crypto security api"
|
|
52
|
+
]
|
|
53
|
+
}
|