@medialane/sdk 0.166.0 → 0.167.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.
@@ -501,8 +501,14 @@ type FundingResult = {
501
501
  intentId: string;
502
502
  reason: string;
503
503
  };
504
- interface FundWithTransferOptions {
504
+ type FundWithTransferOptions = ({
505
+ amount: string;
506
+ amountUsdc?: never;
507
+ } | {
505
508
  amountUsdc: string;
509
+ amount?: never;
510
+ }) & FundWithTransferRest;
511
+ interface FundWithTransferRest {
506
512
  onStep?: (step: FundingStep) => void;
507
513
  pollMs?: number;
508
514
  maxPolls?: number;
@@ -501,8 +501,14 @@ type FundingResult = {
501
501
  intentId: string;
502
502
  reason: string;
503
503
  };
504
- interface FundWithTransferOptions {
504
+ type FundWithTransferOptions = ({
505
+ amount: string;
506
+ amountUsdc?: never;
507
+ } | {
505
508
  amountUsdc: string;
509
+ amount?: never;
510
+ }) & FundWithTransferRest;
511
+ interface FundWithTransferRest {
506
512
  onStep?: (step: FundingStep) => void;
507
513
  pollMs?: number;
508
514
  maxPolls?: number;
@@ -11238,7 +11238,8 @@ async function fundWithChainTransfer(api, wallet, options) {
11238
11238
  const pollMs = options.pollMs ?? 3e3;
11239
11239
  const maxPolls = options.maxPolls ?? 20;
11240
11240
  step("creating");
11241
- const { data: intent } = await api.createFunding({ method: "chain-transfer", params: { amountUsdc: options.amountUsdc } });
11241
+ const params = options.amount !== void 0 ? { amount: options.amount } : { amountUsdc: options.amountUsdc };
11242
+ const { data: intent } = await api.createFunding({ method: "chain-transfer", params });
11242
11243
  let txHash;
11243
11244
  let transferStarted = false;
11244
11245
  try {