@rozoai/checkout 0.1.1 → 0.1.3

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.
@@ -54,6 +54,26 @@ LINK="https://payments.coinbase.com/payment-links/pl_01YOURLINKID"
54
54
  Chain ids: `1` Ethereum · `56` BNB Chain · `137` Polygon · `8453` Base ·
55
55
  `900` Solana · `1500` Stellar · `lightning` Bitcoin Lightning.
56
56
 
57
+ ## Which wallet do I need?
58
+
59
+ **One wallet, on one chain — not one per chain.** Pick whichever coin you
60
+ already hold and pay from wherever it already lives.
61
+
62
+ Any wallet works, and so does an exchange withdrawal: Mode A below just prints
63
+ a deposit block, and you send exactly that `amount` of that `tokenSymbol`, on
64
+ that `chain`, to that `receiverAddress`. Nothing connects to a site and nothing
65
+ is approved in a browser. In practice people use MetaMask or Rabby on the EVM
66
+ chains, Phantom or Solflare on Solana, and a Lightning wallet such as Phoenix
67
+ or Wallet of Satoshi for BTC.
68
+
69
+ Two cases differ. **Stellar** routes through a shared address plus
70
+ `receiverMemo`, so whatever you send from must let you set a memo — omit it and
71
+ the payment is lost. **Lightning** pays the BOLT11 invoice in
72
+ `deposit.lnInvoice`; there is no address to send to.
73
+
74
+ Only `--send` (Mode B) needs a private key, from `ROZO_CHECKOUT_EVM_KEY` or
75
+ `ROZO_CHECKOUT_SOL_KEY`, and it covers EVM chains and Solana only.
76
+
57
77
  ## 1. Quote it (read-only, free)
58
78
 
59
79
  ```bash
@@ -131,7 +151,10 @@ scripts require.
131
151
  }
132
152
  ```
133
153
 
134
- Send exactly the fields this block gives you. For Lightning,
154
+ Send exactly the fields this block gives you. On Stellar the memo is
155
+ **`MEMO_TEXT`** even when it looks numeric — sending it as `MEMO_ID` will not
156
+ match. `deposit.expiresIn` tells you how long the order stays valid. For
157
+ Lightning,
135
158
  `deposit.lnInvoice` holds the BOLT11 string to scan, and `deposit.amount` is
136
159
  in satoshis.
137
160
 
@@ -154,22 +177,113 @@ That is the whole of Mode A. Skip to step 5.
154
177
 
155
178
  ### The optional way: let the script pay (Mode B)
156
179
 
157
- Only if you want this machine to sign for you, and only on EVM chains and
158
- Solana. This is the only part that needs a private key:
180
+ Only if you want this machine to sign for you, and only on **EVM chains and
181
+ Solana** — there is no `--send` for Stellar or Lightning, which are paid from
182
+ your own wallet. This is the only part that needs a key.
183
+
184
+ **Solana — use the keypair you already have.** If you have ever run
185
+ `solana-keygen`, `~/.config/solana/id.json` already exists and is used
186
+ automatically:
159
187
 
160
188
  ```bash
161
- # Preview exactly what would be signed — signs nothing
162
- ROZO_CHECKOUT_SOL_KEY=<base58 secret key> \
163
- node scripts/dist/send-sol.js --rozo-payment-id <rozoPaymentId> --dry-run
189
+ node scripts/dist/send-sol.js --rozo-payment-id <rozoPaymentId> --send
190
+ ```
164
191
 
165
- # Actually send. --send is mandatory.
166
- ROZO_CHECKOUT_SOL_KEY=<base58 secret key> \
167
- node scripts/dist/send-sol.js --rozo-payment-id <rozoPaymentId> --send
192
+ **EVM — use an encrypted keystore.** Export a V3 JSON keystore from your
193
+ wallet and point at it. The passphrase is prompted; it is never a flag:
194
+
195
+ ```bash
196
+ ROZO_CHECKOUT_EVM_KEYSTORE=~/wallets/hot.json \
197
+ node scripts/dist/send-evm.js --rozo-payment-id <rozoPaymentId> --send
168
198
  ```
169
199
 
