@fereai/sdk 0.2.0-dev.17 → 0.2.1-dev.18

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/client.d.ts CHANGED
@@ -13,7 +13,7 @@
13
13
  * });
14
14
  * ```
15
15
  */
16
- import type { ChatEvent, SwapRequest, LimitOrderRequest, HooksRequest, DepositRequest, WithdrawRequest } from "./types.js";
16
+ import type { ChatEvent, SwapRequest, LimitOrderRequest, HooksRequest, DepositRequest, WithdrawRequest, UserResponse } from "./types.js";
17
17
  export declare class FereClient {
18
18
  private readonly api;
19
19
  private constructor();
@@ -38,7 +38,8 @@ export declare class FereClient {
38
38
  getWallets: () => Promise<unknown>;
39
39
  getHoldings: () => Promise<unknown>;
40
40
  getCredits: () => Promise<import("./types.js").CreditsInfo>;
41
- getUser: () => Promise<unknown>;
41
+ claimDailyCredits: () => Promise<import("./types.js").ClaimDailyCreditsResponse>;
42
+ getUser: () => Promise<UserResponse>;
42
43
  getChains: () => Promise<unknown>;
43
44
  getEarnInfo: () => Promise<unknown>;
44
45
  getPositions: () => Promise<unknown>;
package/dist/client.js CHANGED
@@ -99,6 +99,7 @@ class FereClient {
99
99
  getWallets = () => this.api.getWallets();
100
100
  getHoldings = () => this.api.getHoldings();
101
101
  getCredits = () => this.api.getCredits();
102
+ claimDailyCredits = () => this.api.claimDailyCredits();
102
103
  getUser = () => this.api.getUser();
103
104
  getChains = () => this.api.getChains();
104
105
  getEarnInfo = () => this.api.getEarnInfo();
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { FereAPI } from "./low-level.js";
2
2
  export { FereClient } from "./client.js";
3
3
  export { AuthManager } from "./auth.js";
4
- export type { ChatEvent, TaskResponse, TaskStatusResponse, SwapRequest, LimitOrderRequest, HooksRequest, DepositRequest, WithdrawRequest, CreditsInfo, WalletInfo, } from "./types.js";
4
+ export type { ChatEvent, TaskResponse, TaskStatusResponse, SwapRequest, LimitOrderRequest, HooksRequest, DepositRequest, WithdrawRequest, CreditsInfo, WalletInfo, UserResponse, ClaimDailyCreditsResponse, } from "./types.js";
5
5
  export { TaskTimeoutError } from "./types.js";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Low-level SDK — 1:1 typed wrappers around every gateway endpoint.
3
3
  */
4
- import type { ChatEvent, CreditsInfo, DepositRequest, HooksRequest, LimitOrderRequest, SwapRequest, TaskResponse, TaskStatusResponse, WithdrawRequest } from "./types.js";
4
+ import type { ChatEvent, ClaimDailyCreditsResponse, CreditsInfo, DepositRequest, HooksRequest, LimitOrderRequest, SwapRequest, TaskResponse, TaskStatusResponse, UserResponse, WithdrawRequest } from "./types.js";
5
5
  export declare class FereAPI {
6
6
  private readonly baseUrl;
7
7
  private readonly auth;
@@ -53,6 +53,7 @@ export declare class FereAPI {
53
53
  }): Promise<unknown>;
54
54
  notificationStream(): AsyncGenerator<ChatEvent>;
55
55
  getCredits(): Promise<CreditsInfo>;
56
- getUser(): Promise<unknown>;
56
+ claimDailyCredits(): Promise<ClaimDailyCreditsResponse>;
57
+ getUser(): Promise<UserResponse>;
57
58
  getChains(): Promise<unknown>;
58
59
  }
package/dist/low-level.js CHANGED
@@ -275,6 +275,9 @@ class FereAPI {
275
275
  async getCredits() {
276
276
  return this.authedGet("/v1/credits");
277
277
  }
278
+ async claimDailyCredits() {
279
+ return this.authedPost("/v1/credits/claim-daily", {});
280
+ }
278
281
  async getUser() {
279
282
  return this.authedGet("/v1/user");
280
283
  }
package/dist/types.d.ts CHANGED
@@ -29,6 +29,23 @@ export interface WalletInfo {
29
29
  export interface CreditsInfo {
30
30
  credits_available: number | null;
31
31
  }
32
+ export interface ClaimDailyCreditsResponse {
33
+ success: boolean;
34
+ credits_claimed: number | null;
35
+ new_balance: number | null;
36
+ next_claim_available_at: string | null;
37
+ error: string | null;
38
+ current_balance: number | null;
39
+ }
40
+ export interface UserResponse {
41
+ name: string | null;
42
+ credits_available: number | null;
43
+ wallets: WalletInfo[] | null;
44
+ /** @deprecated Always null — removed for privacy. */
45
+ id: string | null;
46
+ /** @deprecated Always null — removed for privacy. */
47
+ email: string | null;
48
+ }
32
49
  export interface SwapRequest {
33
50
  chain_id_in: number;
34
51
  chain_id_out: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fereai/sdk",
3
- "version": "0.2.0-dev.17",
3
+ "version": "0.2.1-dev.18",
4
4
  "description": "TypeScript SDK for the FereAI Gateway API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",