From bda24ea57cd76814f59714aa9b4561e95635e947 Mon Sep 17 00:00:00 2001 From: justin <328965+justinbarry@users.noreply.github.com> Date: Wed, 20 Dec 2023 17:25:52 -0800 Subject: [PATCH] Restore abstraxion library README This update adds a README file to the `abstraxion` library, providing information about the library's purpose, installation, and basic usage. It also includes a patch to ensure that the README will be displayed correctly. --- .changeset/chilly-lamps-float.md | 5 +++ packages/abstraxion/README.md | 69 ++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 .changeset/chilly-lamps-float.md create mode 100644 packages/abstraxion/README.md diff --git a/.changeset/chilly-lamps-float.md b/.changeset/chilly-lamps-float.md new file mode 100644 index 00000000..f56bb401 --- /dev/null +++ b/.changeset/chilly-lamps-float.md @@ -0,0 +1,5 @@ +--- +"@burnt-labs/abstraxion": patch +--- + +Restore readme to the abstraxtion library diff --git a/packages/abstraxion/README.md b/packages/abstraxion/README.md new file mode 100644 index 00000000..01c5d610 --- /dev/null +++ b/packages/abstraxion/README.md @@ -0,0 +1,69 @@ +# abstraxion + +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. + +## Installation + +Run the following: + +``` +npm i @burnt-labs/abstraxion +``` + +## Basic Usage + +Find an implementation demo here: [abstraxion demo](../../apps/demo-app) + +First, wrap your app in the `AbstraxionProvider` at the top level + +``` +"use client"; +import { AbstraxionProvider } from "abstraxion"; +import "./globals.css"; +import "@burnt-labs/ui/styles.css"; +import "@burnt-labs/abstraxion/styles.css"; + +export default function RootLayout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + + + {children} + + + ); +} +``` + +Then, import the `Abstraxion` modal and trigger however you'd like, for example: + +``` +"use client"; +import { Abstraxion } from "abstraxion"; +import { useState } from "react"; + +export default function Home() { + const [isOpen, setIsOpen] = useState(false); + return ( +
+ setIsOpen(false)} isOpen={isOpen} /> + +
+ ); +} + +``` + +Finally, call the exported hooks to serve your functionality needs: + +``` +const { data: account } = useAbstraxionAccount(); +const { client } = useAbstraxionSigningClient(); +``` + +Feel free to consult the documentation for more advanced usage and configuration. + +Please check back regularly for updates and feel free to report any issues. Thank you for using `abstraxion` by Burnt Labs!