170
- Use `send-evm.js` with `ROZO_CHECKOUT_EVM_KEY` for Ethereum, BNB Chain,
171
- Polygon and Base. A single payment may not exceed **$1,100**; above that, pay
172
- from your own wallet as above.
200
+ Either file can also be given explicitly with `--keyfile <path>`, and
201
+ `--dry-run` works with every source: it derives the address and runs all the
202
+ checks without signing anything.
203
+
204
+ **For unattended automation**, where nobody can type a passphrase, a raw key in
205
+ the environment still works exactly as before — `ROZO_CHECKOUT_SOL_KEY` or
206
+ `ROZO_CHECKOUT_EVM_KEY`, or `ROZO_CHECKOUT_KEYSTORE_PASSPHRASE` alongside a
207
+ keystore. On a machine a person uses, prefer a key file.
208
+
209
+ These settings can also live in a `.env` in the directory you run from (or
210
+ `--env-file <path>`). Only `ROZO_CHECKOUT_*` keys are read from it, it is
211
+ parsed as plain text and never run through a shell, and anything already in
212
+ your real environment wins. **Add `.env` to your `.gitignore`.**
213
+
214
+ A key file or `.env` must not be readable by other users (`chmod 600`) and must
215
+ not be tracked by git. Both are refused rather than warned about.
216
+
217
+ <details>
218
+ <summary><b>Set up a local wallet for <code>--send</code></b> — .env template and per-wallet export steps</summary>
219
+
220
+ **None of this is needed for the default path.** Paying from your own wallet
221
+ needs no key and no configuration, and works with wallets that can never be
222
+ used here — including hardware wallets and exchange accounts.
223
+
224
+ A `.env` in the directory you run from, with every variable this tool reads:
225
+
226
+ ```bash
227
+ # None of this is needed to pay from your own wallet. These are read only
228
+ # when you use --send.
229
+
230
+ # Solana secret key: a base58 string, or a JSON byte array. Only needed if you
231
+ # do NOT have ~/.config/solana/id.json, which is picked up automatically.
232
+ ROZO_CHECKOUT_SOL_KEY=REPLACE_ME_base58_secret_key
233
+
234
+ # EVM raw private key: 64 hex characters, 0x prefix optional. The least safe
235
+ # option — prefer the keystore below.
236
+ ROZO_CHECKOUT_EVM_KEY=0x0000000000000000000000000000000000000000000000000000000000000000
237
+
238
+ # EVM encrypted V3 keystore: path to the file. Preferred over the raw key.
239
+ ROZO_CHECKOUT_EVM_KEYSTORE=/replace/me/keystores/my-hot-wallet
240
+
241
+ # Passphrase for that keystore. Only for unattended runs; on a terminal you
242
+ # are prompted instead, and nothing is stored.
243
+ ROZO_CHECKOUT_KEYSTORE_PASSPHRASE=REPLACE_ME_not_a_real_passphrase
244
+
245
+ # Optional RPC overrides, one per chain id. 8453 = Base, 900 = Solana.
246
+ ROZO_CHECKOUT_RPC_8453=https://mainnet.base.org
247
+ ROZO_CHECKOUT_RPC_900=https://api.mainnet-beta.solana.com
248
+ ```
249
+
250
+ Then lock it down and keep it out of git:
251
+
252
+ ```bash
253
+ chmod 600 .env
254
+ echo '.env' >> .gitignore
255
+ ```
256
+
257
+ **Solana**
258
+
259
+ - `solana-keygen new` writes `~/.config/solana/id.json`. Nothing to configure —
260
+ it is found automatically. This is the path we recommend.
261
+ - **Phantom** → Settings → Export Private Key gives a **base58** string. Put it
262
+ in `ROZO_CHECKOUT_SOL_KEY`.
263
+ - **Solflare** exports a base58 string in current versions and a JSON byte
264
+ array in older ones. Both are accepted as-is.
265
+
266
+ **EVM**
267
+
268
+ - **MetaMask** and **Rabby** → Export private key gives 64 hex characters.
269
+ Paste it into `ROZO_CHECKOUT_EVM_KEY` as-is; the `0x` prefix is optional.
270
+ - **Encrypted keystore (safer).** Browser wallets export raw keys, not
271
+ keystores. To turn one into an encrypted keystore, use Foundry:
272
+ `cast wallet import my-hot-wallet --interactive` prompts for the key and
273
+ writes an encrypted V3 keystore to `~/.foundry/keystores/my-hot-wallet`
274
+ (`--keystore-dir` changes where). Point `ROZO_CHECKOUT_EVM_KEYSTORE` at that
275
+ file. `geth account import` also produces a V3 keystore.
276
+
277
+ **Wallets that cannot be used with `--send`:** hardware wallets (Ledger,
278
+ Trezor), WalletConnect-only mobile wallets, and exchange accounts. None of them
279
+ hand over a signing key, by design. Use the default keyless path instead — it
280
+ works with all of them.
281
+
282
+ </details>
283
+
284
+
285
+ A single payment may not exceed **$1,100**; above that, pay from your own
286
+ wallet as above.
173
287
 
