@lydianpay/sdk-web 3.15.1 → 3.15.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.
@@ -3,6 +3,7 @@ import { CheckoutNamespace } from '../constants';
3
3
  export type WalletRequest = {
4
4
  method: string;
5
5
  params: unknown;
6
+ broadcast?: (signed: unknown) => Promise<void>;
6
7
  };
7
8
  export type BuildTransferRequestArgs = {
8
9
  asset: DisplayAsset;
@@ -11,6 +12,11 @@ export type BuildTransferRequestArgs = {
11
12
  amount: string;
12
13
  tokenContract?: string;
13
14
  backendTransfer?: () => Promise<BuildTransferResponse>;
15
+ approvedMethods?: readonly string[];
16
+ broadcastTransfer?: (signed: {
17
+ unsignedTransfer: string;
18
+ signature: string;
19
+ }) => Promise<unknown>;
14
20
  };
15
21
  export type BuildBalanceRequestArgs = {
16
22
  account: string;
@@ -1,9 +1,10 @@
1
1
  import { Base } from '../base.js';
2
- import { BuildTransferRequest, BuildTransferResponse, CancelTransactionRequest, CreatePaymentRequest, CreateTransactionResponse, GetTransactionResponse, KYCVerificationRequest } from '../../types';
2
+ import { BroadcastTransferRequest, BroadcastTransferResponse, BuildTransferRequest, BuildTransferResponse, CancelTransactionRequest, CreatePaymentRequest, CreateTransactionResponse, GetTransactionResponse, KYCVerificationRequest } from '../../types';
3
3
  export declare class CryptoTransactions extends Base {
4
4
  getCryptoTransaction(transactionID: string): Promise<GetTransactionResponse>;
5
5
  createPaymentRequest(transactionID: string, paymentRequest: CreatePaymentRequest): Promise<CreateTransactionResponse>;
6
6
  buildTransfer(transactionID: string, paymentRequestID: string, request: BuildTransferRequest): Promise<BuildTransferResponse>;
7
+ broadcastTransfer(transactionID: string, paymentRequestID: string, request: BroadcastTransferRequest): Promise<BroadcastTransferResponse>;
7
8
  cancelCryptoTransaction(transactionID: string, cancelTransaction: CancelTransactionRequest): Promise<CreateTransactionResponse>;
8
9
  kycVerification(transactionID: string, kycVerificationRequest: KYCVerificationRequest): Promise<CreateTransactionResponse>;
9
10
  }
@@ -222,6 +222,14 @@ export type BuildTransferResponse = {
222
222
  unsignedTransfer: string;
223
223
  lastValidBlockHeight: number;
224
224
  };
225
+ export type BroadcastTransferRequest = {
226
+ fromAddress: string;
227
+ unsignedTransfer: string;
228
+ signature: string;
229
+ };
230
+ export type BroadcastTransferResponse = {
231
+ txHash: string;
232
+ };
225
233
  export type KYCVerificationRequest = {
226
234
  asset: string;
227
235
  network: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lydianpay/sdk-web",
3
- "version": "3.15.1",
3
+ "version": "3.15.3",
4
4
  "description": "Drop-in crypto payment checkout for the web — a <lydian-checkout> web component and window.Lydian API across 20+ chains and major stablecoins.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -88,7 +88,7 @@
88
88
  },
89
89
  "dependencies": {
90
90
  "@lydianpay/frontend-shared-helpers": "1.2.0",
91
- "@lydianpay/lydianconnect": "^1.10.1",
91
+ "@lydianpay/lydianconnect": "^1.10.3",
92
92
  "@lydianpay/lydianconnect-catalog": "^1.4.1",
93
93
  "@solana/qr-code-styling": "^1.6.0",
94
94
  "dompurify": "^3.4.12",