@lucid-agents/taskmarket 1.43.0 → 1.45.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/dist/agent-compatibility.json +1 -1
- package/dist/{api-HZEK636T.js → api-PZVGK3VQ.js} +2 -2
- package/dist/{channels-FWGJII6Y.js → channels-LDMZ3OEM.js} +4 -4
- package/dist/{chunk-XZZKUMHQ.js → chunk-5NILW5UT.js} +22 -7
- package/dist/{chunk-MGDBSENK.js → chunk-6YFLKQ4Q.js} +4646 -4006
- package/dist/{chunk-FKQBRXQS.js → chunk-FHDTYW6C.js} +1 -1
- package/dist/{chunk-F532X4HL.js → chunk-GIVPCMJ3.js} +1 -1
- package/dist/{chunk-FN5FZ4RL.js → chunk-JPVBWX3Q.js} +3 -3
- package/dist/{chunk-YS3YH7U3.js → chunk-KY4JM6NG.js} +3 -3
- package/dist/{chunk-XEGCIN3K.js → chunk-PRYNO5S7.js} +1 -1
- package/dist/{chunk-FNSX2KLZ.js → chunk-QUY6764O.js} +2 -2
- package/dist/{chunk-ZMPMQTQQ.js → chunk-QYXBVFVX.js} +5 -5
- package/dist/{chunk-Z7MFEW73.js → chunk-THIC75V5.js} +3 -3
- package/dist/{chunk-B2PINQHQ.js → chunk-TPCXOWSC.js} +8 -8
- package/dist/{chunk-IRKICJEV.js → chunk-XLJRCGOJ.js} +1 -1
- package/dist/{doctor-NTQ3ZJRU.js → doctor-HV5QQDGU.js} +8 -8
- package/dist/index.js +621 -237
- package/dist/{launch-FOCL5JOR.js → launch-56RHQCWT.js} +11 -11
- package/dist/pi-extensions/xgate.cjs +32 -1
- package/dist/{read-auth-UAZUJEEQ.js → read-auth-ZJBQQVGO.js} +3 -3
- package/dist/{reconcile-IKPAKGH3.js → reconcile-PQXSATCK.js} +4 -4
- package/dist/{status-A636ECTT.js → status-EBMZGDFS.js} +8 -8
- package/dist/{sync-pull-DVC4R6BN.js → sync-pull-423LBSPO.js} +4 -4
- package/dist/{task-access-grants-5I7QQXZV.js → task-access-grants-KWTKM3NP.js} +2 -2
- package/package.json +4 -4
|
@@ -14,8 +14,8 @@ import {
|
|
|
14
14
|
parseFailureBody,
|
|
15
15
|
readFailureBody,
|
|
16
16
|
withErrorContext
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-5NILW5UT.js";
|
|
18
|
+
import "./chunk-6YFLKQ4Q.js";
|
|
19
19
|
import "./chunk-S7SJMJ2I.js";
|
|
20
20
|
export {
|
|
21
21
|
ApiError,
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
selectRail,
|
|
11
11
|
uncertainPurchases,
|
|
12
12
|
withdrawalHatch
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-THIC75V5.js";
|
|
14
|
+
import "./chunk-GIVPCMJ3.js";
|
|
15
|
+
import "./chunk-5NILW5UT.js";
|
|
16
|
+
import "./chunk-6YFLKQ4Q.js";
|
|
17
17
|
import "./chunk-YM4S6IE4.js";
|
|
18
18
|
import "./chunk-XJOB4NMV.js";
|
|
19
19
|
import "./chunk-S7SJMJ2I.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
paymentProtocolFor,
|
|
10
10
|
taskmarketChain,
|
|
11
11
|
verifierProviderId
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-6YFLKQ4Q.js";
|
|
13
13
|
|
|
14
14
|
// src/lib/idempotency.ts
|
|
15
15
|
import { randomUUID } from "crypto";
|
|
@@ -380,7 +380,12 @@ async function getWalletAddress() {
|
|
|
380
380
|
}
|
|
381
381
|
|
|
382
382
|
// src/lib/tap.ts
|
|
383
|
-
var TAP_ALGORITHMS = [
|
|
383
|
+
var TAP_ALGORITHMS = [
|
|
384
|
+
"ed25519",
|
|
385
|
+
"ecdsa-p256-sha256",
|
|
386
|
+
"rsa-pss-sha256",
|
|
387
|
+
"rsa-pss-sha512"
|
|
388
|
+
];
|
|
384
389
|
var TAP_MAX_LIFETIME_SECONDS = 8 * 60;
|
|
385
390
|
var TAP_DEFAULT_LIFETIME_SECONDS = 5 * 60;
|
|
386
391
|
var ED25519_PKCS8_PREFIX = Buffer.from("302e020100300506032b657004220420", "hex");
|
|
@@ -389,6 +394,9 @@ function isTapAlgorithm(value) {
|
|
|
389
394
|
}
|
|
390
395
|
function algorithmsFor(key) {
|
|
391
396
|
if (key.asymmetricKeyType === "ed25519") return ["ed25519"];
|
|
397
|
+
if (key.asymmetricKeyType === "ec" && key.asymmetricKeyDetails?.namedCurve === "prime256v1") {
|
|
398
|
+
return ["ecdsa-p256-sha256"];
|
|
399
|
+
}
|
|
392
400
|
if (key.asymmetricKeyType === "rsa" || key.asymmetricKeyType === "rsa-pss") {
|
|
393
401
|
return ["rsa-pss-sha256", "rsa-pss-sha512"];
|
|
394
402
|
}
|
|
@@ -416,9 +424,8 @@ function parseTapPrivateKey(text, alg) {
|
|
|
416
424
|
}
|
|
417
425
|
const supported = algorithmsFor(privateKey);
|
|
418
426
|
if (supported.length === 0) {
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
);
|
|
427
|
+
const found = privateKey.asymmetricKeyType === "ec" ? `an EC key on ${privateKey.asymmetricKeyDetails?.namedCurve ?? "an unknown curve"}` : privateKey.asymmetricKeyType ?? "unknown";
|
|
428
|
+
throw new Error(`TAP keys must be ed25519, ECDSA P-256 or RSA, not ${found}`);
|
|
422
429
|
}
|
|
423
430
|
if (alg !== void 0) {
|
|
424
431
|
if (!isTapAlgorithm(alg)) {
|
|
@@ -467,8 +474,12 @@ function tapSignatureAgentFor(stored, apiBase = apiUrl) {
|
|
|
467
474
|
}
|
|
468
475
|
return stored.signatureAgent;
|
|
469
476
|
}
|
|
470
|
-
|
|
471
|
-
|
|
477
|
+
var TAP_CREATE_ALGORITHMS = ["ecdsa-p256-sha256", "ed25519"];
|
|
478
|
+
function generateTapKey(alg = "ecdsa-p256-sha256") {
|
|
479
|
+
if (alg === "ed25519") {
|
|
480
|
+
return { privateKey: generateKeyPairSync("ed25519").privateKey, alg };
|
|
481
|
+
}
|
|
482
|
+
return { privateKey: generateKeyPairSync("ec", { namedCurve: "prime256v1" }).privateKey, alg };
|
|
472
483
|
}
|
|
473
484
|
function storedTapKey(deviceEncryptionKeyHex, keyId, key, now = /* @__PURE__ */ new Date(), source = "imported") {
|
|
474
485
|
const pem = key.privateKey.export({ type: "pkcs8", format: "pem" }).toString();
|
|
@@ -561,6 +572,9 @@ function tapSignatureBase(components, signatureParams) {
|
|
|
561
572
|
}
|
|
562
573
|
function rawSign(alg, privateKey, data) {
|
|
563
574
|
if (alg === "ed25519") return cryptoSign(null, data, privateKey);
|
|
575
|
+
if (alg === "ecdsa-p256-sha256") {
|
|
576
|
+
return cryptoSign("sha256", data, { key: privateKey, dsaEncoding: "ieee-p1363" });
|
|
577
|
+
}
|
|
564
578
|
return cryptoSign(alg === "rsa-pss-sha256" ? "sha256" : "sha512", data, {
|
|
565
579
|
key: privateKey,
|
|
566
580
|
padding: constants.RSA_PKCS1_PSS_PADDING,
|
|
@@ -945,6 +959,7 @@ export {
|
|
|
945
959
|
parseTapPrivateKey,
|
|
946
960
|
validateTapKeyId,
|
|
947
961
|
validateTapSignatureAgent,
|
|
962
|
+
TAP_CREATE_ALGORITHMS,
|
|
948
963
|
generateTapKey,
|
|
949
964
|
storedTapKey,
|
|
950
965
|
tapKeySummary,
|