accounts 0.4.25 → 0.5.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # accounts
2
2
 
3
+ ## 0.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 5b4ce03: Public release.
8
+
3
9
  ## 0.4.25
4
10
 
5
11
  ### Patch Changes
package/README.md CHANGED
@@ -1,103 +1,68 @@
1
- # Tempo Accounts SDK
1
+ <p align="center">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset=".github/logo-dark.svg">
4
+ <source media="(prefers-color-scheme: light)" srcset=".github/logo-light.svg">
5
+ <img alt="accounts" src=".github/logo-light.svg" width="auto" height="100">
6
+ </picture>
7
+ </p>
2
8
 
3
- Accounts SDK for Tempo Wallets & Apps.
9
+ <p align="center"><b>Accounts SDK for Apps and Wallets building on Tempo.</b></p>
4
10
 
5
- ## Install
6
-
7
- ```sh
8
- pnpm i accounts
9
- ```
11
+ <p align="center">
12
+ <a href="#quick-prompt">Quick Prompt</a> · <a href="#install">Install</a> · <a href="#documentation">Documentation</a> · <a href="#examples">Examples</a> · <a href="#development">Development</a> · <a href="#license">License</a>
13
+ </p>
10
14
 
11
- ## Usage
15
+ ---
12
16
 
13
- ### Vanilla JS
17
+ ## Quick Prompt
14
18
 
15
- You can get set up with the Accounts SDK with pure JavaScript by using the
16
- `Provider` instance.
19
+ Prompt your agent:
17
20
 
