zold 0.18.2 → 0.18.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.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/lib/zold/node/front.rb +4 -0
- data/lib/zold/txn.rb +12 -0
- data/lib/zold/version.rb +1 -1
- data/test/node/test_front.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 698a768b9b3f876914ba5ebdc8138b4efb44b935a7e4919570ef1c6a77acd07a
|
|
4
|
+
data.tar.gz: a8e8bf6f982a0f94f9e4fda31e688614eb7a6621114f97b2aacfbaf8f5037e08
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 34bfc8d3fbf0d6d5bf4f42c8c23522d50bdaaa7a4b274a212906fb3acf96d0f194bd40330c4bc72c53a9af5c36cbc637c0f4d7d92058f2d26655fe3151d68f3b
|
|
7
|
+
data.tar.gz: 700621299bcb866e6a98f89a3c777077616fd7cd9b27a94cbee87581249406c1aa8a41443d68bf1e595384163b2c9bc3311626a8d8bfc7d78dbe12f5ba53b7a9
|
data/.rubocop.yml
CHANGED
data/lib/zold/node/front.rb
CHANGED
|
@@ -307,6 +307,10 @@ from #{request.ip} in #{Age.new(@start, limit: 1)}")
|
|
|
307
307
|
fetch(&:mnemo)
|
|
308
308
|
end
|
|
309
309
|
|
|
310
|
+
get %r{/wallet/(?<id>[A-Fa-f0-9]{16})/txns.json} do
|
|
311
|
+
fetch { |w| w.txns.map(&:to_json) }
|
|
312
|
+
end
|
|
313
|
+
|
|
310
314
|
get %r{/wallet/(?<id>[A-Fa-f0-9]{16})\.txt} do
|
|
311
315
|
fetch do |wallet|
|
|
312
316
|
[
|
data/lib/zold/txn.rb
CHANGED
|
@@ -94,6 +94,18 @@ module Zold
|
|
|
94
94
|
].join(';')
|
|
95
95
|
end
|
|
96
96
|
|
|
97
|
+
def to_json
|
|
98
|
+
{
|
|
99
|
+
id: @id,
|
|
100
|
+
date: @date.utc.iso8601,
|
|
101
|
+
amount: @amount.to_i,
|
|
102
|
+
prefix: @prefix,
|
|
103
|
+
bfn: @bnf,
|
|
104
|
+
details: @details,
|
|
105
|
+
sign: @sign
|
|
106
|
+
}
|
|
107
|
+
end
|
|
108
|
+
|
|
97
109
|
def to_text
|
|
98
110
|
start = @amount.negative? ? "##{@id}" : '-'
|
|
99
111
|
"#{start} #{@date.utc.iso8601} #{@amount} #{@bnf} #{@details}"
|
data/lib/zold/version.rb
CHANGED
data/test/node/test_front.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zold
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.18.
|
|
4
|
+
version: 0.18.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yegor Bugayenko
|
|
@@ -703,7 +703,7 @@ licenses:
|
|
|
703
703
|
- MIT
|
|
704
704
|
metadata: {}
|
|
705
705
|
post_install_message: |-
|
|
706
|
-
Thanks for installing Zold 0.18.
|
|
706
|
+
Thanks for installing Zold 0.18.3!
|
|
707
707
|
Study our White Paper: https://papers.zold.io/wp.pdf
|
|
708
708
|
Read our blog posts: https://blog.zold.io
|
|
709
709
|
Try online wallet at: https://wts.zold.io
|