@0xward/twinpayai-client 1.0.7 → 1.1.2

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 (3) hide show
  1. package/README.md +0 -4
  2. package/index.js +5 -5
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,13 +1,9 @@
1
1
  <p align="center">
2
- <img src="./assets/header-sync.svg" alt="0xward Core Intelligence Sync Animation" width="120" height="120" />
3
2
  </p>
4
3
 
5
4
  # @0xward/twinpayai-client
6
5
 
7
6
  <p align="center">
8
- <a href="https://www.npmjs.com/package/@0xward/twinpayai-client"><img src="https://img.shields.io/npm/v/@0xward/twinpayai-client?style=flat-square" alt="NPM Version" /></a>
9
- <a href="https://www.npmjs.com/package/@0xward/twinpayai-client"><img src="https://img.shields.io/npm/dm/@0xward/twinpayai-client?style=flat-square" alt="NPM Downloads" /></a>
10
- <a href="https://www.npmjs.com/package/@0xward/twinpayai-client"><img src="https://img.shields.io/npm/l/@0xward/twinpayai-client?style=flat-square" alt="License" /></a>
11
7
  </p>
12
8
 
13
9
  An automated payment initialization client designed to enable autonomous software entities to programmatically dispatch and audit digital currency transfers on the Stacks layer-2 environment.
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.2",
4
4
  "description": "AI-powered transaction payment agent built on the Stacks blockchain secured by Bitcoin.",
5
5
  "main": "index.js",
6
6
  "keywords": [