@jimmygu/sfa-sdk-test 1.0.2 → 1.0.4

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.mts CHANGED
@@ -765,8 +765,8 @@ declare class HyperliquidService {
765
765
  error: string | null;
766
766
  }>;
767
767
  transfer(params: HyperliquidTransferParams): Promise<string>;
768
- deposit(params: HyperliquidDepositParams): Promise<unknown>;
769
- getStatus(params: HyperliquidGetStatusParams): Promise<unknown>;
768
+ deposit(params: HyperliquidDepositParams): Promise<HyperliquidDepositResponse>;
769
+ getStatus(params: HyperliquidGetStatusParams): Promise<HyperliquidDepositStatusResponse>;
770
770
  protected generatePermit(params: HyperliquidGeneratePermitParams): Promise<{
771
771
  amount: string;
772
772
  deadline: number;
@@ -814,6 +814,19 @@ interface HyperliquidDepositParams extends HyperliquidTransferParams {
814
814
  interface HyperliquidGetStatusParams {
815
815
  depositId: string;
816
816
  }
817
+ interface HyperliquidResponse<T> {
818
+ code: number;
819
+ data: T;
820
+ }
821
+ interface HyperliquidDepositResponseData {
822
+ deposit_id: number;
823
+ }
824
+ type HyperliquidDepositResponse = HyperliquidResponse<HyperliquidDepositResponseData>;
825
+ interface HyperliquidDepositStatusResponseData {
826
+ status: string;
827
+ txHash: string;
828
+ }
829
+ type HyperliquidDepositStatusResponse = HyperliquidResponse<HyperliquidDepositStatusResponseData>;
817
830
 
818
831
  declare const tokens: TokenConfig[];
819
832
  declare const usdtTokens: TokenConfig[];
@@ -1041,4 +1054,4 @@ declare const NetworkRpcUrlsMap: Record<string, string[]>;
1041
1054
  declare const getRpcUrls: (blockchain: string) => string[];
1042
1055
  declare const setRpcUrls: (urls: Record<string, string[]>) => Record<string, string[]>;
1043
1056
 
1044
- export { ApiError, type AppFee, AptosWallet, type BadRequestResponse, CancelError, CancelablePromise, EVMWallet, type GetAllQuoteParams, GetExecutionStatusResponse, Hyperliquid, type HyperliquidDepositParams, HyperliquidFromTokens, type HyperliquidGetStatusParams, type HyperliquidQuoteParams, type HyperliquidTransferParams, HyperliuquidToToken, NearWallet, NetworkRpcUrlsMap, OpenAPI, type OpenAPIConfig, type Quote, QuoteRequest, type QuoteResponse, SFA, Service, type ServiceType, SolanaWallet, type SubmitDepositTxRequest, SubmitDepositTxResponse, type SwapDetails, type TokenConfig, TokenResponse, type TransactionDetails, TransactionStatus, TronWallet, getRpcUrls, setRpcUrls, tokens, usdcChains, usdcTokens, usdtChains, usdtTokens };
1057
+ export { ApiError, type AppFee, AptosWallet, type BadRequestResponse, CancelError, CancelablePromise, EVMWallet, type GetAllQuoteParams, GetExecutionStatusResponse, Hyperliquid, type HyperliquidDepositParams, type HyperliquidDepositResponse, type HyperliquidDepositStatusResponse, HyperliquidFromTokens, type HyperliquidGetStatusParams, type HyperliquidQuoteParams, type HyperliquidTransferParams, HyperliuquidToToken, NearWallet, NetworkRpcUrlsMap, OpenAPI, type OpenAPIConfig, type Quote, QuoteRequest, type QuoteResponse, SFA, Service, type ServiceType, SolanaWallet, type SubmitDepositTxRequest, SubmitDepositTxResponse, type SwapDetails, type TokenConfig, TokenResponse, type TransactionDetails, TransactionStatus, TronWallet, getRpcUrls, setRpcUrls, tokens, usdcChains, usdcTokens, usdtChains, usdtTokens };
package/dist/index.d.ts CHANGED
@@ -765,8 +765,8 @@ declare class HyperliquidService {
765
765
  error: string | null;
766
766
  }>;
767
767
  transfer(params: HyperliquidTransferParams): Promise<string>;
768
- deposit(params: HyperliquidDepositParams): Promise<unknown>;
769
- getStatus(params: HyperliquidGetStatusParams): Promise<unknown>;
768
+ deposit(params: HyperliquidDepositParams): Promise<HyperliquidDepositResponse>;
769
+ getStatus(params: HyperliquidGetStatusParams): Promise<HyperliquidDepositStatusResponse>;
770
770
  protected generatePermit(params: HyperliquidGeneratePermitParams): Promise<{
771
771
  amount: string;
772
772
  deadline: number;
@@ -814,6 +814,19 @@ interface HyperliquidDepositParams extends HyperliquidTransferParams {
814
814
  interface HyperliquidGetStatusParams {
815
815
  depositId: string;
816
816
  }
817
+ interface HyperliquidResponse<T> {
818
+ code: number;
819
+ data: T;
820
+ }
821
+ interface HyperliquidDepositResponseData {
822
+ deposit_id: number;
823
+ }
824
+ type HyperliquidDepositResponse = HyperliquidResponse<HyperliquidDepositResponseData>;
825
+ interface HyperliquidDepositStatusResponseData {
826
+ status: string;
827
+ txHash: string;
828
+ }
829
+ type HyperliquidDepositStatusResponse = HyperliquidResponse<HyperliquidDepositStatusResponseData>;
817
830
 
818
831
  declare const tokens: TokenConfig[];
819
832
  declare const usdtTokens: TokenConfig[];
@@ -1041,4 +1054,4 @@ declare const NetworkRpcUrlsMap: Record<string, string[]>;
1041
1054
  declare const getRpcUrls: (blockchain: string) => string[];
1042
1055
  declare const setRpcUrls: (urls: Record<string, string[]>) => Record<string, string[]>;
1043
1056
 
1044
- export { ApiError, type AppFee, AptosWallet, type BadRequestResponse, CancelError, CancelablePromise, EVMWallet, type GetAllQuoteParams, GetExecutionStatusResponse, Hyperliquid, type HyperliquidDepositParams, HyperliquidFromTokens, type HyperliquidGetStatusParams, type HyperliquidQuoteParams, type HyperliquidTransferParams, HyperliuquidToToken, NearWallet, NetworkRpcUrlsMap, OpenAPI, type OpenAPIConfig, type Quote, QuoteRequest, type QuoteResponse, SFA, Service, type ServiceType, SolanaWallet, type SubmitDepositTxRequest, SubmitDepositTxResponse, type SwapDetails, type TokenConfig, TokenResponse, type TransactionDetails, TransactionStatus, TronWallet, getRpcUrls, setRpcUrls, tokens, usdcChains, usdcTokens, usdtChains, usdtTokens };
1057
+ export { ApiError, type AppFee, AptosWallet, type BadRequestResponse, CancelError, CancelablePromise, EVMWallet, type GetAllQuoteParams, GetExecutionStatusResponse, Hyperliquid, type HyperliquidDepositParams, type HyperliquidDepositResponse, type HyperliquidDepositStatusResponse, HyperliquidFromTokens, type HyperliquidGetStatusParams, type HyperliquidQuoteParams, type HyperliquidTransferParams, HyperliuquidToToken, NearWallet, NetworkRpcUrlsMap, OpenAPI, type OpenAPIConfig, type Quote, QuoteRequest, type QuoteResponse, SFA, Service, type ServiceType, SolanaWallet, type SubmitDepositTxRequest, SubmitDepositTxResponse, type SwapDetails, type TokenConfig, TokenResponse, type TransactionDetails, TransactionStatus, TronWallet, getRpcUrls, setRpcUrls, tokens, usdcChains, usdcTokens, usdtChains, usdtTokens };
package/dist/index.js CHANGED
@@ -4846,7 +4846,6 @@ var HyperliquidService = class {
4846
4846
  amountWei: quote?.quoteParam?.amountWei
4847
4847
  };
4848
4848
  const txhash = await ServiceMap[Service.OneClick].send(sendParams);
4849
- console.log("txhash: %o", txhash);
4850
4849
  return txhash;
4851
4850
  }
4852
4851
  async deposit(params) {
@@ -4861,18 +4860,17 @@ var HyperliquidService = class {
4861
4860
  evmWallet,
4862
4861
  amountWei: quote?.quoteParam?.amountWei
4863
4862
  });
4864
- console.log("permitParams: %o", permitParams);
4865
4863
  const depositParams = {
4866
4864
  deposit_address: quote?.quote?.depositAddress,
4867
4865
  from_addr: quote?.quoteParam?.refundTo,
4868
4866
  from_amount: quote?.quote?.amountIn,
4869
4867
  from_chain: quote?.quoteParam?.fromToken?.blockchain,
4870
4868
  from_hash: txhash,
4871
- from_token: quote?.quoteParam?.fromToken?.contractAddress,
4869
+ from_token: quote?.quoteParam?.fromToken?.symbol,
4872
4870
  sender: quote?.quoteParam?.recipient,
4873
4871
  to_amount: quote?.quoteParam?.amountWei,
4874
4872
  to_chain: quote?.quoteParam?.toToken?.blockchain,
4875
- to_token: quote?.quoteParam?.toToken?.contractAddress,
4873
+ to_token: quote?.quoteParam?.toToken?.symbol,
4876
4874
  type: Service.OneClick,
4877
4875
  permit: permitParams
4878
4876
  };
@@ -4887,7 +4885,6 @@ var HyperliquidService = class {
4887
4885
  401: `Unauthorized - JWT token is invalid`
4888
4886
  }
4889
4887
  });
4890
- console.log("depositRes: %o", depositRes);
4891
4888
  return depositRes;
4892
4889
  }
