@depay/widgets 11.4.5 → 11.6.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.
- package/README.md +1 -1
- package/dist/esm/index.bundle.d.ts +184 -0
- package/dist/esm/index.bundle.js +41 -26
- package/dist/esm/index.d.ts +184 -0
- package/dist/esm/index.evm.d.ts +184 -0
- package/dist/esm/index.evm.js +67 -42
- package/dist/esm/index.evm.js.map +1 -1
- package/dist/esm/index.js +67 -42
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.solana.d.ts +184 -0
- package/dist/esm/index.solana.js +67 -42
- package/dist/esm/index.solana.js.map +1 -1
- package/dist/umd/index.bundle.d.ts +184 -0
- package/dist/umd/index.bundle.js +41 -26
- package/dist/umd/index.d.ts +184 -0
- package/dist/umd/index.evm.d.ts +184 -0
- package/dist/umd/index.evm.js +67 -42
- package/dist/umd/index.evm.js.map +1 -1
- package/dist/umd/index.js +67 -42
- package/dist/umd/index.js.map +1 -1
- package/dist/umd/index.solana.d.ts +184 -0
- package/dist/umd/index.solana.js +67 -42
- package/dist/umd/index.solana.js.map +1 -1
- package/package.json +7 -6
package/README.md
CHANGED
|
@@ -629,7 +629,7 @@ DePayWidgets.Payment({
|
|
|
629
629
|
Allows to pass an already connected wallet instance (to skip the "Connect Wallet" flow):
|
|
630
630
|
|
|
631
631
|
```javascript
|
|
632
|
-
let { wallet } DePayWidgets.Connect({})
|
|
632
|
+
let { wallet } = DePayWidgets.Connect({})
|
|
633
633
|
|
|
634
634
|
DePayWidgets.Payment({
|
|
635
635
|
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
declare namespace DePayWidgets {
|
|
2
|
+
|
|
3
|
+
interface ColorsOptions {
|
|
4
|
+
primary?: string;
|
|
5
|
+
text?: string;
|
|
6
|
+
buttonText?: string;
|
|
7
|
+
icons?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface StyleOptions {
|
|
11
|
+
colors?: ColorsOptions;
|
|
12
|
+
fontFamily?: string;
|
|
13
|
+
css?: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface AcceptOptions {
|
|
17
|
+
blockchain: string;
|
|
18
|
+
token: string;
|
|
19
|
+
receiver: string;
|
|
20
|
+
amount?: number;
|
|
21
|
+
fee?: {
|
|
22
|
+
amount: string;
|
|
23
|
+
receiver: string;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
interface BlockchainStringListOptions {
|
|
28
|
+
ethereum?: string[];
|
|
29
|
+
bsc?: string[];
|
|
30
|
+
polygon?: string[];
|
|
31
|
+
solana?: string[];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
interface BlockchainStringOptions {
|
|
35
|
+
ethereum?: string;
|
|
36
|
+
bsc?: string;
|
|
37
|
+
polygon?: string;
|
|
38
|
+
solana?: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
interface PaymentOptions {
|
|
42
|
+
accept: AcceptOptions[];
|
|
43
|
+
amount?: {
|
|
44
|
+
currency?: string;
|
|
45
|
+
fix?: number;
|
|
46
|
+
};
|
|
47
|
+
sent?: (transaction: any) => void;
|
|
48
|
+
succeeded?: (transaction: any) => void;
|
|
49
|
+
validated?: (successful: boolean, transaction: any) => void;
|
|
50
|
+
failed?: (transaction: any) => void;
|
|
51
|
+
error?: (error: any) => void;
|
|
52
|
+
critical?: (error: any) => void;
|
|
53
|
+
style?: StyleOptions;
|
|
54
|
+
whitelist?: BlockchainStringListOptions;
|
|
55
|
+
blacklist?: BlockchainStringListOptions;
|
|
56
|
+
providers?: BlockchainStringListOptions;
|
|
57
|
+
currency?: string;
|
|
58
|
+
connected?: (address: string) => void;
|
|
59
|
+
closed?: () => void;
|
|
60
|
+
track?: {
|
|
61
|
+
endpoint?: string;
|
|
62
|
+
method?: (payment: any) => void;
|
|
63
|
+
poll?: {
|
|
64
|
+
endpoint?: string;
|
|
65
|
+
method?: (payment: any) => void;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
recover?: {
|
|
69
|
+
blockchain: string;
|
|
70
|
+
transaction: string;
|
|
71
|
+
sender: string;
|
|
72
|
+
nonce: number;
|
|
73
|
+
afterBlock: number;
|
|
74
|
+
token: string;
|
|
75
|
+
amount: number;
|
|
76
|
+
};
|
|
77
|
+
closable?: boolean;
|
|
78
|
+
integration?: string;
|
|
79
|
+
container?: HTMLElement;
|
|
80
|
+
before?: (payment: any) => Promise<void>;
|
|
81
|
+
wallet?: any;
|
|
82
|
+
title?: string;
|
|
83
|
+
action?: string;
|
|
84
|
+
document?: HTMLElement;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
interface PaymentResponse {
|
|
88
|
+
unmount: () => void;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
const Payment: (options: PaymentOptions) => Promise<PaymentResponse>;
|
|
92
|
+
|
|
93
|
+
interface ConnectOptions {
|
|
94
|
+
style?: StyleOptions;
|
|
95
|
+
error?: (error: any) => void;
|
|
96
|
+
document?: HTMLElement;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
interface ConnectResponse {
|
|
100
|
+
account: string;
|
|
101
|
+
wallet: any;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const Connect: (options: ConnectOptions) => Promise<ConnectResponse>;
|
|
105
|
+
|
|
106
|
+
interface LoginOptions {
|
|
107
|
+
message: string;
|
|
108
|
+
endpoint?: string;
|
|
109
|
+
recover?: (message: string, signature: string) => void;
|
|
110
|
+
wallet?: any;
|
|
111
|
+
style?: StyleOptions;
|
|
112
|
+
error?: (error: any) => void;
|
|
113
|
+
document?: HTMLElement;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
interface LoginResponse {
|
|
117
|
+
account: string;
|
|
118
|
+
wallet: any;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
const Login: (options: LoginOptions) => Promise<LoginResponse>;
|
|
122
|
+
|
|
123
|
+
interface SaleOptions {
|
|
124
|
+
sell: BlockchainStringOptions;
|
|
125
|
+
amount?: {
|
|
126
|
+
start?: number;
|
|
127
|
+
min?: number;
|
|
128
|
+
step?: number;
|
|
129
|
+
token?: boolean;
|
|
130
|
+
};
|
|
131
|
+
sent?: (transaction: any) => void;
|
|
132
|
+
succeeded?: (transaction: any) => void;
|
|
133
|
+
failed?: (transaction: any) => void;
|
|
134
|
+
error?: (error: any) => void;
|
|
135
|
+
critical?: (error: any) => void;
|
|
136
|
+
style?: StyleOptions;
|
|
137
|
+
blacklist?: BlockchainStringListOptions;
|
|
138
|
+
providers?: BlockchainStringListOptions;
|
|
139
|
+
currency?: string;
|
|
140
|
+
connected?: (address: string) => void;
|
|
141
|
+
closed?: () => void;
|
|
142
|
+
tokenImage: string;
|
|
143
|
+
closable?: boolean;
|
|
144
|
+
integration?: string;
|
|
145
|
+
wallet?: any;
|
|
146
|
+
document?: HTMLElement;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
interface SaleResponse {
|
|
150
|
+
unmount: () => void;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
const Sale: (options: SaleOptions) => Promise<SaleResponse>;
|
|
154
|
+
|
|
155
|
+
interface SelectOptions {
|
|
156
|
+
what: string;
|
|
157
|
+
style?: StyleOptions;
|
|
158
|
+
error?: (error: any) => void;
|
|
159
|
+
document?: HTMLElement;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
const Select: (options: SelectOptions) => Promise<any>;
|
|
163
|
+
|
|
164
|
+
interface LoadingOptions {
|
|
165
|
+
text: string;
|
|
166
|
+
style?: StyleOptions;
|
|
167
|
+
error?: (error: any) => void;
|
|
168
|
+
critical?: (error: any) => void;
|
|
169
|
+
document?: HTMLElement;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
const Loading: (options: LoadingOptions) => Promise<any>;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
declare const DePayWidgets: {
|
|
176
|
+
Connect: DePayWidgets.Connect;
|
|
177
|
+
Login: DePayWidgets.Login;
|
|
178
|
+
Payment: DePayWidgets.Payment;
|
|
179
|
+
Sale: DePayWidgets.Sale;
|
|
180
|
+
Select: DePayWidgets.Select;
|
|
181
|
+
Loading: DePayWidgets.Loading;
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
export default DePayWidgets;
|