@telaro/defi 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/README.md ADDED
@@ -0,0 +1,46 @@
1
+ # @telaro/defi
2
+
3
+ Telaro DeFi-venue adapter bundle.
4
+
5
+ Wrap a venue SDK (Drift, Jupiter, Kamino, MarginFi, Voltr) so every
6
+ call auto-records on Telaro. One install, one import per venue.
7
+
8
+ ## Install
9
+
10
+ ```bash
11
+ pnpm add @telaro/defi
12
+ ```
13
+
14
+ ## Usage
15
+
16
+ ```ts
17
+ // Drift
18
+ import { DriftClient } from "@drift-labs/sdk";
19
+ import { withTelaro } from "@telaro/defi/drift";
20
+ const drift = new DriftClient({...});
21
+ await drift.subscribe();
22
+ const bonded = withTelaro(drift, { bondAmount: 5_000_000_000n, scorer });
23
+ await bonded.placePerpOrder({...}); // auto-records
24
+
25
+ // Jupiter
26
+ import { withTelaro } from "@telaro/defi/jupiter";
27
+
28
+ // Kamino
29
+ import { withTelaro } from "@telaro/defi/kamino";
30
+
31
+ // MarginFi
32
+ import { withTelaro } from "@telaro/defi/marginfi";
33
+
34
+ // Voltr
35
+ import { withTelaro } from "@telaro/defi/voltr";
36
+ ```
37
+
38
+ ## Subpaths
39
+
40
+ | Subpath | Wraps |
41
+ |---|---|
42
+ | `@telaro/defi/drift` | Drift `@drift-labs/sdk` `DriftClient` |
43
+ | `@telaro/defi/jupiter` | Jupiter aggregator client |
44
+ | `@telaro/defi/kamino` | Kamino managed vault SDK |
45
+ | `@telaro/defi/marginfi` | MarginFi `@mrgnlabs/marginfi-client-v2` |
46
+ | `@telaro/defi/voltr` | Voltr lending SDK |
@@ -0,0 +1,7 @@
1
+ /**
2
+ * `@telaro/defi/drift` — thin re-export of `@telaro/drift`. Use this subpath
3
+ * if you only care about the drift venue; the parent `@telaro/defi`
4
+ * exposes the same surface for every venue.
5
+ */
6
+ export * from "@telaro/drift";
7
+ //# sourceMappingURL=drift.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drift.d.ts","sourceRoot":"","sources":["../src/drift.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,cAAc,eAAe,CAAC"}
package/dist/drift.js ADDED
@@ -0,0 +1,7 @@
1
+ /**
2
+ * `@telaro/defi/drift` — thin re-export of `@telaro/drift`. Use this subpath
3
+ * if you only care about the drift venue; the parent `@telaro/defi`
4
+ * exposes the same surface for every venue.
5
+ */
6
+ export * from "@telaro/drift";
7
+ //# sourceMappingURL=drift.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drift.js","sourceRoot":"","sources":["../src/drift.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,cAAc,eAAe,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @telaro/defi — Telaro DeFi-venue adapter bundle.
3
+ *
4
+ * One install gives you the Telaro wrappers for the five DeFi SDKs we
5
+ * support today. Pick the subpath that matches your venue:
6
+ *
7
+ * import { withTelaro } from "@telaro/defi/drift";
8
+ * import { withTelaro } from "@telaro/defi/jupiter";
9
+ * import { withTelaro } from "@telaro/defi/kamino";
10
+ * import { withTelaro } from "@telaro/defi/marginfi";
11
+ * import { withTelaro } from "@telaro/defi/voltr";
12
+ *
13
+ * The root export re-exports the shared `ActionKind` enum and the
14
+ * dapp-adapter-core types so you can pass them around without a second
15
+ * import.
16
+ */
17
+ export { ActionKind } from "@telaro/dapp-adapter-core";
18
+ export type { BondedDappConfig, DappSdkLike, } from "@telaro/dapp-adapter-core";
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,YAAY,EACV,gBAAgB,EAChB,WAAW,GACZ,MAAM,2BAA2B,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @telaro/defi — Telaro DeFi-venue adapter bundle.
3
+ *
4
+ * One install gives you the Telaro wrappers for the five DeFi SDKs we
5
+ * support today. Pick the subpath that matches your venue:
6
+ *
7
+ * import { withTelaro } from "@telaro/defi/drift";
8
+ * import { withTelaro } from "@telaro/defi/jupiter";
9
+ * import { withTelaro } from "@telaro/defi/kamino";
10
+ * import { withTelaro } from "@telaro/defi/marginfi";
11
+ * import { withTelaro } from "@telaro/defi/voltr";
12
+ *
13
+ * The root export re-exports the shared `ActionKind` enum and the
14
+ * dapp-adapter-core types so you can pass them around without a second
15
+ * import.
16
+ */
17
+ export { ActionKind } from "@telaro/dapp-adapter-core";
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * `@telaro/defi/jupiter` — thin re-export of `@telaro/jupiter`. Use this subpath
3
+ * if you only care about the jupiter venue; the parent `@telaro/defi`
4
+ * exposes the same surface for every venue.
5
+ */
6
+ export * from "@telaro/jupiter";
7
+ //# sourceMappingURL=jupiter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jupiter.d.ts","sourceRoot":"","sources":["../src/jupiter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * `@telaro/defi/jupiter` — thin re-export of `@telaro/jupiter`. Use this subpath
3
+ * if you only care about the jupiter venue; the parent `@telaro/defi`
4
+ * exposes the same surface for every venue.
5
+ */
6
+ export * from "@telaro/jupiter";
7
+ //# sourceMappingURL=jupiter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jupiter.js","sourceRoot":"","sources":["../src/jupiter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * `@telaro/defi/kamino` — thin re-export of `@telaro/kamino`. Use this subpath
3
+ * if you only care about the kamino venue; the parent `@telaro/defi`
4
+ * exposes the same surface for every venue.
5
+ */
6
+ export * from "@telaro/kamino";
7
+ //# sourceMappingURL=kamino.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kamino.d.ts","sourceRoot":"","sources":["../src/kamino.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,cAAc,gBAAgB,CAAC"}
package/dist/kamino.js ADDED
@@ -0,0 +1,7 @@
1
+ /**
2
+ * `@telaro/defi/kamino` — thin re-export of `@telaro/kamino`. Use this subpath
3
+ * if you only care about the kamino venue; the parent `@telaro/defi`
4
+ * exposes the same surface for every venue.
5
+ */
6
+ export * from "@telaro/kamino";
7
+ //# sourceMappingURL=kamino.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kamino.js","sourceRoot":"","sources":["../src/kamino.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * `@telaro/defi/marginfi` — thin re-export of `@telaro/marginfi`. Use this subpath
3
+ * if you only care about the marginfi venue; the parent `@telaro/defi`
4
+ * exposes the same surface for every venue.
5
+ */
6
+ export * from "@telaro/marginfi";
7
+ //# sourceMappingURL=marginfi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"marginfi.d.ts","sourceRoot":"","sources":["../src/marginfi.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * `@telaro/defi/marginfi` — thin re-export of `@telaro/marginfi`. Use this subpath
3
+ * if you only care about the marginfi venue; the parent `@telaro/defi`
4
+ * exposes the same surface for every venue.
5
+ */
6
+ export * from "@telaro/marginfi";
7
+ //# sourceMappingURL=marginfi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"marginfi.js","sourceRoot":"","sources":["../src/marginfi.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * `@telaro/defi/voltr` — thin re-export of `@telaro/voltr`. Use this subpath
3
+ * if you only care about the voltr venue; the parent `@telaro/defi`
4
+ * exposes the same surface for every venue.
5
+ */
6
+ export * from "@telaro/voltr";
7
+ //# sourceMappingURL=voltr.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"voltr.d.ts","sourceRoot":"","sources":["../src/voltr.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,cAAc,eAAe,CAAC"}
package/dist/voltr.js ADDED
@@ -0,0 +1,7 @@
1
+ /**
2
+ * `@telaro/defi/voltr` — thin re-export of `@telaro/voltr`. Use this subpath
3
+ * if you only care about the voltr venue; the parent `@telaro/defi`
4
+ * exposes the same surface for every venue.
5
+ */
6
+ export * from "@telaro/voltr";
7
+ //# sourceMappingURL=voltr.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"voltr.js","sourceRoot":"","sources":["../src/voltr.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,cAAc,eAAe,CAAC"}
package/package.json ADDED
@@ -0,0 +1,69 @@
1
+ {
2
+ "name": "@telaro/defi",
3
+ "version": "0.1.0",
4
+ "description": "Telaro DeFi-venue adapters bundle. Wrap Drift, Jupiter, Kamino, MarginFi, or Voltr SDKs so every venue interaction auto-records on Telaro. One install, one import per venue.",
5
+ "license": "MIT",
6
+ "homepage": "https://telaro.xyz",
7
+ "repository": "https://github.com/Telaro-Protocol/telaro-protocol",
8
+ "main": "dist/index.js",
9
+ "module": "dist/index.js",
10
+ "types": "dist/index.d.ts",
11
+ "type": "module",
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "import": "./dist/index.js"
16
+ },
17
+ "./drift": {
18
+ "types": "./dist/drift.d.ts",
19
+ "import": "./dist/drift.js"
20
+ },
21
+ "./jupiter": {
22
+ "types": "./dist/jupiter.d.ts",
23
+ "import": "./dist/jupiter.js"
24
+ },
25
+ "./kamino": {
26
+ "types": "./dist/kamino.d.ts",
27
+ "import": "./dist/kamino.js"
28
+ },
29
+ "./marginfi": {
30
+ "types": "./dist/marginfi.d.ts",
31
+ "import": "./dist/marginfi.js"
32
+ },
33
+ "./voltr": {
34
+ "types": "./dist/voltr.d.ts",
35
+ "import": "./dist/voltr.js"
36
+ }
37
+ },
38
+ "files": [
39
+ "dist",
40
+ "README.md"
41
+ ],
42
+ "scripts": {
43
+ "build": "tsc -p tsconfig.json",
44
+ "test": "node --import tsx/esm --test tests/*.test.ts"
45
+ },
46
+ "dependencies": {
47
+ "@telaro/dapp-adapter-core": "workspace:*",
48
+ "@telaro/drift": "workspace:*",
49
+ "@telaro/jupiter": "workspace:*",
50
+ "@telaro/kamino": "workspace:*",
51
+ "@telaro/marginfi": "workspace:*",
52
+ "@telaro/voltr": "workspace:*"
53
+ },
54
+ "devDependencies": {
55
+ "@types/node": "^22.0.0",
56
+ "typescript": "^5.5.0",
57
+ "tsx": "^4.16.0"
58
+ },
59
+ "keywords": [
60
+ "telaro",
61
+ "defi",
62
+ "drift",
63
+ "jupiter",
64
+ "kamino",
65
+ "marginfi",
66
+ "voltr",
67
+ "solana"
68
+ ]
69
+ }