remitmd 0.4.0 → 0.4.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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -288
  3. data/lib/remitmd.rb +1 -1
  4. metadata +12 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e8ea560fba297ec6f5d69e5f9a0aedd35c832d075f95ffa899dea1dd73455b92
4
- data.tar.gz: cb0a69a1c200337866fb204ffd8419a805c815d0d6980770fde356cca3c234b7
3
+ metadata.gz: fb629574b0068a996c2afc9beec3bf0c28a4d3838e674cdf5a9841a66b3de091
4
+ data.tar.gz: 25446d1826566c5606f80845dab3263b5bf5936ce2b4d123b317b6f9162d845c
5
5
  SHA512:
6
- metadata.gz: a1bd3b20c90b07ad619d8d429afab47a906102b77d29d15620eedee158bb55f7f02512072f096ce9c55412f14695901a590122f3c9e043eab957303dfaf98d49
7
- data.tar.gz: 76fcf0164b8b325bd6f1509caad8fa0fac0eae613723f0c8e8839c69d2d78ea6fb87859680f7d88126b7f49a95ee20fb3305721513e034498032c4ccef9bd223
6
+ metadata.gz: 45bb3ff15f9966ca2b424e9ebe91b7a368328ef5dceb4cd6eb3fb4e3b0991e20622d5dba55b1983b3dd0bd7f2978d4d6922f22b9dabefdace06bbdb4331ce6b4
7
+ data.tar.gz: 44bd1e9d31c038f5a5e5fad6a65be2194d3004a7222391f0ace4472799a05e96e25c3cf25986be160dce7c423579605b04306248636c128d359ec8b404911f50
data/README.md CHANGED
@@ -1,290 +1,8 @@
1
- # remit.md Ruby SDK
1
+ # remitmd (Ruby) — DEPRECATED
2
2
 
