@m2msentinel/sdk 1.2.2 → 1.2.5
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 +106 -100
- package/agent_adapter.js +1 -1
- package/base_account_paymaster_guard.js +869 -0
- package/index.d.ts +237 -1
- package/index.js +6 -1
- package/mcp_server.js +2 -2
- package/package.json +15 -4
- package/typescript/base_account_paymaster_guard.ts +264 -0
- package/typescript/index.ts +12 -0
- package/typescript/package-lock.json +50 -0
- package/typescript/package.json +6 -2
- package/typescript/tsconfig.json +13 -0
- package/typescript/x402.ts +1 -1
- package/x402_signer.js +1 -1
package/typescript/package.json
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "m2m-sentinel-sdk",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.5",
|
|
4
4
|
"description": "Source-distributed TypeScript client for M2M Sentinel Base capability intelligence API",
|
|
5
5
|
"main": "index.ts",
|
|
6
6
|
"types": "index.ts",
|
|
7
7
|
"private": true,
|
|
8
|
+
"engines": {
|
|
9
|
+
"node": ">=18"
|
|
10
|
+
},
|
|
8
11
|
"scripts": {
|
|
9
|
-
"build": "tsc"
|
|
12
|
+
"build": "tsc --noEmit"
|
|
10
13
|
},
|
|
11
14
|
"devDependencies": {
|
|
15
|
+
"@types/node": "^22.7.5",
|
|
12
16
|
"typescript": "^5.0.0"
|
|
13
17
|
}
|
|
14
18
|
}
|
package/typescript/x402.ts
CHANGED
|
@@ -318,7 +318,7 @@ export class X402SignerClient {
|
|
|
318
318
|
|
|
319
319
|
async fetchWithAutoPayment(path: string, options: any = {}): Promise<any> {
|
|
320
320
|
const url = path.startsWith('http') ? path : `${this.baseUrl}/${path.replace(/^\/+/, '')}`;
|
|
321
|
-
const headers = { 'Accept': 'application/json', 'User-Agent': '@m2msentinel/sdk-ts/1.2.
|
|
321
|
+
const headers = { 'Accept': 'application/json', 'User-Agent': '@m2msentinel/sdk-ts/1.2.5', ...(options.headers || {}) };
|
|
322
322
|
|
|
323
323
|
let res = await fetch(url, { method: options.method || 'GET', headers, body: options.body });
|
|
324
324
|
if (res.status !== 402) {
|
package/x402_signer.js
CHANGED
|
@@ -271,7 +271,7 @@ class X402SignerClient {
|
|
|
271
271
|
path: url.pathname + url.search,
|
|
272
272
|
method: options.method || 'GET',
|
|
273
273
|
headers: {
|
|
274
|
-
'User-Agent': 'M2M-Sentinel-X402Signer/1.2.
|
|
274
|
+
'User-Agent': 'M2M-Sentinel-X402Signer/1.2.5',
|
|
275
275
|
'Accept': 'application/json',
|
|
276
276
|
...(options.headers || {})
|
|
277
277
|
},
|