@optimex-xyz/market-maker-sdk 0.5.0-dev-4237adc → 0.5.0-dev-aa5306f

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.ts CHANGED
@@ -4590,10 +4590,15 @@ declare namespace index {
4590
4590
  export { index_ERC20__factory as ERC20__factory, index_Payment__factory as Payment__factory, index_Router__factory as Router__factory, index_Signer__factory as Signer__factory };
4591
4591
  }
4592
4592
 
4593
- declare class RouterService {
4594
- private readonly provider;
4595
- private readonly contract;
4593
+ declare class RouterService implements ConfigObserver {
4594
+ private provider;
4595
+ private contract;
4596
4596
  constructor();
4597
+ /**
4598
+ * Implementation of ConfigObserver interface
4599
+ * Updates service when config changes
4600
+ */
4601
+ onConfigUpdate(newConfig: AppConfig): void;
4597
4602
  getSigner(): Promise<string>;
4598
4603
  getCurrentPubkey(network: string): Promise<ITypes.MPCInfoStructOutput>;
4599
4604
  getCurrentStage(tradeId: BytesLike): Promise<bigint>;
@@ -4620,10 +4625,15 @@ declare class RouterService {
4620
4625
  }
4621
4626
  declare const routerService: RouterService;
4622
4627
 
4623
- declare class SignerService {
4624
- private readonly provider;
4628
+ declare class SignerService implements ConfigObserver {
4629
+ private provider;
4625
4630
  private readonly routerService;
4626
4631
  constructor();
4632
+ /**
4633
+ * Implementation of ConfigObserver interface
4634
+ * Updates service when config changes
4635
+ */
4636
+ onConfigUpdate(newConfig: AppConfig): void;
4627
4637
  getDomain(): Promise<{
4628
4638
  name: string;
4629
4639
  version: string;
@@ -4662,11 +4672,371 @@ declare const SubmitSettlementResponseSchema: z.ZodObject<{
4662
4672
  }, {
4663
4673
  message: string;
4664
4674
  }>;
4675
+ declare const TradeDetailResponseSchema: z.ZodObject<{
4676
+ data: z.ZodObject<{
4677
+ tradeId: z.ZodString;
4678
+ sessionId: z.ZodString;
4679
+ solverAddress: z.ZodString;
4680
+ fromToken: z.ZodObject<{
4681
+ tokenId: z.ZodString;
4682
+ chain: z.ZodString;
4683
+ address: z.ZodString;
4684
+ feeIn: z.ZodBoolean;
4685
+ feeOut: z.ZodBoolean;
4686
+ }, "strip", z.ZodTypeAny, {
4687
+ address: string;
4688
+ tokenId: string;
4689
+ chain: string;
4690
+ feeIn: boolean;
4691
+ feeOut: boolean;
4692
+ }, {
4693
+ address: string;
4694
+ tokenId: string;
4695
+ chain: string;
4696
+ feeIn: boolean;
4697
+ feeOut: boolean;
4698
+ }>;
4699
+ toToken: z.ZodObject<{
4700
+ tokenId: z.ZodString;
4701
+ chain: z.ZodString;
4702
+ address: z.ZodString;
4703
+ feeIn: z.ZodBoolean;
4704
+ feeOut: z.ZodBoolean;
4705
+ }, "strip", z.ZodTypeAny, {
4706
+ address: string;
4707
+ tokenId: string;
4708
+ chain: string;
4709
+ feeIn: boolean;
4710
+ feeOut: boolean;
4711
+ }, {
4712
+ address: string;
4713
+ tokenId: string;
4714
+ chain: string;
4715
+ feeIn: boolean;
4716
+ feeOut: boolean;
4717
+ }>;
4718
+ amountBeforeFees: z.ZodString;
4719
+ amountAfterFees: z.ZodString;
4720
+ fromUserAddress: z.ZodString;
4721
+ userReceivingAddress: z.ZodString;
4722
+ deadline: z.ZodNumber;
4723
+ protocolFeeInBps: z.ZodString;
4724
+ protocolMpcPubkey: z.ZodString;
4725
+ protocolMpcAddress: z.ZodString;
4726
+ bestIndicativeQuote: z.ZodString;
4727
+ displayIndicativeQuote: z.ZodString;
4728
+ pmmFinalists: z.ZodArray<z.ZodObject<{
4729
+ pmmId: z.ZodString;
4730
+ pmmReceivingAddress: z.ZodString;
4731
+ }, "strip", z.ZodTypeAny, {
4732
+ pmmId: string;
4733
+ pmmReceivingAddress: string;
4734
+ }, {
4735
+ pmmId: string;
4736
+ pmmReceivingAddress: string;
4737
+ }>, "many">;
4738
+ settlementQuote: z.ZodString;
4739
+ receivingAmount: z.ZodString;
4740
+ selectedPmm: z.ZodString;
4741
+ selectedPmmReceivingAddress: z.ZodString;
4742
+ selectedPmmOperator: z.ZodString;
4743
+ selectedPmmSigDeadline: z.ZodNumber;
4744
+ commitmentRetries: z.ZodNumber;
4745
+ pmmFailureStats: z.ZodRecord<z.ZodString, z.ZodNumber>;
4746
+ commitedSignature: z.ZodString;
4747
+ minAmountOut: z.ZodNull;
4748
+ sessionDeadline: z.ZodNumber;
4749
+ userDepositTx: z.ZodString;
4750
+ depositVault: z.ZodString;
4751
+ paymentBundle: z.ZodObject<{
4752
+ tradeIds: z.ZodArray<z.ZodString, "many">;
4753
+ settlementTx: z.ZodString;
4754
+ signature: z.ZodString;
4755
+ startIndex: z.ZodNumber;
4756
+ pmmId: z.ZodString;
4757
+ signedAt: z.ZodNumber;
4758
+ }, "strip", z.ZodTypeAny, {
4759
+ signature: string;
4760
+ tradeIds: string[];
4761
+ signedAt: number;
4762
+ pmmId: string;
4763
+ settlementTx: string;
4764
+ startIndex: number;
4765
+ }, {
4766
+ signature: string;
4767
+ tradeIds: string[];
4768
+ signedAt: number;
4769
+ pmmId: string;
4770
+ settlementTx: string;
4771
+ startIndex: number;
4772
+ }>;
4773
+ userSignature: z.ZodString;
4774
+ tradeSubmissionTx: z.ZodString;
4775
+ tradeSelectPmmTx: z.ZodString;
4776
+ tradeMakePaymentTx: z.ZodString;
4777
+ state: z.ZodString;
4778
+ lastUpdateMsg: z.ZodString;
4779
+ version: z.ZodNumber;
4780
+ }, "strip", z.ZodTypeAny, {
4781
+ version: number;
4782
+ deadline: number;
4783
+ tradeId: string;
4784
+ minAmountOut: null;
4785
+ sessionId: string;
4786
+ solverAddress: string;
4787
+ fromToken: {
4788
+ address: string;
4789
+ tokenId: string;
4790
+ chain: string;
4791
+ feeIn: boolean;
4792
+ feeOut: boolean;
4793
+ };
4794
+ toToken: {
4795
+ address: string;
4796
+ tokenId: string;
4797
+ chain: string;
4798
+ feeIn: boolean;
4799
+ feeOut: boolean;
4800
+ };
4801
+ amountBeforeFees: string;
4802
+ amountAfterFees: string;
4803
+ fromUserAddress: string;
4804
+ userReceivingAddress: string;
4805
+ protocolFeeInBps: string;
4806
+ protocolMpcPubkey: string;
4807
+ protocolMpcAddress: string;
4808
+ bestIndicativeQuote: string;
4809
+ displayIndicativeQuote: string;
4810
+ pmmFinalists: {
4811
+ pmmId: string;
4812
+ pmmReceivingAddress: string;
4813
+ }[];
4814
+ settlementQuote: string;
4815
+ receivingAmount: string;
4816
+ selectedPmm: string;
4817
+ selectedPmmReceivingAddress: string;
4818
+ selectedPmmOperator: string;
4819
+ selectedPmmSigDeadline: number;
4820
+ commitmentRetries: number;
4821
+ pmmFailureStats: Record<string, number>;
4822
+ commitedSignature: string;
4823
+ sessionDeadline: number;
4824
+ userDepositTx: string;
4825
+ depositVault: string;
4826
+ paymentBundle: {
4827
+ signature: string;
4828
+ tradeIds: string[];
4829
+ signedAt: number;
4830
+ pmmId: string;
4831
+ settlementTx: string;
4832
+ startIndex: number;
4833
+ };
4834
+ userSignature: string;
4835
+ tradeSubmissionTx: string;
4836
+ tradeSelectPmmTx: string;
4837
+ tradeMakePaymentTx: string;
4838
+ state: string;
4839
+ lastUpdateMsg: string;
4840
+ }, {
4841
+ version: number;
4842
+ deadline: number;
4843
+ tradeId: string;
4844
+ minAmountOut: null;
4845
+ sessionId: string;
4846
+ solverAddress: string;
4847
+ fromToken: {
4848
+ address: string;
4849
+ tokenId: string;
4850
+ chain: string;
4851
+ feeIn: boolean;
4852
+ feeOut: boolean;
4853
+ };
4854
+ toToken: {
4855
+ address: string;
4856
+ tokenId: string;
4857
+ chain: string;
4858
+ feeIn: boolean;
4859
+ feeOut: boolean;
4860
+ };
4861
+ amountBeforeFees: string;
4862
+ amountAfterFees: string;
4863
+ fromUserAddress: string;
4864
+ userReceivingAddress: string;
4865
+ protocolFeeInBps: string;
4866
+ protocolMpcPubkey: string;
4867
+ protocolMpcAddress: string;
4868
+ bestIndicativeQuote: string;
4869
+ displayIndicativeQuote: string;
4870
+ pmmFinalists: {
4871
+ pmmId: string;
4872
+ pmmReceivingAddress: string;
4873
+ }[];
4874
+ settlementQuote: string;
4875
+ receivingAmount: string;
4876
+ selectedPmm: string;
4877
+ selectedPmmReceivingAddress: string;
4878
+ selectedPmmOperator: string;
4879
+ selectedPmmSigDeadline: number;
4880
+ commitmentRetries: number;
4881
+ pmmFailureStats: Record<string, number>;
4882
+ commitedSignature: string;
4883
+ sessionDeadline: number;
4884
+ userDepositTx: string;
4885
+ depositVault: string;
4886
+ paymentBundle: {
4887
+ signature: string;
4888
+ tradeIds: string[];
4889
+ signedAt: number;
4890
+ pmmId: string;
4891
+ settlementTx: string;
4892
+ startIndex: number;
4893
+ };
4894
+ userSignature: string;
4895
+ tradeSubmissionTx: string;
4896
+ tradeSelectPmmTx: string;
4897
+ tradeMakePaymentTx: string;
4898
+ state: string;
4899
+ lastUpdateMsg: string;
4900
+ }>;
4901
+ traceId: z.ZodString;
4902
+ }, "strip", z.ZodTypeAny, {
4903
+ data: {
4904
+ version: number;
4905
+ deadline: number;
4906
+ tradeId: string;
4907
+ minAmountOut: null;
4908
+ sessionId: string;
4909
+ solverAddress: string;
4910
+ fromToken: {
4911
+ address: string;
4912
+ tokenId: string;
4913
+ chain: string;
4914
+ feeIn: boolean;
4915
+ feeOut: boolean;
4916
+ };
4917
+ toToken: {
4918
+ address: string;
4919
+ tokenId: string;
4920
+ chain: string;
4921
+ feeIn: boolean;
4922
+ feeOut: boolean;
4923
+ };
4924
+ amountBeforeFees: string;
4925
+ amountAfterFees: string;
4926
+ fromUserAddress: string;
4927
+ userReceivingAddress: string;
4928
+ protocolFeeInBps: string;
4929
+ protocolMpcPubkey: string;
4930
+ protocolMpcAddress: string;
4931
+ bestIndicativeQuote: string;
4932
+ displayIndicativeQuote: string;
4933
+ pmmFinalists: {
4934
+ pmmId: string;
4935
+ pmmReceivingAddress: string;
4936
+ }[];
4937
+ settlementQuote: string;
4938
+ receivingAmount: string;
4939
+ selectedPmm: string;
4940
+ selectedPmmReceivingAddress: string;
4941
+ selectedPmmOperator: string;
4942
+ selectedPmmSigDeadline: number;
4943
+ commitmentRetries: number;
4944
+ pmmFailureStats: Record<string, number>;
4945
+ commitedSignature: string;
4946
+ sessionDeadline: number;
4947
+ userDepositTx: string;
4948
+ depositVault: string;
4949
+ paymentBundle: {
4950
+ signature: string;
4951
+ tradeIds: string[];
4952
+ signedAt: number;
4953
+ pmmId: string;
4954
+ settlementTx: string;
4955
+ startIndex: number;
4956
+ };
4957
+ userSignature: string;
4958
+ tradeSubmissionTx: string;
4959
+ tradeSelectPmmTx: string;
4960
+ tradeMakePaymentTx: string;
4961
+ state: string;
4962
+ lastUpdateMsg: string;
4963
+ };
4964
+ traceId: string;
4965
+ }, {
4966
+ data: {
4967
+ version: number;
4968
+ deadline: number;
4969
+ tradeId: string;
4970
+ minAmountOut: null;
4971
+ sessionId: string;
4972
+ solverAddress: string;
4973
+ fromToken: {
4974
+ address: string;
4975
+ tokenId: string;
4976
+ chain: string;
4977
+ feeIn: boolean;
4978
+ feeOut: boolean;
4979
+ };
4980
+ toToken: {
4981
+ address: string;
4982
+ tokenId: string;
4983
+ chain: string;
4984
+ feeIn: boolean;
4985
+ feeOut: boolean;
4986
+ };
4987
+ amountBeforeFees: string;
4988
+ amountAfterFees: string;
4989
+ fromUserAddress: string;
4990
+ userReceivingAddress: string;
4991
+ protocolFeeInBps: string;
4992
+ protocolMpcPubkey: string;
4993
+ protocolMpcAddress: string;
4994
+ bestIndicativeQuote: string;
4995
+ displayIndicativeQuote: string;
4996
+ pmmFinalists: {
4997
+ pmmId: string;
4998
+ pmmReceivingAddress: string;
4999
+ }[];
5000
+ settlementQuote: string;
5001
+ receivingAmount: string;
5002
+ selectedPmm: string;
5003
+ selectedPmmReceivingAddress: string;
5004
+ selectedPmmOperator: string;
5005
+ selectedPmmSigDeadline: number;
5006
+ commitmentRetries: number;
5007
+ pmmFailureStats: Record<string, number>;
5008
+ commitedSignature: string;
5009
+ sessionDeadline: number;
5010
+ userDepositTx: string;
5011
+ depositVault: string;
5012
+ paymentBundle: {
5013
+ signature: string;
5014
+ tradeIds: string[];
5015
+ signedAt: number;
5016
+ pmmId: string;
5017
+ settlementTx: string;
5018
+ startIndex: number;
5019
+ };
5020
+ userSignature: string;
5021
+ tradeSubmissionTx: string;
5022
+ tradeSelectPmmTx: string;
5023
+ tradeMakePaymentTx: string;
5024
+ state: string;
5025
+ lastUpdateMsg: string;
5026
+ };
5027
+ traceId: string;
5028
+ }>;
4665
5029
  type SubmitSettlementRequest = z.infer<typeof SubmitSettlementRequestSchema>;
4666
5030
  type SubmitSettlementResponse = z.infer<typeof SubmitSettlementResponseSchema>;
4667
- declare class SolverService {
4668
- private readonly baseURL;
5031
+ type TradeDetailResponse = z.infer<typeof TradeDetailResponseSchema>;
5032
+ declare class SolverService implements ConfigObserver {
5033
+ private baseURL;
4669
5034
  constructor();
5035
+ /**
5036
+ * Implementation of ConfigObserver interface
5037
+ * Updates service when config changes
5038
+ */
5039
+ onConfigUpdate(newConfig: AppConfig): void;
4670
5040
  /**
4671
5041
  * Submits a settlement transaction to the solver backend
4672
5042
  * @param params Settlement transaction parameters
@@ -4674,6 +5044,13 @@ declare class SolverService {
4674
5044
  * @throws Error if the request fails or validation fails
4675
5045
  */
4676
5046
  submitSettlementTx(params: SubmitSettlementRequest): Promise<SubmitSettlementResponse>;
5047
+ /**
5048
+ * Get trade details
5049
+ * @param tradeId ID of the trade to query
5050
+ * @returns Promise with trade details in camelCase format
5051
+ * @throws Error if request fails or validation fails
5052
+ */
5053
+ getTradeDetail(tradeId: string): Promise<TradeDetailResponse>;
4677
5054
  }
4678
5055
  declare const solverService: SolverService;
4679
5056
 
package/dist/index.js CHANGED
@@ -80,7 +80,7 @@ var environments = {
80
80
  }
81
81
  },
82
82
  production: {
83
- backendUrl: "https://api.petafi.xyz",
83
+ backendUrl: "https://api.optimex.xyz",
84
84
  rpcUrl: "https://bitfi-ledger-testnet.alt.technology",
85
85
  routerAddress: "0x272599CE3602A49B580A5C4a4d3C1067E30248D2",
86
86
  paymentAddressMap: {
@@ -3502,6 +3502,15 @@ var RouterService = class {
3502
3502
  constructor() {
3503
3503
  this.provider = new import_ethers5.JsonRpcProvider(config.getRpcUrl());
3504
3504
  this.contract = Router__factory.connect(config.getRouterAddress(), this.provider);
3505
+ config.registerObserver(this);
3506
+ }
3507
+ /**
3508
+ * Implementation of ConfigObserver interface
3509
+ * Updates service when config changes
3510
+ */
3511
+ onConfigUpdate(newConfig) {
3512
+ this.provider = new import_ethers5.JsonRpcProvider(newConfig.rpcUrl);
3513
+ this.contract = Router__factory.connect(newConfig.routerAddress, this.provider);
3505
3514
  }
3506
3515
  async getSigner() {
3507
3516
  return await this.contract.SIGNER();
@@ -3581,6 +3590,14 @@ var SignerService = class {
3581
3590
  constructor() {
3582
3591
  this.routerService = routerService;
3583
3592
  this.provider = new import_ethers6.JsonRpcProvider(config.getRpcUrl());
3593
+ config.registerObserver(this);
3594
+ }
3595
+ /**
3596
+ * Implementation of ConfigObserver interface
3597
+ * Updates service when config changes
3598
+ */
3599
+ onConfigUpdate(newConfig) {
3600
+ this.provider = new import_ethers6.JsonRpcProvider(newConfig.rpcUrl);
3584
3601
  }
3585
3602
  async getDomain() {
3586
3603
  const signerAddress = await this.routerService.getSigner();
@@ -3656,9 +3673,78 @@ var SubmitSettlementRequestSchema = import_zod.z.object({
3656
3673
  var SubmitSettlementResponseSchema = import_zod.z.object({
3657
3674
  message: import_zod.z.string()
3658
3675
  });
3676
+ var TokenInfoSchema = import_zod.z.object({
3677
+ tokenId: import_zod.z.string(),
3678
+ chain: import_zod.z.string(),
3679
+ address: import_zod.z.string(),
3680
+ feeIn: import_zod.z.boolean(),
3681
+ feeOut: import_zod.z.boolean()
3682
+ });
3683
+ var PMMFinalistSchema = import_zod.z.object({
3684
+ pmmId: import_zod.z.string(),
3685
+ pmmReceivingAddress: import_zod.z.string()
3686
+ });
3687
+ var PaymentBundleSchema = import_zod.z.object({
3688
+ tradeIds: import_zod.z.array(import_zod.z.string()),
3689
+ settlementTx: import_zod.z.string(),
3690
+ signature: import_zod.z.string(),
3691
+ startIndex: import_zod.z.number(),
3692
+ pmmId: import_zod.z.string(),
3693
+ signedAt: import_zod.z.number()
3694
+ });
3695
+ var TradeDetailResponseSchema = import_zod.z.object({
3696
+ data: import_zod.z.object({
3697
+ tradeId: import_zod.z.string(),
3698
+ sessionId: import_zod.z.string(),
3699
+ solverAddress: import_zod.z.string(),
3700
+ fromToken: TokenInfoSchema,
3701
+ toToken: TokenInfoSchema,
3702
+ amountBeforeFees: import_zod.z.string(),
3703
+ amountAfterFees: import_zod.z.string(),
3704
+ fromUserAddress: import_zod.z.string(),
3705
+ userReceivingAddress: import_zod.z.string(),
3706
+ deadline: import_zod.z.number(),
3707
+ protocolFeeInBps: import_zod.z.string(),
3708
+ protocolMpcPubkey: import_zod.z.string(),
3709
+ protocolMpcAddress: import_zod.z.string(),
3710
+ bestIndicativeQuote: import_zod.z.string(),
3711
+ displayIndicativeQuote: import_zod.z.string(),
3712
+ pmmFinalists: import_zod.z.array(PMMFinalistSchema),
3713
+ settlementQuote: import_zod.z.string(),
3714
+ receivingAmount: import_zod.z.string(),
3715
+ selectedPmm: import_zod.z.string(),
3716
+ selectedPmmReceivingAddress: import_zod.z.string(),
3717
+ selectedPmmOperator: import_zod.z.string(),
3718
+ selectedPmmSigDeadline: import_zod.z.number(),
3719
+ commitmentRetries: import_zod.z.number(),
3720
+ pmmFailureStats: import_zod.z.record(import_zod.z.number()),
3721
+ commitedSignature: import_zod.z.string(),
3722
+ minAmountOut: import_zod.z.null(),
3723
+ sessionDeadline: import_zod.z.number(),
3724
+ userDepositTx: import_zod.z.string(),
3725
+ depositVault: import_zod.z.string(),
3726
+ paymentBundle: PaymentBundleSchema,
3727
+ userSignature: import_zod.z.string(),
3728
+ tradeSubmissionTx: import_zod.z.string(),
3729
+ tradeSelectPmmTx: import_zod.z.string(),
3730
+ tradeMakePaymentTx: import_zod.z.string(),
3731
+ state: import_zod.z.string(),
3732
+ lastUpdateMsg: import_zod.z.string(),
3733
+ version: import_zod.z.number()
3734
+ }),
3735
+ traceId: import_zod.z.string()
3736
+ });
3659
3737
  var SolverService = class {
3660
3738
  constructor() {
3661
3739
  this.baseURL = config.getBackendUrl();
3740
+ config.registerObserver(this);
3741
+ }
3742
+ /**
3743
+ * Implementation of ConfigObserver interface
3744
+ * Updates service when config changes
3745
+ */
3746
+ onConfigUpdate(newConfig) {
3747
+ this.baseURL = newConfig.backendUrl;
3662
3748
  }
3663
3749
  /**
3664
3750
  * Submits a settlement transaction to the solver backend
@@ -3671,7 +3757,7 @@ var SolverService = class {
3671
3757
  SubmitSettlementRequestSchema.parse(params);
3672
3758
  const snakeCaseParams = convertToSnakeCase(params);
3673
3759
  const response = await import_axios.default.post(
3674
- `${this.baseURL}/solver/submit-settlement-tx`,
3760
+ `${this.baseURL}/v1/market-maker/submit-settlement-tx`,
3675
3761
  snakeCaseParams,
3676
3762
  {
3677
3763
  headers: {
@@ -3691,6 +3777,34 @@ var SolverService = class {
3691
3777
  throw error;
3692
3778
  }
3693
3779
  }
3780
+ /**
3781
+ * Get trade details
3782
+ * @param tradeId ID of the trade to query
3783
+ * @returns Promise with trade details in camelCase format
3784
+ * @throws Error if request fails or validation fails
3785
+ */
3786
+ async getTradeDetail(tradeId) {
3787
+ try {
3788
+ const response = await import_axios.default.get(`${this.baseURL}/v1/market-maker/trades/${tradeId}`, {
3789
+ headers: {
3790
+ "Content-Type": "application/json",
3791
+ Accept: "application/json"
3792
+ }
3793
+ });
3794
+ console.log("\u{1F680} ~ SolverService ~ getTradeDetail ~ response.data:", response.data);
3795
+ const camelCaseData = convertToCamelCase(response.data);
3796
+ console.log("\u{1F680} ~ SolverService ~ getTradeDetail ~ camelCaseData:", camelCaseData);
3797
+ return TradeDetailResponseSchema.parse(camelCaseData);
3798
+ } catch (error) {
3799
+ if (import_axios.default.isAxiosError(error)) {
3800
+ throw new Error(`Failed to fetch trade details: ${error.message}`);
3801
+ }
3802
+ if (error instanceof import_zod.z.ZodError) {
3803
+ throw new Error(`Invalid data: ${error.message}`);
3804
+ }
3805
+ throw error;
3806
+ }
3807
+ }
3694
3808
  };
3695
3809
  var solverService = new SolverService();
3696
3810
 
@@ -3740,7 +3854,7 @@ var TokenService = class {
3740
3854
  */
3741
3855
  async getTokens() {
3742
3856
  try {
3743
- const response = await import_axios2.default.get(`${this.baseURL}/v1/tokens`, {
3857
+ const response = await import_axios2.default.get(`${this.baseURL}/v1/market-maker/tokens`, {
3744
3858
  headers: {
3745
3859
  Accept: "application/json"
3746
3860
  }