174
288
  ```json
175
289
  {
@@ -44,6 +44,16 @@ LINK="https://payments.coinbase.com/payment-links/pl_01YOURLINKID"
44
44
  链 id:`1` Ethereum · `56` BNB Chain · `137` Polygon · `8453` Base ·
45
45
  `900` Solana · `1500` Stellar · `lightning` Bitcoin Lightning。
46
46
 
47
+ ## 我需要什么钱包?
48
+
49
+ **一个钱包、一条链就够了——不需要每条链各准备一个。**挑一种你已经持有的币,然后从它现在所在的地方付款即可。
50
+
51
+ 任何钱包都可以,从交易所提币同样可以:下面的 Mode A 只是打印一段充值信息,你按其中给出的 `amount`、`tokenSymbol`、`chain`,把钱发到 `receiverAddress` 即可。全程不需要连接任何网站,也不需要在浏览器里做任何授权。实践中大家在 EVM 链上用 MetaMask 或 Rabby,在 Solana 上用 Phantom 或 Solflare,付 BTC 时用 Phoenix、Wallet of Satoshi 之类的闪电钱包。
52
+
53
+ 有两种情况不一样。**Stellar** 走的是共享地址加 `receiverMemo` 的方式,所以你的付款来源必须能填写 memo——漏掉 memo,这笔钱就丢了。**闪电网络**付的是 `deposit.lnInvoice` 里的 BOLT11 invoice,没有可转账的地址。
54
+
55
+ 只有 `--send`(Mode B)需要私钥,且仅支持 EVM 链和 Solana:Solana 直接用 `solana-keygen` 已经生成的 `~/.config/solana/id.json`,EVM 用加密的 keystore(口令交互式输入)。环境变量里的原始私钥保留给无人值守的自动化。
56
+
47
57
  ## 1. 报价(只读,免费)
48
58
 
49
59
  ```bash
@@ -119,7 +129,7 @@ node scripts/dist/create-order.js --url "$LINK" --chain 900 --token USDT --confi
119
129
  }
