@jimmygu/sfa-sdk-test 1.0.2 → 1.0.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.mts +16 -3
- package/dist/index.d.ts +16 -3
- package/dist/index.js +0 -3
- package/dist/index.mjs +0 -3
- package/package.json +1 -1
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<
|
|
769
|
-
getStatus(params: HyperliquidGetStatusParams): Promise<
|
|
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<
|
|
769
|
-
getStatus(params: HyperliquidGetStatusParams): Promise<
|
|
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,7 +4860,6 @@ 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,
|
|
@@ -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,7 +4799,6 @@ 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,
|
|
@@ -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) {
|