remitmd 0.2.5 → 0.3.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1d8076d587f455a8a8f5bd4e80dc542a14cd11226bda0784c9816b45710f526c
4
- data.tar.gz: '005762609902918f053fa2ce4c6b387f6e9af441770c212c9eb913d083113bf8'
3
+ metadata.gz: 7a4fe50ca322390d98424e60dd8ecd9fb1fbd27ffd8264e5d4167e1d2d249212
4
+ data.tar.gz: 68079923cac8357d6560432bb31a26217296d1de44f2134e8934cd233822a03d
5
5
  SHA512:
6
- metadata.gz: 939eea68d169df0628da6639dccb8f3e99961c7c12790f28c26c79e95933f1a93e8543034402eef3360a0f0697fa8346ef5409ac51b50d6801a6943faed94db4
7
- data.tar.gz: bb7e3e396f9db6a9d8b03ea1cd8d01af21bf21d4682072212fbd0de7ef23250beb0659b1a5d20c97416a7fe7703a03f4ac0567db4bbbbbecf2f760de64541d58
6
+ metadata.gz: 50e790537a39130346e2436e1c90b90cc1ca7e7aafe8bf4ba46cde03da31040f4126ba17c5d8e995edd2da2ba4be6d540771a13cb9aeb0f5093554d266bb3794
7
+ data.tar.gz: 8e62c3cfe6c96ea2ccd2dc0cabbefe03bd96602807c916667b87db668c14ccb442fdaabb61c4589177dad5cda3a25f98789a168015b8ca34d47c88f54a35a7f9
data/lib/remitmd/http.rb CHANGED
@@ -38,6 +38,10 @@ module Remitmd
38
38
  request(:post, path, body)
39
39
  end
40
40
 
41
+ def delete(path)
42
+ request(:delete, path, nil)
43
+ end
44
+
41
45
  private
42
46
 
43
47
  def request(method, path, body)
@@ -65,8 +69,9 @@ module Remitmd
65
69
  def build_request(method, path, body, idempotency_key = nil)
66
70
  full_path = "#{@uri.path}#{path}"
67
71
  req = case method
68
- when :get then Net::HTTP::Get.new(full_path)
69
- when :post then Net::HTTP::Post.new(full_path)
72
+ when :get then Net::HTTP::Get.new(full_path)
73
+ when :post then Net::HTTP::Post.new(full_path)
74
+ when :delete then Net::HTTP::Delete.new(full_path)
70
75
  end
71
76
 
72
77
  # Generate 32-byte random nonce and Unix timestamp.
data/lib/remitmd/mock.rb CHANGED
@@ -130,6 +130,10 @@ module Remitmd
130
130
  dispatch("POST", path, body)
131
131
  end
132
132
 
133
+ def delete(path)
134
+ dispatch("DELETE", path, nil)
135
+ end
136
+
133
137
  private
134
138
 
135
139
  def dispatch(method, path, body)
@@ -537,6 +537,39 @@ module Remitmd
537
537
  Webhook.new(@transport.post("/webhooks", body))
538
538
  end
539
539
 
540
+ # List all registered webhooks for this wallet.
541
+ def list_webhooks
542
+ @transport.get("/webhooks").map { |w| Webhook.new(w) }
543
+ end
544
+
545
+ # Delete a webhook by ID.
546
+ def delete_webhook(webhook_id)
547
+ @transport.delete("/webhooks/#{webhook_id}")
548
+ nil
549
+ end
550
+
551
+ # ─── Canonical name aliases ──────────────────────────────────────────────
552
+
553
+ # Canonical name for create_tab.
554
+ def open_tab(provider, limit_amount, per_unit = 0.0, expires_in_secs: 86_400, permit: nil)
555
+ create_tab(provider, limit_amount, per_unit, expires_in_secs: expires_in_secs, permit: permit)
556
+ end
557
+
558
+ # Canonical name for create_stream.
559
+ def open_stream(payee, rate_per_second, max_total, permit: nil)
560
+ create_stream(payee, rate_per_second, max_total, permit: permit)
561
+ end
562
+
563
+ # Canonical name for create_bounty.
564
+ def post_bounty(amount, task_description, deadline, max_attempts: 10, permit: nil)
565
+ create_bounty(amount, task_description, deadline, max_attempts: max_attempts, permit: permit)
566
+ end
567
+
568
+ # Alias for propose_intent.
569
+ def express_intent(to, amount, type: "direct")
570
+ propose_intent(to, amount, type: type)
571
+ end
572
+
540
573
  # ─── One-time operator links ───────────────────────────────────────────────
541
574
 
542
575
  # Generate a one-time URL for the operator to fund this wallet.
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.2.5"
29
+ VERSION = "0.3.0"
30
30
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remitmd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - remit.md