@lydianpay/sdk-web 3.12.0 → 3.12.1

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.
@@ -0,0 +1,18 @@
1
+ type SessionId = string | null | undefined;
2
+ export declare function createCheckoutSessionRecord<T>({ name, isRecord, }: {
3
+ name: string;
4
+ isRecord: (value: unknown) => value is T;
5
+ }): {
6
+ parse: (raw: string | null) => T | null;
7
+ read({ sessionId }: {
8
+ sessionId: SessionId;
9
+ }): T | null;
10
+ write({ sessionId, record }: {
11
+ sessionId: SessionId;
12
+ record: T;
13
+ }): void;
14
+ clear({ sessionId }: {
15
+ sessionId: SessionId;
16
+ }): void;
17
+ };
18
+ export {};
@@ -1,3 +1,4 @@
1
+ import type { CreateTransactionResponse, GetTransactionResponse } from '../types';
1
2
  export declare function parseInstant(iso: string | undefined): number | null;
2
3
  export declare function isFutureInstant(iso: string | undefined, now?: number): boolean;
3
4
  export declare function isSessionPromotable(session: {
@@ -28,6 +29,7 @@ export declare function hasOutstandingPaymentRequest(payments: {
28
29
  status: number;
29
30
  expiration?: string;
30
31
  }[], now?: number): boolean;
32
+ export declare function cryptoTransactionFromLinked(linked: GetTransactionResponse): CreateTransactionResponse;
31
33
  export type RestoreContext = {
32
34
  customerUUID: string;
33
35
  country: string;
@@ -3,16 +3,15 @@ export type WalletHandoff = {
3
3
  v: typeof HANDOFF_VERSION;
4
4
  walletId: string;
5
5
  };
6
- type SessionId = string | null | undefined;
7
- export declare function readWalletHandoff({ sessionId }: {
8
- sessionId: SessionId;
9
- }): WalletHandoff | null;
6
+ export declare const readWalletHandoff: ({ sessionId }: {
7
+ sessionId: string | null | undefined;
8
+ }) => WalletHandoff | null;
9
+ export declare const clearWalletHandoff: ({ sessionId }: {
10
+ sessionId: string | null | undefined;
11
+ }) => void;
12
+ export declare const parseWalletHandoff: (raw: string | null) => WalletHandoff | null;
10
13
  export declare function writeWalletHandoff({ sessionId, walletId, }: {
11
- sessionId: SessionId;
14
+ sessionId: string | null | undefined;
12
15
  walletId: string;
13
16
  }): void;
14
- export declare function clearWalletHandoff({ sessionId }: {
15
- sessionId: SessionId;
16
- }): void;
17
- export declare function parseWalletHandoff(raw: string | null): WalletHandoff | null;
18
17
  export {};
@@ -0,0 +1,22 @@
1
+ declare const RECORD_VERSION = 1;
2
+ export type WalletPaymentInFlight = {
3
+ v: typeof RECORD_VERSION;
4
+ transactionId: string;
5
+ };
6
+ type SessionId = string | null | undefined;
7
+ export declare const readWalletPaymentInFlight: ({ sessionId }: {
8
+ sessionId: string | null | undefined;
9
+ }) => WalletPaymentInFlight | null;
10
+ export declare const clearWalletPaymentInFlight: ({ sessionId }: {
11
+ sessionId: string | null | undefined;
12
+ }) => void;
13
+ export declare const parseWalletPaymentInFlight: (raw: string | null) => WalletPaymentInFlight | null;
14
+ export declare function writeWalletPaymentInFlight({ sessionId, transactionId, }: {
15
+ sessionId: SessionId;
16
+ transactionId: string;
17
+ }): void;
18
+ export declare function hasWalletPaymentInFlight({ sessionId, transactionId, }: {
19
+ sessionId: SessionId;
20
+ transactionId: string;
21
+ }): boolean;
22
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lydianpay/sdk-web",
3
- "version": "3.12.0",
3
+ "version": "3.12.1",
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": {