@xona-labs/xpay 0.2.24 → 0.2.26

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.
Files changed (118) hide show
  1. package/CHANGELOG.md +101 -78
  2. package/README.md +71 -69
  3. package/SKILL.md +22 -22
  4. package/dist/agenc/api.d.ts +8 -8
  5. package/dist/agenc/api.js +11 -11
  6. package/dist/agenc/hire.d.ts +4 -4
  7. package/dist/agenc/hire.js +17 -17
  8. package/dist/agenc/price.d.ts +1 -1
  9. package/dist/agenc/price.js +1 -1
  10. package/dist/biometric/index.d.ts +3 -3
  11. package/dist/biometric/index.js +6 -6
  12. package/dist/cli/accounts.d.ts +1 -1
  13. package/dist/cli/accounts.js +1 -1
  14. package/dist/cli/agenc.d.ts +2 -2
  15. package/dist/cli/agenc.js +4 -4
  16. package/dist/cli/balance.d.ts +1 -1
  17. package/dist/cli/balance.js +4 -4
  18. package/dist/cli/bento.d.ts +3 -3
  19. package/dist/cli/bento.js +8 -8
  20. package/dist/cli/bento.js.map +1 -1
  21. package/dist/cli/biometric.d.ts +1 -1
  22. package/dist/cli/biometric.js +8 -8
  23. package/dist/cli/common.js +6 -6
  24. package/dist/cli/common.js.map +1 -1
  25. package/dist/cli/discover.d.ts +2 -2
  26. package/dist/cli/discover.js +4 -4
  27. package/dist/cli/guardrail.d.ts +1 -1
  28. package/dist/cli/guardrail.js +3 -3
  29. package/dist/cli/index.d.ts +2 -2
  30. package/dist/cli/index.js +12 -12
  31. package/dist/cli/init.d.ts +1 -1
  32. package/dist/cli/init.js +2 -2
  33. package/dist/cli/magicblock.d.ts +1 -1
  34. package/dist/cli/magicblock.js +4 -4
  35. package/dist/cli/mcp-server.d.ts +2 -2
  36. package/dist/cli/mcp-server.d.ts.map +1 -1
  37. package/dist/cli/mcp-server.js +25 -22
  38. package/dist/cli/mcp-server.js.map +1 -1
  39. package/dist/cli/pay.d.ts +1 -1
  40. package/dist/cli/pay.js +1 -1
  41. package/dist/cli/report.d.ts +2 -2
  42. package/dist/cli/report.js +4 -4
  43. package/dist/cli/report.js.map +1 -1
  44. package/dist/cli/sana.d.ts +1 -1
  45. package/dist/cli/sana.js +3 -3
  46. package/dist/cli/shop.d.ts +1 -1
  47. package/dist/cli/shop.js +1 -1
  48. package/dist/cli/swap.d.ts +1 -1
  49. package/dist/cli/swap.js +3 -3
  50. package/dist/cli/token.d.ts +2 -2
  51. package/dist/cli/token.js +2 -2
  52. package/dist/cli/trade.d.ts +2 -2
  53. package/dist/cli/trade.js +8 -8
  54. package/dist/cli/trade.js.map +1 -1
  55. package/dist/cli/transfer.d.ts +1 -1
  56. package/dist/cli/transfer.js +1 -1
  57. package/dist/cli/x.d.ts +1 -1
  58. package/dist/cli/x.js +1 -1
  59. package/dist/cli/zauth.d.ts +1 -1
  60. package/dist/cli/zauth.js +5 -5
  61. package/dist/discover/cache.js +1 -1
  62. package/dist/discover/index.d.ts +2 -2
  63. package/dist/discover/index.js +6 -6
  64. package/dist/discover/orbitx402.d.ts +2 -2
  65. package/dist/discover/orbitx402.js +1 -1
  66. package/dist/discover/payai.js +1 -1
  67. package/dist/do/index.d.ts +2 -2
  68. package/dist/do/index.js +1 -1
  69. package/dist/guardrail/index.d.ts +4 -4
  70. package/dist/guardrail/index.js +14 -14
  71. package/dist/guardrail/index.js.map +1 -1
  72. package/dist/index.d.ts +7 -7
  73. package/dist/index.js +2 -2
  74. package/dist/magicblock/client.d.ts +2 -2
  75. package/dist/magicblock/client.js +4 -4
  76. package/dist/profile/index.d.ts +3 -3
  77. package/dist/profile/index.js +3 -3
  78. package/dist/profile/storage.d.ts +1 -1
  79. package/dist/profile/storage.js +4 -4
  80. package/dist/profile/types.d.ts +6 -6
  81. package/dist/profile/types.js +1 -1
  82. package/dist/report/index.d.ts +1 -1
  83. package/dist/report/index.js +2 -2
  84. package/dist/sana/tools.js +8 -8
  85. package/dist/signers/raw-evm.d.ts +1 -1
  86. package/dist/signers/raw-evm.js +5 -5
  87. package/dist/signers/raw-solana.d.ts +1 -1
  88. package/dist/signers/raw-solana.js +4 -4
  89. package/dist/swap/index.d.ts +6 -6
  90. package/dist/swap/index.js +12 -12
  91. package/dist/token/index.d.ts +8 -8
  92. package/dist/token/index.js +14 -14
  93. package/dist/token/rwa.d.ts +3 -3
  94. package/dist/token/rwa.js +3 -3
  95. package/dist/tools/index.d.ts +15 -1
  96. package/dist/tools/index.d.ts.map +1 -1
  97. package/dist/tools/index.js +71 -31
  98. package/dist/tools/index.js.map +1 -1
  99. package/dist/trading/discovery.d.ts +6 -6
  100. package/dist/trading/discovery.js +7 -7
  101. package/dist/trading/index.d.ts +6 -6
  102. package/dist/trading/index.js +13 -13
  103. package/dist/transfer/index.d.ts +4 -4
  104. package/dist/transfer/index.js +8 -8
  105. package/dist/types.d.ts +7 -7
  106. package/dist/use/index.d.ts +5 -5
  107. package/dist/use/index.js +20 -20
  108. package/dist/wallet/index.d.ts +2 -2
  109. package/dist/wallet/index.js +3 -3
  110. package/dist/x402/evm-payment.d.ts +4 -4
  111. package/dist/x402/evm-payment.js +6 -6
  112. package/dist/x402/extract.d.ts +1 -1
  113. package/dist/x402/extract.js +1 -1
  114. package/dist/x402/svm-payment.d.ts +2 -2
  115. package/dist/x402/svm-payment.js +2 -2
  116. package/dist/zauth/index.d.ts +4 -4
  117. package/dist/zauth/index.js +5 -5
  118. package/package.json +4 -3
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Spec flow (`exact` scheme on eip155 networks):
5
5
  * client signs an EIP-3009 `TransferWithAuthorization` typed-data payload
