@openreceive/browser 0.1.0 → 0.2.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 +63 -0
- package/dist/chunk-V7C55QB2.js +2996 -0
- package/dist/headless.d.ts +799 -0
- package/dist/headless.js +932 -0
- package/dist/index.d.ts +32 -4
- package/dist/index.js +32 -2
- package/dist/status-CLCX5lfx.d.ts +963 -0
- package/dist/styles.css +3 -759
- package/package.json +57 -15
- package/dist/assets/icons/bank.svg +0 -12
- package/dist/assets/icons/bnb.svg +0 -1
- package/dist/assets/icons/card.svg +0 -14
- package/dist/assets/icons/doge.svg +0 -1
- package/dist/assets/pay_tutorials/boltz-1.webp +0 -0
- package/dist/assets/pay_tutorials/boltz-2.webp +0 -0
- package/dist/assets/pay_tutorials/cashapp-1.webp +0 -0
- package/dist/assets/pay_tutorials/cashapp-2.webp +0 -0
- package/dist/assets/pay_tutorials/cashapp-3.webp +0 -0
- package/dist/assets/pay_tutorials/cashapp-4.webp +0 -0
- package/dist/assets/pay_tutorials/cashapp-5.webp +0 -0
- package/dist/assets/pay_tutorials/cashapp-6.webp +0 -0
- package/dist/assets/pay_tutorials/coinbase-1.webp +0 -0
- package/dist/assets/pay_tutorials/coinbase-2.webp +0 -0
- package/dist/assets/pay_tutorials/fixedfloat-1.webp +0 -0
- package/dist/assets/pay_tutorials/fixedfloat-2.webp +0 -0
- package/dist/assets/pay_tutorials/kraken-1.webp +0 -0
- package/dist/assets/pay_tutorials/kraken-2.webp +0 -0
- package/dist/assets/pay_tutorials/kraken-3.webp +0 -0
- package/dist/assets/pay_tutorials/kraken-4.webp +0 -0
- package/dist/assets/pay_tutorials/strike-1.webp +0 -0
- package/dist/assets/pay_tutorials/strike-2.webp +0 -0
- package/dist/assets/pay_tutorials/strike-3.webp +0 -0
- package/dist/assets/pay_tutorials/strike-4.webp +0 -0
- package/dist/assets/provider-icons/aqua.png +0 -0
- package/dist/assets/provider-icons/belo.png +0 -0
- package/dist/assets/provider-icons/binance.png +0 -0
- package/dist/assets/provider-icons/bipa.png +0 -0
- package/dist/assets/provider-icons/bitfinex.png +0 -0
- package/dist/assets/provider-icons/bitget.png +0 -0
- package/dist/assets/provider-icons/bitnob.png +0 -0
- package/dist/assets/provider-icons/bitso.png +0 -0
- package/dist/assets/provider-icons/bity.png +0 -0
- package/dist/assets/provider-icons/blink.png +0 -0
- package/dist/assets/provider-icons/bluewallet.png +0 -0
- package/dist/assets/provider-icons/boltz.png +0 -0
- package/dist/assets/provider-icons/bringin.png +0 -0
- package/dist/assets/provider-icons/bullbitcoin.png +0 -0
- package/dist/assets/provider-icons/cakewallet.png +0 -0
- package/dist/assets/provider-icons/cashapp.png +0 -0
- package/dist/assets/provider-icons/changenow.png +0 -0
- package/dist/assets/provider-icons/chivo.png +0 -0
- package/dist/assets/provider-icons/coinbase.png +0 -0
- package/dist/assets/provider-icons/coincorner.png +0 -0
- package/dist/assets/provider-icons/fixedfloat.png +0 -0
- package/dist/assets/provider-icons/getalby.png +0 -0
- package/dist/assets/provider-icons/kraken.png +0 -0
- package/dist/assets/provider-icons/kryptex.png +0 -0
- package/dist/assets/provider-icons/kucoin.png +0 -0
- package/dist/assets/provider-icons/manifest.json +0 -207
- package/dist/assets/provider-icons/mtpelerin.png +0 -0
- package/dist/assets/provider-icons/muun.png +0 -0
- package/dist/assets/provider-icons/okcoin.png +0 -0
- package/dist/assets/provider-icons/okx.png +0 -0
- package/dist/assets/provider-icons/phoenix.png +0 -0
- package/dist/assets/provider-icons/pouch.png +0 -0
- package/dist/assets/provider-icons/ripio.png +0 -0
- package/dist/assets/provider-icons/river.png +0 -0
- package/dist/assets/provider-icons/rizful.png +0 -0
- package/dist/assets/provider-icons/shakepay.png +0 -0
- package/dist/assets/provider-icons/sideshift.png +0 -0
- package/dist/assets/provider-icons/simpleswap.png +0 -0
- package/dist/assets/provider-icons/speed.png +0 -0
- package/dist/assets/provider-icons/strike.png +0 -0
- package/dist/assets/provider-icons/trocador.png +0 -0
- package/dist/assets/provider-icons/walletofsatoshi.png +0 -0
- package/dist/assets/provider-icons/zeus.png +0 -0
- package/dist/country-map.d.ts +0 -5
- package/dist/country-map.js +0 -17
- package/dist/internal.d.ts +0 -834
- package/dist/internal.js +0 -2617
- package/dist/pay-tutorials.d.ts +0 -1
- package/dist/pay-tutorials.js +0 -42
- package/dist/provider-icons.d.ts +0 -1
- package/dist/provider-icons.js +0 -84
- package/dist/qrcode.d.ts +0 -11
- package/dist/status.d.ts +0 -9
- package/dist/status.js +0 -25
package/dist/pay-tutorials.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const openReceivePayTutorialUrls: Readonly<Record<string, string>>;
|
package/dist/pay-tutorials.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
const cashappTutorial1 = new URL("./assets/pay_tutorials/cashapp-1.webp", import.meta.url).href;
|
|
2
|
-
const cashappTutorial2 = new URL("./assets/pay_tutorials/cashapp-2.webp", import.meta.url).href;
|
|
3
|
-
const cashappTutorial3 = new URL("./assets/pay_tutorials/cashapp-3.webp", import.meta.url).href;
|
|
4
|
-
const cashappTutorial4 = new URL("./assets/pay_tutorials/cashapp-4.webp", import.meta.url).href;
|
|
5
|
-
const cashappTutorial5 = new URL("./assets/pay_tutorials/cashapp-5.webp", import.meta.url).href;
|
|
6
|
-
const cashappTutorial6 = new URL("./assets/pay_tutorials/cashapp-6.webp", import.meta.url).href;
|
|
7
|
-
const boltzTutorial1 = new URL("./assets/pay_tutorials/boltz-1.webp", import.meta.url).href;
|
|
8
|
-
const boltzTutorial2 = new URL("./assets/pay_tutorials/boltz-2.webp", import.meta.url).href;
|
|
9
|
-
const coinbaseTutorial1 = new URL("./assets/pay_tutorials/coinbase-1.webp", import.meta.url).href;
|
|
10
|
-
const coinbaseTutorial2 = new URL("./assets/pay_tutorials/coinbase-2.webp", import.meta.url).href;
|
|
11
|
-
const fixedfloatTutorial1 = new URL("./assets/pay_tutorials/fixedfloat-1.webp", import.meta.url).href;
|
|
12
|
-
const fixedfloatTutorial2 = new URL("./assets/pay_tutorials/fixedfloat-2.webp", import.meta.url).href;
|
|
13
|
-
const krakenTutorial1 = new URL("./assets/pay_tutorials/kraken-1.webp", import.meta.url).href;
|
|
14
|
-
const krakenTutorial2 = new URL("./assets/pay_tutorials/kraken-2.webp", import.meta.url).href;
|
|
15
|
-
const krakenTutorial3 = new URL("./assets/pay_tutorials/kraken-3.webp", import.meta.url).href;
|
|
16
|
-
const krakenTutorial4 = new URL("./assets/pay_tutorials/kraken-4.webp", import.meta.url).href;
|
|
17
|
-
const strikeTutorial1 = new URL("./assets/pay_tutorials/strike-1.webp", import.meta.url).href;
|
|
18
|
-
const strikeTutorial2 = new URL("./assets/pay_tutorials/strike-2.webp", import.meta.url).href;
|
|
19
|
-
const strikeTutorial3 = new URL("./assets/pay_tutorials/strike-3.webp", import.meta.url).href;
|
|
20
|
-
const strikeTutorial4 = new URL("./assets/pay_tutorials/strike-4.webp", import.meta.url).href;
|
|
21
|
-
export const openReceivePayTutorialUrls = {
|
|
22
|
-
"assets/pay_tutorials/cashapp-1.webp": cashappTutorial1,
|
|
23
|
-
"assets/pay_tutorials/cashapp-2.webp": cashappTutorial2,
|
|
24
|
-
"assets/pay_tutorials/cashapp-3.webp": cashappTutorial3,
|
|
25
|
-
"assets/pay_tutorials/cashapp-4.webp": cashappTutorial4,
|
|
26
|
-
"assets/pay_tutorials/cashapp-5.webp": cashappTutorial5,
|
|
27
|
-
"assets/pay_tutorials/cashapp-6.webp": cashappTutorial6,
|
|
28
|
-
"assets/pay_tutorials/boltz-1.webp": boltzTutorial1,
|
|
29
|
-
"assets/pay_tutorials/boltz-2.webp": boltzTutorial2,
|
|
30
|
-
"assets/pay_tutorials/coinbase-1.webp": coinbaseTutorial1,
|
|
31
|
-
"assets/pay_tutorials/coinbase-2.webp": coinbaseTutorial2,
|
|
32
|
-
"assets/pay_tutorials/fixedfloat-1.webp": fixedfloatTutorial1,
|
|
33
|
-
"assets/pay_tutorials/fixedfloat-2.webp": fixedfloatTutorial2,
|
|
34
|
-
"assets/pay_tutorials/kraken-1.webp": krakenTutorial1,
|
|
35
|
-
"assets/pay_tutorials/kraken-2.webp": krakenTutorial2,
|
|
36
|
-
"assets/pay_tutorials/kraken-3.webp": krakenTutorial3,
|
|
37
|
-
"assets/pay_tutorials/kraken-4.webp": krakenTutorial4,
|
|
38
|
-
"assets/pay_tutorials/strike-1.webp": strikeTutorial1,
|
|
39
|
-
"assets/pay_tutorials/strike-2.webp": strikeTutorial2,
|
|
40
|
-
"assets/pay_tutorials/strike-3.webp": strikeTutorial3,
|
|
41
|
-
"assets/pay_tutorials/strike-4.webp": strikeTutorial4
|
|
42
|
-
};
|
package/dist/provider-icons.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const openReceiveProviderIconUrls: Readonly<Record<string, string>>;
|
package/dist/provider-icons.js
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
const aquaIcon = new URL("./assets/provider-icons/aqua.png", import.meta.url).href;
|
|
2
|
-
const beloIcon = new URL("./assets/provider-icons/belo.png", import.meta.url).href;
|
|
3
|
-
const binanceIcon = new URL("./assets/provider-icons/binance.png", import.meta.url).href;
|
|
4
|
-
const bipaIcon = new URL("./assets/provider-icons/bipa.png", import.meta.url).href;
|
|
5
|
-
const bitfinexIcon = new URL("./assets/provider-icons/bitfinex.png", import.meta.url).href;
|
|
6
|
-
const bitgetIcon = new URL("./assets/provider-icons/bitget.png", import.meta.url).href;
|
|
7
|
-
const bitnobIcon = new URL("./assets/provider-icons/bitnob.png", import.meta.url).href;
|
|
8
|
-
const bitsoIcon = new URL("./assets/provider-icons/bitso.png", import.meta.url).href;
|
|
9
|
-
const bityIcon = new URL("./assets/provider-icons/bity.png", import.meta.url).href;
|
|
10
|
-
const blinkIcon = new URL("./assets/provider-icons/blink.png", import.meta.url).href;
|
|
11
|
-
const bluewalletIcon = new URL("./assets/provider-icons/bluewallet.png", import.meta.url).href;
|
|
12
|
-
const boltzIcon = new URL("./assets/provider-icons/boltz.png", import.meta.url).href;
|
|
13
|
-
const bringinIcon = new URL("./assets/provider-icons/bringin.png", import.meta.url).href;
|
|
14
|
-
const bullbitcoinIcon = new URL("./assets/provider-icons/bullbitcoin.png", import.meta.url).href;
|
|
15
|
-
const cakewalletIcon = new URL("./assets/provider-icons/cakewallet.png", import.meta.url).href;
|
|
16
|
-
const cashappIcon = new URL("./assets/provider-icons/cashapp.png", import.meta.url).href;
|
|
17
|
-
const changenowIcon = new URL("./assets/provider-icons/changenow.png", import.meta.url).href;
|
|
18
|
-
const chivoIcon = new URL("./assets/provider-icons/chivo.png", import.meta.url).href;
|
|
19
|
-
const coinbaseIcon = new URL("./assets/provider-icons/coinbase.png", import.meta.url).href;
|
|
20
|
-
const coincornerIcon = new URL("./assets/provider-icons/coincorner.png", import.meta.url).href;
|
|
21
|
-
const fixedfloatIcon = new URL("./assets/provider-icons/fixedfloat.png", import.meta.url).href;
|
|
22
|
-
const getalbyIcon = new URL("./assets/provider-icons/getalby.png", import.meta.url).href;
|
|
23
|
-
const krakenIcon = new URL("./assets/provider-icons/kraken.png", import.meta.url).href;
|
|
24
|
-
const kryptexIcon = new URL("./assets/provider-icons/kryptex.png", import.meta.url).href;
|
|
25
|
-
const kucoinIcon = new URL("./assets/provider-icons/kucoin.png", import.meta.url).href;
|
|
26
|
-
const mtpelerinIcon = new URL("./assets/provider-icons/mtpelerin.png", import.meta.url).href;
|
|
27
|
-
const okcoinIcon = new URL("./assets/provider-icons/okcoin.png", import.meta.url).href;
|
|
28
|
-
const okxIcon = new URL("./assets/provider-icons/okx.png", import.meta.url).href;
|
|
29
|
-
const phoenixIcon = new URL("./assets/provider-icons/phoenix.png", import.meta.url).href;
|
|
30
|
-
const pouchIcon = new URL("./assets/provider-icons/pouch.png", import.meta.url).href;
|
|
31
|
-
const ripioIcon = new URL("./assets/provider-icons/ripio.png", import.meta.url).href;
|
|
32
|
-
const riverIcon = new URL("./assets/provider-icons/river.png", import.meta.url).href;
|
|
33
|
-
const rizfulIcon = new URL("./assets/provider-icons/rizful.png", import.meta.url).href;
|
|
34
|
-
const shakepayIcon = new URL("./assets/provider-icons/shakepay.png", import.meta.url).href;
|
|
35
|
-
const sideshiftIcon = new URL("./assets/provider-icons/sideshift.png", import.meta.url).href;
|
|
36
|
-
const simpleswapIcon = new URL("./assets/provider-icons/simpleswap.png", import.meta.url).href;
|
|
37
|
-
const speedIcon = new URL("./assets/provider-icons/speed.png", import.meta.url).href;
|
|
38
|
-
const strikeIcon = new URL("./assets/provider-icons/strike.png", import.meta.url).href;
|
|
39
|
-
const trocadorIcon = new URL("./assets/provider-icons/trocador.png", import.meta.url).href;
|
|
40
|
-
const walletofsatoshiIcon = new URL("./assets/provider-icons/walletofsatoshi.png", import.meta.url).href;
|
|
41
|
-
const zeusIcon = new URL("./assets/provider-icons/zeus.png", import.meta.url).href;
|
|
42
|
-
export const openReceiveProviderIconUrls = {
|
|
43
|
-
"assets/provider-icons/aqua.png": aquaIcon,
|
|
44
|
-
"assets/provider-icons/belo.png": beloIcon,
|
|
45
|
-
"assets/provider-icons/binance.png": binanceIcon,
|
|
46
|
-
"assets/provider-icons/bipa.png": bipaIcon,
|
|
47
|
-
"assets/provider-icons/bitfinex.png": bitfinexIcon,
|
|
48
|
-
"assets/provider-icons/bitget.png": bitgetIcon,
|
|
49
|
-
"assets/provider-icons/bitnob.png": bitnobIcon,
|
|
50
|
-
"assets/provider-icons/bitso.png": bitsoIcon,
|
|
51
|
-
"assets/provider-icons/bity.png": bityIcon,
|
|
52
|
-
"assets/provider-icons/blink.png": blinkIcon,
|
|
53
|
-
"assets/provider-icons/bluewallet.png": bluewalletIcon,
|
|
54
|
-
"assets/provider-icons/boltz.png": boltzIcon,
|
|
55
|
-
"assets/provider-icons/bringin.png": bringinIcon,
|
|
56
|
-
"assets/provider-icons/bullbitcoin.png": bullbitcoinIcon,
|
|
57
|
-
"assets/provider-icons/cakewallet.png": cakewalletIcon,
|
|
58
|
-
"assets/provider-icons/cashapp.png": cashappIcon,
|
|
59
|
-
"assets/provider-icons/changenow.png": changenowIcon,
|
|
60
|
-
"assets/provider-icons/chivo.png": chivoIcon,
|
|
61
|
-
"assets/provider-icons/coinbase.png": coinbaseIcon,
|
|
62
|
-
"assets/provider-icons/coincorner.png": coincornerIcon,
|
|
63
|
-
"assets/provider-icons/fixedfloat.png": fixedfloatIcon,
|
|
64
|
-
"assets/provider-icons/getalby.png": getalbyIcon,
|
|
65
|
-
"assets/provider-icons/kraken.png": krakenIcon,
|
|
66
|
-
"assets/provider-icons/kryptex.png": kryptexIcon,
|
|
67
|
-
"assets/provider-icons/kucoin.png": kucoinIcon,
|
|
68
|
-
"assets/provider-icons/mtpelerin.png": mtpelerinIcon,
|
|
69
|
-
"assets/provider-icons/okcoin.png": okcoinIcon,
|
|
70
|
-
"assets/provider-icons/okx.png": okxIcon,
|
|
71
|
-
"assets/provider-icons/phoenix.png": phoenixIcon,
|
|
72
|
-
"assets/provider-icons/pouch.png": pouchIcon,
|
|
73
|
-
"assets/provider-icons/ripio.png": ripioIcon,
|
|
74
|
-
"assets/provider-icons/river.png": riverIcon,
|
|
75
|
-
"assets/provider-icons/rizful.png": rizfulIcon,
|
|
76
|
-
"assets/provider-icons/shakepay.png": shakepayIcon,
|
|
77
|
-
"assets/provider-icons/sideshift.png": sideshiftIcon,
|
|
78
|
-
"assets/provider-icons/simpleswap.png": simpleswapIcon,
|
|
79
|
-
"assets/provider-icons/speed.png": speedIcon,
|
|
80
|
-
"assets/provider-icons/strike.png": strikeIcon,
|
|
81
|
-
"assets/provider-icons/trocador.png": trocadorIcon,
|
|
82
|
-
"assets/provider-icons/walletofsatoshi.png": walletofsatoshiIcon,
|
|
83
|
-
"assets/provider-icons/zeus.png": zeusIcon
|
|
84
|
-
};
|
package/dist/qrcode.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
declare module "qrcode" {
|
|
2
|
-
export function toString(
|
|
3
|
-
payload: string,
|
|
4
|
-
options: Record<string, unknown>
|
|
5
|
-
): Promise<string> | string;
|
|
6
|
-
|
|
7
|
-
export function toDataURL(
|
|
8
|
-
payload: string,
|
|
9
|
-
options: Record<string, unknown>
|
|
10
|
-
): Promise<string> | string;
|
|
11
|
-
}
|
package/dist/status.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export type Status = "pending" | "paid" | "expired" | "failed";
|
|
2
|
-
export interface StatusInvoiceLike {
|
|
3
|
-
readonly transaction_state?: string;
|
|
4
|
-
readonly settled_at?: number | string | null;
|
|
5
|
-
readonly expires_at?: number | string | null;
|
|
6
|
-
}
|
|
7
|
-
export declare function status(invoice: StatusInvoiceLike, options?: {
|
|
8
|
-
readonly now?: number;
|
|
9
|
-
}): Status;
|
package/dist/status.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export function status(invoice, options = {}) {
|
|
2
|
-
if (invoice.transaction_state === "settled" || invoice.settled_at != null) {
|
|
3
|
-
return "paid";
|
|
4
|
-
}
|
|
5
|
-
if (invoice.transaction_state === "failed")
|
|
6
|
-
return "failed";
|
|
7
|
-
if (invoice.transaction_state === "expired")
|
|
8
|
-
return "expired";
|
|
9
|
-
const expiresAt = readUnixSeconds(invoice.expires_at);
|
|
10
|
-
if (expiresAt !== undefined && expiresAt <= (options.now ?? currentUnixSeconds())) {
|
|
11
|
-
return "expired";
|
|
12
|
-
}
|
|
13
|
-
return "pending";
|
|
14
|
-
}
|
|
15
|
-
function readUnixSeconds(value) {
|
|
16
|
-
if (typeof value === "number" && Number.isFinite(value))
|
|
17
|
-
return value;
|
|
18
|
-
if (typeof value !== "string" || value.trim().length === 0)
|
|
19
|
-
return undefined;
|
|
20
|
-
const parsed = Number(value);
|
|
21
|
-
return Number.isFinite(parsed) ? parsed : undefined;
|
|
22
|
-
}
|
|
23
|
-
function currentUnixSeconds() {
|
|
24
|
-
return Math.floor(Date.now() / 1000);
|
|
25
|
-
}
|