multisigns-sdk 1.0.0 → 1.0.2

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.js CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  createSolanaMultisigOrder,
15
15
  reconstructAndVerifySolKey,
16
16
  solToLamports
17
- } from "./chunk-XYPJCLZQ.js";
17
+ } from "./chunk-HJV4STV4.js";
18
18
  import {
19
19
  DEFAULT_RPC_ENDPOINTS,
20
20
  TRON_FULL_HOST,
@@ -845,7 +845,7 @@ var EvmStrategy = class {
845
845
  }
846
846
  async createOrder(params) {
847
847
  const { multisigId, wallet, method, instructions: instructions3 } = params;
848
- const response = await this.apiClient.post("/order/create/evm", {
848
+ const response = await this.apiClient.post("/sdk/order/create/evm", {
849
849
  multisigId,
850
850
  walletAddress: wallet.address,
851
851
  method,
@@ -861,7 +861,7 @@ var EvmStrategy = class {
861
861
  if (!multisigId) {
862
862
  throw new Error("Vault id missing");
863
863
  }
864
- const response = await this.apiClient.post("/order/reject/evm", {
864
+ const response = await this.apiClient.post("/sdk/order/reject/evm", {
865
865
  orderId,
866
866
  multisigId,
867
867
  walletAddress: wallet.address
@@ -2160,7 +2160,7 @@ var OrderApi = class {
2160
2160
  if (!orderParams?.vaultAddress || !orderParams?.multisigPda) {
2161
2161
  throw new InvalidInputError("Backend response missing multisig params");
2162
2162
  }
2163
- const { createSolanaMultisigOrder: createSolanaMultisigOrder2 } = await import("./createSolanaMultisigOrder-ABBIJ4ZX.js");
2163
+ const { createSolanaMultisigOrder: createSolanaMultisigOrder2 } = await import("./createSolanaMultisigOrder-JUSIAM5U.js");
2164
2164
  const { Connection: Connection5 } = await import("@solana/web3.js");
2165
2165
  const { DEFAULT_RPC_ENDPOINTS: DEFAULT_RPC_ENDPOINTS2 } = await import("./config-D7BTGWZB.js");
2166
2166
  const networkMode = params.chainId === "sol_mainnet" ? "mainnet" : "testnet";
@@ -4063,7 +4063,7 @@ var WalletService = class {
4063
4063
  const response = await this.client.get(
4064
4064
  `/sdk/wallets/${address2}`
4065
4065
  );
4066
- return response.data;
4066
+ return response;
4067
4067
  }
4068
4068
  /**
4069
4069
  * Gets all wallets for the user.
@@ -4592,7 +4592,7 @@ var SolanaStrategy = class {
4592
4592
  async signOrder(params) {
4593
4593
  const { orderId, wallet, deviceShare, multisigId } = params;
4594
4594
  const connection = this.getProvider();
4595
- const response = await this.apiClient.get(`/order/params/sol/${orderId}`);
4595
+ const response = await this.apiClient.get(`/sdk/order/params/sol/${orderId}`);
4596
4596
  const { order, params: orderParams } = response;
4597
4597
  if (!orderParams?.multisigPda || !orderParams?.transactionIndex) {
4598
4598
  throw new Error("Missing Vault params from backend response");
@@ -4676,7 +4676,7 @@ var SolanaStrategy = class {
4676
4676
  orderToCreate = orderToActivate.order;
4677
4677
  } else {
4678
4678
  const createResponse = await this.apiClient.post(
4679
- "/order/create/sol",
4679
+ "/sdk/order/create/sol",
4680
4680
  {
4681
4681
  multisigId,
4682
4682
  walletAddress: wallet.address,
@@ -4707,7 +4707,7 @@ var SolanaStrategy = class {
4707
4707
  // Cast strictly to match SolOrderData requirements
4708
4708
  // We pass extra props that createSolanaMultisigOrder expects (from IframeCreateSolanaMultisigOrderInput)
4709
4709
  });
4710
- const response = await this.apiClient.post("/order/activate/sol", {
4710
+ const response = await this.apiClient.post("/sdk/order/activate/sol", {
4711
4711
  transaction: signedTx,
4712
4712
  multisigId,
4713
4713
  orderId: orderToCreate.id,
@@ -4753,7 +4753,7 @@ var SolanaStrategy = class {
4753
4753
  tx.recentBlockhash = recentBlockhash;
4754
4754
  tx.partialSign(signer);
4755
4755
  const serializedTx = tx.serialize().toString("base64");
4756
- const response = await this.apiClient.post("/order/reject/sol", {
4756
+ const response = await this.apiClient.post("/sdk/order/reject/sol", {
4757
4757
  orderId,
4758
4758
  walletAddress: wallet.address,
4759
4759
  transaction: serializedTx
@@ -4953,7 +4953,7 @@ var TronStrategy = class {
4953
4953
  type: instructions3[0]?.type,
4954
4954
  tokenAddress: instructions3[0]?.tokenAddress
4955
4955
  }] : instructions3;
4956
- const response = await this.apiClient.post("/order/create/tron", {
4956
+ const response = await this.apiClient.post("/sdk/order/create/tron", {
4957
4957
  multisigId,
4958
4958
  walletAddress: wallet.address,
4959
4959
  actions
@@ -4968,7 +4968,7 @@ var TronStrategy = class {
4968
4968
  if (!multisigId) {
4969
4969
  throw new Error("Vault id missing");
4970
4970
  }
4971
- const response = await this.apiClient.post("/order/reject/tron", {
4971
+ const response = await this.apiClient.post("/sdk/order/reject/tron", {
4972
4972
  orderId,
4973
4973
  multisigId,
4974
4974
  walletAddress: wallet.address
@@ -5037,7 +5037,7 @@ var TronStrategy = class {
5037
5037
  return { hash: broadcastResult.txid };
5038
5038
  }
5039
5039
  async executeTronOrder(order, wallet) {
5040
- const response = await this.apiClient.patch("/order/execute/tron", {
5040
+ const response = await this.apiClient.patch("/sdk/order/execute/tron", {
5041
5041
  orderId: order.id,
5042
5042
  walletAddress: wallet.address
5043
5043
  });
@@ -5292,7 +5292,7 @@ var BtcStrategy = class {
5292
5292
  }
5293
5293
  async createOrder(params) {
5294
5294
  const { multisigId, wallet, instructions: instructions3 } = params;
5295
- const response = await this.apiClient.post("/order/create/btc", {
5295
+ const response = await this.apiClient.post("/sdk/order/create/btc", {
5296
5296
  multisigId,
5297
5297
  walletAddress: wallet.address,
5298
5298
  instructions: {
@@ -5311,7 +5311,7 @@ var BtcStrategy = class {
5311
5311
  if (!multisigId) {
5312
5312
  throw new Error("Vault id missing");
5313
5313
  }
5314
- const response = await this.apiClient.post("/order/reject/btc", {
5314
+ const response = await this.apiClient.post("/sdk/order/reject/btc", {
5315
5315
  orderId,
5316
5316
  multisigId,
5317
5317
  walletAddress: wallet.address
@@ -5429,7 +5429,7 @@ var BtcStrategy = class {
5429
5429
  return { hash: txHash };
5430
5430
  }
5431
5431
  async executeBtcOrder(order, wallet) {
5432
- const response = await this.apiClient.patch("/order/execute/btc", {
5432
+ const response = await this.apiClient.patch("/sdk/order/execute/btc", {
5433
5433
  orderId: order.id,
5434
5434
  walletAddress: wallet.address
5435
5435
  });