Skip to content
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .changeset/eight-jokes-refuse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
'accounts': minor
---

Rewrote `accounts/cli` onto the Wata device-code transport and deprecated `CliAuth` and `Handler.codeAuth` in favor of `Handler.deviceCode`.

```diff
- Provider.create({
- host: 'https://wallet.example.com/api/auth/cli',
- pollIntervalMs: 1000,
- timeoutMs: 60_000,
- })
+ Provider.create({
+ host: 'https://wallet.example.com/auth/device',
+ pollingInterval: 1000,
+ timeout: 60_000,
+ })
```
16 changes: 16 additions & 0 deletions .changeset/plenty-donkeys-search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
'accounts': minor
---

Added a `deviceCode` adapter (`accounts/deviceCode`) that forwards wallet RPC through the Wata device-code transport (RFC 8628 with PKCE), with a `tempoWallet` preset.

```ts
import { deviceCode } from 'accounts/deviceCode'

const adapter = deviceCode({
name: 'Example CLI',
onPrompt: ({ userCode, verificationUriFull }) => console.log(userCode, verificationUriFull),
rdns: 'com.example.cli',
url: 'https://wallet.tempo.xyz/auth/device',
})
```
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,9 @@ Set `VITE_BASE_URL` to the production docs origin when using a custom domain.

The `ref-impls/` directory contains reference implementations for building with Tempo Accounts SDK:

| Directory | Description |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ref-impls/dialog/` | Minimal, unstyled embed dialog app demonstrating how to build a custom embed using the `Remote` API. Select `dialogRefImpl` in the web playground's adapter dropdown to test against it. |
| `ref-impls/cli-auth/` | Minimal React + Cloudflare/Vite host reference for device-code CLI auth: built-in code-auth endpoints plus a single unstyled approval screen and local smoke client. |
| Directory | Description |
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ref-impls/dialog/` | Minimal, unstyled embed dialog app demonstrating how to build a custom embed using the `Remote` API. Select `dialogRefImpl` in the web playground's adapter dropdown to test against it. |

## License

Expand Down
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,12 @@
"src": "./src/wagmi/index.ts",
"default": "./dist/wagmi/index.js"
},
"./deviceCode": {
"types": "./dist/core/adapters/deviceCode/index.d.ts",
"src": "./src/core/adapters/deviceCode/index.ts",
"react-native": "./dist/core/adapters/deviceCode/index.js",
"default": "./dist/core/adapters/deviceCode/index.js"
Comment thread
jxom marked this conversation as resolved.
},
"./mobileWebAuth": {
"types": "./dist/core/adapters/mobileWebAuth/index.d.ts",
"src": "./src/core/adapters/mobileWebAuth/index.ts",
Expand Down
1 change: 0 additions & 1 deletion playgrounds/web/wrangler.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"/auth",
"/auth/*",
"/me",
"/cli-auth/*",
"/webauthn/*",
"/relay",
"/fortune",
Expand Down
68 changes: 0 additions & 68 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion ref-impls/cli-auth/.env.example

This file was deleted.

7 changes: 0 additions & 7 deletions ref-impls/cli-auth/.gitignore

This file was deleted.

180 changes: 0 additions & 180 deletions ref-impls/cli-auth/cli.ts

This file was deleted.

12 changes: 0 additions & 12 deletions ref-impls/cli-auth/index.html

This file was deleted.

Loading
Loading