4893
4890
  async getStatus(params) {
package/dist/index.mjs CHANGED
@@ -4785,7 +4785,6 @@ var HyperliquidService = class {
4785
4785
  amountWei: quote?.quoteParam?.amountWei
4786
4786
  };
4787
4787
  const txhash = await ServiceMap[Service.OneClick].send(sendParams);
4788
- console.log("txhash: %o", txhash);
4789
4788
  return txhash;
4790
4789
  }
4791
4790
  async deposit(params) {
@@ -4800,18 +4799,17 @@ var HyperliquidService = class {
4800
4799
  evmWallet,
4801
4800
  amountWei: quote?.quoteParam?.amountWei
4802
4801
  });
4803
- console.log("permitParams: %o", permitParams);
4804
4802
  const depositParams = {
4805
4803
  deposit_address: quote?.quote?.depositAddress,
4806
4804
  from_addr: quote?.quoteParam?.refundTo,
4807
4805
  from_amount: quote?.quote?.amountIn,
4808
4806
  from_chain: quote?.quoteParam?.fromToken?.blockchain,
4809
4807
  from_hash: txhash,
4810
- from_token: quote?.quoteParam?.fromToken?.contractAddress,
4808
+ from_token: quote?.quoteParam?.fromToken?.symbol,
4811
4809
  sender: quote?.quoteParam?.recipient,
4812
4810
  to_amount: quote?.quoteParam?.amountWei,
4813
4811
  to_chain: quote?.quoteParam?.toToken?.blockchain,
4814
- to_token: quote?.quoteParam?.toToken?.contractAddress,
4812
+ to_token: quote?.quoteParam?.toToken?.symbol,
4815
4813
  type: Service.OneClick,
4816
4814
  permit: permitParams
4817
4815
  };
@@ -4826,7 +4824,6 @@ var HyperliquidService = class {
4826
4824
  401: `Unauthorized - JWT token is invalid`
4827
4825
  }
4828
4826
  });
4829
- console.log("depositRes: %o", depositRes);
4830
4827
  return depositRes;
4831
4828
  }
4832
4829
  async getStatus(params) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jimmygu/sfa-sdk-test",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "TypeScript SDK for StableFlow AI API - Cross-chain token swap solution",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",