@myx-trade/sdk 1.0.3 → 1.0.4-beta.0
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 -25
- package/dist/index.d.ts +16 -25
- package/dist/index.js +1 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -905,7 +905,7 @@ declare const withdrawableLpAmount$1: (params: {
|
|
|
905
905
|
poolId: string;
|
|
906
906
|
price?: bigint;
|
|
907
907
|
}) => Promise<any>;
|
|
908
|
-
declare const withdraw$1: (params: WithdrawParams) => Promise<viem.TransactionReceipt
|
|
908
|
+
declare const withdraw$1: (params: WithdrawParams) => Promise<viem.TransactionReceipt>;
|
|
909
909
|
|
|
910
910
|
declare const getRewards$1: (params: RewardsParams) => Promise<{
|
|
911
911
|
rebates: any;
|
|
@@ -933,7 +933,7 @@ declare const withdrawableLpAmount: (params: {
|
|
|
933
933
|
poolId: string;
|
|
934
934
|
price?: bigint;
|
|
935
935
|
}) => Promise<any>;
|
|
936
|
-
declare const withdraw: (params: WithdrawParams) => Promise<viem.TransactionReceipt
|
|
936
|
+
declare const withdraw: (params: WithdrawParams) => Promise<viem.TransactionReceipt>;
|
|
937
937
|
|
|
938
938
|
declare const transfer: (chainId: ChainId, fromPoolId: string, toPoolId: string, amount: number) => Promise<viem.TransactionReceipt | null>;
|
|
939
939
|
|
|
@@ -1061,37 +1061,28 @@ declare const getTokenInfo: (chainId: number, tokenAddress: string, account?: st
|
|
|
1061
1061
|
|
|
1062
1062
|
/**
|
|
1063
1063
|
* MyxLogger
|
|
1064
|
-
*
|
|
1065
|
-
*
|
|
1066
|
-
* @version 1.0.0
|
|
1067
|
-
* @since 2025-09-19
|
|
1068
|
-
* @license MIT
|
|
1069
|
-
* @copyright Myx
|
|
1070
|
-
* @description MyxLogger is a logger for Myx SDK
|
|
1064
|
+
* Uses optional sink (no global console by default) so LavaMoat allowlist can omit "console".
|
|
1065
|
+
* Host can setSdkLogSink(console) to get logs.
|
|
1071
1066
|
*/
|
|
1072
1067
|
type LogLevel = "debug" | "info" | "error" | "warn" | "none";
|
|
1073
1068
|
interface LoggerOptions {
|
|
1074
1069
|
logLevel?: LogLevel;
|
|
1070
|
+
/** Optional sink; if not set, uses getSdkLogSink() (no-op by default). */
|
|
1071
|
+
sink?: {
|
|
1072
|
+
log?: (...a: unknown[]) => void;
|
|
1073
|
+
info?: (...a: unknown[]) => void;
|
|
1074
|
+
warn?: (...a: unknown[]) => void;
|
|
1075
|
+
error?: (...a: unknown[]) => void;
|
|
1076
|
+
};
|
|
1075
1077
|
}
|
|
1076
1078
|
declare class Logger {
|
|
1077
1079
|
private options;
|
|
1078
1080
|
constructor(options?: LoggerOptions);
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
* info
|
|
1085
|
-
*/
|
|
1086
|
-
info(message: string, ...args: any[]): void;
|
|
1087
|
-
/**
|
|
1088
|
-
* error
|
|
1089
|
-
*/
|
|
1090
|
-
error(message: string, ...args: any[]): void;
|
|
1091
|
-
/**
|
|
1092
|
-
* warn
|
|
1093
|
-
*/
|
|
1094
|
-
warn(message: string, ...args: any[]): void;
|
|
1081
|
+
private get out();
|
|
1082
|
+
debug(message: string, ...args: unknown[]): void;
|
|
1083
|
+
info(message: string, ...args: unknown[]): void;
|
|
1084
|
+
error(message: string, ...args: unknown[]): void;
|
|
1085
|
+
warn(message: string, ...args: unknown[]): void;
|
|
1095
1086
|
}
|
|
1096
1087
|
|
|
1097
1088
|
interface WebSocketConfig extends Omit<Options, "maxReconnectionDelay" | "minReconnectionDelay"> {
|
package/dist/index.d.ts
CHANGED
|
@@ -905,7 +905,7 @@ declare const withdrawableLpAmount$1: (params: {
|
|
|
905
905
|
poolId: string;
|
|
906
906
|
price?: bigint;
|
|
907
907
|
}) => Promise<any>;
|
|
908
|
-
declare const withdraw$1: (params: WithdrawParams) => Promise<viem.TransactionReceipt
|
|
908
|
+
declare const withdraw$1: (params: WithdrawParams) => Promise<viem.TransactionReceipt>;
|
|
909
909
|
|
|
910
910
|
declare const getRewards$1: (params: RewardsParams) => Promise<{
|
|
911
911
|
rebates: any;
|
|
@@ -933,7 +933,7 @@ declare const withdrawableLpAmount: (params: {
|
|
|
933
933
|
poolId: string;
|
|
934
934
|
price?: bigint;
|
|
935
935
|
}) => Promise<any>;
|
|
936
|
-
declare const withdraw: (params: WithdrawParams) => Promise<viem.TransactionReceipt
|
|
936
|
+
declare const withdraw: (params: WithdrawParams) => Promise<viem.TransactionReceipt>;
|
|
937
937
|
|
|
938
938
|
declare const transfer: (chainId: ChainId, fromPoolId: string, toPoolId: string, amount: number) => Promise<viem.TransactionReceipt | null>;
|
|
939
939
|
|
|
@@ -1061,37 +1061,28 @@ declare const getTokenInfo: (chainId: number, tokenAddress: string, account?: st
|
|
|
1061
1061
|
|
|
1062
1062
|
/**
|
|
1063
1063
|
* MyxLogger
|
|
1064
|
-
*
|
|
1065
|
-
*
|
|
1066
|
-
* @version 1.0.0
|
|
1067
|
-
* @since 2025-09-19
|
|
1068
|
-
* @license MIT
|
|
1069
|
-
* @copyright Myx
|
|
1070
|
-
* @description MyxLogger is a logger for Myx SDK
|
|
1064
|
+
* Uses optional sink (no global console by default) so LavaMoat allowlist can omit "console".
|
|
1065
|
+
* Host can setSdkLogSink(console) to get logs.
|
|
1071
1066
|
*/
|
|
1072
1067
|
type LogLevel = "debug" | "info" | "error" | "warn" | "none";
|
|
1073
1068
|
interface LoggerOptions {
|
|
1074
1069
|
logLevel?: LogLevel;
|
|
1070
|
+
/** Optional sink; if not set, uses getSdkLogSink() (no-op by default). */
|
|
1071
|
+
sink?: {
|
|
1072
|
+
log?: (...a: unknown[]) => void;
|
|
1073
|
+
info?: (...a: unknown[]) => void;
|
|
1074
|
+
warn?: (...a: unknown[]) => void;
|
|
1075
|
+
error?: (...a: unknown[]) => void;
|
|
1076
|
+
};
|
|
1075
1077
|
}
|
|
1076
1078
|
declare class Logger {
|
|
1077
1079
|
private options;
|
|
1078
1080
|
constructor(options?: LoggerOptions);
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
* info
|
|
1085
|
-
*/
|
|
1086
|
-
info(message: string, ...args: any[]): void;
|
|
1087
|
-
/**
|
|
1088
|
-
* error
|
|
1089
|
-
*/
|
|
1090
|
-
error(message: string, ...args: any[]): void;
|
|
1091
|
-
/**
|
|
1092
|
-
* warn
|
|
1093
|
-
*/
|
|
1094
|
-
warn(message: string, ...args: any[]): void;
|
|
1081
|
+
private get out();
|
|
1082
|
+
debug(message: string, ...args: unknown[]): void;
|
|
1083
|
+
info(message: string, ...args: unknown[]): void;
|
|
1084
|
+
error(message: string, ...args: unknown[]): void;
|
|
1085
|
+
warn(message: string, ...args: unknown[]): void;
|
|
1095
1086
|
}
|
|
1096
1087
|
|
|
1097
1088
|
interface WebSocketConfig extends Omit<Options, "maxReconnectionDelay" | "minReconnectionDelay"> {
|