shogun-relay-sdk 1.1.0 → 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.
@@ -188,4 +188,19 @@ export declare class BridgeModule {
188
188
  message?: string;
189
189
  error?: string;
190
190
  }>;
191
+ /**
192
+ * Reconcile user's L2 balance by recalculating from deposits, withdrawals, and L2 transfers
193
+ * This fixes balance discrepancies caused by old transfer implementations
194
+ * @param userAddress User's Ethereum address to reconcile
195
+ * @returns Reconciliation result
196
+ */
197
+ reconcileBalance(userAddress: string): Promise<{
198
+ success: boolean;
199
+ user: string;
200
+ currentBalance: string;
201
+ calculatedBalance: string;
202
+ corrected: boolean;
203
+ message: string;
204
+ error?: string;
205
+ }>;
191
206
  }
@@ -88,5 +88,14 @@ class BridgeModule {
88
88
  async processDeposit(txHash) {
89
89
  return this.client.post('/api/v1/bridge/process-deposit', { txHash });
90
90
  }
91
+ /**
92
+ * Reconcile user's L2 balance by recalculating from deposits, withdrawals, and L2 transfers
93
+ * This fixes balance discrepancies caused by old transfer implementations
94
+ * @param userAddress User's Ethereum address to reconcile
95
+ * @returns Reconciliation result
96
+ */
97
+ async reconcileBalance(userAddress) {
98
+ return this.client.post('/api/v1/bridge/reconcile-balance', { user: userAddress });
99
+ }
91
100
  }
92
101
  exports.BridgeModule = BridgeModule;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shogun-relay-sdk",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "SDK for interacting with Shogun Relay API - HTTP client for IPFS, deals, registry, and network operations",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",