shogun-relay-sdk 1.0.1 → 1.0.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.
@@ -143,4 +143,46 @@ export declare class BridgeModule {
143
143
  amount: string;
144
144
  instructions: string;
145
145
  }>;
146
+ /**
147
+ * Retroactively sync missed deposits from a block range
148
+ * Useful if the relay missed some deposits due to downtime or errors
149
+ * @param params Sync parameters
150
+ * @returns Sync results
151
+ */
152
+ syncDeposits(params?: {
153
+ fromBlock?: number;
154
+ toBlock?: number | 'latest';
155
+ user?: string;
156
+ }): Promise<{
157
+ success: boolean;
158
+ results: {
159
+ total: number;
160
+ processed: number;
161
+ skipped: number;
162
+ failed: number;
163
+ errors: string[];
164
+ };
165
+ }>;
166
+ /**
167
+ * Force process a specific deposit by transaction hash
168
+ * Useful for manually recovering a missed deposit
169
+ * @param txHash Transaction hash of the deposit
170
+ * @returns Deposit processing result
171
+ */
172
+ processDeposit(txHash: string): Promise<{
173
+ success: boolean;
174
+ deposit?: {
175
+ txHash: string;
176
+ user: string;
177
+ amount: string;
178
+ amountEth: string;
179
+ blockNumber: number;
180
+ };
181
+ balance?: {
182
+ wei: string;
183
+ eth: string;
184
+ };
185
+ message?: string;
186
+ error?: string;
187
+ }>;
146
188
  }
@@ -70,5 +70,23 @@ class BridgeModule {
70
70
  async getDepositInstructions(amount) {
71
71
  return this.client.post('/api/v1/bridge/deposit', { amount });
72
72
  }
73
+ /**
74
+ * Retroactively sync missed deposits from a block range
75
+ * Useful if the relay missed some deposits due to downtime or errors
76
+ * @param params Sync parameters
77
+ * @returns Sync results
78
+ */
79
+ async syncDeposits(params) {
80
+ return this.client.post('/api/v1/bridge/sync-deposits', params || {});
81
+ }
82
+ /**
83
+ * Force process a specific deposit by transaction hash
84
+ * Useful for manually recovering a missed deposit
85
+ * @param txHash Transaction hash of the deposit
86
+ * @returns Deposit processing result
87
+ */
88
+ async processDeposit(txHash) {
89
+ return this.client.post('/api/v1/bridge/process-deposit', { txHash });
90
+ }
73
91
  }
74
92
  exports.BridgeModule = BridgeModule;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shogun-relay-sdk",
3
- "version": "1.0.1",
3
+ "version": "1.0.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",