18
- Internally, the `Provider` utilizes [EIP-6963](https://eips.ethereum.org/EIPS/eip-6963) to inject it's provider instance into
19
- the page so it can be picked up by wallet connection dialogs on external web applications.
20
-
21
- ```tsx
22
- import { Provider } from 'accounts'
23
-
24
- const provider = Provider.create()
25
-
26
- const { accounts } = await provider.request({
27
- method: 'wallet_connect',
28
- })
21
+ ```
22
+ Read docs.tempo.xyz/accounts and integrate Tempo Wallet into my application
29
23
  ```
30
24
 
31
- ### Viem
32
-
33
- The Provider provides a Viem Client instance via the `getClient` accessor.
25
+ ## Install
34
26
 
35
- ```tsx
36
- import { Provider } from 'accounts'
27
+ ```bash
28
+ npm i accounts
29
+ ```
37
30
 
38
- const provider = Provider.create()
31
+ ```bash
32
+ pnpm i accounts
33
+ ```
39
34
 
40
- const client = provider.getClient()
35
+ ```bash
36
+ bun i accounts
41
37
  ```
42
38
 
43
- ### Wagmi
39
+ ## Documentation
44
40
 
45
- Use the `tempoWallet` Wagmi connector to allow your Wagmi application to enable the Tempo Wallet dialog.
41
+ For documentation and guides, visit [docs.tempo.xyz/accounts](https://docs.tempo.xyz/accounts).
46
42
 
47
- ```tsx
48
- import { createConfig, http } from 'wagmi'
49
- import { tempo } from 'wagmi/chains'
50
- import { tempoWallet } from 'accounts/wagmi'
43
+ ## Getting Help
51
44
 
52
- export const wagmiConfig = createConfig({
53
- chains: [tempo],
54
- connectors: [tempoWallet()],
55
- transports: {
56
- [tempo.id]: http(),
57
- },
58
- })
59
- ```
45
+ Have questions or building something cool with the Accounts SDK?
60
46
 
61
- ### CLI
62
-
63
- Use the `accounts/cli` entrypoint when an external CLI already owns the local key material and only needs the Tempo Wallet browser flow to authenticate the user and authorize that key.
64
-
65
- ```ts
66
- import { Provider } from 'accounts/cli'
67
-
68
- const provider = Provider.create({
69
- host: 'https://wallet.example.com/cli-auth',
70
- })
71
-
72
- const { accounts } = await provider.request({
73
- method: 'wallet_connect',
74
- params: [
75
- {
76
- capabilities: {
77
- authorizeAccessKey: {
78
- expiry: Math.floor(Date.now() / 1000) + 3600,
79
- publicKey: '0x...',
80
- },
81
- },
82
- },
83
- ],
84
- })
85
- ```
47
+ Join the Telegram group to chat with the team and other devs: [@mpp_devs](https://t.me/mpp_devs)
86
48
 
87
- ## Adapters
49
+ ## Examples
88
50
 
89
- | Adapter | Description |
90
- | ------------------------ | ---------------------------------------------------------------------------------- |
91
- | `dialog` / `tempoWallet` | Adapter for the Tempo Wallet dialog (an embedded iframe/popup dialog). |
92
- | `webAuthn` | App-bound passkey accounts using WebAuthn registration and authentication flows. |
93
- | `cli` | Device-code based adapter for CLI authentication and access key authorization. |
94
- | `local` | Key agnostic adapter to define arbitrary account/key types and signing mechanisms. |
51
+ | Example | Description |
52
+ | ----------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
53
+ | [basic](./examples/basic) | Wagmi-based setup using the `tempoWallet` connector to connect to Tempo Wallets. |
54
+ | [cli](./examples/cli) | Minimal CLI setup to connect and authorize local keys using Tempo Wallets. |
55
+ | [domain-bound-webauthn](./examples/domain-bound-webauthn) | Domain-bound passkey example using Wagmi and the `webAuthn` connector. |
56
+ | [with-access-key](./examples/with-access-key) | Authorize access keys using Tempo Wallets to submit transactions without prompts. |
57
+ | [with-access-key-and-webauthn](./examples/with-access-key-and-webauthn) | Authorize access keys using domain-bound Passkeys. |
58
+ | [with-fee-payer](./examples/with-fee-payer) | Sponsor transactions via Tempo Wallets. |
59
+ | [with-fee-payer-and-webauthn](./examples/with-fee-payer-and-webauthn) | Sponsor transactions using a Cloudflare Worker with domain-bound Passkeys. |
95
60
 
96
61
  ## Development
97
62
 
98
63
  ```sh
99
64
  pnpm dev # start dialog + dialog-ref + web playground dev servers
100
- pnpm playground:cli # run the CLI playground client
65
+ pnpm dev:cli # start the CLI playground client
101
66
  pnpm dev:dialog # start Tempo Wallet dialog only
102
67
  pnpm dev:dialog-ref # start reference dialog implementation only (port 5174)
103
68
  pnpm dev:playground # start web playground only
@@ -114,6 +79,14 @@ pnpm test # run tests
114
79
  > - `https://playground.a:5173`
115
80
  > - `https://playground.b:5175`
116
81
 
82
+ ### Playgrounds
83
+
84
+ | Playground | Command | Description |
85
+ | ---------------------------- | ---------------- | -------------------------------------------- |
86
+ | [web](./playgrounds/web) | `pnpm dev` | Web playground for dialog + adapter testing. |
87
+ | [wagmi](./playgrounds/wagmi) | `pnpm dev:wagmi` | Wagmi-based playground with connectors. |
88
+ | [cli](./playgrounds/cli) | `pnpm dev:cli` | CLI playground for device-code auth flow. |
89
+
117
90
  ### Reference Implementations
118
91
 
119
92
  The `ref-impls/` directory contains reference implementations for building on the Account SDK:
@@ -125,4 +98,15 @@ The `ref-impls/` directory contains reference implementations for building on th
125
98
 
126
99
  ## License
127
100
 
128
- MIT
101
+ <sup>
102
+ Licensed under either of <a href="LICENSE-APACHE">Apache License, Version
103
+ 2.0</a> or <a href="LICENSE-MIT">MIT license</a> at your option.
104
+ </sup>
105
+
106
+ <br>
107
+
108
+ <sub>
109
+ Unless you explicitly state otherwise, any contribution intentionally submitted
110
+ for inclusion in these packages by you, as defined in the Apache-2.0 license,
111
+ shall be dual licensed as above, without any additional terms or conditions.
112
+ </sub>
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "accounts",
3
3
  "description": "Tempo Accounts SDK",
4
4
  "type": "module",
5
- "version": "0.4.25",
5
+ "version": "0.5.0",
6
6
  "dependencies": {
7
7
  "@remix-run/fetch-router": "~0.17.0",
8
8
  "idb-keyval": "^6.2.2",
@@ -33,7 +33,7 @@
33
33
  "repository": {
34
34
  "url": "https://github.com/tempoxyz/accounts"
35
35
  },
36
- "license": "MIT",
36
+ "license": "MIT OR Apache-2.0",
37
37
  "files": [
38
38
  "dist",
39
39
  "src",
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2026-present weth, LLC
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.