@0xmonaco/core 1.0.24 → 1.0.25
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/api/faucet/api.d.ts +10 -8
- package/dist/api/faucet/api.js +10 -10
- package/package.json +3 -3
package/dist/api/faucet/api.d.ts
CHANGED
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
10
10
|
* ```typescript
|
|
11
|
-
*
|
|
11
|
+
* // A valid Cloudflare Turnstile token is required on every mint.
|
|
12
|
+
* const { minted, failed, remainingRequests24h } = await sdk.faucet.mint({ turnstileToken });
|
|
12
13
|
* ```
|
|
13
14
|
*/
|
|
14
15
|
import type { FaucetAPI, MintTokensParams, MintTokensResponse } from "@0xmonaco/types";
|
|
@@ -18,14 +19,15 @@ export declare class FaucetAPIImpl extends BaseAPI implements FaucetAPI {
|
|
|
18
19
|
* Mints the full set of testnet tokens to the authenticated user.
|
|
19
20
|
*
|
|
20
21
|
* Synchronous: resolves only when every faucet transaction confirmed
|
|
21
|
-
* on-chain (HTTP 200). Rejects with
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* the quota), and 503
|
|
22
|
+
* on-chain (HTTP 200). Rejects with 400 when the Turnstile token is missing
|
|
23
|
+
* or invalid, 429 when the daily quota is exhausted, 502 when transactions
|
|
24
|
+
* failed or were only partially confirmed (the error details carry the
|
|
25
|
+
* minted/failed breakdown; delivered legs still consume the quota), and 503
|
|
26
|
+
* when the faucet is unavailable (safe to retry).
|
|
25
27
|
*
|
|
26
|
-
* @param params -
|
|
27
|
-
*
|
|
28
|
+
* @param params - Mint parameters, including the required Turnstile captcha
|
|
29
|
+
* token
|
|
28
30
|
* @returns Promise resolving to the minted tokens and remaining quota
|
|
29
31
|
*/
|
|
30
|
-
mint(params
|
|
32
|
+
mint(params: MintTokensParams): Promise<MintTokensResponse>;
|
|
31
33
|
}
|
package/dist/api/faucet/api.js
CHANGED
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
10
10
|
* ```typescript
|
|
11
|
-
*
|
|
11
|
+
* // A valid Cloudflare Turnstile token is required on every mint.
|
|
12
|
+
* const { minted, failed, remainingRequests24h } = await sdk.faucet.mint({ turnstileToken });
|
|
12
13
|
* ```
|
|
13
14
|
*/
|
|
14
15
|
import { BaseAPI } from "../base";
|
|
@@ -18,21 +19,20 @@ export class FaucetAPIImpl extends BaseAPI {
|
|
|
18
19
|
* Mints the full set of testnet tokens to the authenticated user.
|
|
19
20
|
*
|
|
20
21
|
* Synchronous: resolves only when every faucet transaction confirmed
|
|
21
|
-
* on-chain (HTTP 200). Rejects with
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* the quota), and 503
|
|
22
|
+
* on-chain (HTTP 200). Rejects with 400 when the Turnstile token is missing
|
|
23
|
+
* or invalid, 429 when the daily quota is exhausted, 502 when transactions
|
|
24
|
+
* failed or were only partially confirmed (the error details carry the
|
|
25
|
+
* minted/failed breakdown; delivered legs still consume the quota), and 503
|
|
26
|
+
* when the faucet is unavailable (safe to retry).
|
|
25
27
|
*
|
|
26
|
-
* @param params -
|
|
27
|
-
*
|
|
28
|
+
* @param params - Mint parameters, including the required Turnstile captcha
|
|
29
|
+
* token
|
|
28
30
|
* @returns Promise resolving to the minted tokens and remaining quota
|
|
29
31
|
*/
|
|
30
32
|
async mint(params) {
|
|
31
33
|
return await this.makeAuthenticatedRequest(perpRoutes.faucet.mint(), {
|
|
32
34
|
method: "POST",
|
|
33
|
-
|
|
34
|
-
body: JSON.stringify({ turnstileToken: params.turnstileToken }),
|
|
35
|
-
}),
|
|
35
|
+
body: JSON.stringify({ turnstileToken: params.turnstileToken }),
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0xmonaco/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.25",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"viem": "^2.45.2"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@0xmonaco/contracts": "1.0.
|
|
27
|
-
"@0xmonaco/types": "1.0.
|
|
26
|
+
"@0xmonaco/contracts": "1.0.25",
|
|
27
|
+
"@0xmonaco/types": "1.0.25",
|
|
28
28
|
"@noble/curves": "^1.9.1",
|
|
29
29
|
"@noble/hashes": "^1.8.0",
|
|
30
30
|
"http-status-codes": "^2.3.0"
|