shogun-relay-sdk 1.1.2 → 1.1.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/modules/bridge.d.ts +11 -0
- package/dist/modules/bridge.js +9 -0
- package/package.json +1 -1
package/dist/modules/bridge.d.ts
CHANGED
|
@@ -61,6 +61,17 @@ export declare class BridgeModule {
|
|
|
61
61
|
balance: string;
|
|
62
62
|
balanceEth: string;
|
|
63
63
|
}>;
|
|
64
|
+
/**
|
|
65
|
+
* Get the next nonce for a user (for withdrawal requests)
|
|
66
|
+
* This allows clients to include the nonce in their signed message
|
|
67
|
+
* @param userAddress User's Ethereum address
|
|
68
|
+
* @returns Last nonce and next nonce
|
|
69
|
+
*/
|
|
70
|
+
getNonce(userAddress: string): Promise<{
|
|
71
|
+
success: boolean;
|
|
72
|
+
lastNonce: string;
|
|
73
|
+
nextNonce: string;
|
|
74
|
+
}>;
|
|
64
75
|
/**
|
|
65
76
|
* Transfer balance from one user to another (L2 -> L2)
|
|
66
77
|
* @param params Transfer parameters
|
package/dist/modules/bridge.js
CHANGED
|
@@ -13,6 +13,15 @@ class BridgeModule {
|
|
|
13
13
|
async getBalance(userAddress) {
|
|
14
14
|
return this.client.get(`/api/v1/bridge/balance/${userAddress}`);
|
|
15
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Get the next nonce for a user (for withdrawal requests)
|
|
18
|
+
* This allows clients to include the nonce in their signed message
|
|
19
|
+
* @param userAddress User's Ethereum address
|
|
20
|
+
* @returns Last nonce and next nonce
|
|
21
|
+
*/
|
|
22
|
+
async getNonce(userAddress) {
|
|
23
|
+
return this.client.get(`/api/v1/bridge/nonce/${userAddress}`);
|
|
24
|
+
}
|
|
16
25
|
/**
|
|
17
26
|
* Transfer balance from one user to another (L2 -> L2)
|
|
18
27
|
* @param params Transfer parameters
|
package/package.json
CHANGED