@contextvm/sdk 0.2.7 → 0.2.8
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
CHANGED
|
@@ -25,6 +25,42 @@ npm install @contextvm/sdk
|
|
|
25
25
|
|
|
26
26
|
**Note:** You can use your preferred package manager to install the SDK.
|
|
27
27
|
|
|
28
|
+
## Package Structure
|
|
29
|
+
|
|
30
|
+
The SDK supports two import patterns:
|
|
31
|
+
|
|
32
|
+
### Primary Entrypoint (Recommended)
|
|
33
|
+
|
|
34
|
+
Import from the root for convenience:
|
|
35
|
+
|
|
36
|
+
```typescript
|
|
37
|
+
import { NostrClientTransport, createLogger } from '@contextvm/sdk';
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Subpath Imports (Tree-shaking)
|
|
41
|
+
|
|
42
|
+
For smaller bundles, import directly from specific modules:
|
|
43
|
+
|
|
44
|
+
```typescript
|
|
45
|
+
// Core utilities
|
|
46
|
+
import { createLogger } from '@contextvm/sdk/core';
|
|
47
|
+
|
|
48
|
+
// Transport implementations
|
|
49
|
+
import { NostrClientTransport } from '@contextvm/sdk/transport';
|
|
50
|
+
|
|
51
|
+
// Relay management
|
|
52
|
+
import { RelayPool } from '@contextvm/sdk/relay';
|
|
53
|
+
|
|
54
|
+
// Cryptographic signing
|
|
55
|
+
import { NostrSigner } from '@contextvm/sdk/signer';
|
|
56
|
+
|
|
57
|
+
// Gateway and Proxy
|
|
58
|
+
import { Gateway } from '@contextvm/sdk/gateway';
|
|
59
|
+
import { Proxy } from '@contextvm/sdk/proxy';
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**Note:** Subpath imports help bundlers eliminate unused code. Use them when bundle size matters.
|
|
63
|
+
|
|
28
64
|
## Usage
|
|
29
65
|
|
|
30
66
|
Visit the [ContextVM documentation](https://contextvm.org) for information on how to use ContextVM.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/transport/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/transport/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wCAAwC,CAAC;AACvD,cAAc,2BAA2B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/transport/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/transport/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wCAAwC,CAAC;AACvD,cAAc,2BAA2B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contextvm/sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
4
4
|
"description": "CtxVM SDK for JavaScript/TypeScript",
|
|
5
5
|
"license": "LGPL-3.0-1",
|
|
6
6
|
"author": "ContextVM",
|
|
7
7
|
"bugs": "https://github.com/ContextVM/ts-sdk/issues",
|
|
8
8
|
"type": "module",
|
|
9
|
+
"sideEffects": false,
|
|
9
10
|
"repository": {
|
|
10
11
|
"type": "git",
|
|
11
12
|
"url": "git+https://github.com/ContextVM/ts-sdk.git"
|
|
@@ -23,15 +24,46 @@
|
|
|
23
24
|
"llm"
|
|
24
25
|
],
|
|
25
26
|
"exports": {
|
|
26
|
-
".":
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"./
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"./
|
|
27
|
+
".": {
|
|
28
|
+
"types": "./dist/esm/index.d.ts",
|
|
29
|
+
"default": "./dist/esm/index.js"
|
|
30
|
+
},
|
|
31
|
+
"./core": {
|
|
32
|
+
"types": "./dist/esm/core/index.d.ts",
|
|
33
|
+
"default": "./dist/esm/core/index.js"
|
|
34
|
+
},
|
|
35
|
+
"./core/*": {
|
|
36
|
+
"types": "./dist/esm/core/*.d.ts",
|
|
37
|
+
"default": "./dist/esm/core/*.js"
|
|
38
|
+
},
|
|
39
|
+
"./relay": {
|
|
40
|
+
"types": "./dist/esm/relay/index.d.ts",
|
|
41
|
+
"default": "./dist/esm/relay/index.js"
|
|
42
|
+
},
|
|
43
|
+
"./relay/*": {
|
|
44
|
+
"types": "./dist/esm/relay/*.d.ts",
|
|
45
|
+
"default": "./dist/esm/relay/*.js"
|
|
46
|
+
},
|
|
47
|
+
"./signer": {
|
|
48
|
+
"types": "./dist/esm/signer/index.d.ts",
|
|
49
|
+
"default": "./dist/esm/signer/index.js"
|
|
50
|
+
},
|
|
51
|
+
"./signer/*": {
|
|
52
|
+
"types": "./dist/esm/signer/*.d.ts",
|
|
53
|
+
"default": "./dist/esm/signer/*.js"
|
|
54
|
+
},
|
|
55
|
+
"./gateway": {
|
|
56
|
+
"types": "./dist/esm/gateway/index.d.ts",
|
|
57
|
+
"default": "./dist/esm/gateway/index.js"
|
|
58
|
+
},
|
|
59
|
+
"./proxy": {
|
|
60
|
+
"types": "./dist/esm/proxy/index.d.ts",
|
|
61
|
+
"default": "./dist/esm/proxy/index.js"
|
|
62
|
+
},
|
|
63
|
+
"./transport": {
|
|
64
|
+
"types": "./dist/esm/transport/index.d.ts",
|
|
65
|
+
"default": "./dist/esm/transport/index.js"
|
|
66
|
+
}
|
|
35
67
|
},
|
|
36
68
|
"types": "./dist/esm/index.d.ts",
|
|
37
69
|
"files": [
|
|
@@ -44,7 +76,8 @@
|
|
|
44
76
|
"test": "bun test src",
|
|
45
77
|
"format": "bun prettier --write src",
|
|
46
78
|
"release": "bun run build && bun publish",
|
|
47
|
-
"typecheck": "bun run tsc --noEmit"
|
|
79
|
+
"typecheck": "bun run tsc --noEmit",
|
|
80
|
+
"verify-exports": "bun run scripts/verify-exports.ts"
|
|
48
81
|
},
|
|
49
82
|
"devDependencies": {
|
|
50
83
|
"@changesets/cli": "^2.29.8",
|