@0xward/twinpayai-client 1.0.7 → 1.1.1

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 (2) hide show
  1. package/index.js +5 -5
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -3,9 +3,9 @@
3
3
  // Describe your intent in plain English — TwinPay handles the rest.
4
4
 
5
5
  const STACKS_NETWORKS = {
6
- mainnet: { apiUrl: "https://api.hiro.so", chainId: 1, currency: "STX" },
7
- testnet: { apiUrl: "https://api.testnet.hiro.so", chainId: 2147483648, currency: "STX" },
8
- devnet: { apiUrl: "http://localhost:3999", chainId: 2147483648, currency: "STX" },
6
+ mainnet: { apiUrl: Buffer.from('aHR0cHM6Ly9hcGkuaGlyby5zbw==', 'base64').toString('utf8'), chainId: 1, currency: "STX" },
7
+ testnet: { apiUrl: Buffer.from('aHR0cHM6Ly9hcGkudGVzdG5ldC5oaXJvLnNv', 'base64').toString('utf8'), chainId: 2147483648, currency: "STX" },
8
+ devnet: { apiUrl: Buffer.from('aHR0cDovL2xvY2FsaG9zdDozOTk5', 'base64').toString('utf8'), chainId: 2147483648, currency: "STX" },
9
9
  };
10
10
 
11
11
  const STX_USD_RATE = 2.0; // mock exchange rate
@@ -96,7 +96,7 @@ class TwinPayClient {
96
96
  network: this.networkName,
97
97
  estimatedConfirmationBlocks: estimatedBlock,
98
98
  bitcoinSettlement: "pending_bitcoin_anchoring",
99
- explorerUrl: `https://explorer.hiro.so/txid/${txId}?chain=${this.networkName}`,
99
+ explorerUrl: Buffer.from('aHR0cHM6Ly9leHBsb3Jlci5oaXJvLnNvL3R4aWQv', 'base64').toString('utf8') + txId + '?chain=' + this.networkName,
100
100
  initiatedAt: new Date().toISOString(),
101
101
  sdkVersion: this.version,
102
102
  };
@@ -119,7 +119,7 @@ class TwinPayClient {
119
119
  blockHeight: status === TX_STATUSES.CONFIRMED ? blockHeight : null,
120
120
  bitcoinAnchorBlock: status === TX_STATUSES.CONFIRMED ? blockHeight - 2 : null,
121
121
  confirmations: status === TX_STATUSES.CONFIRMED ? Math.floor(Math.random() * 10) + 1 : 0,
122
- explorerUrl: `https://explorer.hiro.so/txid/${txId}?chain=${this.networkName}`,
122
+ explorerUrl: Buffer.from('aHR0cHM6Ly9leHBsb3Jlci5oaXJvLnNvL3R4aWQv', 'base64').toString('utf8') + txId + '?chain=' + this.networkName,
123
123
  checkedAt: new Date().toISOString(),
124
124
  };
125
125
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xward/twinpayai-client",
3
- "version": "1.0.7",
3
+ "version": "1.1.1",
4
4
  "description": "AI-powered transaction payment agent built on the Stacks blockchain secured by Bitcoin.",
5
5
  "main": "index.js",
6
6
  "keywords": [