120
130
  ```
121
131
 
122
- 严格按这个信息块给出的字段来发送。对于 Lightning,`deposit.lnInvoice` 里是供扫码的
132
+ 严格按这个信息块给出的字段来发送。Stellar 上的 memo 即使看起来是纯数字,也**始终是 `MEMO_TEXT`** —— 按 `MEMO_ID` 发送不会被匹配上。`deposit.expiresIn` 会告诉你订单还有多久过期。对于 Lightning,`deposit.lnInvoice` 里是供扫码的
123
133
  BOLT11 字符串,`deposit.amount` 的单位是聪 (satoshis)。
124
134
 
125
135
  ## 4. 付款
@@ -140,21 +150,99 @@ BOLT11 字符串,`deposit.amount` 的单位是聪 (satoshis)。
140
150
 
141
151
  ### 可选的方式:让脚本替你付(模式 B)
142
152
 
143
- 只有当你想让这台机器替你签名时才需要,而且仅限 EVM 链与 Solana。这是唯一需要私钥的
144
- 部分:
153
+ 只有当你想让这台机器替你签名时才需要,而且**只支持 EVM 链和 Solana** —— Stellar 和
154
+ 闪电网络没有 `--send`,只能用你自己的钱包付。这是整个流程里唯一需要私钥的部分。
155
+
156
+ **Solana —— 直接用你已有的密钥对。** 只要你跑过 `solana-keygen`,
157
+ `~/.config/solana/id.json` 就已经存在,脚本会自动使用它:
158
+
159
+ ```bash
160
+ node scripts/dist/send-sol.js --rozo-payment-id <rozoPaymentId> --send
161
+ ```
162
+
163
+ **EVM —— 用加密的 keystore。** 从你的钱包导出一个 V3 JSON keystore 并指向它。
164
+ 口令 (passphrase) 会交互式提示输入,永远不会作为命令行参数传递:
165
+
166
+ ```bash
167
+ ROZO_CHECKOUT_EVM_KEYSTORE=~/wallets/hot.json \
168
+ node scripts/dist/send-evm.js --rozo-payment-id <rozoPaymentId> --send
169
+ ```
170
+
171
+ 两种文件也都可以用 `--keyfile <path>` 显式指定;`--dry-run` 对所有来源都有效:
172
+ 它会推导出地址并跑完所有检查,但不签任何名。
173
+
174
+ **用于无人值守的自动化**(没有人能输入口令的场景),环境变量里的原始私钥依然照旧
175
+ 可用 —— `ROZO_CHECKOUT_SOL_KEY` 或 `ROZO_CHECKOUT_EVM_KEY`,或者配合 keystore 使用
176
+ `ROZO_CHECKOUT_KEYSTORE_PASSPHRASE`。在有人使用的机器上,优先用密钥文件。
177
+
178
+ 这些设置也可以放在你运行命令所在目录的 `.env` 里(或者用 `--env-file <path>` 指定)。
179
+ 其中只有 `ROZO_CHECKOUT_*` 开头的键会被读取,文件按纯文本解析、绝不交给 shell 执行,
180
+ 而且真实环境变量优先级更高。**记得把 `.env` 加进 `.gitignore`。**
181
+
182
+ 密钥文件和 `.env` 都不能被其他用户读取(`chmod 600`),也不能被 git 跟踪。这两种情况都会被
183
+ 直接拒绝,而不是只给个警告。
184
+
185
+ <details>
186
+ <summary><b>为 <code>--send</code> 配置本地钱包</b> —— .env 模板与各钱包导出步骤</summary>
187
+
188
+ **默认路径不需要这里的任何东西。** 用你自己的钱包付款既不需要私钥也不需要任何配置,
189
+ 而且支持那些在这里根本用不了的钱包 —— 包括硬件钱包和交易所账户。
190
+
191
+ 在你运行命令的目录放一个 `.env`,下面列出了本工具会读取的全部变量:
145
192
 
146
193
  ```bash
147
- # 预览将要签名的确切内容 —— 不会签任何名
148
- ROZO_CHECKOUT_SOL_KEY=<base58 secret key> \
149
- node scripts/dist/send-sol.js --rozo-payment-id <rozoPaymentId> --dry-run
194
+ # 用你自己的钱包付款不需要下面任何一项。它们只在你使用 --send 时才被读取。
195
+
196
+ # Solana 私钥:base58 字符串,或 JSON 字节数组。只有在你没有
197
+ # ~/.config/solana/id.json(它会被自动识别)时才需要填。
198
+ ROZO_CHECKOUT_SOL_KEY=REPLACE_ME_base58_secret_key
199
+
200
+ # EVM 原始私钥:0x 加 64 位十六进制。这是最不安全的方式 —— 优先用下面的 keystore。
201
+ ROZO_CHECKOUT_EVM_KEY=0x0000000000000000000000000000000000000000000000000000000000000000
150
202
 
