diff --git a/examples/stellar-nuxt-receive/.env.example b/examples/stellar-nuxt-receive/.env.example new file mode 100644 index 0000000..d78313c --- /dev/null +++ b/examples/stellar-nuxt-receive/.env.example @@ -0,0 +1,3 @@ +# No environment variables required for the basic receive flow. +# If you want to auto-fetch announcements from a custom RPC, set: +# NUXT_PUBLIC_STELLAR_RPC=https://soroban-testnet.stellar.org diff --git a/examples/stellar-nuxt-receive/README.md b/examples/stellar-nuxt-receive/README.md new file mode 100644 index 0000000..ada1f74 --- /dev/null +++ b/examples/stellar-nuxt-receive/README.md @@ -0,0 +1,42 @@ +# stellar-nuxt-receive + +Minimal Nuxt 3 app demonstrating `@wraith-protocol/sdk-nuxt`. + +Composables (`useStellarStealthKeys`, `useStealthMetaAddress`, etc.) are +**auto-imported** — no explicit import statements needed in your components. + +## Setup + +```bash +pnpm install +pnpm --filter stellar-nuxt-receive dev +``` + +## SSR notes + +The module registers all composables as Nuxt auto-imports and adds the +packages to `build.transpile` so Nitro can tree-shake them on the server. +Crypto operations are synchronous and environment-agnostic; network calls +only run when explicitly invoked, so server rendering is safe by default. + +## Adding the module to your own Nuxt app + +```bash +npx nuxi module add @wraith-protocol/sdk-nuxt +``` + +Or manually in `nuxt.config.ts`: + +```ts +export default defineNuxtConfig({ + modules: ['@wraith-protocol/sdk-nuxt'], +}) +``` + +Composables available without any import: + +- `useStellarStealthKeys()` +- `useEvmStealthKeys()` +- `useSolanaStealthKeys()` +- `useStealthMetaAddress()` +- `useWraith(config?)` diff --git a/examples/stellar-nuxt-receive/app.vue b/examples/stellar-nuxt-receive/app.vue new file mode 100644 index 0000000..f7ddb53 --- /dev/null +++ b/examples/stellar-nuxt-receive/app.vue @@ -0,0 +1,101 @@ + + +