coloredcoins 0.0.4 → 0.0.5
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 +4 -0
- data/Gemfile +1 -1
- data/lib/coloredcoins/api.rb +5 -0
- data/lib/coloredcoins/version.rb +1 -1
- data/spec/coloredcoins/api_spec.rb +11 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3f9f320d62b619f4380823e7ed1da7696728ec2
|
4
|
+
data.tar.gz: bee587696feed4f1c7ae29e64690aee5656943ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9842997cdaf54e317c136c3b32214703b5d6cfc13253e8f4ee457a0a49b92a61d5d880019a80fb5dc07b7654ffd0c4a502a0531fefb2842dbf6983646ec48500
|
7
|
+
data.tar.gz: bb48333e53ffa66f0babc2e66730201b76ff9abf948ba6858c11da93edb3268361a560823e361d77e2b9efebca76063d9a058c408c8a812cd779cfe764417b25
|
data/.rubocop.yml
CHANGED
data/Gemfile
CHANGED
data/lib/coloredcoins/api.rb
CHANGED
@@ -34,6 +34,11 @@ module Coloredcoins
|
|
34
34
|
@connection.post('/sendasset', asset)
|
35
35
|
end
|
36
36
|
|
37
|
+
# http://coloredcoins.org/documentation/#BurnAsset
|
38
|
+
def burn_asset(args)
|
39
|
+
@connection.post('/burnasset', args)
|
40
|
+
end
|
41
|
+
|
37
42
|
# http://coloredcoins.org/documentation/#BroadcastTransaction
|
38
43
|
def broadcast(tx_hex)
|
39
44
|
@connection.post('/broadcast', txHex: tx_hex)
|
data/lib/coloredcoins/version.rb
CHANGED
@@ -68,6 +68,17 @@ describe Coloredcoins::API do
|
|
68
68
|
end
|
69
69
|
end
|
70
70
|
|
71
|
+
describe '#burn_asset' do
|
72
|
+
it 'should call connection' do
|
73
|
+
args = {
|
74
|
+
from: ['blah'],
|
75
|
+
burn: [{ assetId: 'blah', amount: 1 }]
|
76
|
+
}
|
77
|
+
subject.burn_asset(args)
|
78
|
+
expect(subject.connection).to have_received(:post).with(/burnasset/, args)
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
71
82
|
describe '#asset_metadata' do
|
72
83
|
it 'should call connection' do
|
73
84
|
subject.asset_metadata('asset_id', 'utxo:1')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coloredcoins
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Genaro Madrid
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-03-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|