3
- > [Skill MD](https://remit.md) · [Docs](https://remit.md/docs) · [Agent Spec](https://remit.md/agent.md)
3
+ > **This gem has been deprecated.** Use the [pay CLI](https://pay-skill.com/docs/cli) or [pay SDKs](https://pay-skill.com/docs) instead.
4
4
 
5
- Universal payment protocol for AI agents - Ruby client library.
6
-
7
- [![CI](https://github.com/remit-md/sdk/actions/workflows/ci.yml/badge.svg)](https://github.com/remit-md/sdk/actions/workflows/ci.yml)
8
- [![Gem Version](https://badge.fury.io/rb/remitmd.svg)](https://badge.fury.io/rb/remitmd)
9
-
10
- ## Installation
11
-
12
- ```ruby
13
- gem "remitmd"
14
- ```
15
-
16
- or install directly:
17
-
18
- ```bash
19
- gem install remitmd
20
- ```
21
-
22
- ## Quickstart
23
-
24
- ```ruby
25
- require "remitmd"
26
-
27
- wallet = Remitmd::RemitWallet.new(private_key: ENV["REMITMD_KEY"])
28
-
29
- # Direct payment
30
- tx = wallet.pay("0xRecipient0000000000000000000000000000001", 1.50)
31
- puts tx.tx_hash
32
-
33
- # Check reputation
34
- rep = wallet.reputation("0xSomeAgent000000000000000000000000001")
35
- puts "Score: #{rep.score}"
36
- ```
37
-
38
- Or from environment variables:
39
-
40
- ```ruby
41
- wallet = Remitmd::RemitWallet.from_env
42
- # Auto-detects: CliSigner (remit CLI) > REMITMD_KEY
43
- # Optional: REMITMD_CHAIN (default: "base"), REMITMD_API_URL
44
- ```
45
-
46
- Permits are auto-signed. Every payment method calls the server's `/permits/prepare` endpoint, signs the hash, and includes the permit automatically.
47
-
48
- ## CLI Signer (Recommended)
49
-
50
- The CLI signer delegates key management to the `remit` CLI binary, which holds your encrypted keystore at `~/.remit/keys/`. No private key in your environment -- just install the CLI and set a password.
51
-
52
- ```bash
53
- # Install the CLI
54
- # macOS: brew install remit-md/tap/remit
55
- # Windows: winget install remit-md.remit
56
- # Linux: curl -fsSL https://remit.md/install.sh | sh
57
-
58
- export REMIT_SIGNER_KEY=your-keystore-password
59
- ```
60
-
61
- ```ruby
62
- # Explicit
63
- signer = Remitmd::CliSigner.new
64
- wallet = Remitmd::RemitWallet.new(signer: signer)
65
-
66
- # Or auto-detect from env (recommended)
67
- wallet = Remitmd::RemitWallet.from_env # detects remit CLI automatically
68
- ```
69
-
70
- `RemitWallet.from_env` detects signing methods automatically. Priority: `CliSigner` (CLI + keystore + password) > `REMITMD_KEY`.
71
-
72
- ## Payment Models
73
-
74
- ### Direct Payment
75
-
76
- ```ruby
77
- tx = wallet.pay("0xRecipient...", 5.00, memo: "AI inference fee")
78
- ```
79
-
80
- ### Escrow
81
-
82
- ```ruby
83
- escrow = wallet.create_escrow("0xContractor...", 100.00, memo: "Code review")
84
- # Work happens...
85
- tx = wallet.release_escrow(escrow.id) # pay the contractor
86
- # or
87
- tx = wallet.cancel_escrow(escrow.id) # refund yourself
88
- ```
89
-
90
- ### Metered Tab (off-chain billing)
91
-
92
- ```ruby
93
- tab = wallet.create_tab("0xProvider...", 50.00, 0.003)
94
-
95
- # Provider charges with EIP-712 signature
96
- contracts = wallet.get_contracts
97
- sig = wallet.sign_tab_charge(contracts.tab, tab.id, 3_000_000, 1)
98
- wallet.charge_tab(tab.id, 0.003, 0.003, 1, sig)
99
-
100
- # Close when done - unused funds return
101
- wallet.close_tab(tab.id)
102
- ```
103
-
104
- ### Payment Stream
105
-
106
- ```ruby
107
- stream = wallet.create_stream("0xWorker...", 0.001, 100.00)
108
- # Worker receives 0.001 USDC/second, funded with 100 USDC deposit
109
-
110
- tx = wallet.withdraw_stream(stream.id)
111
- ```
112
-
113
- ### Bounty
114
-
115
- ```ruby
116
- bounty = wallet.create_bounty(25.00, "Summarise top 10 EIPs of 2025")
117
-
118
- # Any agent can submit work; you decide the winner
119
- tx = wallet.award_bounty(bounty.id, "0xWinner...")
120
- ```
121
-
122
- ### Security Deposit
123
-
124
- ```ruby
125
- dep = wallet.place_deposit("0xCounterpart...", 100.00, expires_in_secs: 86_400)
126
- wallet.return_deposit(dep.id)
127
- ```
128
-
129
- ### Payment Intent
130
-
131
- ```ruby
132
- # Propose payment terms before committing
133
- intent = wallet.propose_intent("0xCounterpart...", 50.00, type: "escrow")
134
- ```
135
-
136
- ## Testing with MockRemit
137
-
138
- MockRemit gives you a zero-network, zero-latency test double. No API key needed.
139
-
140
- ```ruby
141
- require "remitmd"
142
-
143
- RSpec.describe MyPayingAgent do
144
- let(:mock) { Remitmd::MockRemit.new }
145
- let(:wallet) { mock.wallet }
146
-
147
- after { mock.reset }
148
-
149
- it "pays the correct amount" do
150
- agent = MyPayingAgent.new(wallet: wallet)
151
- agent.run(task: "summarise document")
152
-
153
- expect(mock.was_paid?("0xProvider...", 0.003)).to be true
154
- expect(mock.balance).to eq(BigDecimal("9999.997"))
155
- end
156
- end
157
- ```
158
-
159
- ### MockRemit assertions
160
-
161
- ```ruby
162
- mock.was_paid?(address, amount) # true/false
163
- mock.total_paid_to(address) # BigDecimal - sum of all payments to address
164
- mock.transaction_count # Integer
165
- mock.balance # BigDecimal - current balance
166
- mock.transactions # Array<Transaction>
167
- mock.set_balance(amount) # Override starting balance
168
- mock.reset # Clear all state
169
- ```
170
-
171
- ## All Methods
172
-
173
- ```ruby
174
- # Contract discovery (cached per session)
175
- wallet.get_contracts # Hash
176
-
177
- # Balance & analytics
178
- wallet.balance # Balance
179
- wallet.history(limit: 50, offset: 0) # TransactionList
180
- wallet.reputation(address) # Reputation
181
- wallet.spending_summary # SpendingSummary
182
- wallet.remaining_budget # Budget
183
-
184
- # Direct payment
185
- wallet.pay(to, amount, memo: nil, permit: nil) # Transaction
186
-
187
- # Escrow
188
- wallet.create_escrow(payee, amount, memo: nil, expires_in_secs: nil, permit: nil) # Escrow
189
- wallet.claim_start(escrow_id) # Escrow
190
- wallet.release_escrow(escrow_id, memo: nil) # Transaction
191
- wallet.cancel_escrow(escrow_id) # Transaction
192
- wallet.get_escrow(escrow_id) # Escrow
193
-
194
- # Tabs
195
- wallet.create_tab(provider, limit, per_unit, expires_in_secs: 86_400, permit: nil) # Tab
196
- wallet.charge_tab(tab_id, amount, cumulative, call_count, provider_sig) # TabCharge
197
- wallet.close_tab(tab_id, final_amount: nil, provider_sig: nil) # Tab
198
-
199
- # Tab provider (signing charges)
200
- wallet.sign_tab_charge(tab_contract, tab_id, total_charged, call_count) # String
201
-
202
- # EIP-2612 Permit (auto-signed when omitted from payment methods)
203
- wallet.sign_permit(flow, amount) # PermitSignature
204
-
205
- # Streams
206
- wallet.create_stream(payee, rate_per_second, max_total, permit: nil) # Stream
207
- wallet.close_stream(stream_id) # Stream
208
- wallet.withdraw_stream(stream_id) # Transaction
209
-
210
- # Bounties
211
- wallet.create_bounty(amount, task, deadline, max_attempts: 10, permit: nil) # Bounty
212
- wallet.submit_bounty(bounty_id, evidence_hash) # BountySubmission
213
- wallet.award_bounty(bounty_id, submission_id) # Bounty
214
-
215
- # Deposits
216
- wallet.place_deposit(provider, amount, expires_in_secs: 3600, permit: nil) # Deposit
217
- wallet.return_deposit(deposit_id) # Transaction
218
-
219
- # Webhooks
220
- wallet.register_webhook(url, events, chains: nil) # Webhook
221
-
222
- # Operator links (optional: messages: [], agent_name: "")
223
- wallet.create_fund_link # LinkResponse
224
- wallet.create_withdraw_link(messages: ["Withdraw"], agent_name: "my-agent") # LinkResponse
225
-
226
- # Testnet
227
- wallet.mint(amount) # Hash {tx_hash, balance}
228
- ```
229
-
230
- ## Error Handling
231
-
232
- All errors are `Remitmd::RemitError` with structured fields and enriched details:
233
-
234
- ```ruby
235
- begin
236
- wallet.pay("0xRecipient...", 100.00)
237
- rescue Remitmd::RemitError => e
238
- puts e.code # "INSUFFICIENT_BALANCE"
239
- puts e.message # "Insufficient USDC balance: have $5.00, need $100.00"
240
- puts e.doc_url # Direct link to error documentation
241
- puts e.context # Hash: {"required" => "100.00", "available" => "5.00", ...}
242
- end
243
- ```
244
-
245
- ## Custom Signer
246
-
247
- Implement `Remitmd::Signer` for HSM, KMS, or multi-sig workflows:
248
-
249
- ```ruby
250
- class MyHsmSigner
251
- include Remitmd::Signer
252
-
253
- def sign(message)
254
- # Delegate to your HSM
255
- MyHsm.sign(message)
256
- end
257
-
258
- def address
259
- "0xYourAddress..."
260
- end
261
- end
262
-
263
- wallet = Remitmd::RemitWallet.new(signer: MyHsmSigner.new)
264
- ```
265
-
266
- ## Chains
267
-
268
- ```ruby
269
- Remitmd::RemitWallet.new(private_key: key, chain: "base") # Base mainnet (default)
270
- Remitmd::RemitWallet.new(private_key: key, chain: "base_sepolia") # Base Sepolia testnet
271
- ```
272
-
273
- ## Advanced
274
-
275
- ### Manual Permit Signing
276
-
277
- Permits are auto-signed by default via the server's `/permits/prepare` endpoint. If you need manual control (pre-signed permits, multi-step workflows), pass a `PermitSignature` explicitly:
278
-
279
- ```ruby
280
- permit = wallet.sign_permit("direct", 5.00)
281
- tx = wallet.pay("0xRecipient...", 5.00, permit: permit)
282
- ```
283
-
284
- Supported flows: `"direct"`, `"escrow"`, `"tab"`, `"stream"`, `"bounty"`, `"deposit"`.
285
-
286
- ## License
287
-
288
- MIT - see [LICENSE](LICENSE)
289
-
290
- [Documentation](https://remit.md/docs) · [Protocol Spec](https://remit.md) · [GitHub](https://github.com/remit-md/sdk)
5
+ - **CLI:** `cargo install pay-cli` [pay-skill.com/docs/cli](https://pay-skill.com/docs/cli)
6
+ - **Python SDK:** `pip install pay-sdk` — [pay-skill.com/docs/sdk/python](https://pay-skill.com/docs/sdk/python)
7
+ - **TypeScript SDK:** `npm install @pay-skill/sdk` — [pay-skill.com/docs/sdk/typescript](https://pay-skill.com/docs/sdk/typescript)
8
+ - **Source:** [github.com/remit-md/pay-sdk](https://github.com/remit-md/pay-sdk)
data/lib/remitmd.rb CHANGED
@@ -26,5 +26,5 @@ require_relative "remitmd/x402_paywall"
26
26
  # mock.was_paid?("0x0000000000000000000000000000000000000001", 1.00) # => true
27
27
  #
28
28
  module Remitmd
29
- VERSION = "0.4.0"
29
+ VERSION = "0.4.1"
30
30
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remitmd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - remit.md
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-03-29 00:00:00.000000000 Z
11
+ date: 2026-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -38,9 +38,9 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.60'
41
- description: Send and receive USDC via the remit.md protocol. Supports direct payments,
42
- escrow, metered tabs, payment streams, bounties, and security deposits. Includes
43
- MockRemit for zero-network testing.
41
+ description: 'DEPRECATED: This gem is no longer maintained. Use pay-cli (cargo install
42
+ pay-cli) or pay SDKs (pip install pay-sdk / npm install @pay-skill/sdk). See https://pay-skill.com/docs
43
+ for migration.'
44
44
  email:
45
45
  - hello@remit.md
46
46
  executables: []
@@ -61,14 +61,15 @@ files:
61
61
  - lib/remitmd/wallet.rb
62
62
  - lib/remitmd/x402_client.rb
63
63
  - lib/remitmd/x402_paywall.rb
64
- homepage: https://remit.md
64
+ homepage: https://pay-skill.com
65
65
  licenses:
66
66
  - MIT
67
67
  metadata:
68
- homepage_uri: https://remit.md
69
- source_code_uri: https://github.com/remit-md/sdk
70
- changelog_uri: https://github.com/remit-md/sdk/releases
71
- post_install_message:
68
+ homepage_uri: https://pay-skill.com
69
+ source_code_uri: https://github.com/remit-md/pay-sdk
70
+ changelog_uri: https://github.com/remit-md/pay-sdk/releases
71
+ post_install_message: 'WARNING: remitmd is deprecated. Use pay-cli or pay SDKs instead.
72
+ See https://pay-skill.com/docs'
72
73
  rdoc_options: []
73
74
  require_paths:
74
75
  - lib
@@ -86,5 +87,5 @@ requirements: []
86
87
  rubygems_version: 3.4.19
87
88
  signing_key:
88
89
  specification_version: 4
89
- summary: remit.md universal payment protocol SDK for AI agents
90
+ summary: 'DEPRECATED: Use pay-cli or pay SDKs instead. See https://pay-skill.com/docs'
90
91
  test_files: []