@busha/ramp-web-sdk 0.1.5 → 0.1.7
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/dist/BushaRampWidget.d.ts +11 -0
- package/dist/constants/colors.d.ts +1 -0
- package/dist/constants/icons.d.ts +1 -0
- package/dist/constants/variables.d.ts +13 -0
- package/dist/helper.d.ts +12 -0
- package/dist/index.d.ts +2 -0
- package/dist/types.d.ts +18 -0
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const dark = "#000639";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const close = "<svg width=\"40\" height=\"41\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M0 10.5C0 4.977 4.477.5 10 .5h20c5.523 0 10 4.477 10 10v20c0 5.523-4.477 10-10 10H10c-5.523 0-10-4.477-10-10v-20Z\" fill=\"#F1F1F1\"/><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M25.927 15.78a.75.75 0 1 0-1.06-1.06l-4.793 4.793-4.793-4.793a.75.75 0 0 0-1.061 1.06l4.793 4.793-4.793 4.793a.75.75 0 1 0 1.06 1.061l4.794-4.793 4.793 4.793a.75.75 0 0 0 1.06-1.06l-4.793-4.794 4.793-4.793Z\" fill=\"#000639\"/></svg>";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const CONTAINER_ID = "busha-ramp-container";
|
|
2
|
+
export declare const LOADER_ID = "busha-ramp-loader";
|
|
3
|
+
export declare const STYLESHEET_ID = "busha-ramp-styles";
|
|
4
|
+
export declare const CLOSE_BUTTON_ID = "busha-ramp-close-btn";
|
|
5
|
+
export declare const IFRAME_ID = "busha-ramp-iframe";
|
|
6
|
+
export declare const FORM_ID = "busha-ramp-form";
|
|
7
|
+
export declare const BUY_UI: string | undefined;
|
|
8
|
+
export declare const SELL_UI: string | undefined;
|
|
9
|
+
export declare const BUY_SANDBOX_UI: string | undefined;
|
|
10
|
+
export declare const SELL_SANDBOX_UI: string | undefined;
|
|
11
|
+
export declare const INITIALIZED_STATUS = "INITIALIZED";
|
|
12
|
+
export declare const CANCELLED_STATUS = "CANCELLED";
|
|
13
|
+
export declare const COMPLETED_STATUS = "COMPLETED";
|
package/dist/helper.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { QuotePayload } from "./types";
|
|
2
|
+
export declare function injectGlobalStyles(): void;
|
|
3
|
+
export declare function validatePayload(p: QuotePayload): void;
|
|
4
|
+
export declare function createContainerEl(): HTMLDivElement;
|
|
5
|
+
export declare function createCloseBtnEl(): HTMLButtonElement;
|
|
6
|
+
export declare function createSpinnerEl(): HTMLDivElement;
|
|
7
|
+
export declare function createIframeEl(): HTMLIFrameElement;
|
|
8
|
+
type FormPayload = Omit<QuotePayload, "onClose" | "onSuccess" | "sandbox">;
|
|
9
|
+
export declare function createFormEl({ sandbox, ...payload }: FormPayload & {
|
|
10
|
+
sandbox?: boolean;
|
|
11
|
+
}): HTMLFormElement;
|
|
12
|
+
export {};
|
package/dist/index.d.ts
ADDED
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type MessageType = {
|
|
2
|
+
status: string;
|
|
3
|
+
data?: unknown;
|
|
4
|
+
};
|
|
5
|
+
export interface QuotePayload {
|
|
6
|
+
fiatAmount?: string;
|
|
7
|
+
cryptoAmount?: string;
|
|
8
|
+
fiatCurrency?: string;
|
|
9
|
+
cryptoCurrency?: string;
|
|
10
|
+
side: "buy" | "sell";
|
|
11
|
+
publicKey?: string;
|
|
12
|
+
address?: string;
|
|
13
|
+
network?: string;
|
|
14
|
+
redirectUrl?: string;
|
|
15
|
+
onClose?: (d?: unknown) => void;
|
|
16
|
+
onSuccess: (d?: unknown) => void;
|
|
17
|
+
sandboxMode?: boolean;
|
|
18
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@busha/ramp-web-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "Official Busha Ramp Web SDK for integrating cryptocurrency on-ramp functionality into web applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.umd.js",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|
|
45
45
|
"dev": "vite",
|
|
46
|
-
"build": "
|
|
46
|
+
"build": "vite build && tsc -p tsconfig.lib.json",
|
|
47
47
|
"lint": "eslint .",
|
|
48
48
|
"preview": "vite preview",
|
|
49
49
|
"test": "vitest run",
|