@paywithglide/glide-react 0.0.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.
package/README.md ADDED
@@ -0,0 +1 @@
1
+ React components for https://paywithglide.xyz
@@ -0,0 +1,39 @@
1
+ export type Hex = `0x${string}`;
2
+ export type EVMTransaction = {
3
+ chainId: number;
4
+ account?: Hex;
5
+ to: Hex;
6
+ data?: Hex;
7
+ value?: bigint;
8
+ };
9
+ export type GlideDepositWalletProvider = {
10
+ address: Hex | undefined;
11
+ availableChainIds: number[] | undefined;
12
+ currentChainId: number | undefined;
13
+ switchChainAsync: (args: {
14
+ chainId: number;
15
+ }) => Promise<unknown>;
16
+ sendTransactionAsync: (tx: EVMTransaction) => Promise<Hex>;
17
+ };
18
+ export type GlideDepositOptions = {
19
+ app: string;
20
+ recipient?: Hex;
21
+ walletProvider?: GlideDepositWalletProvider;
22
+ baseUrl?: string;
23
+ };
24
+ export declare class GlideDeposit {
25
+ opts: GlideDepositOptions;
26
+ constructor(opts: GlideDepositOptions);
27
+ private didInit;
28
+ initialize(): void;
29
+ destroy(): void;
30
+ open: () => void;
31
+ private get baseUrl();
32
+ private get iframe();
33
+ private iframeEventHandler;
34
+ private openUrl;
35
+ private createIframe;
36
+ private removeIframe;
37
+ private showLoader;
38
+ private hideLoader;
39
+ }