151
- # 真正发送。--send 是必需的。
152
- ROZO_CHECKOUT_SOL_KEY=<base58 secret key> \
153
- node scripts/dist/send-sol.js --rozo-payment-id <rozoPaymentId> --send
203
+ # EVM 加密 V3 keystore:文件路径。比上面的原始私钥更推荐。
204
+ ROZO_CHECKOUT_EVM_KEYSTORE=/replace/me/keystores/my-hot-wallet
205
+
206
+ # 该 keystore 的口令。只在无人值守时需要;在终端上会交互式提示,且不会被保存。
207
+ ROZO_CHECKOUT_KEYSTORE_PASSPHRASE=REPLACE_ME_not_a_real_passphrase
208
+
209
+ # 可选的 RPC 覆盖,按链 id 一条。8453 = Base,900 = Solana。
210
+ ROZO_CHECKOUT_RPC_8453=https://mainnet.base.org
211
+ ROZO_CHECKOUT_RPC_900=https://api.mainnet-beta.solana.com
154
212
  ```
155
213
 
156
- Ethereum、BNB Chain、Polygon 和 Base 用 `send-evm.js` 配合 `ROZO_CHECKOUT_EVM_KEY`。
157
- 单笔付款不得超过 **$1,100**;超过这个数就按上面的方式用你自己的钱包付。
214
+ 然后锁好权限,并确保它不进 git:
215
+
216
+ ```bash
217
+ chmod 600 .env
218
+ echo '.env' >> .gitignore
219
+ ```
220
+
221
+ **Solana**
222
+
223
+ - `solana-keygen new` 会写出 `~/.config/solana/id.json`。什么都不用配 —— 它会被自动
224
+ 找到。这是我们推荐的方式。
225
+ - **Phantom** → Settings → Export Private Key 给出的是 **base58** 字符串,填进
226
+ `ROZO_CHECKOUT_SOL_KEY`。
227
+ - **Solflare** 新版本导出 base58 字符串,旧版本导出 JSON 字节数组。两种都可以直接用。
228
+
229
+ **EVM**
230
+
231
+ - **MetaMask** 和 **Rabby** → 导出私钥给出的是 64 位十六进制字符串。直接原样粘贴到
232
+ `ROZO_CHECKOUT_EVM_KEY` 即可;`0x` 前缀加不加都行。
233
+ - **加密 keystore(更安全)。** 浏览器钱包只能导出原始私钥,不能导出 keystore。
234
+ 想把私钥变成加密 keystore,可以用 Foundry:`cast wallet import my-hot-wallet
235
+ --interactive` 会提示你输入私钥,并把加密的 V3 keystore 写到
236
+ `~/.foundry/keystores/my-hot-wallet`(用 `--keystore-dir` 可改目录)。然后把
237
+ `ROZO_CHECKOUT_EVM_KEYSTORE` 指向该文件。`geth account import` 同样会生成 V3 keystore。
238
+
239
+ **不能用于 `--send` 的钱包:** 硬件钱包(Ledger、Trezor)、只支持 WalletConnect 的
240
+ 手机钱包,以及交易所账户。它们在设计上就不会交出签名私钥。这类用户请走默认的无私钥
241
+ 路径 —— 那条路对它们全都适用。
242
+
243
+ </details>
244
+
245
+ 单笔付款不得超过 **$1,100**;超过就按上面的方式用你自己的钱包付。
158
246
 
159
247
  ```json