6
- * (an off-chain signature USDC supports it natively) → header carries
6
+ * (an off-chain signature - USDC supports it natively) → header carries
7
7
  * the authorization + signature → facilitator submits the transfer
8
8
  * on-chain and pays the gas.
9
9
  *
@@ -19,7 +19,7 @@ import type { PaymentRequirement } from "../types.js";
19
19
  export interface BuildEvmPaymentArgs {
20
20
  /** Payer address (the EVM signer's wallet address). */
21
21
  address: string;
22
- /** EIP-712 typed-data signer from `signer.signEvmTypedData`. */
22
+ /** EIP-712 typed-data signer - from `signer.signEvmTypedData`. */
23
23
  signTypedData: (typedData: {
24
24
  domain: Record<string, unknown>;
25
25
  types: Record<string, Array<{
@@ -39,12 +39,12 @@ export declare function isEvmNetwork(network: string): boolean;
39
39
  /**
40
40
  * True when this requirement carries the EIP-712 domain params (`extra.name`
41
41
  * + `extra.version`) the gasless signature needs. Catalog snapshots usually
42
- * strip `extra` a fresh 402 challenge always has it.
42
+ * strip `extra` - a fresh 402 challenge always has it.
43
43
  */
44
44
  export declare function hasEvmDomainParams(req: PaymentRequirement): boolean;
45
45
  /**
46
46
  * Returns the value of the `X-Payment` header (base64 of canonical JSON
47
- * envelope), ready to attach to the retry request. Nothing is broadcast
47
+ * envelope), ready to attach to the retry request. Nothing is broadcast -
48
48
  * the facilitator settles server-side.
49
49
  */
50
50
  export declare function buildEvmPaymentHeader(args: BuildEvmPaymentArgs): Promise<string>;
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Spec flow (`exact` scheme on eip155 networks):
5
5
  * client signs an EIP-3009 `TransferWithAuthorization` typed-data payload
6
- * (an off-chain signature USDC supports it natively) → header carries
6
+ * (an off-chain signature - USDC supports it natively) → header carries
7
7
  * the authorization + signature → facilitator submits the transfer
8
8
  * on-chain and pays the gas.
9
9
  *
@@ -54,29 +54,29 @@ export function isEvmNetwork(network) {
54
54
  /**
55
55
  * True when this requirement carries the EIP-712 domain params (`extra.name`
56
56
  * + `extra.version`) the gasless signature needs. Catalog snapshots usually
57
- * strip `extra` a fresh 402 challenge always has it.
57
+ * strip `extra` - a fresh 402 challenge always has it.
58
58
  */
59
59
  export function hasEvmDomainParams(req) {
60
60
  return Boolean(req.extra?.name && req.extra?.version);
61
61
  }
62
62
  /**
63
63
  * Returns the value of the `X-Payment` header (base64 of canonical JSON
64
- * envelope), ready to attach to the retry request. Nothing is broadcast
64
+ * envelope), ready to attach to the retry request. Nothing is broadcast -
65
65
  * the facilitator settles server-side.
66
66
  */
67
67
  export async function buildEvmPaymentHeader(args) {
68
68
  const req = args.requirement;
69
- // The EIP-3009 payload shape only exists in x402 v2 never emit a v1
69
+ // The EIP-3009 payload shape only exists in x402 v2 - never emit a v1
70
70
  // envelope here (v1 catalog entries without a version reach us as 1).
71
71
  const version = Math.max(args.x402Version ?? 2, 2);
72
72
  if (!hasEvmDomainParams(req)) {
73
- throw new Error(`buildEvmPaymentHeader: EIP-712 domain params (extra.name/extra.version) missing for asset ${req.asset} re-fetch the live 402 challenge`);
73
+ throw new Error(`buildEvmPaymentHeader: EIP-712 domain params (extra.name/extra.version) missing for asset ${req.asset} - re-fetch the live 402 challenge`);
74
74
  }
75
75
  const now = Math.floor(Date.now() / 1000);
76
76
  const nonceBytes = globalThis.crypto.getRandomValues(new Uint8Array(32));
77
77
  const nonce = "0x" + Buffer.from(nonceBytes).toString("hex");
78
78
  // Authorization values travel as decimal strings in the header payload but
79
- // are signed as uint256 same split @x402/evm's client makes.
79
+ // are signed as uint256 - same split @x402/evm's client makes.
80
80
  const authorization = {
81
81
  from: args.address,
82
82
  to: req.payTo,
@@ -9,7 +9,7 @@
9
9
  * envelope, or a SINGLE bare requirement object
10
10
  * encoding: raw JSON, base64-JSON, url-encoded JSON, or "<scheme> <payload>"
11
11
  * fields: PayAI uses `amount`/`payTo`; the x402 spec uses
12
- * `maxAmountRequired`/`payTo`; others use `recipient`/`token`
12
+ * `maxAmountRequired`/`payTo`; others use `recipient`/`token` -
13
13
  * we alias them all into our PaymentRequirement.
14
14
  *
15
15
  * Shared by `probe()` and `useByUrl()`.
@@ -9,7 +9,7 @@
9
9
  * envelope, or a SINGLE bare requirement object
10
10
  * encoding: raw JSON, base64-JSON, url-encoded JSON, or "<scheme> <payload>"
11
11
  * fields: PayAI uses `amount`/`payTo`; the x402 spec uses
12
- * `maxAmountRequired`/`payTo`; others use `recipient`/`token`
12
+ * `maxAmountRequired`/`payTo`; others use `recipient`/`token` -
13
13
  * we alias them all into our PaymentRequirement.
14
14
  *
15
15
  * Shared by `probe()` and `useByUrl()`.
@@ -8,14 +8,14 @@
8
8
  * This is the path xPay 0.1.4+ takes for Solana endpoints reporting
9
9
  * `x402Version >= 2` (CAIP networks like `solana:5eykt4…`). Legacy 0.1.x
10
10
  * sent a sign-and-broadcast `txSig` header which is *not* what the
11
- * canonical x402 servers expect your endpoint would 4xx on the retry.
11
+ * canonical x402 servers expect - your endpoint would 4xx on the retry.
12
12
  *
13
13
  * Inputs (the `PaymentRequirement` xPay parsed from the 402 challenge) are
14
14
  * normalized into `@x402/core/types`'s `PaymentRequirements` shape.
15
15
  */
16
16
  import type { PaymentRequirement } from "../types.js";
17
17
  export interface BuildSvmPaymentArgs {
18
- /** A `@solana/kit` TransactionSigner from `signer.getKitSigner()`. */
18
+ /** A `@solana/kit` TransactionSigner - from `signer.getKitSigner()`. */
19
19
  kitSigner: unknown;
20
20
  /** What the server's 402 told us we owe. */
21
21
  requirement: PaymentRequirement;
@@ -8,7 +8,7 @@
8
8
  * This is the path xPay 0.1.4+ takes for Solana endpoints reporting
9
9
  * `x402Version >= 2` (CAIP networks like `solana:5eykt4…`). Legacy 0.1.x
10
10
  * sent a sign-and-broadcast `txSig` header which is *not* what the
11
- * canonical x402 servers expect your endpoint would 4xx on the retry.
11
+ * canonical x402 servers expect - your endpoint would 4xx on the retry.
12
12
  *
13
13
  * Inputs (the `PaymentRequirement` xPay parsed from the 402 challenge) are
14
14
  * normalized into `@x402/core/types`'s `PaymentRequirements` shape.
@@ -43,7 +43,7 @@ export async function buildSvmPaymentHeader(args) {
43
43
  // partial = { x402Version, payload: { transaction: <base64 signed tx> } }
44
44
  // Assemble the FULL canonical PaymentPayloadV2 envelope:
45
45
  // { x402Version, accepted: <the requirement we're paying>, payload }
46
- // The `accepted` field is REQUIRED in v2 it tells the facilitator which
46
+ // The `accepted` field is REQUIRED in v2 - it tells the facilitator which
47
47
  // of its advertised `accepts[]` items we picked. (Loose top-level
48
48
  // scheme/network is v1; v2 nests them inside `accepted`.)
49
49
  const envelope = {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * zauth partner integration repository security scans behind zauth's
2
+ * zauth partner integration - repository security scans behind zauth's
3
3
  * x402-paywalled endpoint. The scan POST is paid (normal x402 flow); results
4
4
  * are polled from an unpaid status URL keyed by sessionToken. A repo that
5
5
  * zauth has scanned recently may return its cached report on the POST
@@ -13,7 +13,7 @@ export interface ScanPending {
13
13
  }
14
14
  /**
15
15
  * Kickoff response from the paid POST: `{ status, scanId, sessionToken }`.
16
- * Only this response carries the sessionToken (a ~1h JWT) poll responses
16
+ * Only this response carries the sessionToken (a ~1h JWT) - poll responses
17
17
  * echo just `{ status, scanId, progress }`, so callers must hold on to the
18
18
  * token themselves.
19
19
  */
@@ -23,7 +23,7 @@ export declare function isScanning(data: unknown): boolean;
23
23
  /** One unpaid GET against the scan-status endpoint. */
24
24
  export declare function fetchScanStatus(sessionToken: string): Promise<unknown>;
25
25
  /**
26
- * Completed reports embed every provenance match with full file contents
26
+ * Completed reports embed every provenance match with full file contents -
27
27
  * tens of KB the caller rarely needs (analysisMarkdown already summarizes
28
28
  * them). Swap the array for a count; use the raw payload when full detail
29
29
  * matters (CLI --json).
@@ -38,7 +38,7 @@ export interface PollOptions {
38
38
  /**
39
39
  * Poll the unpaid status endpoint until the scan leaves "scanning" or the
40
40
  * timeout elapses. On timeout the last payload (still pending) is returned
41
- * rather than throwing callers surface the sessionToken for a later check.
41
+ * rather than throwing - callers surface the sessionToken for a later check.
42
42
  */
43
43
  export declare function pollRepoScan(sessionToken: string, opts?: PollOptions): Promise<unknown>;
44
44
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
1
  /**
2
- * zauth partner integration repository security scans behind zauth's
2
+ * zauth partner integration - repository security scans behind zauth's
3
3
  * x402-paywalled endpoint. The scan POST is paid (normal x402 flow); results
4
4
  * are polled from an unpaid status URL keyed by sessionToken. A repo that
5
5
  * zauth has scanned recently may return its cached report on the POST
@@ -8,7 +8,7 @@
8
8
  export const ZAUTH_BASE = process.env.XPAY_ZAUTH_ENDPOINT ?? "https://api.zauth.inc";
9
9
  /**
10
10
  * Kickoff response from the paid POST: `{ status, scanId, sessionToken }`.
11
- * Only this response carries the sessionToken (a ~1h JWT) poll responses
11
+ * Only this response carries the sessionToken (a ~1h JWT) - poll responses
12
12
  * echo just `{ status, scanId, progress }`, so callers must hold on to the
13
13
  * token themselves.
14
14
  */
@@ -26,7 +26,7 @@ export async function fetchScanStatus(sessionToken) {
26
26
  // The kickoff response carries both a short scanId and a JWT sessionToken;
27
27
  // only the JWT works here. Catch the mixup before it becomes an opaque 401.
28
28
  if (!sessionToken.includes(".")) {
29
- throw new Error(`zauth: "${sessionToken}" looks like a scanId pass the sessionToken (the long JWT from the scan kickoff) instead`);
29
+ throw new Error(`zauth: "${sessionToken}" looks like a scanId - pass the sessionToken (the long JWT from the scan kickoff) instead`);
30
30
  }
31
31
  const res = await fetch(`${ZAUTH_BASE}/x402/reposcan/${encodeURIComponent(sessionToken)}`);
32
32
  const text = await res.text();
@@ -46,7 +46,7 @@ export async function fetchScanStatus(sessionToken) {
46
46
  return data;
47
47
  }
48
48
  /**
49
- * Completed reports embed every provenance match with full file contents
49
+ * Completed reports embed every provenance match with full file contents -
50
50
  * tens of KB the caller rarely needs (analysisMarkdown already summarizes
51
51
  * them). Swap the array for a count; use the raw payload when full detail
52
52
  * matters (CLI --json).
@@ -62,7 +62,7 @@ export function compactScanReport(data) {
62
62
  /**
63
63
  * Poll the unpaid status endpoint until the scan leaves "scanning" or the
64
64
  * timeout elapses. On timeout the last payload (still pending) is returned
65
- * rather than throwing callers surface the sessionToken for a later check.
65
+ * rather than throwing - callers surface the sessionToken for a later check.
66
66
  */
67
67
  export async function pollRepoScan(sessionToken, opts = {}) {
68
68
  const timeoutMs = opts.timeoutMs ?? 90_000;
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@xona-labs/xpay",
3
- "version": "0.2.24",
3
+ "version": "0.2.26",
4
4
  "mcpName": "io.github.xona-labs/xpay",
5
- "description": "Discovery and usage layer for agentic commerce — multi-network wallet, x402 payments, AgenC marketplace hires, 20k+ services via PayAI and other catalogs",
5
+ "description": "Xona Wallet: agent wallet and payment rail for agentic commerce. Multi-network wallet, x402 payments, AgenC marketplace hires, 20k+ services via PayAI and other catalogs",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
8
8
  "types": "dist/index.d.ts",
@@ -27,8 +27,9 @@
27
27
  "type": "git",
28
28
  "url": "https://github.com/xona-labs/xpay"
29
29
  },
30
- "homepage": "https://xpay.xona-agent.com",
30
+ "homepage": "https://wallet.xona-agent.com",
31
31
  "keywords": [
32
+ "xona-wallet",
32
33
  "x402",
33
34
  "agentic-commerce",
34
35
  "agenc",