uvd-x402-sdk 2.109.0 → 2.110.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/README.md CHANGED
@@ -10,7 +10,7 @@ Users sign a message or transaction, and the Ultravioleta facilitator handles on
10
10
 
11
11
  ## Features
12
12
 
13
- **Arras NEAR escrow (v2.108.0):** offline local-key NEP-366 authorization, canonical Rust payment IDs and pull lifecycle helpers through `uvd-x402-sdk/near`. [Guide and agent example](docs/near-escrow.md). As of 2026-11-02 the facilitator advertises escrow only on testnet, and the SDK's escrow contract registry has no mainnet row yet.
13
+ **Arras NEAR escrow (v2.110.0):** offline local-key NEP-366 authorization, canonical Rust payment IDs and pull lifecycle helpers through `uvd-x402-sdk/near`. [Guide and agent example](docs/near-escrow.md). As of 2026-11-03 the production facilitator relays NEAR escrow only on testnet. Since 2.110.0 the registry allows mainnet escrow signing only for `v1.arras-escrow.near`; testnet keeps `arras-v1b-1101.testnet`.
14
14
 
15
15
  - **31 Networks**: EVM (19 including HashKey Chain, Arc, Scroll, SKALE Base, Robinhood Chain), Solana, Fogo, Stellar, NEAR, Algorand, Sui, XRP Ledger, Hedera (mainnet + testnet)
16
16
  - **Multi-Stablecoin**: USDC, EURC, AUSD, PYUSD, USDT, USDG (Robinhood Chain)
@@ -65,7 +65,7 @@ declare const NEAR_ESCROW_TOKENS: Readonly<Record<NearEscrowNetwork, string>>;
65
65
  /**
66
66
  * The Arras escrow deployments this SDK signs for, per network. Any other escrowContract is refused before the
67
67
  * signer is called, for authorization and lifecycle alike: a signed delegate can be relayed by anyone, so a 402
68
- * server must not be able to point it at its own account. Mainnet stays empty until its contract ships in a release.
68
+ * server must not be able to point it at its own account. Only deployed Arras v1 contracts are registered.
69
69
  */
70
70
  declare const NEAR_ESCROW_CONTRACTS: Readonly<Record<NearEscrowNetwork, readonly string[]>>;
71
71
  /** Canonical Arras JSON: field order, decimal-string timestamps, lowercase hex, no spaces. */
@@ -154,7 +154,7 @@ interface NearStorageOptions {
154
154
  /** YoctoNEAR, not NEAR. Query storage_balance_bounds for the live contract minimum. */
155
155
  deposit?: NearUnsigned;
156
156
  }
157
- /** Explicit trusted deployment configuration; this unsigned builder does not select an account parent. */
157
+ /** Explicit deployment from NEAR_ESCROW_CONTRACTS for the selected network. */
158
158
  interface ArrasStorageOptions extends NearStorageOptions {
159
159
  escrowContract: string;
160
160
  }
@@ -65,7 +65,7 @@ declare const NEAR_ESCROW_TOKENS: Readonly<Record<NearEscrowNetwork, string>>;
65
65
  /**
66
66
  * The Arras escrow deployments this SDK signs for, per network. Any other escrowContract is refused before the
67
67
  * signer is called, for authorization and lifecycle alike: a signed delegate can be relayed by anyone, so a 402
68
- * server must not be able to point it at its own account. Mainnet stays empty until its contract ships in a release.
68
+ * server must not be able to point it at its own account. Only deployed Arras v1 contracts are registered.
69
69
  */
70
70
  declare const NEAR_ESCROW_CONTRACTS: Readonly<Record<NearEscrowNetwork, readonly string[]>>;
71
71
  /** Canonical Arras JSON: field order, decimal-string timestamps, lowercase hex, no spaces. */
@@ -154,7 +154,7 @@ interface NearStorageOptions {
154
154
  /** YoctoNEAR, not NEAR. Query storage_balance_bounds for the live contract minimum. */
155
155
  deposit?: NearUnsigned;
156
156
  }
157
- /** Explicit trusted deployment configuration; this unsigned builder does not select an account parent. */
157
+ /** Explicit deployment from NEAR_ESCROW_CONTRACTS for the selected network. */
158
158
  interface ArrasStorageOptions extends NearStorageOptions {
159
159
  escrowContract: string;
160
160
  }
@@ -1363,7 +1363,7 @@ var NEAR_ESCROW_TOKENS = Object.freeze({
1363
1363
  });
1364
1364
  var NEAR_ESCROW_CONTRACTS = Object.freeze({
1365
1365
  "near:testnet": Object.freeze(["arras-v1b-1101.testnet"]),
1366
- "near:mainnet": Object.freeze([])
1366
+ "near:mainnet": Object.freeze(["v1.arras-escrow.near"])
1367
1367
  });
1368
1368
  var NONCE_RANGE_MULTIPLIER = 1000000n;
1369
1369
  function hex(value, size, name) {
@@ -1643,6 +1643,9 @@ function storage(o, receiverId, registrationOnly, defaultDeposit) {
1643
1643
  function buildArrasStorageDeposit(options) {
1644
1644
  const o = { ...options };
1645
1645
  if (o.network !== "near:mainnet" && o.network !== "near:testnet") throw new Error("Unsupported NEAR network");
1646
+ if (!NEAR_ESCROW_CONTRACTS[o.network].includes(o.escrowContract)) {
1647
+ throw new Error(`escrowContract: not a registered Arras escrow for ${o.network}`);
1648
+ }
1646
1649
  return storage(o, o.escrowContract, false, NEAR_ARRAS_STORAGE_DEPOSIT);
1647
1650
  }
1648
1651
  function buildUsdcStorageDeposit(options) {