@decentrys/dri-sdk 0.1.0 → 0.1.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.
- package/README.md +102 -24
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
# @decentrys/dri-sdk
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
**Follows stolen funds across hops and chains, and identifies where lawful intervention becomes possible.**
|
|
4
|
+
|
|
5
|
+
Digital Recovery Intelligence. You seed an investigation with the addresses that
|
|
6
|
+
received extracted funds; it traces outward, attributes the destinations, and
|
|
7
|
+
names the points where a party who can actually act — an exchange, a custodian,
|
|
8
|
+
a court — becomes reachable.
|
|
9
|
+
|
|
10
|
+
## What this is not
|
|
11
|
+
|
|
12
|
+
- Decentrys **never takes custody** of assets, and does not freeze, seize, transmit or return anything.
|
|
13
|
+
- It is **not a law firm, law enforcement agency, or licensed recovery agent.** Nothing here is legal advice.
|
|
14
|
+
- The **Recovery Index is an analytical estimate** from a versioned model. Not a prediction, guarantee, or promised recovery rate.
|
|
15
|
+
- Attribution beyond a mixer is **inference, and labelled as inference.**
|
|
16
|
+
- Sold to organisations. Not a consumer service.
|
|
5
17
|
|
|
6
18
|
## Install
|
|
7
19
|
|
|
@@ -9,40 +21,106 @@ and evidence packages.
|
|
|
9
21
|
npm install @decentrys/dri-sdk
|
|
10
22
|
```
|
|
11
23
|
|
|
12
|
-
##
|
|
24
|
+
## Getting an API key
|
|
25
|
+
|
|
26
|
+
Sign in at [decentrys.com/developers](https://decentrys.com/developers) and create a key.
|
|
13
27
|
|
|
14
|
-
|
|
15
|
-
transmit or return anything. It is not a law firm, a law enforcement agency or
|
|
16
|
-
a licensed recovery agent, and nothing it returns is legal advice.
|
|
28
|
+
There are two kinds, and picking the wrong one is the mistake that matters:
|
|
17
29
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
`
|
|
30
|
+
| Prefix | Where it belongs | Why |
|
|
31
|
+
|---|---|---|
|
|
32
|
+
| `dk_pub_live_…` | **Publishable.** Ships inside a wallet, extension or mobile app. | Bounded to the origins you register and to read-only Protect endpoints. Anyone can extract it from your bundle; that's expected, and it's why it can't do anything dangerous. |
|
|
33
|
+
| `dk_live_…` | **Secret.** Server-side only. | Full scope access. If this ends up in a client bundle it is a leaked credential the moment it ships. |
|
|
22
34
|
|
|
23
|
-
|
|
35
|
+
**Secret key only** — an investigation names third parties.
|
|
36
|
+
|
|
37
|
+
## Quick start
|
|
24
38
|
|
|
25
39
|
```ts
|
|
26
|
-
|
|
27
|
-
|
|
40
|
+
import { DecentrysDri, MissingDisclosureError } from '@decentrys/dri-sdk';
|
|
41
|
+
|
|
42
|
+
const dri = new DecentrysDri({ apiKey: 'dk_live_...' });
|
|
43
|
+
|
|
44
|
+
// 1. Seed with where the funds went
|
|
45
|
+
const investigation = await dri.createInvestigation({
|
|
46
|
+
title: 'Vault drain 2026-09-04',
|
|
47
|
+
seedChain: 'ethereum',
|
|
48
|
+
seedAddress: '0xattacker...',
|
|
49
|
+
maxHops: 4,
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
// 2. Expand deliberately — one address, one hop per call
|
|
53
|
+
await dri.traceFunds(investigation.id);
|
|
54
|
+
|
|
55
|
+
// 3. Where can someone act?
|
|
28
56
|
const points = await dri.identifyInterventionPoints(investigation.id);
|
|
29
57
|
```
|
|
30
58
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
59
|
+
Tracing is one hop at a time on purpose. Public RPC endpoints are rate-limited,
|
|
60
|
+
and an exhausted quota reads as *"the funds vanished"* rather than *"we ran out
|
|
61
|
+
of budget"*.
|
|
62
|
+
|
|
63
|
+
## Intervention points
|
|
64
|
+
|
|
65
|
+
```ts
|
|
66
|
+
points.custodial // an exchange or custodian HOLDS the value — contactable, serveable
|
|
67
|
+
points.crossChain // a bridge operator holds RECORDS of value that has moved on
|
|
68
|
+
points.obfuscation // where provable attribution stops
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Collapsing custodial and cross-chain sends legal budget after a paper trail.
|
|
34
72
|
|
|
35
|
-
|
|
36
|
-
indirect connection is an observation about a counterparty, never an
|
|
37
|
-
accusation about a person.
|
|
73
|
+
## Recovery Index
|
|
38
74
|
|
|
39
|
-
|
|
75
|
+
```ts
|
|
76
|
+
const index = await dri.getRecoveryIndex(recoveryCaseId);
|
|
77
|
+
|
|
78
|
+
index.score // 0-100
|
|
79
|
+
index.band // 'VERY_LOW' | 'LOW' | 'MODERATE' | 'HIGH'
|
|
80
|
+
index.analyticalOnly // always true
|
|
81
|
+
index.disclaimer // must be shown wherever the score is
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
The client throws `MissingDisclosureError` if a score ever arrives without its
|
|
85
|
+
disclaimer — a distinct class from `DriError`, so a retry-on-transport-error
|
|
86
|
+
loop can't swallow it. A dashboard renders whatever arrives, and "58 — MODERATE"
|
|
87
|
+
beside the word *recovery* is read as a rate.
|
|
88
|
+
|
|
89
|
+
```ts
|
|
90
|
+
try {
|
|
91
|
+
const index = await dri.getRecoveryIndex(caseId);
|
|
92
|
+
render(index.score, index.disclaimer); // never one without the other
|
|
93
|
+
} catch (e) {
|
|
94
|
+
if (e instanceof MissingDisclosureError) { /* do not render a bare score */ }
|
|
95
|
+
}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Evidence packages
|
|
99
|
+
|
|
100
|
+
```ts
|
|
101
|
+
const pkg = await dri.generateEvidencePackage(caseId);
|
|
102
|
+
// hashed and immutable, so a reader months later can confirm what was produced
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Every method
|
|
106
|
+
|
|
107
|
+
`createInvestigation` · `listInvestigations` · `traceFunds` · `getFlowGraph` ·
|
|
108
|
+
`identifyInterventionPoints` · `getInvestigationTimeline` · `listCases` ·
|
|
109
|
+
`getRecoveryIndex` · `generateEvidencePackage`
|
|
110
|
+
|
|
111
|
+
## The rest of the SDK
|
|
112
|
+
|
|
113
|
+
| Package | For |
|
|
114
|
+
|---|---|
|
|
115
|
+
| [`@decentrys/protect`](https://www.npmjs.com/package/@decentrys/protect) | Pre-sign risk assessment for wallets and dapps |
|
|
116
|
+
| [`@decentrys/ui-sdk`](https://www.npmjs.com/package/@decentrys/ui-sdk) | React components that render Protect results |
|
|
117
|
+
| [`@decentrys/sentinel-sdk`](https://www.npmjs.com/package/@decentrys/sentinel-sdk) | Monitoring deployed contracts and treasuries |
|
|
118
|
+
| [`@decentrys/risk-sdk`](https://www.npmjs.com/package/@decentrys/risk-sdk) | Screening for exchanges and custodians |
|
|
119
|
+
| [`@decentrys/dri-sdk`](https://www.npmjs.com/package/@decentrys/dri-sdk) | Fund tracing and recovery intelligence |
|
|
120
|
+
| [`@decentrys/agent`](https://www.npmjs.com/package/@decentrys/agent) | Policy enforcement for autonomous agents |
|
|
40
121
|
|
|
41
122
|
## Licence
|
|
42
123
|
|
|
43
124
|
MIT © Decentrys Labs
|
|
44
125
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
- [decentrys.com](https://decentrys.com) · [SDK overview](https://decentrys.com/sdk) · [Developer API](https://decentrys.com/developers)
|
|
48
|
-
- Source: [github.com/teamdecentrys-byte/Decentrys](https://github.com/teamdecentrys-byte/Decentrys)
|
|
126
|
+
[decentrys.com](https://decentrys.com) · [SDK overview](https://decentrys.com/sdk) · [Developer API](https://decentrys.com/developers) · [Source](https://github.com/teamdecentrys-byte/Decentrys)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decentrys/dri-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Digital Recovery Intelligence: fund tracing, attribution, intervention points and evidence packages. Analytical only — Decentrys never takes custody of assets.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Decentrys Labs",
|