@rozoai/checkout 0.1.0 → 0.1.1
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/README.md +189 -215
- package/{QUICKSTART.es.md → docs/QUICKSTART.es.md} +55 -24
- package/{QUICKSTART.ja.md → docs/QUICKSTART.ja.md} +52 -22
- package/{QUICKSTART.md → docs/QUICKSTART.md} +54 -24
- package/{QUICKSTART.zh.md → docs/QUICKSTART.zh.md} +41 -18
- package/docs/README.es.md +251 -0
- package/docs/README.ja.md +255 -0
- package/docs/README.zh.md +233 -0
- package/docs/how-it-works.md +43 -0
- package/docs/safety.md +74 -0
- package/llms.txt +17 -7
- package/package.json +3 -8
- package/scripts/dist/cli.js +853 -481
- package/scripts/dist/send-evm.js +11 -40
- package/scripts/dist/send-sol.js +11 -40
- package/README.es.md +0 -287
- package/README.ja.md +0 -265
- package/README.zh.md +0 -187
|
@@ -4,21 +4,34 @@
|
|
|
4
4
|
|
|
5
5
|
OpenRouter の Coinbase 決済リンク (Payment Link) を、Solana、BNB Chain、
|
|
6
6
|
Ethereum、Polygon、Base、Stellar 上の USDT/USDC、または Lightning 経由の BTC で支払います。所要 5 分。
|
|
7
|
-
仕組みと設計意図については [README.md](README.md) を参照してください。
|
|
7
|
+
仕組みと設計意図については [README.md](../README.md) を参照してください。
|
|
8
8
|
|
|
9
9
|
## ワンライナー
|
|
10
10
|
|
|
11
|
+
```bash
|
|
12
|
+
npx @rozoai/checkout pay https://payments.coinbase.com/payment-links/pl_01YOURLINKID
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
これ 1 つで、以下の全ステップを実行します。通貨の選択、見積もり、注文作成、確認、承認、
|
|
16
|
+
入金手順の表示、そして決済完了までのポーリングです。通貨を選ぶ場面でウォレットアドレスを
|
|
17
|
+
貼り付けると、残高を調べてどの通貨なら支払えるかを表示します。これは任意で、実際に署名
|
|
18
|
+
される内容は一切変わりません。
|
|
19
|
+
|
|
20
|
+
使う通貨が決まっている場合は、指定すればこの質問を省略できます:
|
|
21
|
+
|
|
11
22
|
```bash
|
|
12
23
|
npx @rozoai/checkout pay https://payments.coinbase.com/payment-links/pl_01YOURLINKID --with usdt-solana
|
|
13
24
|
```
|
|
14
25
|
|
|
15
|
-
|
|
16
|
-
表示、そして決済完了までのポーリングです。`--with` に指定できる通貨: `usdt-solana`、
|
|
26
|
+
`--with` に指定できる通貨: `usdt-solana`、
|
|
17
27
|
`usdc-solana`、`usdt-bnb`、`usdc-bnb`、`usdt-ethereum`、`usdc-ethereum`、
|
|
18
28
|
`usdt-polygon`、`usdc-polygon`、`usdc-base`、`usdc-stellar`、`btc-lightning`。
|
|
29
|
+
スクリプトやエージェントでは必ず `--with` を渡してください。対話式の選択は端末でのみ
|
|
30
|
+
表示され、既定の通貨はありません。
|
|
19
31
|
|
|
20
|
-
|
|
21
|
-
|
|
32
|
+
既定では、任意のウォレットから支払うためのアドレスを表示するだけです — 鍵も設定も
|
|
33
|
+
不要です。CLI にホットウォレットから署名させたい場合にだけ `--send` を、機械可読な
|
|
34
|
+
出力が必要な場合は `--json` を追加してください。
|
|
22
35
|
|
|
23
36
|
このページの残りは、同じフローを 1 ステップずつ実行するものです。うまくいかないときや、
|
|
24
37
|
自分でスクリプトを書くときは、こちらが必要になります。
|
|
@@ -51,8 +64,8 @@ node scripts/dist/quote.js --url "$LINK"
|
|
|
51
64
|
{
|
|
52
65
|
"success": true,
|
|
53
66
|
"merchant": "OpenRouter, Inc.",
|
|
54
|
-
"invoice": { "amount": "
|
|
55
|
-
"callerPays": "
|
|
67
|
+
"invoice": { "amount": "1050.00", "fiat": { "amount": "1050.00", "currency": "USD" } },
|
|
68
|
+
"callerPays": "1050.00",
|
|
56
69
|
"coinbaseExpiryIso": "2026-08-09T10:00:00.000Z"
|
|
57
70
|
}
|
|
58
71
|
```
|
|
@@ -73,19 +86,21 @@ node scripts/dist/create-order.js --url "$LINK" --chain 900 --token USDT
|
|
|
73
86
|
{
|
|
74
87
|
"success": true,
|
|
75
88
|
"rozoPaymentId": "11111111-2222-4333-8444-555555555555",
|
|
76
|
-
"invoice": { "amount": "
|
|
89
|
+
"invoice": { "amount": "1050.000000", "currency": "USD" },
|
|
77
90
|
"deposit": null,
|
|
78
91
|
"depositWithheld": true,
|
|
79
92
|
"display": {
|
|
80
93
|
"chain": "Solana",
|
|
81
|
-
"amount": "
|
|
82
|
-
"payToMasked": "9WzDXw...AWWM"
|
|
83
|
-
"memoRequirement": "This deposit REQUIRES the memo/tag below. ..."
|
|
94
|
+
"amount": "1054.410000 USDT",
|
|
95
|
+
"payToMasked": "9WzDXw...AWWM"
|
|
84
96
|
},
|
|
85
97
|
"expiry": { "effectiveDeadlineIso": "2026-08-08T11:00:00.000Z", "minutesOfSlack": 55 }
|
|
86
98
|
}
|
|
87
99
|
```
|
|
88
100
|
|
|
101
|
+
この例は代表的なケースです。$1,000 分の OpenRouter クレジットに対する **$1,050.00**
|
|
102
|
+
のインボイスです。**$1,100** までのインボイスであれば同じ方法で支払えます。
|
|
103
|
+
|
|
89
104
|
**先へ進む前に必ず `display.amount` を確認してください。** 通常はインボイス金額より
|
|
90
105
|
大きくなります — ブリッジ (bridge) 手数料とネットワーク手数料が含まれるためです。`rozoPaymentId` を
|
|
91
106
|
控えておいてください。以降のコマンドはすべてこれを使います。
|
|
@@ -109,23 +124,37 @@ node scripts/dist/create-order.js --url "$LINK" --chain 900 --token USDT --confi
|
|
|
109
124
|
"tokenSymbol": "USDT",
|
|
110
125
|
"receiverAddress": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
|
|
111
126
|
"receiverMemo": "rozo-901",
|
|
112
|
-
"amount": "
|
|
127
|
+
"amount": "1054.410000",
|
|
113
128
|
"payTo": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM"
|
|
114
129
|
}
|
|
115
130
|
}
|
|
116
131
|
```
|
|
117
132
|
|
|
118
|
-
Lightning
|
|
119
|
-
`deposit.amount` は
|
|
133
|
+
このブロックが示すフィールドを、そのとおりに送金してください。Lightning の場合、
|
|
134
|
+
`deposit.lnInvoice` にスキャン用の BOLT11 文字列が入り、`deposit.amount` は
|
|
135
|
+
satoshi 単位になります。
|
|
120
136
|
|
|
121
137
|
## 4. 支払う
|
|
122
138
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
`deposit
|
|
126
|
-
|
|
139
|
+
### 簡単な方法: 自分のウォレットから
|
|
140
|
+
|
|
141
|
+
**秘密鍵も環境変数も設定も一切不要です。** 好きなウォレットを開き、上の `deposit`
|
|
142
|
+
ブロックが示すとおりに送金してください:
|
|
143
|
+
|
|
144
|
+
- `tokenSymbol` を `amount` だけ、
|
|
145
|
+
- `chain` の上で、
|
|
146
|
+
- `receiverAddress` へ — JSON からコピーし、決して手入力し直さないでください。
|
|
147
|
+
|
|
148
|
+
ブロックに `receiverMemo` などそれ以外のフィールドが含まれている場合は、示されたとおりに
|
|
149
|
+
そのまま付けてください。それはそのチェーンにおけるアドレスの一部です。Lightning の場合は
|
|
150
|
+
代わりに `deposit.lnInvoice` をスキャンするか貼り付けてください。
|
|
151
|
+
|
|
152
|
+
モード A はこれで全部です。ステップ 5 へ進んでください。
|
|
153
|
+
|
|
154
|
+
### 任意の方法: スクリプトに支払わせる(モード B)
|
|
127
155
|
|
|
128
|
-
|
|
156
|
+
このマシンに署名させたい場合にだけ、そして EVM チェーンと Solana でのみ使えます。
|
|
157
|
+
秘密鍵が必要なのはこの部分だけです:
|
|
129
158
|
|
|
130
159
|
```bash
|
|
131
160
|
# 署名される内容を正確にプレビューします — 署名は一切行いません
|
|
@@ -138,7 +167,8 @@ ROZO_CHECKOUT_SOL_KEY=<base58 secret key> \
|
|
|
138
167
|
```
|
|
139
168
|
|
|
140
169
|
Ethereum、BNB Chain、Polygon、Base では `send-evm.js` を `ROZO_CHECKOUT_EVM_KEY` と
|
|
141
|
-
|
|
170
|
+
併せて使います。1 回の支払いは **$1,100** を超えられません。それを超える場合は、上記の
|
|
171
|
+
とおり自分のウォレットから支払ってください。
|
|
142
172
|
|
|
143
173
|
```json
|
|
144
174
|
{
|
|
@@ -183,5 +213,5 @@ node scripts/dist/status.js --rozo-payment-id <rozoPaymentId> --watch --timeout
|
|
|
183
213
|
依頼してください。使い捨ての入金アドレスへの 2 回目の支払いは、入金として反映される
|
|
184
214
|
保証がありません。
|
|
185
215
|
|
|
186
|
-
エラーコードの完全な一覧は [README.md](README.md) に、エージェント向けの指示は
|
|
187
|
-
[SKILL.md](SKILL.md) にあります。
|
|
216
|
+
エラーコードの完全な一覧は [README.md](../README.md) に、エージェント向けの指示は
|
|
217
|
+
[SKILL.md](../SKILL.md) にあります。
|
|
@@ -4,21 +4,34 @@
|
|
|
4
4
|
|
|
5
5
|
Pay an OpenRouter Coinbase Payment Link with USDT/USDC on Solana, BNB Chain,
|
|
6
6
|
Ethereum, Polygon, Base or Stellar, or with BTC over Lightning. Five minutes.
|
|
7
|
-
For how it works and why, see [README.md](README.md).
|
|
7
|
+
For how it works and why, see [README.md](../README.md).
|
|
8
8
|
|
|
9
9
|
## The one-liner
|
|
10
10
|
|
|
11
|
+
```bash
|
|
12
|
+
npx @rozoai/checkout pay https://payments.coinbase.com/payment-links/pl_01YOURLINKID
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
That runs every step below for you: pick a coin, quote, create, review,
|
|
16
|
+
confirm, deposit instructions, then polling until settlement. At the coin
|
|
17
|
+
prompt you can paste your wallet address and the picker will check your
|
|
18
|
+
balances and mark which coins you can afford — optional, and it never changes
|
|
19
|
+
what gets signed.
|
|
20
|
+
|
|
21
|
+
If you already know your coin, name it and skip the question:
|
|
22
|
+
|
|
11
23
|
```bash
|
|
12
24
|
npx @rozoai/checkout pay https://payments.coinbase.com/payment-links/pl_01YOURLINKID --with usdt-solana
|
|
13
25
|
```
|
|
14
26
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
`usdc-
|
|
18
|
-
|
|
27
|
+
Coins for `--with`: `usdt-solana`, `usdc-solana`, `usdt-bnb`, `usdc-bnb`,
|
|
28
|
+
`usdt-ethereum`, `usdc-ethereum`, `usdt-polygon`, `usdc-polygon`, `usdc-base`,
|
|
29
|
+
`usdc-stellar`, `btc-lightning`. Scripts and agents must pass `--with`: the
|
|
30
|
+
picker only appears on a terminal, and there is no default coin.
|
|
19
31
|
|
|
20
|
-
|
|
21
|
-
|
|
32
|
+
By default it just prints an address for you to pay from any wallet — no key
|
|
33
|
+
and no configuration needed. Add `--send` only if you want the CLI to sign
|
|
34
|
+
from a hot wallet instead, and `--json` for machine-readable output.
|
|
22
35
|
|
|
23
36
|
The rest of this page is the same flow run one step at a time, which is what
|
|
24
37
|
you want if something goes wrong or you are scripting it yourself.
|
|
@@ -51,8 +64,8 @@ node scripts/dist/quote.js --url "$LINK"
|
|
|
51
64
|
{
|
|
52
65
|
"success": true,
|
|
53
66
|
"merchant": "OpenRouter, Inc.",
|
|
54
|
-
"invoice": { "amount": "
|
|
55
|
-
"callerPays": "
|
|
67
|
+
"invoice": { "amount": "1050.00", "fiat": { "amount": "1050.00", "currency": "USD" } },
|
|
68
|
+
"callerPays": "1050.00",
|
|
56
69
|
"coinbaseExpiryIso": "2026-08-09T10:00:00.000Z"
|
|
57
70
|
}
|
|
58
71
|
```
|
|
@@ -73,19 +86,21 @@ is **withheld** at this stage — you get a masked summary to check first.
|
|
|
73
86
|
{
|
|
74
87
|
"success": true,
|
|
75
88
|
"rozoPaymentId": "11111111-2222-4333-8444-555555555555",
|
|
76
|
-
"invoice": { "amount": "
|
|
89
|
+
"invoice": { "amount": "1050.000000", "currency": "USD" },
|
|
77
90
|
"deposit": null,
|
|
78
91
|
"depositWithheld": true,
|
|
79
92
|
"display": {
|
|
80
93
|
"chain": "Solana",
|
|
81
|
-
"amount": "
|
|
82
|
-
"payToMasked": "9WzDXw...AWWM"
|
|
83
|
-
"memoRequirement": "This deposit REQUIRES the memo/tag below. ..."
|
|
94
|
+
"amount": "1054.410000 USDT",
|
|
95
|
+
"payToMasked": "9WzDXw...AWWM"
|
|
84
96
|
},
|
|
85
97
|
"expiry": { "effectiveDeadlineIso": "2026-08-08T11:00:00.000Z", "minutesOfSlack": 55 }
|
|
86
98
|
}
|
|
87
99
|
```
|
|
88
100
|
|
|
101
|
+
This example is the flagship case: a **$1,050.00** invoice for $1,000 of
|
|
102
|
+
OpenRouter credits. Any invoice up to **$1,100** can be paid this way.
|
|
103
|
+
|
|
89
104
|
**Check `display.amount` before going on.** It is normally larger than the
|
|
90
105
|
invoice — it includes the bridge and network fees. Note the `rozoPaymentId`;
|
|
91
106
|
every later command uses it.
|
|
@@ -110,23 +125,37 @@ scripts require.
|
|
|
110
125
|
"tokenSymbol": "USDT",
|
|
111
126
|
"receiverAddress": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
|
|
112
127
|
"receiverMemo": "rozo-901",
|
|
113
|
-
"amount": "
|
|
128
|
+
"amount": "1054.410000",
|
|
114
129
|
"payTo": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM"
|
|
115
130
|
}
|
|
116
131
|
}
|
|
117
132
|
```
|
|
118
133
|
|
|
119
|
-
|
|
120
|
-
`deposit.
|
|
134
|
+
Send exactly the fields this block gives you. For Lightning,
|
|
135
|
+
`deposit.lnInvoice` holds the BOLT11 string to scan, and `deposit.amount` is
|
|
136
|
+
in satoshis.
|
|
121
137
|
|
|
122
138
|
## 4. Pay
|
|
123
139
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
140
|
+
### The simple way: from your own wallet
|
|
141
|
+
|
|
142
|
+
**No key, no environment variable, no configuration.** Open any wallet, and
|
|
143
|
+
send exactly what the `deposit` block above says:
|
|
144
|
+
|
|
145
|
+
- the `amount` of the `tokenSymbol`,
|
|
146
|
+
- on the `chain`,
|
|
147
|
+
- to the `receiverAddress` — copied from the JSON, never retyped.
|
|
148
|
+
|
|
149
|
+
If the block contains any other field, such as `receiverMemo`, include it
|
|
150
|
+
exactly as given; it is part of the address for that chain. For Lightning,
|
|
151
|
+
scan or paste `deposit.lnInvoice` instead.
|
|
152
|
+
|
|
153
|
+
That is the whole of Mode A. Skip to step 5.
|
|
154
|
+
|
|
155
|
+
### The optional way: let the script pay (Mode B)
|
|
128
156
|
|
|
129
|
-
|
|
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:
|
|
130
159
|
|
|
131
160
|
```bash
|
|
132
161
|
# Preview exactly what would be signed — signs nothing
|
|
@@ -139,7 +168,8 @@ ROZO_CHECKOUT_SOL_KEY=<base58 secret key> \
|
|
|
139
168
|
```
|
|
140
169
|
|
|
141
170
|
Use `send-evm.js` with `ROZO_CHECKOUT_EVM_KEY` for Ethereum, BNB Chain,
|
|
142
|
-
Polygon and Base.
|
|
171
|
+
Polygon and Base. A single payment may not exceed **$1,100**; above that, pay
|
|
172
|
+
from your own wallet as above.
|
|
143
173
|
|
|
144
174
|
```json
|
|
145
175
|
{
|
|
@@ -184,5 +214,5 @@ Read `error.code`. The three you are most likely to hit:
|
|
|
184
214
|
reconcile it. A second payment to a one-time deposit address is not guaranteed
|
|
185
215
|
to be credited.
|
|
186
216
|
|
|
187
|
-
The full error table is in [README.md](README.md), and the agent-facing
|
|
188
|
-
instructions are in [SKILL.md](SKILL.md).
|
|
217
|
+
The full error table is in [README.md](../README.md), and the agent-facing
|
|
218
|
+
instructions are in [SKILL.md](../SKILL.md).
|
|
@@ -4,17 +4,25 @@
|
|
|
4
4
|
|
|
5
5
|
用 Solana、BNB Chain、Ethereum、Polygon、Base 或 Stellar 上的 USDT/USDC,或者用走
|
|
6
6
|
Lightning 的 BTC,去支付一个 OpenRouter Coinbase 收款链接 (Payment Link)。五分钟搞定。
|
|
7
|
-
工作原理与设计理由见 [README.md](README.md)。
|
|
7
|
+
工作原理与设计理由见 [README.md](../README.md)。
|
|
8
8
|
|
|
9
9
|
## 一行命令搞定
|
|
10
10
|
|
|
11
|
+
```bash
|
|
12
|
+
npx @rozoai/checkout pay https://payments.coinbase.com/payment-links/pl_01YOURLINKID
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
这一条命令会替你跑完下面的每一步:选币、报价、创建订单、核对、确认、充值指令,然后一直轮询到结清。在选币那一步,你可以粘贴自己的钱包地址,它会去查余额并标出哪些币你付得起 —— 这是可选的,而且不会改变任何实际签名的内容。
|
|
16
|
+
|
|
17
|
+
如果你已经知道要用哪种币,直接指定就能跳过这一问:
|
|
18
|
+
|
|
11
19
|
```bash
|
|
12
20
|
npx @rozoai/checkout pay https://payments.coinbase.com/payment-links/pl_01YOURLINKID --with usdt-solana
|
|
13
21
|
```
|
|
14
22
|
|
|
15
|
-
|
|
23
|
+
`--with` 可选的币种有:`usdt-solana`、`usdc-solana`、`usdt-bnb`、`usdc-bnb`、`usdt-ethereum`、`usdc-ethereum`、`usdt-polygon`、`usdc-polygon`、`usdc-base`、`usdc-stellar`、`btc-lightning`。脚本和 agent 必须显式传 `--with`:交互式选择只在终端里出现,而且没有默认币种。
|
|
16
24
|
|
|
17
|
-
|
|
25
|
+
默认情况下它只是打印一个地址,让你用任意钱包去付 —— 不需要私钥,也不需要任何配置。只有当你想让 CLI 改从热钱包签名时才加 `--send`;加 `--json` 输出机器可读格式。
|
|
18
26
|
|
|
19
27
|
本页剩下的内容就是同一套流程,只不过一步一步来 —— 如果出了问题,或者你想自己写脚本,那才需要看它们。
|
|
20
28
|
|
|
@@ -46,8 +54,8 @@ node scripts/dist/quote.js --url "$LINK"
|
|
|
46
54
|
{
|
|
47
55
|
"success": true,
|
|
48
56
|
"merchant": "OpenRouter, Inc.",
|
|
49
|
-
"invoice": { "amount": "
|
|
50
|
-
"callerPays": "
|
|
57
|
+
"invoice": { "amount": "1050.00", "fiat": { "amount": "1050.00", "currency": "USD" } },
|
|
58
|
+
"callerPays": "1050.00",
|
|
51
59
|
"coinbaseExpiryIso": "2026-08-09T10:00:00.000Z"
|
|
52
60
|
}
|
|
53
61
|
```
|
|
@@ -68,19 +76,21 @@ node scripts/dist/create-order.js --url "$LINK" --chain 900 --token USDT
|
|
|
68
76
|
{
|
|
69
77
|
"success": true,
|
|
70
78
|
"rozoPaymentId": "11111111-2222-4333-8444-555555555555",
|
|
71
|
-
"invoice": { "amount": "
|
|
79
|
+
"invoice": { "amount": "1050.000000", "currency": "USD" },
|
|
72
80
|
"deposit": null,
|
|
73
81
|
"depositWithheld": true,
|
|
74
82
|
"display": {
|
|
75
83
|
"chain": "Solana",
|
|
76
|
-
"amount": "
|
|
77
|
-
"payToMasked": "9WzDXw...AWWM"
|
|
78
|
-
"memoRequirement": "This deposit REQUIRES the memo/tag below. ..."
|
|
84
|
+
"amount": "1054.410000 USDT",
|
|
85
|
+
"payToMasked": "9WzDXw...AWWM"
|
|
79
86
|
},
|
|
80
87
|
"expiry": { "effectiveDeadlineIso": "2026-08-08T11:00:00.000Z", "minutesOfSlack": 55 }
|
|
81
88
|
}
|
|
82
89
|
```
|
|
83
90
|
|
|
91
|
+
本例即旗舰场景:一张 **$1,050.00** 的账单,用于购买 $1,000 的 OpenRouter 额度。
|
|
92
|
+
任何不超过 **$1,100** 的账单都可以这样支付。
|
|
93
|
+
|
|
84
94
|
**继续之前务必核对 `display.amount`。** 它通常大于账单金额 —— 因为它包含了跨桥费用和
|
|
85
95
|
网络费用。记下 `rozoPaymentId`;后面每一条命令都要用它。
|
|
86
96
|
|
|
@@ -103,22 +113,35 @@ node scripts/dist/create-order.js --url "$LINK" --chain 900 --token USDT --confi
|
|
|
103
113
|
"tokenSymbol": "USDT",
|
|
104
114
|
"receiverAddress": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
|
|
105
115
|
"receiverMemo": "rozo-901",
|
|
106
|
-
"amount": "
|
|
116
|
+
"amount": "1054.410000",
|
|
107
117
|
"payTo": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM"
|
|
108
118
|
}
|
|
109
119
|
}
|
|
110
120
|
```
|
|
111
121
|
|
|
112
|
-
|
|
113
|
-
的单位是聪 (satoshis)。
|
|
122
|
+
严格按这个信息块给出的字段来发送。对于 Lightning,`deposit.lnInvoice` 里是供扫码的
|
|
123
|
+
BOLT11 字符串,`deposit.amount` 的单位是聪 (satoshis)。
|
|
114
124
|
|
|
115
125
|
## 4. 付款
|
|
116
126
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
127
|
+
### 最简单的方式:用你自己的钱包
|
|
128
|
+
|
|
129
|
+
**无需私钥、无需环境变量、无需任何配置。** 打开任意一个钱包,严格按上面那个
|
|
130
|
+
`deposit` 信息块所写的去发送:
|
|
131
|
+
|
|
132
|
+
- `amount` 数量的 `tokenSymbol`,
|
|
133
|
+
- 在 `chain` 这条链上,
|
|
134
|
+
- 发往 `receiverAddress` —— 从 JSON 里复制,绝不要手打重输。
|
|
135
|
+
|
|
136
|
+
如果这个信息块里还有别的字段,比如 `receiverMemo`,就原样一并带上;在那条链上它属于
|
|
137
|
+
地址的一部分。对于 Lightning,改为扫码或粘贴 `deposit.lnInvoice`。
|
|
138
|
+
|
|
139
|
+
模式 A 到这里就全部结束了。直接跳到第 5 步。
|
|
140
|
+
|
|
141
|
+
### 可选的方式:让脚本替你付(模式 B)
|
|
120
142
|
|
|
121
|
-
|
|
143
|
+
只有当你想让这台机器替你签名时才需要,而且仅限 EVM 链与 Solana。这是唯一需要私钥的
|
|
144
|
+
部分:
|
|
122
145
|
|
|
123
146
|
```bash
|
|
124
147
|
# 预览将要签名的确切内容 —— 不会签任何名
|
|
@@ -131,7 +154,7 @@ ROZO_CHECKOUT_SOL_KEY=<base58 secret key> \
|
|
|
131
154
|
```
|
|
132
155
|
|
|
133
156
|
Ethereum、BNB Chain、Polygon 和 Base 用 `send-evm.js` 配合 `ROZO_CHECKOUT_EVM_KEY`。
|
|
134
|
-
|
|
157
|
+
单笔付款不得超过 **$1,100**;超过这个数就按上面的方式用你自己的钱包付。
|
|
135
158
|
|
|
136
159
|
```json
|
|
137
160
|
{
|
|
@@ -175,4 +198,4 @@ node scripts/dist/status.js --rozo-payment-id <rozoPaymentId> --watch --timeout
|
|
|
175
198
|
`rozoPaymentId` 和每一个交易 hash,找人来做对账。向一个一次性充值地址付第二笔款,
|
|
176
199
|
并不保证会被入账。
|
|
177
200
|
|
|
178
|
-
完整的错误码表在 [README.md](README.md),面向 agent 的指令在 [SKILL.md](SKILL.md)。
|
|
201
|
+
完整的错误码表在 [README.md](../README.md),面向 agent 的指令在 [SKILL.md](../SKILL.md)。
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
# rozo-checkout
|
|
2
|
+
|
|
3
|
+
[English](../README.md) | [简体中文](README.zh.md) | [日本語](README.ja.md) | **Español**
|
|
4
|
+
|
|
5
|
+
Pagar un **enlace de pago de Coinbase (Payment Link) de OpenRouter** con una
|
|
6
|
+
moneda que ese enlace no puede aceptar directamente: BTC por Lightning, o
|
|
7
|
+
USDT/USDC en Solana, BNB Chain, Ethereum, Polygon, Base o Stellar. Un enlace de
|
|
8
|
+
pago de Coinbase solo acepta USDC en Base; esto enruta la moneda que realmente
|
|
9
|
+
se posee a través de un puente, y una billetera fondeadora liquida la factura en
|
|
10
|
+
nombre del usuario. Sin cuenta, sin clave de API, sin navegador.
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npx @rozoai/checkout pay <coinbase-link>
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Primero pregunta con qué moneda se quiere pagar —al pegar la dirección de la
|
|
17
|
+
billetera en el prompt, marca cuáles se pueden pagar con el saldo disponible— y
|
|
18
|
+
luego imprime una dirección de depósito para pagar desde cualquier billetera
|
|
19
|
+
—**sin clave privada, sin variable de entorno, sin configuración**—. Después
|
|
20
|
+
espera hasta que la factura quede liquidada.
|
|
21
|
+
|
|
22
|
+
¿Ya se sabe qué moneda usar? Se puede omitir la pregunta:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npx @rozoai/checkout pay <coinbase-link> --with usdt-solana
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Monedas con las que se puede pagar
|
|
29
|
+
|
|
30
|
+
| Cadena | `--with` | Id de cadena | Notas |
|
|
31
|
+
|---|---|---|---|
|
|
32
|
+
| Ethereum | `usdt-ethereum` `usdc-ethereum` | `1` | 6 decimales |
|
|
33
|
+
| BNB Chain | `usdt-bnb` `usdc-bnb` | `56` | 18 decimales |
|
|
34
|
+
| Polygon | `usdt-polygon` `usdc-polygon` | `137` | 6 decimales |
|
|
35
|
+
| Base | `usdc-base` | `8453` | 6 decimales |
|
|
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 |
|
|
38
|
+
| Bitcoin Lightning | `btc-lightning` | `lightning` | BOLT11; importes en satoshis |
|
|
39
|
+
|
|
40
|
+
Las monedas de gas nativas (SOL, BNB, ETH, MATIC) y el BTC on-chain no se aceptan.
|
|
41
|
+
|
|
42
|
+
## Usarlo desde el agente
|
|
43
|
+
|
|
44
|
+
La carga útil es la misma en todas partes: el comando de una línea de arriba, o
|
|
45
|
+
apuntar al agente a [llms.txt](../llms.txt). **Pagar desde la propia billetera
|
|
46
|
+
nunca necesita una clave.** Solo la bandera opcional `--send` firma en local, y
|
|
47
|
+
solo esa bandera lee `ROZO_CHECKOUT_EVM_KEY` / `ROZO_CHECKOUT_SOL_KEY`. Los agentes y los scripts deben
|
|
48
|
+
pasar siempre `--with`: el selector solo aparece en una terminal y no hay moneda
|
|
49
|
+
por defecto de forma deliberada.
|
|
50
|
+
|
|
51
|
+
<details>
|
|
52
|
+
<summary><b>Claude Code</b> — instalar la habilidad, o pegar el comando de una línea</summary>
|
|
53
|
+
|
|
54
|
+
Este repositorio es una habilidad de Claude Code: incluye `SKILL.md` más los
|
|
55
|
+
ejecutables de `scripts/dist/`. Basta con clonarlo en el directorio de
|
|
56
|
+
habilidades y Claude Code lo detecta automáticamente.
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
git clone https://github.com/RozoAI/rozo-checkout-skill ~/.claude/skills/rozo-checkout
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
O saltarse la instalación y simplemente pedirle que ejecute:
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
Paga este enlace de OpenRouter con USDT en Solana:
|
|
66
|
+
npx @rozoai/checkout pay <coinbase-link> --with usdt-solana
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Billetera: cualquier billetera, **sin clave**. Añadir `--send` solo si se quiere
|
|
70
|
+
que Claude firme desde una billetera caliente, lo cual necesita la clave del entorno.
|
|
71
|
+
</details>
|
|
72
|
+
|
|
73
|
+
<details>
|
|
74
|
+
<summary><b>Codex CLI</b> — AGENTS.md, o ejecutarlo directamente</summary>
|
|
75
|
+
|
|
76
|
+
Codex lee `AGENTS.md` desde la raíz del proyecto. Conviene añadir una
|
|
77
|
+
instrucción permanente para que sepa cómo pagar sin que haya que explicárselo
|
|
78
|
+
cada vez:
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
Para pagar un enlace de pago de OpenRouter / Coinbase, ejecuta:
|
|
82
|
+
npx @rozoai/checkout pay <coinbase-link> --with usdt-solana
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Billetera: cualquier billetera, **sin clave**. `--send` sí necesita la clave del entorno.
|
|
86
|
+
</details>
|
|
87
|
+
|
|
88
|
+
<details>
|
|
89
|
+
<summary><b>OpenCode</b> — AGENTS.md, o ejecutarlo directamente</summary>
|
|
90
|
+
|
|
91
|
+
OpenCode también lee `AGENTS.md` desde la raíz del proyecto, así que el fragmento
|
|
92
|
+
de Codex de arriba funciona sin cambios. El camino más corto sigue siendo el
|
|
93
|
+
propio comando:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
npx @rozoai/checkout pay <coinbase-link> --with usdt-solana
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Billetera: cualquier billetera, **sin clave**. `--send` sí necesita la clave del entorno.
|
|
100
|
+
</details>
|
|
101
|
+
|
|
102
|
+
<details>
|
|
103
|
+
<summary><b>Cline</b> — .clinerules, o ejecutarlo directamente</summary>
|
|
104
|
+
|
|
105
|
+
Cline lee las instrucciones permanentes desde `.clinerules` en la raíz del proyecto:
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
Para pagar un enlace de pago de OpenRouter / Coinbase, ejecuta:
|
|
109
|
+
npx @rozoai/checkout pay <coinbase-link> --with usdt-solana
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Billetera: cualquier billetera, **sin clave**. `--send` sí necesita la clave del entorno.
|
|
113
|
+
</details>
|
|
114
|
+
|
|
115
|
+
<details>
|
|
116
|
+
<summary><b>Cursor</b> — .cursor/rules, o ejecutarlo directamente</summary>
|
|
117
|
+
|
|
118
|
+
Añadir una regla de proyecto en `.cursor/rules/rozo-checkout.mdc`:
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
Para pagar un enlace de pago de OpenRouter / Coinbase, ejecuta:
|
|
122
|
+
npx @rozoai/checkout pay <coinbase-link> --with usdt-solana
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Billetera: cualquier billetera, **sin clave**. `--send` sí necesita la clave del entorno.
|
|
126
|
+
</details>
|
|
127
|
+
|
|
128
|
+
<details>
|
|
129
|
+
<summary><b>Hermes Agent</b> — ejecutar el comando de una línea en una sesión</summary>
|
|
130
|
+
|
|
131
|
+
Hermes Agent (Nous Research) tiene acceso a la shell y su propio sistema de
|
|
132
|
+
habilidades. Se inicia con `hermes` y se le pide:
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
Descarga https://checkout.rozo.ai/llms.txt y luego paga este enlace de OpenRouter:
|
|
136
|
+
npx @rozoai/checkout pay <coinbase-link> --with usdt-solana
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Billetera: cualquier billetera, **sin clave**. `--send` sí necesita la clave del entorno.
|
|
140
|
+
</details>
|
|
141
|
+
|
|
142
|
+
<details>
|
|
143
|
+
<summary><b>OpenClaw</b> — openclaw agent exec</summary>
|
|
144
|
+
|
|
145
|
+
El punto de entrada headless de OpenClaw ejecuta una tarea puntual, lo que encaja
|
|
146
|
+
con un pago que se dispara desde un script o desde un canal de chat:
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
openclaw agent exec "Pay this OpenRouter link with USDT on Solana by running: npx @rozoai/checkout pay <coinbase-link> --with usdt-solana"
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Billetera: cualquier billetera, **sin clave**. `--send` sí necesita la clave del entorno.
|
|
153
|
+
</details>
|
|
154
|
+
|
|
155
|
+
<details>
|
|
156
|
+
<summary><b>Pi</b> — ejecutar el comando de una línea en una sesión</summary>
|
|
157
|
+
|
|
158
|
+
Pi es un agente de terminal BYOK cuyas herramientas integradas incluyen `bash`,
|
|
159
|
+
así que puede ejecutar el comando directamente. Se inicia con `pi` y se le pide:
|
|
160
|
+
|
|
161
|
+
```
|
|
162
|
+
Paga este enlace de OpenRouter con USDT en Solana ejecutando:
|
|
163
|
+
npx @rozoai/checkout pay <coinbase-link> --with usdt-solana
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Billetera: cualquier billetera, **sin clave**. `--send` sí necesita la clave del entorno.
|
|
167
|
+
</details>
|
|
168
|
+
|
|
169
|
+
<details>
|
|
170
|
+
<summary><b>Terminal — sin ningún agente</b> — ejecutar los scripts paso a paso</summary>
|
|
171
|
+
|
|
172
|
+
Conducir cada paso a mano. Los paquetes son autocontenidos; no hay nada que
|
|
173
|
+
instalar más allá de Node 18+.
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
git clone https://github.com/RozoAI/rozo-checkout-skill && cd rozo-checkout-skill
|
|
177
|
+
LINK="https://payments.coinbase.com/payment-links/pl_01YOURLINKID"
|
|
178
|
+
|
|
179
|
+
# Cotización de solo lectura, no cuesta nada
|
|
180
|
+
node scripts/dist/quote.js --url "$LINK"
|
|
181
|
+
|
|
182
|
+
# Crear la orden. Aquí se RETIENE la dirección de depósito completa; primero se
|
|
183
|
+
# obtiene un resumen enmascarado para revisar.
|
|
184
|
+
node scripts/dist/create-order.js --url "$LINK" --chain 900 --token USDT
|
|
185
|
+
|
|
186
|
+
# Una vez decidido el pago, volver a ejecutar con --confirm para liberarla
|
|
187
|
+
node scripts/dist/create-order.js --url "$LINK" --chain 900 --token USDT --confirm
|
|
188
|
+
|
|
189
|
+
# Pagar el bloque de depósito desde cualquier billetera y observar la liquidación
|
|
190
|
+
node scripts/dist/status.js --rozo-payment-id <uuid> --watch
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Cada script imprime exactamente un objeto JSON en stdout. Código de salida `0`
|
|
194
|
+
éxito, `1` rechazado/fallido (leer `error.code`), `2` uso incorrecto, `3` enviado
|
|
195
|
+
pero sin confirmar. Recorrido completo: [QUICKSTART](QUICKSTART.es.md).
|
|
196
|
+
|
|
197
|
+
Billetera: cualquier billetera, **sin clave**. Para el envío desde billetera
|
|
198
|
+
caliente, ver `send-evm.js` / `send-sol.js`, que leen `ROZO_CHECKOUT_EVM_KEY` /
|
|
199
|
+
`ROZO_CHECKOUT_SOL_KEY`.
|
|
200
|
+
</details>
|
|
201
|
+
|
|
202
|
+
<details>
|
|
203
|
+
<summary><b>Cualquier otro agente</b> — apuntarlo a llms.txt</summary>
|
|
204
|
+
|
|
205
|
+
Cualquier agente capaz de descargar una URL y ejecutar un comando puede hacer esto:
|
|
206
|
+
|
|
207
|
+
```
|
|
208
|
+
Descarga https://checkout.rozo.ai/llms.txt a tu contexto y úsalo
|
|
209
|
+
para pagar este enlace de OpenRouter: <coinbase-link>
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
Si el agente no tiene shell pero puede hacer peticiones HTTP, puede manejar
|
|
213
|
+
directamente los cuatro endpoints públicos — ver [cómo funciona](how-it-works.md).
|
|
214
|
+
|
|
215
|
+
Billetera: cualquier billetera, **sin clave**. `--send` sí necesita la clave del entorno.
|
|
216
|
+
</details>
|
|
217
|
+
|
|
218
|
+
## Tres reglas que conviene conocer
|
|
219
|
+
|
|
220
|
+
- **La dirección de depósito es de un solo uso.** Nunca reutilizar una de una
|
|
221
|
+
orden anterior, de una respuesta cacheada o de una captura de pantalla.
|
|
222
|
+
- **Enviar exactamente el importe mostrado.** Normalmente es mayor que la
|
|
223
|
+
factura: incluye las comisiones del puente y de la red.
|
|
224
|
+
- **Nunca pagar dos veces una orden ya fondeada.** Si ya se ha detectado un
|
|
225
|
+
pago, detenerse y pedir a una persona que lo concilie; un segundo pago a una
|
|
226
|
+
dirección de un solo uso no tiene garantía de ser acreditado.
|
|
227
|
+
|
|
228
|
+
La lista completa de lo que esta herramienta se niega a hacer, y por qué, está en
|
|
229
|
+
[docs/safety.md](safety.md).
|
|
230
|
+
|
|
231
|
+
## Enlaces
|
|
232
|
+
|
|
233
|
+
- [Inicio rápido](QUICKSTART.es.md) — los cinco comandos, con la salida esperada
|
|
234
|
+
- [Cómo funciona](how-it-works.md) — el flujo, los endpoints, los identificadores
|
|
235
|
+
- [Diseño de seguridad](safety.md) — cada salvaguarda, en detalle
|
|
236
|
+
- [SKILL.md](../SKILL.md) — instrucciones dirigidas al agente · [llms.txt](../llms.txt) — resumen en un solo archivo
|
|
237
|
+
- [checkout.rozo.ai/agent](https://checkout.rozo.ai/agent.html) — lo mismo, en la web
|
|
238
|
+
- [Issues](https://github.com/RozoAI/rozo-checkout-skill/issues) — errores y solicitudes
|
|
239
|
+
|
|
240
|
+
## Registro de cambios
|
|
241
|
+
|
|
242
|
+
- **0.1.1** — un solo límite de gasto en lugar de dos: un pago individual no
|
|
243
|
+
puede superar los $1,100 (dimensionado para una compra de crédito de $1,000
|
|
244
|
+
más su comisión del 5%); se eliminan el tope acumulado por sesión y la bandera
|
|
245
|
+
`--yes-large`. La documentación deja explícito que pagar desde la propia
|
|
246
|
+
billetera no necesita clave ni configuración.
|
|
247
|
+
- **0.1.0** — primera versión: `npx @rozoai/checkout`.
|
|
248
|
+
|
|
249
|
+
## Licencia
|
|
250
|
+
|
|
251
|
+
MIT.
|