160
248
  {
package/docs/README.es.md CHANGED
@@ -34,11 +34,32 @@ npx @rozoai/checkout pay <coinbase-link> --with usdt-solana
34
34
  | Polygon | `usdt-polygon` `usdc-polygon` | `137` | 6 decimales |
35
35
  | Base | `usdc-base` | `8453` | 6 decimales |
36
36
  | Solana | `usdt-solana` `usdc-solana` | `900` | SPL; SOL nativo no admitido |
37
- | Stellar | `usdc-stellar` | `1500` | memo obligatorio — se muestra en el bloque de depósito |
37
+ | Stellar | `usdc-stellar` | `1500` | memo `MEMO_TEXT` obligatorio — se muestra en el bloque de depósito |
38
38
  | Bitcoin Lightning | `btc-lightning` | `lightning` | BOLT11; importes en satoshis |
39
39
 
40
40
  Las monedas de gas nativas (SOL, BNB, ETH, MATIC) y el BTC on-chain no se aceptan.
41
41
 
42
+ ## ¿Qué wallet necesito?
43
+
44
+ **Una wallet, en una cadena: no hace falta una por cada cadena.** Elige de la
45
+ tabla de arriba la moneda que ya tengas y paga desde donde ya esté.
46
+
47
+ - **Sirve cualquier wallet, y también un retiro desde un exchange.** La vía por
48
+ defecto solo imprime un bloque de depósito: envía exactamente ese `amount` de
49
+ ese `tokenSymbol`, en esa `chain`, a esa `receiverAddress`. Nada se conecta a
50
+ ningún sitio ni se aprueba en el navegador. En la práctica la gente usa
51
+ MetaMask o Rabby en las cadenas EVM, Phantom o Solflare en Solana, y una
52
+ wallet Lightning como Phoenix o Wallet of Satoshi para BTC.
53
+ - **Stellar es la que exige cuidado.** Sus depósitos se enrutan mediante una
54
+ dirección compartida más `receiverMemo`, así que aquello desde lo que envíes
55
+ — exchange o wallet — debe permitirte fijar un memo. Si lo omites, el pago se
56
+ pierde.
57
+ - **Lightning paga una factura, no una dirección.** Escanea o pega
58
+ `deposit.lnInvoice`; no hay ninguna dirección a la que enviar.
59
+ - **Solo `--send` necesita una clave privada**, leída de
60
+ `ROZO_CHECKOUT_EVM_KEY` o `ROZO_CHECKOUT_SOL_KEY`, y cubre únicamente las
61
+ cadenas EVM y Solana. Todo lo demás no usa claves.
62
+
42
63
  ## Usarlo desde el agente
43
64
 
44
65
  La carga útil es la misma en todas partes: el comando de una línea de arriba, o
@@ -82,7 +103,7 @@ Para pagar un enlace de pago de OpenRouter / Coinbase, ejecuta:
82
103
  npx @rozoai/checkout pay <coinbase-link> --with usdt-solana
83
104
  ```
84
105
 
85
- Billetera: cualquier billetera, **sin clave**. `--send` sí necesita la clave del entorno.
106
+ Billetera: cualquier billetera, **sin clave**. Solo `--send` la necesita: firma localmente con el par de claves de la CLI de Solana o un keystore cifrado, y solo admite cadenas EVM y Solana (Stellar y Lightning son solo Modo A).
86
107
  </details>
87
108
 
88
109
  <details>
@@ -96,7 +117,7 @@ propio comando:
96
117
  npx @rozoai/checkout pay <coinbase-link> --with usdt-solana
97
118
  ```
98
119
 
99
- Billetera: cualquier billetera, **sin clave**. `--send` sí necesita la clave del entorno.
120
+ Billetera: cualquier billetera, **sin clave**. Solo `--send` la necesita: firma localmente con el par de claves de la CLI de Solana o un keystore cifrado.
100
121
  </details>
101
122
 
102
123
  <details>
@@ -109,7 +130,7 @@ Para pagar un enlace de pago de OpenRouter / Coinbase, ejecuta:
109
130
  npx @rozoai/checkout pay <coinbase-link> --with usdt-solana
110
131
  ```
111
132
 
112
- Billetera: cualquier billetera, **sin clave**. `--send` sí necesita la clave del entorno.
133
+ Billetera: cualquier billetera, **sin clave**. Solo `--send` la necesita: firma localmente con el par de claves de la CLI de Solana o un keystore cifrado.
113
134
  </details>
114
135
 
115
136
  <details>
@@ -122,7 +143,7 @@ Para pagar un enlace de pago de OpenRouter / Coinbase, ejecuta:
122
143
  npx @rozoai/checkout pay <coinbase-link> --with usdt-solana
123
144
  ```
124
145
 
125
- Billetera: cualquier billetera, **sin clave**. `--send` sí necesita la clave del entorno.
146
+ Billetera: cualquier billetera, **sin clave**. Solo `--send` la necesita: firma localmente con el par de claves de la CLI de Solana o un keystore cifrado.
126
147
  </details>
127
148
 
128
149
  <details>
@@ -136,7 +157,7 @@ Descarga https://checkout.rozo.ai/llms.txt y luego paga este enlace de OpenRoute
136
157
  npx @rozoai/checkout pay <coinbase-link> --with usdt-solana
137
158
  ```
138
159
 
139
- Billetera: cualquier billetera, **sin clave**. `--send` sí necesita la clave del entorno.
160
+ Billetera: cualquier billetera, **sin clave**. Solo `--send` la necesita: firma localmente con el par de claves de la CLI de Solana o un keystore cifrado.
140
161
  </details>
141
162
 
142
163
  <details>
@@ -149,7 +170,7 @@ con un pago que se dispara desde un script o desde un canal de chat:
149
170
  openclaw agent exec "Pay this OpenRouter link with USDT on Solana by running: npx @rozoai/checkout pay <coinbase-link> --with usdt-solana"
150
171
  ```
151
172
 
152
- Billetera: cualquier billetera, **sin clave**. `--send` sí necesita la clave del entorno.
173
+ Billetera: cualquier billetera, **sin clave**. Solo `--send` la necesita: firma localmente con el par de claves de la CLI de Solana o un keystore cifrado.
153
174
  </details>
154
175
 
155
176
  <details>
@@ -163,7 +184,7 @@ Paga este enlace de OpenRouter con USDT en Solana ejecutando:
163
184
  npx @rozoai/checkout pay <coinbase-link> --with usdt-solana
164
185
  ```
165
186
 
166
- Billetera: cualquier billetera, **sin clave**. `--send` sí necesita la clave del entorno.
187
+ Billetera: cualquier billetera, **sin clave**. Solo `--send` la necesita: firma localmente con el par de claves de la CLI de Solana o un keystore cifrado.
167
188
  </details>
168
189
 
169
190
  <details>
@@ -212,7 +233,76 @@ para pagar este enlace de OpenRouter: <coinbase-link>
212
233
  Si el agente no tiene shell pero puede hacer peticiones HTTP, puede manejar
213
234
  directamente los cuatro endpoints públicos — ver [cómo funciona](how-it-works.md).
214
235
 
215
- Billetera: cualquier billetera, **sin clave**. `--send` sí necesita la clave del entorno.
236
+ Billetera: cualquier billetera, **sin clave**. Solo `--send` la necesita: firma localmente con el par de claves de la CLI de Solana o un keystore cifrado.
237
+ </details>
238
+
239
+ <details>
240
+ <summary><b>Configurar una billetera local para <code>--send</code></b> — plantilla .env y pasos de exportación por billetera</summary>
241
+
242
+ **Nada de esto hace falta para la ruta por defecto.** Pagar desde la propia
243
+ billetera no necesita clave ni configuración, y funciona con billeteras que aquí
244
+ nunca se pueden usar, incluidas las de hardware y las cuentas de exchange.
245
+
246
+ Un `.env` en el directorio desde el que se ejecuta, con todas las variables que
247
+ esta herramienta lee:
248
+
249
+ ```bash
250
+ # Nada de esto hace falta para pagar desde la propia billetera. Solo se lee
251
+ # cuando se usa --send.
252
+
253
+ # Clave secreta de Solana: una cadena base58 o un arreglo JSON de bytes. Solo
254
+ # hace falta si NO se tiene ~/.config/solana/id.json, que se detecta solo.
255
+ ROZO_CHECKOUT_SOL_KEY=REPLACE_ME_base58_secret_key
256
+
257
+ # Clave privada EVM en bruto: 0x seguido de 64 caracteres hex. La opción menos
258
+ # segura: es preferible el keystore de abajo.
259
+ ROZO_CHECKOUT_EVM_KEY=0x0000000000000000000000000000000000000000000000000000000000000000
260
+
261
+ # Keystore V3 cifrado para EVM: ruta al archivo. Preferible a la clave en bruto.
262
+ ROZO_CHECKOUT_EVM_KEYSTORE=/replace/me/keystores/my-hot-wallet
263
+
264
+ # Frase de contraseña de ese keystore. Solo para ejecuciones desatendidas; en
265
+ # una terminal se solicita y no se guarda nada.
266
+ ROZO_CHECKOUT_KEYSTORE_PASSPHRASE=REPLACE_ME_not_a_real_passphrase
267
+
268
+ # Sobrescrituras de RPC opcionales, una por id de cadena. 8453 = Base,
269
+ # 900 = Solana.
270
+ ROZO_CHECKOUT_RPC_8453=https://mainnet.base.org
271
+ ROZO_CHECKOUT_RPC_900=https://api.mainnet-beta.solana.com
272
+ ```
273
+
274
+ Después, restringir permisos y mantenerlo fuera de git:
275
+
276
+ ```bash
277
+ chmod 600 .env
278
+ echo '.env' >> .gitignore
279
+ ```
280
+
281
+ **Solana**
282
+
283
+ - `solana-keygen new` escribe `~/.config/solana/id.json`. No hay nada que
284
+ configurar: se encuentra automáticamente. Es la ruta recomendada.
285
+ - **Phantom** → Settings → Export Private Key da una cadena **base58**. Va en
286
+ `ROZO_CHECKOUT_SOL_KEY`.
287
+ - **Solflare** exporta una cadena base58 en las versiones actuales y un arreglo
288
+ JSON de bytes en las antiguas. Ambos se aceptan tal cual.
289
+
290
+ **EVM**
291
+
292
+ - **MetaMask** y **Rabby** exportan la clave privada como 64 caracteres hex.
293
+ Pegarla tal cual en `ROZO_CHECKOUT_EVM_KEY`; el prefijo `0x` es opcional.
294
+ - **Keystore cifrado (más seguro).** Las billeteras de navegador exportan claves
295
+ en bruto, no keystores. Para convertir una en un keystore cifrado, usar
296
+ Foundry: `cast wallet import my-hot-wallet --interactive` pide la clave y
297
+ escribe un keystore V3 cifrado en `~/.foundry/keystores/my-hot-wallet`
298
+ (`--keystore-dir` cambia la ubicación). Apuntar `ROZO_CHECKOUT_EVM_KEYSTORE` a
299
+ ese archivo. `geth account import` también genera un keystore V3.
300
+
301
+ **Billeteras que no se pueden usar con `--send`:** billeteras de hardware
302
+ (Ledger, Trezor), billeteras móviles solo con WalletConnect y cuentas de
303
+ exchange. Por diseño, ninguna entrega una clave de firma. Esos casos usan la
304
+ ruta por defecto sin clave, que funciona con todas ellas.
305
+
216
306
  </details>
217
307
 
218
308
  ## Tres reglas que conviene conocer
@@ -239,6 +329,21 @@ La lista completa de lo que esta herramienta se niega a hacer, y por qué, está
239
329
 
240
330
  ## Registro de cambios
241
331
 
332
+ - **0.1.3** — Correcciones surgidas del primer pago real. Los bundles ya no fallan
333
+ con `__filename is not defined` en Node 22+ (el banner de esbuild ahora define
334
+ `__filename`/`__dirname` además de `require`, y las pruebas ejecutan cada bundle
335
+ de verdad). Los depósitos de Stellar indican el tipo de memo (`MEMO_TEXT`, aunque
336
+ el memo parezca numérico). Las órdenes muestran la validez restante como duración
337
+ ("expires in 47m") en el bloque de depósito y en `status`, con el comando exacto
338
+ para crear una nueva. Reutilizar una orden impaga existente, y pedir una moneda
339
+ distinta a la suya, ahora se explican en lugar de parecer errores.
340
+ - **0.1.2** — El Modo B ya no necesita una clave privada en bruto en una variable
341
+ de entorno. En Solana usa el `~/.config/solana/id.json` que `solana-keygen` ya
342
+ creó; en EVM un keystore V3 cifrado cuya frase de contraseña se solicita.
343
+ `--keyfile` indica cualquiera de los dos explícitamente, y los ajustes pueden
344
+ venir de un `.env` incluido en `.gitignore`. Las claves en bruto del entorno
345
+ siguen funcionando para automatización desatendida. Los archivos de claves y
346
+ el `.env` deben ser `chmod 600` y no estar bajo seguimiento de git.
242
347
  - **0.1.1** — un solo límite de gasto en lugar de dos: un pago individual no
243
348
  puede superar los $1,100 (dimensionado para una compra de crédito de $1,000
244
349
  más su comisión del 5%); se eliminan el tope acumulado por sesión y la bandera