@proxygate/cli 0.1.5 → 0.1.7
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/dist/commands/tunnel-handlers.d.ts.map +1 -1
- package/dist/commands/tunnel-handlers.js +1 -32
- package/dist/commands/tunnel-handlers.js.map +1 -1
- package/dist/keypair.d.ts +2 -7
- package/dist/keypair.d.ts.map +1 -1
- package/dist/keypair.js +37 -101
- package/dist/keypair.js.map +1 -1
- package/package.json +12 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tunnel-handlers.d.ts","sourceRoot":"","sources":["../../src/commands/tunnel-handlers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tunnel-handlers.d.ts","sourceRoot":"","sources":["../../src/commands/tunnel-handlers.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAG9D,sFAAsF;AACtF,wBAAsB,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC;IAC9D,SAAS,EAAE,UAAU,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC,CA2BD;AAED,yDAAyD;AACzD,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAU/E;AAED,yCAAyC;AACzC,wBAAgB,SAAS,IAAI,MAAM,CAElC;AAMD,gEAAgE;AAChE,wBAAgB,WAAW,CAAC,QAAQ,EAAE,uBAAuB,EAAE,GAAG,IAAI,CAWrE;AAED,wCAAwC;AACxC,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAGnD;AAED,iCAAiC;AACjC,wBAAgB,OAAO,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAE1C;AAED,mCAAmC;AACnC,wBAAgB,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAIhF"}
|
|
@@ -2,39 +2,8 @@ import { readFile } from 'node:fs/promises';
|
|
|
2
2
|
import { resolve } from 'node:path';
|
|
3
3
|
import { homedir } from 'node:os';
|
|
4
4
|
import nacl from 'tweetnacl';
|
|
5
|
+
import { encodeBase58 } from '@proxygate/sdk';
|
|
5
6
|
import { bold, green, yellow, red, dim, cyan } from '../format.js';
|
|
6
|
-
// ---------------------------------------------------------------------------
|
|
7
|
-
// Helpers
|
|
8
|
-
// ---------------------------------------------------------------------------
|
|
9
|
-
/** Base58 alphabet (same as Solana). */
|
|
10
|
-
const BASE58_ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
|
|
11
|
-
/** Encode bytes as base58 string. */
|
|
12
|
-
function encodeBase58(bytes) {
|
|
13
|
-
const digits = [0];
|
|
14
|
-
for (const byte of bytes) {
|
|
15
|
-
let carry = byte;
|
|
16
|
-
for (let j = 0; j < digits.length; j++) {
|
|
17
|
-
carry += digits[j] << 8;
|
|
18
|
-
digits[j] = carry % 58;
|
|
19
|
-
carry = (carry / 58) | 0;
|
|
20
|
-
}
|
|
21
|
-
while (carry > 0) {
|
|
22
|
-
digits.push(carry % 58);
|
|
23
|
-
carry = (carry / 58) | 0;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
let result = '';
|
|
27
|
-
for (const byte of bytes) {
|
|
28
|
-
if (byte === 0)
|
|
29
|
-
result += BASE58_ALPHABET[0];
|
|
30
|
-
else
|
|
31
|
-
break;
|
|
32
|
-
}
|
|
33
|
-
for (let i = digits.length - 1; i >= 0; i--) {
|
|
34
|
-
result += BASE58_ALPHABET[digits[i]];
|
|
35
|
-
}
|
|
36
|
-
return result;
|
|
37
|
-
}
|
|
38
7
|
/** Load and parse a Solana keypair JSON file, returning secretKey + walletAddress. */
|
|
39
8
|
export async function loadKeypair(keypairPath) {
|
|
40
9
|
let resolvedPath = keypairPath;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tunnel-handlers.js","sourceRoot":"","sources":["../../src/commands/tunnel-handlers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"tunnel-handlers.js","sourceRoot":"","sources":["../../src/commands/tunnel-handlers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEnE,sFAAsF;AACtF,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,WAAmB;IAInD,IAAI,YAAY,GAAG,WAAW,CAAC;IAC/B,IAAI,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QACjC,YAAY,GAAG,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;IACvD,CAAC;IACD,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAErC,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IAClD,MAAM,QAAQ,GAAY,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAE1C,IACE,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,C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AS,CAAC,SAAiB,EAAE,OAAe,EAAE,IAAY;IACxE,OAAO,CAAC,GAAG,CACT,GAAG,SAAS,EAAE,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,IAAI,IAAI,GAAG,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CACxF,CAAC;AACJ,CAAC"}
|
package/dist/keypair.d.ts
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Parse and convert Solana keypairs from various formats.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* -
|
|
6
|
-
* - JSON array of 32 numbers (seed only)
|
|
7
|
-
* - Base58 string, 64 bytes decoded (Phantom private key export)
|
|
8
|
-
* - Base58 string, 32 bytes decoded (seed)
|
|
9
|
-
* - Raw base64 string, 64 bytes decoded
|
|
10
|
-
* - Raw base64 string, 32 bytes decoded
|
|
4
|
+
* Delegates core parsing to @proxygate/sdk's parseKeypairBytes.
|
|
5
|
+
* Adds CLI-specific format detection labels for user display.
|
|
11
6
|
*
|
|
12
7
|
* Output: Solana-compatible JSON array of 64 numbers [secretKey(32) + publicKey(32)].
|
|
13
8
|
*/
|
package/dist/keypair.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keypair.d.ts","sourceRoot":"","sources":["../src/keypair.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"keypair.d.ts","sourceRoot":"","sources":["../src/keypair.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAWH,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB;AAqCD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAIrD"}
|
package/dist/keypair.js
CHANGED
|
@@ -1,129 +1,65 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Parse and convert Solana keypairs from various formats.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* -
|
|
6
|
-
* - JSON array of 32 numbers (seed only)
|
|
7
|
-
* - Base58 string, 64 bytes decoded (Phantom private key export)
|
|
8
|
-
* - Base58 string, 32 bytes decoded (seed)
|
|
9
|
-
* - Raw base64 string, 64 bytes decoded
|
|
10
|
-
* - Raw base64 string, 32 bytes decoded
|
|
4
|
+
* Delegates core parsing to @proxygate/sdk's parseKeypairBytes.
|
|
5
|
+
* Adds CLI-specific format detection labels for user display.
|
|
11
6
|
*
|
|
12
7
|
* Output: Solana-compatible JSON array of 64 numbers [secretKey(32) + publicKey(32)].
|
|
13
8
|
*/
|
|
14
|
-
import
|
|
15
|
-
const
|
|
16
|
-
const BASE58_SET = new Set(BASE58_ALPHABET);
|
|
17
|
-
const BASE58_MAP = new Map();
|
|
18
|
-
for (let i = 0; i < BASE58_ALPHABET.length; i++) {
|
|
19
|
-
BASE58_MAP.set(BASE58_ALPHABET[i], i);
|
|
20
|
-
}
|
|
21
|
-
function decodeBase58(str) {
|
|
22
|
-
let leadingOnes = 0;
|
|
23
|
-
for (let i = 0; i < str.length && str[i] === '1'; i++)
|
|
24
|
-
leadingOnes++;
|
|
25
|
-
let num = BigInt(0);
|
|
26
|
-
for (let i = 0; i < str.length; i++) {
|
|
27
|
-
const v = BASE58_MAP.get(str[i]);
|
|
28
|
-
if (v === undefined)
|
|
29
|
-
throw new Error(`Invalid base58 character: ${str[i]}`);
|
|
30
|
-
num = num * 58n + BigInt(v);
|
|
31
|
-
}
|
|
32
|
-
const bytes = [];
|
|
33
|
-
while (num > 0n) {
|
|
34
|
-
bytes.unshift(Number(num % 256n));
|
|
35
|
-
num /= 256n;
|
|
36
|
-
}
|
|
37
|
-
for (let i = 0; i < leadingOnes; i++)
|
|
38
|
-
bytes.unshift(0);
|
|
39
|
-
return Uint8Array.from(bytes);
|
|
40
|
-
}
|
|
9
|
+
import { parseKeypairBytes, decodeBase58 } from '@proxygate/sdk';
|
|
10
|
+
const BASE58_CHARS = new Set('123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz');
|
|
41
11
|
function isBase58(str) {
|
|
42
12
|
for (const ch of str) {
|
|
43
|
-
if (!
|
|
13
|
+
if (!BASE58_CHARS.has(ch))
|
|
44
14
|
return false;
|
|
45
15
|
}
|
|
46
16
|
return str.length > 0;
|
|
47
17
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
function keypairFromSeed(seed) {
|
|
52
|
-
const kp = nacl.sign.keyPair.fromSeed(seed);
|
|
53
|
-
return kp.secretKey; // 64 bytes: seed(32) + pubkey(32)
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Parse raw content (file contents or pasted string) into a 64-byte Solana keypair.
|
|
57
|
-
* Throws descriptive errors for unsupported formats.
|
|
58
|
-
*/
|
|
59
|
-
export function parseKeypair(raw) {
|
|
18
|
+
/** Detect the human-readable format label for CLI display. */
|
|
19
|
+
function detectFormat(raw) {
|
|
60
20
|
const trimmed = raw.trim();
|
|
61
|
-
// 1. JSON array
|
|
62
21
|
if (trimmed.startsWith('[')) {
|
|
63
22
|
try {
|
|
64
23
|
const arr = JSON.parse(trimmed);
|
|
65
|
-
if (
|
|
66
|
-
|
|
24
|
+
if (Array.isArray(arr)) {
|
|
25
|
+
if (arr.length === 64)
|
|
26
|
+
return 'Solana CLI keypair (64-byte JSON array)';
|
|
27
|
+
if (arr.length === 32)
|
|
28
|
+
return '32-byte seed (JSON array, expanded to keypair)';
|
|
67
29
|
}
|
|
68
|
-
if (arr.length === 64) {
|
|
69
|
-
return { secretKey: arr, format: 'Solana CLI keypair (64-byte JSON array)' };
|
|
70
|
-
}
|
|
71
|
-
if (arr.length === 32) {
|
|
72
|
-
const full = keypairFromSeed(Uint8Array.from(arr));
|
|
73
|
-
return { secretKey: Array.from(full), format: '32-byte seed (JSON array, expanded to keypair)' };
|
|
74
|
-
}
|
|
75
|
-
throw new Error(`Expected 32 or 64 numbers, got ${arr.length}`);
|
|
76
|
-
}
|
|
77
|
-
catch (err) {
|
|
78
|
-
if (err instanceof SyntaxError)
|
|
79
|
-
throw new Error('Invalid JSON in keypair file');
|
|
80
|
-
throw err;
|
|
81
30
|
}
|
|
31
|
+
catch { /* fall through */ }
|
|
82
32
|
}
|
|
83
|
-
// 2. Base58 string (Phantom export, etc.)
|
|
84
33
|
if (isBase58(trimmed) && trimmed.length >= 32 && trimmed.length <= 96) {
|
|
85
34
|
const bytes = decodeBase58(trimmed);
|
|
86
|
-
if (bytes.length === 64)
|
|
87
|
-
return
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
const full = keypairFromSeed(bytes);
|
|
91
|
-
return { secretKey: Array.from(full), format: 'Base58 seed (32 bytes, expanded to keypair)' };
|
|
92
|
-
}
|
|
93
|
-
// Could be a public key (32 bytes are valid base58 at shorter lengths)
|
|
94
|
-
throw new Error(`Base58 decoded to ${bytes.length} bytes. Expected 32 (seed) or 64 (keypair).`);
|
|
35
|
+
if (bytes.length === 64)
|
|
36
|
+
return 'Base58 private key (64 bytes, e.g. Phantom export)';
|
|
37
|
+
if (bytes.length === 32)
|
|
38
|
+
return 'Base58 seed (32 bytes, expanded to keypair)';
|
|
95
39
|
}
|
|
96
|
-
// 3. Hex string (check before base64, since hex chars are valid base64)
|
|
97
40
|
if (/^(0x)?[0-9a-fA-F]+$/.test(trimmed)) {
|
|
98
41
|
const hex = trimmed.startsWith('0x') ? trimmed.slice(2) : trimmed;
|
|
99
|
-
if (hex.length === 128
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}
|
|
104
|
-
if (bytes.length === 32) {
|
|
105
|
-
const full = keypairFromSeed(bytes);
|
|
106
|
-
return { secretKey: Array.from(full), format: 'Hex seed (32 bytes, expanded to keypair)' };
|
|
107
|
-
}
|
|
108
|
-
}
|
|
42
|
+
if (hex.length === 128)
|
|
43
|
+
return 'Hex private key (64 bytes)';
|
|
44
|
+
if (hex.length === 64)
|
|
45
|
+
return 'Hex seed (32 bytes, expanded to keypair)';
|
|
109
46
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
if (bytes.length === 32) {
|
|
117
|
-
const full = keypairFromSeed(bytes);
|
|
118
|
-
return { secretKey: Array.from(full), format: 'Base64 seed (32 bytes, expanded to keypair)' };
|
|
119
|
-
}
|
|
120
|
-
throw new Error(`Base64 decoded to ${bytes.length} bytes. Expected 32 (seed) or 64 (keypair).`);
|
|
47
|
+
if (/^[A-Za-z0-9+/]+=*$/.test(trimmed) && trimmed.length >= 43) {
|
|
48
|
+
const bytes = Buffer.from(trimmed, 'base64');
|
|
49
|
+
if (bytes.length === 64)
|
|
50
|
+
return 'Base64 private key (64 bytes)';
|
|
51
|
+
if (bytes.length === 32)
|
|
52
|
+
return 'Base64 seed (32 bytes, expanded to keypair)';
|
|
121
53
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
54
|
+
return 'Unknown format';
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Parse raw content (file contents or pasted string) into a 64-byte Solana keypair.
|
|
58
|
+
* Throws descriptive errors for unsupported formats.
|
|
59
|
+
*/
|
|
60
|
+
export function parseKeypair(raw) {
|
|
61
|
+
const format = detectFormat(raw);
|
|
62
|
+
const secretKey = parseKeypairBytes(raw);
|
|
63
|
+
return { secretKey: Array.from(secretKey), format };
|
|
128
64
|
}
|
|
129
65
|
//# sourceMappingURL=keypair.js.map
|
package/dist/keypair.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keypair.js","sourceRoot":"","sources":["../src/keypair.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"keypair.js","sourceRoot":"","sources":["../src/keypair.ts"],"names":[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F,CAAC;IAED,IAAI,qBAAqB,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;QACxC,MAAM,GAAG,GAAG,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;QAClE,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG;YAAE,OAAO,4BAA4B,CAAC;QAC5D,IAAI,GAAG,CAAC,MAAM,KAAK,EAAE;YAAE,OAAO,0CAA0C,CAAC;IAC3E,CAAC;IAED,IAAI,oBAAoB,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,MAAM,IAAI,EAAE,EAAE,CAAC;QAC/D,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QAC7C,IAAI,KAAK,CAAC,MAAM,KAAK,EAAE;YAAE,OAAO,+BAA+B,CAAC;QAChE,IAAI,KAAK,CAAC,MAAM,KAAK,EAAE;YAAE,OAAO,6CAA6C,CAAC;IAChF,CAAC;IAED,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,GAAW;IACtC,MAAM,MAAM,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;IACjC,MAAM,SAAS,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC;IACzC,OAAO,EAAE,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;AACtD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proxygate/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "ProxyGate CLI — buy APIs, sell agent capacity, and post jobs on the autonomous agent marketplace. USDC on Solana.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -35,21 +35,12 @@
|
|
|
35
35
|
"engines": {
|
|
36
36
|
"node": ">=18.0.0"
|
|
37
37
|
},
|
|
38
|
-
"scripts": {
|
|
39
|
-
"build:skills": "tsx scripts/embed-skills.ts",
|
|
40
|
-
"build": "pnpm build:skills && tsc",
|
|
41
|
-
"typecheck": "tsc --noEmit",
|
|
42
|
-
"dev": "tsx src/index.ts",
|
|
43
|
-
"test": "vitest run",
|
|
44
|
-
"postinstall": "node dist/postinstall.js || true",
|
|
45
|
-
"prepublishOnly": "pnpm build"
|
|
46
|
-
},
|
|
47
38
|
"dependencies": {
|
|
48
39
|
"@inquirer/prompts": "^8.3.0",
|
|
49
|
-
"@proxygate/sdk": "^0.3.0",
|
|
50
40
|
"commander": "^14.0.3",
|
|
51
41
|
"js-yaml": "^4.1.1",
|
|
52
|
-
"tweetnacl": "^1.0.3"
|
|
42
|
+
"tweetnacl": "^1.0.3",
|
|
43
|
+
"@proxygate/sdk": "0.3.2"
|
|
53
44
|
},
|
|
54
45
|
"devDependencies": {
|
|
55
46
|
"@types/js-yaml": "^4.0.9",
|
|
@@ -57,5 +48,13 @@
|
|
|
57
48
|
"tsx": "^4.0.0",
|
|
58
49
|
"typescript": "^5.7.0",
|
|
59
50
|
"vitest": "^4.0.0"
|
|
51
|
+
},
|
|
52
|
+
"scripts": {
|
|
53
|
+
"build:skills": "tsx scripts/embed-skills.ts",
|
|
54
|
+
"build": "pnpm build:skills && tsc",
|
|
55
|
+
"typecheck": "tsc --noEmit",
|
|
56
|
+
"dev": "tsx src/index.ts",
|
|
57
|
+
"test": "vitest run",
|
|
58
|
+
"postinstall": "node dist/postinstall.js || true"
|
|
60
59
|
}
|
|
61
|
-
}
|
|
60
|
+
}
|