@palindromepay/sdk 2.1.7 → 2.1.8

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.
@@ -101,6 +101,8 @@ export interface PalindromePaySDKConfig {
101
101
  /** Apollo client for subgraph queries (required) */
102
102
  apolloClient: ApolloClient;
103
103
  chain?: Chain;
104
+ /** Use Base Sepolia testnet contract (default: false = Base mainnet) */
105
+ testnet?: boolean;
104
106
  /** Cache TTL in milliseconds (default: 5000) */
105
107
  cacheTTL?: number;
106
108
  /** Maximum cache entries before LRU eviction (default: 1000) */
@@ -249,7 +249,9 @@ class PalindromePaySDK {
249
249
  };
250
250
  /** Cached fee basis points (lazily computed from contract) */
251
251
  this.cachedFeeBps = null;
252
- this.contractAddress = config_1.CONFIG.DEFAULT_CONTRACT_ADDRESS;
252
+ this.contractAddress = config.testnet
253
+ ? config_1.CONFIG.TESTNET_CONTRACT_ADDRESS
254
+ : config_1.CONFIG.CONTRACT_ADDRESS;
253
255
  this.abiEscrow = PalindromePay_json_1.default.abi;
254
256
  this.abiWallet = PalindromePayWallet_json_1.default.abi;
255
257
  this.abiERC20 = USDT_json_1.default.abi;
package/dist/config.d.ts CHANGED
@@ -3,8 +3,8 @@ import { Address } from "viem";
3
3
  * Default configuration for Palindrome Pay SDK
4
4
  */
5
5
  export declare const CONFIG: {
6
- /**
7
- * Default PalindromePay contract address (Base mainnet)
8
- */
9
- readonly DEFAULT_CONTRACT_ADDRESS: Address;
6
+ /** PalindromePay contract address (Base mainnet) */
7
+ readonly CONTRACT_ADDRESS: Address;
8
+ /** PalindromePay contract address (Base Sepolia testnet) */
9
+ readonly TESTNET_CONTRACT_ADDRESS: Address;
10
10
  };
package/dist/config.js CHANGED
@@ -5,8 +5,8 @@ exports.CONFIG = void 0;
5
5
  * Default configuration for Palindrome Pay SDK
6
6
  */
7
7
  exports.CONFIG = {
8
- /**
9
- * Default PalindromePay contract address (Base mainnet)
10
- */
11
- DEFAULT_CONTRACT_ADDRESS: "0x47631c5Efe9AA709A020638B51E05b07e32FAF43",
8
+ /** PalindromePay contract address (Base mainnet) */
9
+ CONTRACT_ADDRESS: "0x47631c5Efe9AA709A020638B51E05b07e32FAF43",
10
+ /** PalindromePay contract address (Base Sepolia testnet) */
11
+ TESTNET_CONTRACT_ADDRESS: "0x2de68eec06080d7bc947c484aaff903e75bc08ea",
12
12
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@palindromepay/sdk",
3
- "version": "2.1.7",
3
+ "version": "2.1.8",
4
4
  "description": "TypeScript SDK for PalindromeCryptoEscrow - Secure blockchain escrow with buyer/seller protection",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",