nem-ruby 0.0.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.
- checksums.yaml +7 -0
- data/.gitignore +12 -0
- data/.rspec +2 -0
- data/.rubocop.yml +119 -0
- data/.travis.yml +23 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +6 -0
- data/README.md +81 -0
- data/Rakefile +6 -0
- data/examples/apostille_audit.rb +22 -0
- data/examples/apostille_create.rb +31 -0
- data/examples/endpoint/account.rb +73 -0
- data/examples/endpoint/account_local.rb +21 -0
- data/examples/endpoint/block.rb +14 -0
- data/examples/endpoint/chain.rb +15 -0
- data/examples/endpoint/debug.rb +17 -0
- data/examples/endpoint/local.rb +17 -0
- data/examples/endpoint/mosaic.rb +9 -0
- data/examples/endpoint/namespace.rb +13 -0
- data/examples/endpoint/node.rb +24 -0
- data/examples/endpoint/timesync.rb +9 -0
- data/examples/endpoint/transaction.rb +42 -0
- data/examples/localnode.rb +0 -0
- data/examples/nis.rb +34 -0
- data/examples/node_pool.rb +23 -0
- data/examples/transaction/importance_transfer.rb +23 -0
- data/examples/transaction/mosaic_definition_creation.rb +52 -0
- data/examples/transaction/mosaic_supply_change.rb +25 -0
- data/examples/transaction/multisig_add_cosignatory.rb +31 -0
- data/examples/transaction/multisig_aggregate_modification.rb +29 -0
- data/examples/transaction/multisig_signature.rb +41 -0
- data/examples/transaction/multisig_transfer.rb +35 -0
- data/examples/transaction/provision_namespace.rb +20 -0
- data/examples/transaction/transfer.rb +32 -0
- data/examples/transaction/transfer_mosaic.rb +72 -0
- data/examples/transaction/transfer_with_encrypted_message.rb +40 -0
- data/examples/transaction/transfer_with_local.rb +34 -0
- data/lib/nem.rb +21 -0
- data/lib/nem/apostille.rb +104 -0
- data/lib/nem/apostille_audit.rb +47 -0
- data/lib/nem/client.rb +170 -0
- data/lib/nem/configuration.rb +29 -0
- data/lib/nem/endpoint.rb +4 -0
- data/lib/nem/endpoint/account.rb +264 -0
- data/lib/nem/endpoint/base.rb +45 -0
- data/lib/nem/endpoint/block.rb +15 -0
- data/lib/nem/endpoint/chain.rb +17 -0
- data/lib/nem/endpoint/debug.rb +54 -0
- data/lib/nem/endpoint/local/account.rb +54 -0
- data/lib/nem/endpoint/local/chain.rb +15 -0
- data/lib/nem/endpoint/mosaic.rb +13 -0
- data/lib/nem/endpoint/namespace.rb +37 -0
- data/lib/nem/endpoint/node.rb +83 -0
- data/lib/nem/endpoint/timesync.rb +9 -0
- data/lib/nem/endpoint/transaction.rb +34 -0
- data/lib/nem/error.rb +6 -0
- data/lib/nem/fee.rb +2 -0
- data/lib/nem/fee/importance_transfer.rb +24 -0
- data/lib/nem/fee/mosaic_definition_creation.rb +24 -0
- data/lib/nem/fee/mosaic_supply_change_transfer.rb +24 -0
- data/lib/nem/fee/multisig.rb +24 -0
- data/lib/nem/fee/multisig_aggregation_modification.rb +28 -0
- data/lib/nem/fee/provision_namespace.rb +34 -0
- data/lib/nem/fee/transfer.rb +66 -0
- data/lib/nem/keypair.rb +44 -0
- data/lib/nem/mixin.rb +2 -0
- data/lib/nem/mixin/assignable.rb +12 -0
- data/lib/nem/model.rb +3 -0
- data/lib/nem/model/account.rb +67 -0
- data/lib/nem/model/account_historical.rb +19 -0
- data/lib/nem/model/block.rb +33 -0
- data/lib/nem/model/chain.rb +14 -0
- data/lib/nem/model/connection.rb +23 -0
- data/lib/nem/model/experience.rb +20 -0
- data/lib/nem/model/explorer_block.rb +21 -0
- data/lib/nem/model/harvest.rb +23 -0
- data/lib/nem/model/heartbeat.rb +21 -0
- data/lib/nem/model/importance.rb +29 -0
- data/lib/nem/model/importance_transfer_transaction.rb +16 -0
- data/lib/nem/model/keypair.rb +19 -0
- data/lib/nem/model/message.rb +91 -0
- data/lib/nem/model/mosaic.rb +21 -0
- data/lib/nem/model/mosaic_attachment.rb +22 -0
- data/lib/nem/model/mosaic_definition.rb +65 -0
- data/lib/nem/model/mosaic_definition_creation_transaction.rb +18 -0
- data/lib/nem/model/mosaic_id.rb +27 -0
- data/lib/nem/model/mosaic_levy.rb +32 -0
- data/lib/nem/model/mosaic_owned.rb +22 -0
- data/lib/nem/model/mosaic_properties.rb +44 -0
- data/lib/nem/model/mosaic_supply.rb +21 -0
- data/lib/nem/model/mosaic_supply_change_transaction.rb +18 -0
- data/lib/nem/model/multisig_aggregate_modification_transaction.rb +21 -0
- data/lib/nem/model/multisig_info.rb +16 -0
- data/lib/nem/model/multisig_signature_transaction.rb +17 -0
- data/lib/nem/model/multisig_transaction.rb +21 -0
- data/lib/nem/model/namespace.rb +24 -0
- data/lib/nem/model/nem_announce_result.rb +19 -0
- data/lib/nem/model/network_time.rb +16 -0
- data/lib/nem/model/nis_node_info.rb +26 -0
- data/lib/nem/model/node.rb +41 -0
- data/lib/nem/model/provision_namespace_transaction.rb +18 -0
- data/lib/nem/model/status.rb +21 -0
- data/lib/nem/model/timer.rb +31 -0
- data/lib/nem/model/timesync.rb +19 -0
- data/lib/nem/model/transaction.rb +71 -0
- data/lib/nem/model/transfer_transaction.rb +24 -0
- data/lib/nem/model/unlocked_info.rb +24 -0
- data/lib/nem/mosaic.rb +2 -0
- data/lib/nem/mosaic/dim_coin.rb +21 -0
- data/lib/nem/mosaic/dim_token.rb +21 -0
- data/lib/nem/mosaic/ecobit_eco.rb +21 -0
- data/lib/nem/mosaic/xem.rb +21 -0
- data/lib/nem/node.rb +29 -0
- data/lib/nem/node_pool.rb +31 -0
- data/lib/nem/request.rb +2 -0
- data/lib/nem/request/announce.rb +76 -0
- data/lib/nem/transaction.rb +3 -0
- data/lib/nem/transaction/base.rb +45 -0
- data/lib/nem/transaction/importance_transfer.rb +42 -0
- data/lib/nem/transaction/mosaic_definition_creation.rb +45 -0
- data/lib/nem/transaction/mosaic_supply_change.rb +45 -0
- data/lib/nem/transaction/multisig.rb +29 -0
- data/lib/nem/transaction/multisig_aggregate_modification.rb +30 -0
- data/lib/nem/transaction/multisig_cosignatory_modification.rb +33 -0
- data/lib/nem/transaction/multisig_signature.rb +31 -0
- data/lib/nem/transaction/provision_namespace.rb +65 -0
- data/lib/nem/transaction/transfer.rb +63 -0
- data/lib/nem/util.rb +44 -0
- data/lib/nem/util/assignable.rb +51 -0
- data/lib/nem/util/convert.rb +112 -0
- data/lib/nem/util/deserializer.rb +158 -0
- data/lib/nem/util/ed25519.rb +316 -0
- data/lib/nem/util/serializer.rb +260 -0
- data/lib/nem/version.rb +3 -0
- data/nem-ruby.gemspec +46 -0
- metadata +350 -0
@@ -0,0 +1,260 @@
|
|
1
|
+
module Nem
|
2
|
+
module Util
|
3
|
+
module Serializer
|
4
|
+
# Serialize a transaction object
|
5
|
+
# @param [Hash] entity
|
6
|
+
# @return [Array]
|
7
|
+
def self.serialize_transaction(entity)
|
8
|
+
specific = case entity[:type]
|
9
|
+
when 0x0101 then serialize_transfer(entity)
|
10
|
+
when 0x0801 then serialize_importance_transfer(entity)
|
11
|
+
when 0x1001 then serialize_multisig_aggregate_modification(entity)
|
12
|
+
when 0x1002 then serialize_multisig_signature(entity)
|
13
|
+
when 0x1004 then serialize_multisig(entity)
|
14
|
+
when 0x2001 then serialize_provision_namespace(entity)
|
15
|
+
when 0x4001 then serialize_mosaic_definition_creation(entity)
|
16
|
+
when 0x4002 then serialize_mosaic_supply_change(entity)
|
17
|
+
else raise "Not implemented entity type: #{entity[:type]}"
|
18
|
+
end
|
19
|
+
serialize_common(entity) + specific
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
def self.serialize_transfer(entity)
|
25
|
+
a = []
|
26
|
+
a.concat serialize_safe_string(entity[:recipient])
|
27
|
+
a.concat serialize_long(entity[:amount])
|
28
|
+
payload = Nem::Util::Convert.hex2ua(entity[:message][:payload])
|
29
|
+
if payload.size == 0
|
30
|
+
a.concat [0, 0, 0, 0]
|
31
|
+
else
|
32
|
+
a.concat serialize_int(payload.size + 8)
|
33
|
+
a.concat serialize_int(entity[:message][:type])
|
34
|
+
a.concat serialize_int(payload.size)
|
35
|
+
a.concat payload
|
36
|
+
end
|
37
|
+
if entity[:mosaics] && entity[:mosaics].size > 0
|
38
|
+
a.concat serialize_mosaics(entity[:mosaics])
|
39
|
+
end
|
40
|
+
a
|
41
|
+
end
|
42
|
+
|
43
|
+
def self.serialize_importance_transfer(entity)
|
44
|
+
a = []
|
45
|
+
a.concat serialize_int(entity[:mode])
|
46
|
+
temp = Nem::Util::Convert.hex2ua(entity[:remoteAccount])
|
47
|
+
a.concat serialize_int(temp.size)
|
48
|
+
a.concat temp
|
49
|
+
end
|
50
|
+
|
51
|
+
def self.serialize_multisig_aggregate_modification(entity)
|
52
|
+
a = []
|
53
|
+
a.concat serialize_int(entity[:modifications].size)
|
54
|
+
mods = entity[:modifications].inject([]) do |b, mod|
|
55
|
+
b.concat serialize_int(40)
|
56
|
+
b.concat serialize_int(mod[:modificationType])
|
57
|
+
b.concat serialize_int(32)
|
58
|
+
b.concat Nem::Util::Convert.hex2ua(mod[:cosignatoryAccount])
|
59
|
+
b
|
60
|
+
end
|
61
|
+
a.concat mods
|
62
|
+
|
63
|
+
# The following part describes the minimum cosignatories modification.
|
64
|
+
# The part is optional. Version 1 aggregate modification transactions should omit this part.
|
65
|
+
# Version 2 aggregate modification transactions with no minimum cosignatories modification
|
66
|
+
# should only write the length field with value 0x00, 0x00, 0x00, 0x00.
|
67
|
+
if true # only version2
|
68
|
+
if entity[:minCosignatories][:relativeChange] > 0
|
69
|
+
a.concat serialize_int(4)
|
70
|
+
a.concat serialize_int(entity[:minCosignatories][:relativeChange])
|
71
|
+
else
|
72
|
+
a.concat [0, 0, 0, 0]
|
73
|
+
end
|
74
|
+
end
|
75
|
+
a
|
76
|
+
end
|
77
|
+
|
78
|
+
def self.serialize_multisig_signature(entity)
|
79
|
+
a = []
|
80
|
+
temp = Nem::Util::Convert.hex2ua(entity[:otherHash][:data])
|
81
|
+
a.concat serialize_int(4 + temp.size)
|
82
|
+
a.concat serialize_int(temp.size)
|
83
|
+
a.concat temp
|
84
|
+
a.concat serialize_safe_string(entity[:otherAccount])
|
85
|
+
end
|
86
|
+
|
87
|
+
def self.serialize_multisig(entity)
|
88
|
+
a = []
|
89
|
+
trans = entity[:otherTrans]
|
90
|
+
tx = case trans[:type]
|
91
|
+
when 0x0101 then serialize_transfer(trans)
|
92
|
+
when 0x0801 then serialize_importance_transfer(trans)
|
93
|
+
when 0x1001 then serialize_multisig_aggregate_modification(trans)
|
94
|
+
else raise "Unexpected type #{trans[:type]}"
|
95
|
+
end
|
96
|
+
tx = serialize_common(trans) + tx
|
97
|
+
a.concat serialize_int(tx.size)
|
98
|
+
a.concat tx
|
99
|
+
end
|
100
|
+
|
101
|
+
def self.serialize_provision_namespace(entity)
|
102
|
+
a = []
|
103
|
+
a.concat serialize_safe_string(entity[:rentalFeeSink])
|
104
|
+
a.concat serialize_long(entity[:rentalFee])
|
105
|
+
temp = Nem::Util::Convert.hex2ua(Nem::Util::Convert.utf8_to_hex(entity[:newPart]))
|
106
|
+
a.concat serialize_int(temp.size)
|
107
|
+
a.concat temp
|
108
|
+
if entity[:parent]
|
109
|
+
temp = Nem::Util::Convert.hex2ua(Nem::Util::Convert.utf8_to_hex(entity[:parent]))
|
110
|
+
a.concat serialize_int(temp.size)
|
111
|
+
a.concat temp
|
112
|
+
else
|
113
|
+
a.concat [255, 255, 255, 255]
|
114
|
+
end
|
115
|
+
a
|
116
|
+
end
|
117
|
+
|
118
|
+
def self.serialize_mosaic_definition_creation(entity)
|
119
|
+
a = []
|
120
|
+
a.concat serialize_mosaic_definition(entity[:mosaicDefinition])
|
121
|
+
a.concat serialize_safe_string(entity[:creationFeeSink])
|
122
|
+
a.concat serialize_long(entity[:creationFee])
|
123
|
+
end
|
124
|
+
|
125
|
+
def self.serialize_mosaic_supply_change(entity)
|
126
|
+
a = []
|
127
|
+
a.concat serialize_mosaic_id(entity[:mosaicId])
|
128
|
+
a.concat serialize_int(entity[:supplyType])
|
129
|
+
a.concat serialize_long(entity[:delta])
|
130
|
+
end
|
131
|
+
|
132
|
+
def self.serialize_common(entity)
|
133
|
+
a = []
|
134
|
+
a.concat serialize_int(entity[:type])
|
135
|
+
a.concat serialize_int(entity[:version])
|
136
|
+
a.concat serialize_int(entity[:timeStamp])
|
137
|
+
|
138
|
+
signer = Nem::Util::Convert.hex2ua(entity[:signer])
|
139
|
+
a.concat serialize_int(signer.size)
|
140
|
+
a.concat signer
|
141
|
+
|
142
|
+
a.concat serialize_long(entity[:fee].to_i)
|
143
|
+
a.concat serialize_int(entity[:deadline])
|
144
|
+
end
|
145
|
+
|
146
|
+
# Safe String - Each char is 8 bit
|
147
|
+
# @param [String] str
|
148
|
+
# @return [Array]
|
149
|
+
def self.serialize_safe_string(str)
|
150
|
+
return [255, 255, 255, 255] if str.nil?
|
151
|
+
return [0, 0, 0, 0] if str.empty?
|
152
|
+
[str.size, 0, 0, 0] + str.bytes
|
153
|
+
end
|
154
|
+
|
155
|
+
# @param [String] str
|
156
|
+
# @return [Array]
|
157
|
+
def self.serialize_bin_string(str)
|
158
|
+
return [255, 255, 255, 255] if str.nil?
|
159
|
+
return [0, 0, 0, 0] if str.empty?
|
160
|
+
chars = str.is_a?(String) ? str.chars : str
|
161
|
+
[chars.size, 0, 0, 0] + chars.map(&:to_i)
|
162
|
+
end
|
163
|
+
|
164
|
+
# @param [Integer] value
|
165
|
+
# @return [Array]
|
166
|
+
def self.serialize_int(value)
|
167
|
+
[value].pack('I').unpack('C4')
|
168
|
+
end
|
169
|
+
|
170
|
+
# @param [Integer] value
|
171
|
+
# @return [Array]
|
172
|
+
def self.serialize_long(value)
|
173
|
+
a = [0, 0, 0, 0, 0, 0, 0, 0]
|
174
|
+
bin = sprintf('%040b', value)
|
175
|
+
0.upto(bin.size / 8 - 1) do |i|
|
176
|
+
a[i] = 0xFF & (value >> 8 * i)
|
177
|
+
end
|
178
|
+
a
|
179
|
+
end
|
180
|
+
|
181
|
+
# @param [Nem::Struct::Mosaic] mosaic
|
182
|
+
# @return [Array]
|
183
|
+
def self.serialize_mosaic_and_quantity(mosaic_attachment)
|
184
|
+
a = []
|
185
|
+
a.concat serialize_mosaic_id(mosaic_attachment[:mosaicId])
|
186
|
+
a.concat serialize_long(mosaic_attachment[:quantity])
|
187
|
+
end
|
188
|
+
|
189
|
+
# @param [Array <Nem::Struct::Mosaic>] entities
|
190
|
+
# @return [Array]
|
191
|
+
def self.serialize_mosaics(entities)
|
192
|
+
a = []
|
193
|
+
a.concat serialize_int(entities.size)
|
194
|
+
mosaics = entities.inject([]) do |memo, ent|
|
195
|
+
memo.concat serialize_mosaic_and_quantity(ent)
|
196
|
+
end
|
197
|
+
a.concat serialize_int(mosaics.size)
|
198
|
+
a.concat mosaics
|
199
|
+
end
|
200
|
+
|
201
|
+
# @param [Hash] entity
|
202
|
+
# @return [Array]
|
203
|
+
def self.serialize_mosaic_id(entity)
|
204
|
+
a = []
|
205
|
+
a.concat serialize_safe_string(entity[:namespaceId])
|
206
|
+
a.concat serialize_safe_string(entity[:name])
|
207
|
+
serialize_int(a.size) + a
|
208
|
+
end
|
209
|
+
|
210
|
+
# @param [Hash] entity
|
211
|
+
# @return [Array]
|
212
|
+
def self.serialize_property(entity)
|
213
|
+
a = []
|
214
|
+
a.concat serialize_safe_string(entity[:name])
|
215
|
+
a.concat serialize_safe_string(entity[:value])
|
216
|
+
serialize_int(a.size) + a
|
217
|
+
end
|
218
|
+
|
219
|
+
# @param [Array] entities
|
220
|
+
# @return [Array]
|
221
|
+
def self.serialize_properties(entities)
|
222
|
+
order = {
|
223
|
+
'divisibility' => 1,
|
224
|
+
'initialSupply' => 2,
|
225
|
+
'supplyMutable' => 3,
|
226
|
+
'transferable' => 4
|
227
|
+
}
|
228
|
+
serialize_int(entities.size) + entities
|
229
|
+
.sort_by { |ent| order[ent[:name]] }
|
230
|
+
.inject([]) { |memo, ent| memo + serialize_property(ent) }
|
231
|
+
end
|
232
|
+
|
233
|
+
# @param [Hash] entity
|
234
|
+
# @return [Array]
|
235
|
+
def self.serialize_levy(entity)
|
236
|
+
return [0, 0, 0, 0] if entity.nil?
|
237
|
+
a = []
|
238
|
+
a.concat serialize_int(entity[:type])
|
239
|
+
a.concat serialize_safe_string(entity[:recipient])
|
240
|
+
a.concat serialize_mosaic_id(entity[:mosaicId])
|
241
|
+
a.concat serialize_long(entity[:fee])
|
242
|
+
serialize_int(a.size) + a
|
243
|
+
end
|
244
|
+
|
245
|
+
# @param [Hash] entity
|
246
|
+
# @return [Array]
|
247
|
+
def self.serialize_mosaic_definition(entity)
|
248
|
+
a = []
|
249
|
+
creator = Nem::Util::Convert.hex2ua(entity[:creator])
|
250
|
+
a.concat serialize_int(creator.size)
|
251
|
+
a.concat creator
|
252
|
+
a.concat serialize_mosaic_id(entity[:id])
|
253
|
+
a.concat serialize_bin_string(Nem::Util::Convert.hex2ua(Nem::Util::Convert.utf8_to_hex(entity[:description])))
|
254
|
+
a.concat serialize_properties(entity[:properties])
|
255
|
+
a.concat serialize_levy(entity[:levy])
|
256
|
+
serialize_int(a.size) + a
|
257
|
+
end
|
258
|
+
end
|
259
|
+
end
|
260
|
+
end
|
data/lib/nem/version.rb
ADDED
data/nem-ruby.gemspec
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'nem/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'nem-ruby'
|
8
|
+
spec.version = Nem::VERSION
|
9
|
+
spec.authors = ['Yoshiyuki Ieyama']
|
10
|
+
spec.email = ['yukku0423@gmail.com']
|
11
|
+
|
12
|
+
spec.summary = 'Ruby gem for communicating with the nem'
|
13
|
+
spec.description = 'Ruby gem for communicating with the nem'
|
14
|
+
spec.homepage = 'https://github.com/44uk/nem-ruby'
|
15
|
+
spec.license = 'MIT'
|
16
|
+
|
17
|
+
spec.required_ruby_version = '>= 2.2.6'
|
18
|
+
spec.metadata['yard.run'] = 'yri'
|
19
|
+
|
20
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
21
|
+
f.match(%r{^(test|spec|features)/})
|
22
|
+
end
|
23
|
+
spec.require_paths = ['lib']
|
24
|
+
|
25
|
+
spec.post_install_message = '
|
26
|
+
<# nem-ruby #>
|
27
|
+
Please see https://gitter.im/44uk/nem-ruby for the latest information.
|
28
|
+
The gem is under development. Incompatible changes can be made.
|
29
|
+
Feel free to ask and give feedback to https://twitter.com/44uk_i3
|
30
|
+
Good luck! NEM application development with Ruby!
|
31
|
+
'
|
32
|
+
|
33
|
+
spec.add_development_dependency 'bundler', '~> 1.15'
|
34
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
35
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
36
|
+
spec.add_development_dependency 'yard', '~> 0.9'
|
37
|
+
spec.add_development_dependency 'rubocop', '~> 0.47'
|
38
|
+
spec.add_development_dependency 'timecop', '~> 0.8'
|
39
|
+
spec.add_development_dependency 'webmock', '~> 2.3'
|
40
|
+
spec.add_development_dependency 'pry-byebug', '~> 3'
|
41
|
+
|
42
|
+
spec.add_dependency 'digest-sha3', '~> 1.1'
|
43
|
+
spec.add_dependency 'base32', '~> 0.3'
|
44
|
+
spec.add_dependency 'faraday', '~> 0.11'
|
45
|
+
spec.add_dependency 'faraday_middleware', '~> 0.11'
|
46
|
+
end
|
metadata
ADDED
@@ -0,0 +1,350 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: nem-ruby
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Yoshiyuki Ieyama
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-12-24 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.15'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.15'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: yard
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0.9'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0.9'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rubocop
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0.47'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0.47'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: timecop
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0.8'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0.8'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: webmock
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '2.3'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '2.3'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: pry-byebug
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '3'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '3'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: digest-sha3
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '1.1'
|
132
|
+
type: :runtime
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '1.1'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: base32
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0.3'
|
146
|
+
type: :runtime
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0.3'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: faraday
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0.11'
|
160
|
+
type: :runtime
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - "~>"
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0.11'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: faraday_middleware
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - "~>"
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0.11'
|
174
|
+
type: :runtime
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - "~>"
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0.11'
|
181
|
+
description: Ruby gem for communicating with the nem
|
182
|
+
email:
|
183
|
+
- yukku0423@gmail.com
|
184
|
+
executables: []
|
185
|
+
extensions: []
|
186
|
+
extra_rdoc_files: []
|
187
|
+
files:
|
188
|
+
- ".gitignore"
|
189
|
+
- ".rspec"
|
190
|
+
- ".rubocop.yml"
|
191
|
+
- ".travis.yml"
|
192
|
+
- CODE_OF_CONDUCT.md
|
193
|
+
- Gemfile
|
194
|
+
- README.md
|
195
|
+
- Rakefile
|
196
|
+
- examples/apostille_audit.rb
|
197
|
+
- examples/apostille_create.rb
|
198
|
+
- examples/endpoint/account.rb
|
199
|
+
- examples/endpoint/account_local.rb
|
200
|
+
- examples/endpoint/block.rb
|
201
|
+
- examples/endpoint/chain.rb
|
202
|
+
- examples/endpoint/debug.rb
|
203
|
+
- examples/endpoint/local.rb
|
204
|
+
- examples/endpoint/mosaic.rb
|
205
|
+
- examples/endpoint/namespace.rb
|
206
|
+
- examples/endpoint/node.rb
|
207
|
+
- examples/endpoint/timesync.rb
|
208
|
+
- examples/endpoint/transaction.rb
|
209
|
+
- examples/localnode.rb
|
210
|
+
- examples/nis.rb
|
211
|
+
- examples/node_pool.rb
|
212
|
+
- examples/transaction/importance_transfer.rb
|
213
|
+
- examples/transaction/mosaic_definition_creation.rb
|
214
|
+
- examples/transaction/mosaic_supply_change.rb
|
215
|
+
- examples/transaction/multisig_add_cosignatory.rb
|
216
|
+
- examples/transaction/multisig_aggregate_modification.rb
|
217
|
+
- examples/transaction/multisig_signature.rb
|
218
|
+
- examples/transaction/multisig_transfer.rb
|
219
|
+
- examples/transaction/provision_namespace.rb
|
220
|
+
- examples/transaction/transfer.rb
|
221
|
+
- examples/transaction/transfer_mosaic.rb
|
222
|
+
- examples/transaction/transfer_with_encrypted_message.rb
|
223
|
+
- examples/transaction/transfer_with_local.rb
|
224
|
+
- lib/nem.rb
|
225
|
+
- lib/nem/apostille.rb
|
226
|
+
- lib/nem/apostille_audit.rb
|
227
|
+
- lib/nem/client.rb
|
228
|
+
- lib/nem/configuration.rb
|
229
|
+
- lib/nem/endpoint.rb
|
230
|
+
- lib/nem/endpoint/account.rb
|
231
|
+
- lib/nem/endpoint/base.rb
|
232
|
+
- lib/nem/endpoint/block.rb
|
233
|
+
- lib/nem/endpoint/chain.rb
|
234
|
+
- lib/nem/endpoint/debug.rb
|
235
|
+
- lib/nem/endpoint/local/account.rb
|
236
|
+
- lib/nem/endpoint/local/chain.rb
|
237
|
+
- lib/nem/endpoint/mosaic.rb
|
238
|
+
- lib/nem/endpoint/namespace.rb
|
239
|
+
- lib/nem/endpoint/node.rb
|
240
|
+
- lib/nem/endpoint/timesync.rb
|
241
|
+
- lib/nem/endpoint/transaction.rb
|
242
|
+
- lib/nem/error.rb
|
243
|
+
- lib/nem/fee.rb
|
244
|
+
- lib/nem/fee/importance_transfer.rb
|
245
|
+
- lib/nem/fee/mosaic_definition_creation.rb
|
246
|
+
- lib/nem/fee/mosaic_supply_change_transfer.rb
|
247
|
+
- lib/nem/fee/multisig.rb
|
248
|
+
- lib/nem/fee/multisig_aggregation_modification.rb
|
249
|
+
- lib/nem/fee/provision_namespace.rb
|
250
|
+
- lib/nem/fee/transfer.rb
|
251
|
+
- lib/nem/keypair.rb
|
252
|
+
- lib/nem/mixin.rb
|
253
|
+
- lib/nem/mixin/assignable.rb
|
254
|
+
- lib/nem/model.rb
|
255
|
+
- lib/nem/model/account.rb
|
256
|
+
- lib/nem/model/account_historical.rb
|
257
|
+
- lib/nem/model/block.rb
|
258
|
+
- lib/nem/model/chain.rb
|
259
|
+
- lib/nem/model/connection.rb
|
260
|
+
- lib/nem/model/experience.rb
|
261
|
+
- lib/nem/model/explorer_block.rb
|
262
|
+
- lib/nem/model/harvest.rb
|
263
|
+
- lib/nem/model/heartbeat.rb
|
264
|
+
- lib/nem/model/importance.rb
|
265
|
+
- lib/nem/model/importance_transfer_transaction.rb
|
266
|
+
- lib/nem/model/keypair.rb
|
267
|
+
- lib/nem/model/message.rb
|
268
|
+
- lib/nem/model/mosaic.rb
|
269
|
+
- lib/nem/model/mosaic_attachment.rb
|
270
|
+
- lib/nem/model/mosaic_definition.rb
|
271
|
+
- lib/nem/model/mosaic_definition_creation_transaction.rb
|
272
|
+
- lib/nem/model/mosaic_id.rb
|
273
|
+
- lib/nem/model/mosaic_levy.rb
|
274
|
+
- lib/nem/model/mosaic_owned.rb
|
275
|
+
- lib/nem/model/mosaic_properties.rb
|
276
|
+
- lib/nem/model/mosaic_supply.rb
|
277
|
+
- lib/nem/model/mosaic_supply_change_transaction.rb
|
278
|
+
- lib/nem/model/multisig_aggregate_modification_transaction.rb
|
279
|
+
- lib/nem/model/multisig_info.rb
|
280
|
+
- lib/nem/model/multisig_signature_transaction.rb
|
281
|
+
- lib/nem/model/multisig_transaction.rb
|
282
|
+
- lib/nem/model/namespace.rb
|
283
|
+
- lib/nem/model/nem_announce_result.rb
|
284
|
+
- lib/nem/model/network_time.rb
|
285
|
+
- lib/nem/model/nis_node_info.rb
|
286
|
+
- lib/nem/model/node.rb
|
287
|
+
- lib/nem/model/provision_namespace_transaction.rb
|
288
|
+
- lib/nem/model/status.rb
|
289
|
+
- lib/nem/model/timer.rb
|
290
|
+
- lib/nem/model/timesync.rb
|
291
|
+
- lib/nem/model/transaction.rb
|
292
|
+
- lib/nem/model/transfer_transaction.rb
|
293
|
+
- lib/nem/model/unlocked_info.rb
|
294
|
+
- lib/nem/mosaic.rb
|
295
|
+
- lib/nem/mosaic/dim_coin.rb
|
296
|
+
- lib/nem/mosaic/dim_token.rb
|
297
|
+
- lib/nem/mosaic/ecobit_eco.rb
|
298
|
+
- lib/nem/mosaic/xem.rb
|
299
|
+
- lib/nem/node.rb
|
300
|
+
- lib/nem/node_pool.rb
|
301
|
+
- lib/nem/request.rb
|
302
|
+
- lib/nem/request/announce.rb
|
303
|
+
- lib/nem/transaction.rb
|
304
|
+
- lib/nem/transaction/base.rb
|
305
|
+
- lib/nem/transaction/importance_transfer.rb
|
306
|
+
- lib/nem/transaction/mosaic_definition_creation.rb
|
307
|
+
- lib/nem/transaction/mosaic_supply_change.rb
|
308
|
+
- lib/nem/transaction/multisig.rb
|
309
|
+
- lib/nem/transaction/multisig_aggregate_modification.rb
|
310
|
+
- lib/nem/transaction/multisig_cosignatory_modification.rb
|
311
|
+
- lib/nem/transaction/multisig_signature.rb
|
312
|
+
- lib/nem/transaction/provision_namespace.rb
|
313
|
+
- lib/nem/transaction/transfer.rb
|
314
|
+
- lib/nem/util.rb
|
315
|
+
- lib/nem/util/assignable.rb
|
316
|
+
- lib/nem/util/convert.rb
|
317
|
+
- lib/nem/util/deserializer.rb
|
318
|
+
- lib/nem/util/ed25519.rb
|
319
|
+
- lib/nem/util/serializer.rb
|
320
|
+
- lib/nem/version.rb
|
321
|
+
- nem-ruby.gemspec
|
322
|
+
homepage: https://github.com/44uk/nem-ruby
|
323
|
+
licenses:
|
324
|
+
- MIT
|
325
|
+
metadata:
|
326
|
+
yard.run: yri
|
327
|
+
post_install_message: "\n <# nem-ruby #>\n Please see https://gitter.im/44uk/nem-ruby
|
328
|
+
for the latest information.\n The gem is under development. Incompatible changes
|
329
|
+
can be made.\n Feel free to ask and give feedback to https://twitter.com/44uk_i3\n
|
330
|
+
\ Good luck! NEM application development with Ruby!\n "
|
331
|
+
rdoc_options: []
|
332
|
+
require_paths:
|
333
|
+
- lib
|
334
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
335
|
+
requirements:
|
336
|
+
- - ">="
|
337
|
+
- !ruby/object:Gem::Version
|
338
|
+
version: 2.2.6
|
339
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
340
|
+
requirements:
|
341
|
+
- - ">="
|
342
|
+
- !ruby/object:Gem::Version
|
343
|
+
version: '0'
|
344
|
+
requirements: []
|
345
|
+
rubyforge_project:
|
346
|
+
rubygems_version: 2.6.8
|
347
|
+
signing_key:
|
348
|
+
specification_version: 4
|
349
|
+
summary: Ruby gem for communicating with the nem
|
350
|
+
test_files: []
|