shogun-relay-sdk 1.2.0 → 1.2.3
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.
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -2
- package/dist/modules/bridge.js +2 -1
- package/dist/types.d.ts +0 -63
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ import { DealsModule } from "./modules/deals";
|
|
|
7
7
|
import { RegistryModule } from "./modules/registry";
|
|
8
8
|
import { UploadsModule } from "./modules/uploads";
|
|
9
9
|
import { BridgeModule } from "./modules/bridge";
|
|
10
|
-
import { OracleModule } from "./modules/oracle";
|
|
11
10
|
export * from "./types";
|
|
12
11
|
export declare class ShogunRelaySDK {
|
|
13
12
|
private client;
|
|
@@ -19,7 +18,6 @@ export declare class ShogunRelaySDK {
|
|
|
19
18
|
registry: RegistryModule;
|
|
20
19
|
uploads: UploadsModule;
|
|
21
20
|
bridge: BridgeModule;
|
|
22
|
-
oracle: OracleModule;
|
|
23
21
|
constructor(config: ApiClientConfig);
|
|
24
22
|
setToken(token: string): void;
|
|
25
23
|
}
|
package/dist/index.js
CHANGED
|
@@ -24,7 +24,6 @@ const deals_1 = require("./modules/deals");
|
|
|
24
24
|
const registry_1 = require("./modules/registry");
|
|
25
25
|
const uploads_1 = require("./modules/uploads");
|
|
26
26
|
const bridge_1 = require("./modules/bridge");
|
|
27
|
-
const oracle_1 = require("./modules/oracle");
|
|
28
27
|
// Export types
|
|
29
28
|
__exportStar(require("./types"), exports);
|
|
30
29
|
class ShogunRelaySDK {
|
|
@@ -38,7 +37,6 @@ class ShogunRelaySDK {
|
|
|
38
37
|
this.registry = new registry_1.RegistryModule(this.client);
|
|
39
38
|
this.uploads = new uploads_1.UploadsModule(this.client);
|
|
40
39
|
this.bridge = new bridge_1.BridgeModule(this.client);
|
|
41
|
-
this.oracle = new oracle_1.OracleModule(this.client);
|
|
42
40
|
}
|
|
43
41
|
setToken(token) {
|
|
44
42
|
this.client.setToken(token);
|
package/dist/modules/bridge.js
CHANGED
|
@@ -189,7 +189,8 @@ class BridgeModule {
|
|
|
189
189
|
* @returns Transaction details
|
|
190
190
|
*/
|
|
191
191
|
async getTransaction(txHash) {
|
|
192
|
-
|
|
192
|
+
// URL-encode the txHash to handle special characters (e.g., / and + in base64 hashes)
|
|
193
|
+
return this.client.get(`/api/v1/bridge/transaction/${encodeURIComponent(txHash)}`);
|
|
193
194
|
}
|
|
194
195
|
}
|
|
195
196
|
exports.BridgeModule = BridgeModule;
|
package/dist/types.d.ts
CHANGED
|
@@ -241,66 +241,3 @@ export interface RelaysListResponse {
|
|
|
241
241
|
}>;
|
|
242
242
|
error?: string;
|
|
243
243
|
}
|
|
244
|
-
/**
|
|
245
|
-
* Oracle Data Feed
|
|
246
|
-
*/
|
|
247
|
-
export interface OracleFeed {
|
|
248
|
-
feedId: string;
|
|
249
|
-
name: string;
|
|
250
|
-
priceUSDC: number;
|
|
251
|
-
dataType: number;
|
|
252
|
-
dataTypeName: string;
|
|
253
|
-
active: boolean;
|
|
254
|
-
schema: string;
|
|
255
|
-
}
|
|
256
|
-
/**
|
|
257
|
-
* Validated Oracle Packet
|
|
258
|
-
*/
|
|
259
|
-
export interface OraclePacket {
|
|
260
|
-
feedId: string;
|
|
261
|
-
value: string;
|
|
262
|
-
timestamp: number;
|
|
263
|
-
signature: string;
|
|
264
|
-
deadline: number;
|
|
265
|
-
payload: string;
|
|
266
|
-
}
|
|
267
|
-
/**
|
|
268
|
-
* Global Oracle Stats
|
|
269
|
-
*/
|
|
270
|
-
export interface OracleGlobalStats {
|
|
271
|
-
totalAccesses: number;
|
|
272
|
-
totalRevenueUSDC: number;
|
|
273
|
-
lastAccess?: string;
|
|
274
|
-
accessesByFeed: Record<string, number>;
|
|
275
|
-
revenueByFeed: Record<string, number>;
|
|
276
|
-
}
|
|
277
|
-
/**
|
|
278
|
-
* Oracle Feeds Response
|
|
279
|
-
*/
|
|
280
|
-
export interface OracleFeedsResponse {
|
|
281
|
-
success: boolean;
|
|
282
|
-
feeds: OracleFeed[];
|
|
283
|
-
}
|
|
284
|
-
/**
|
|
285
|
-
* Oracle Data Response
|
|
286
|
-
*/
|
|
287
|
-
export interface OracleDataResponse {
|
|
288
|
-
success: boolean;
|
|
289
|
-
packet?: OraclePacket;
|
|
290
|
-
paymentRequired?: boolean;
|
|
291
|
-
priceUSDC?: number;
|
|
292
|
-
error?: string;
|
|
293
|
-
paymentDetails?: {
|
|
294
|
-
required: boolean;
|
|
295
|
-
amountUSDC: number;
|
|
296
|
-
tiers: any[];
|
|
297
|
-
x402: any;
|
|
298
|
-
};
|
|
299
|
-
}
|
|
300
|
-
/**
|
|
301
|
-
* Oracle Global Stats Response
|
|
302
|
-
*/
|
|
303
|
-
export interface OracleGlobalStatsResponse {
|
|
304
|
-
success: boolean;
|
|
305
|
-
stats: OracleGlobalStats;
|
|
306
|
-
}
|
package/package.json
CHANGED