@burnt-labs/abstraxion 0.0.1-alpha.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,59 @@
1
+ # abstraxion
2
+
3
+ The `abstraxion` library is an account abstraction solution tailored for the XION chain. It offers a clean and streamlined way to create abstract accounts, sign transactions, integrating seamlessly with [graz](https://github.com/graz-sh/graz), to additionally provide traditional cosmos wallet functionalities.
4
+
5
+ ## Installation
6
+
7
+ _Coming Soon_
8
+
9
+ ## Basic Usage
10
+
11
+ First, wrap your app in the `AbstraxionProvider` at the top level
12
+
13
+ ```
14
+ "use client";
15
+ import { AbstraxionProvider } from "abstraxion";
16
+ import { Inter } from "next/font/google";
17
+ import "./globals.css";
18
+
19
+ const inter = Inter({ subsets: ["latin"] });
20
+
21
+ export default function RootLayout({
22
+ children,
23
+ }: {
24
+ children: React.ReactNode;
25
+ }) {
26
+ return (
27
+ <html lang="en">
28
+ <body className={inter.className}>
29
+ <AbstraxionProvider>{children}</AbstraxionProvider>
30
+ </body>
31
+ </html>
32
+ );
33
+ }
34
+
35
+
36
+ ```
37
+
38
+ Then, import the `Abstraxion` modal in your react/next project and trigger however you'd like, for example:
39
+
40
+ ```
41
+ "use client";
42
+ import { Abstraxion } from "abstraxion";
43
+ import { useState } from "react";
44
+
45
+ export default function Home() {
46
+ const [isOpen, setIsOpen] = useState(false);
47
+ return (
48
+ <div>
49
+ <Abstraxion onClose={() => setIsOpen(false)} isOpen={isOpen} />
50
+ <button onClick={() => setIsOpen(true)}>Click here</button>
51
+ </div>
52
+ );
53
+ }
54
+
55
+ ```
56
+
57
+ Feel free to consult the documentation for more advanced usage and configuration.
58
+
59
+ Please check back regularly for updates and feel free to report any issues. Thank you for using `abstraxion` by Burnt Labs!
@@ -0,0 +1,38 @@
1
+ interface AbstraxionAccount {
2
+ name?: string;
3
+ algo?: string;
4
+ pubKey?: Uint8Array;
5
+ address?: Uint8Array;
6
+ bech32Address: string;
7
+ isNanoLedger?: boolean;
8
+ isKeystone?: boolean;
9
+ }
10
+ export const useAbstraxionAccount: () => {
11
+ data: AbstraxionAccount;
12
+ isConnected: boolean;
13
+ isConnecting?: undefined;
14
+ isReconnecting?: undefined;
15
+ } | {
16
+ data: AbstraxionAccount;
17
+ isConnected: boolean;
18
+ isConnecting: boolean;
19
+ isReconnecting: boolean;
20
+ } | {
21
+ data: undefined;
22
+ isConnected: boolean;
23
+ isConnecting?: undefined;
24
+ isReconnecting?: undefined;
25
+ };
26
+ interface AbstraxionModalProps {
27
+ onClose: VoidFunction;
28
+ isOpen: boolean;
29
+ }
30
+ export const Abstraxion: ({ isOpen, onClose }: AbstraxionModalProps) => import("react/jsx-runtime").JSX.Element | null;
31
+ export const AbstraxionProvider: ({ children, }: {
32
+ children: React.ReactNode;
33
+ }) => import("react/jsx-runtime").JSX.Element;
34
+ export const useAbstraxionSigningClient: () => {
35
+ client: import("graz/dist/cosmjs").SigningCosmWasmClient | undefined;
36
+ };
37
+
38
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"mappings":"AUQA;IACE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AASD,OAAO,MAAM;;;;;;;;;;;;;;;CAyCZ,CAAC;AY5CF;IACE,OAAO,EAAE,YAAY,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,OAAO,MAAM,kCAAmC,oBAAoB,mDAqCnE,CAAC;AAEF,OAAO,MAAM;cAGD,MAAM,SAAS;6CAW1B,CAAC;AClEF,OAAO,MAAM;;CA4CZ,CAAC","sources":["src/src/components/Icons/CloseIcon.tsx","src/src/components/Button/Button.styles.ts","src/src/components/Button/index.tsx","src/src/components/ErrorDisplay/ErrorDisplay.styles.ts","src/src/components/AbstraxionContext/index.tsx","src/src/components/ErrorDisplay/index.tsx","src/src/components/Abstraxion/Abstraxtion.styles.ts","src/src/components/Icons/Spinner.tsx","src/src/components/WalletLoading/index.tsx","src/src/components/AbstraxionWallets/AbstraxionWallets.styles.ts","src/src/hooks/useAbstraxionAccount.ts","src/utils/truncateAddress.ts","src/src/interfaces/queries.ts","src/src/components/Icons/AccountWalletLogo.tsx","src/src/components/AbstraxionWallets/index.tsx","src/src/components/Input/Input.styles.ts","src/src/components/Input/index.tsx","src/src/components/AbstraxionSignin/AbstraxionSignin.styles.ts","src/chain/index.ts","src/utils/regex.ts","src/src/components/AbstraxionSignin/index.tsx","src/src/lib.ts","src/src/components/Abstraxion/index.tsx","src/src/hooks/useAbstraxionSigningClient.ts","src/src/hooks/index.ts","src/src/index.ts","src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"export { Abstraxion } from \"./components/Abstraxion\";\nexport { AbstraxionProvider } from \"./components/Abstraxion\";\nexport { useAbstraxionAccount, useAbstraxionSigningClient } from \"./hooks\";\n"],"names":[],"version":3,"file":"index.d.ts.map"}