@fairblock/stabletrust 2.0.12 → 2.0.13

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fairblock/stabletrust",
3
- "version": "2.0.12",
3
+ "version": "2.0.13",
4
4
  "description": "SDK for confidential transfers using homomorphic encryption and zero-knowledge proofs",
5
5
  "main": "src/index.js",
6
6
  "types": "src/withdrawal-fees.d.ts",
package/src/backend.js CHANGED
@@ -9,6 +9,7 @@ export const CHAIN_KEY_BY_ID = {
9
9
  11155111: "ethereumSepolia",
10
10
  421614: "arbitrumSepolia",
11
11
  42431: "tempo",
12
+ 42161: "arbitrumOne",
12
13
  };
13
14
 
14
15
  /**
@@ -9,6 +9,7 @@ import {
9
9
  ANONYMOUS_IPFS_TRANSFER_FEE_SIGNATURE,
10
10
  ANONYMOUS_INLINE_TRANSFER_FEE_SIGNATURE,
11
11
  getStabletrustContractAddress,
12
+ STABLETRUST_CONTRACTS_BY_CHAIN_ID,
12
13
  } from "./constants.js";
13
14
  import { deriveKeys, decryptCiphertext, combineCiphertext } from "./crypto.js";
14
15
  import {
@@ -76,9 +77,9 @@ export class ConfidentialTransferClient {
76
77
  throw new Error("chainId is required");
77
78
  }
78
79
  if (!resolvedContractAddress) {
79
- const supportedChainIds = [2201, 5042002, 84532, 11155111, 421614, 42431]
80
- .map(String)
81
- .join(", ");
80
+ const supportedChainIds = Object.keys(
81
+ STABLETRUST_CONTRACTS_BY_CHAIN_ID,
82
+ ).join(", ");
82
83
  throw new Error(
83
84
  `contractAddress is required for chainId ${resolvedChainId}. No default Stabletrust contract is configured for this chain. Supported chainIds: ${supportedChainIds}`,
84
85
  );
package/src/constants.js CHANGED
@@ -69,6 +69,7 @@ export const STABLETRUST_CONTRACTS_BY_CHAIN_ID = Object.freeze({
69
69
  11155111: "0x7507a13352AFAa79D33E994f86f2f62463ba8DE4", //Ethereum
70
70
  421614: "0x5acECCdeb5CbD3C727eCB49F8706Eb80EF2f977F", //Arbitrum
71
71
  42431: "0xE559fB936C69c46E216bf61B07C16bF1a6d444aa", //Tempo
72
+ 42161: "0xCAA6384D5Ac8b9111D482dd676BB890f2b6e9513", //Arbitrum One (mainnet)
72
73
  });
73
74
 
74
75
  export function getStabletrustContractAddress(chainId) {