@unlink-xyz/react 0.1.3-canary.4ed691d → 0.1.3-canary.54f2704

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/index.d.ts CHANGED
@@ -103,7 +103,7 @@ type UnlinkState = {
103
103
  */
104
104
  type TransferInput = {
105
105
  token: string;
106
- /** Unlink address (0zk1... bech32m) */
106
+ /** Unlink address (unlink1... bech32m) */
107
107
  recipient: string;
108
108
  amount: bigint;
109
109
  };
@@ -534,7 +534,7 @@ declare function useDeposit(): UseOperationMutationResult<DepositInput[], Deposi
534
534
  *
535
535
  * const handleSend = async () => {
536
536
  * const result = await send([
537
- * { token: "0x...", recipient: "0zk1...", amount: 100n },
537
+ * { token: "0x...", recipient: "unlink1...", amount: 100n },
538
538
  * ]);
539
539
  * console.log("Relay ID:", result.relayId);
540
540
  * };
package/dist/index.js CHANGED
@@ -9042,9 +9042,9 @@ function genBech32(encoding) {
9042
9042
  }
9043
9043
  var bech32m = /* @__PURE__ */ genBech32("bech32m");
9044
9044
  var VERSION = 1;
9045
- var LIMIT = 127;
9045
+ var LIMIT = 130;
9046
9046
  var ALL_CHAINS = "ffffffffffffffff";
9047
- var PREFIX = "0zk";
9047
+ var PREFIX = "unlink";
9048
9048
  var SALT = new TextEncoder().encode("unlink");
9049
9049
  function xorWithSalt(hex2) {
9050
9050
  const bytes2 = Hex.toBytes(hex2);
@@ -9162,7 +9162,7 @@ function parseZkAddress(value) {
9162
9162
  };
9163
9163
  } catch (err) {
9164
9164
  throw new ValidationError(
9165
- `Invalid ZK address (expected 0zk1... format): ${err instanceof Error ? err.message : "unknown error"}`
9165
+ `Invalid ZK address (expected unlink1... format): ${err instanceof Error ? err.message : "unknown error"}`
9166
9166
  );
9167
9167
  }
9168
9168
  }
@@ -55656,6 +55656,16 @@ function createAdapterService(deps) {
55656
55656
  const reshieldSpecs = params.reshields.map(
55657
55657
  (reshield, i) => normalizeReshieldSpec(reshield, i)
55658
55658
  );
55659
+ const seenReshieldTokens = /* @__PURE__ */ new Set();
55660
+ for (const r2 of reshieldSpecs) {
55661
+ const lower = r2.token.toLowerCase();
55662
+ if (seenReshieldTokens.has(lower)) {
55663
+ throw new AdapterError(
55664
+ `duplicate reshield token ${r2.token}; each reshield must target a unique token`
55665
+ );
55666
+ }
55667
+ seenReshieldTokens.add(lower);
55668
+ }
55659
55669
  const account = overrides?.account ?? await deps.requireActiveAccount();
55660
55670
  const signer = overrides?.signer ?? deps.requireSigner(account);
55661
55671
  const nowSeconds = BigInt(Math.floor(nowImpl() / 1e3));