btcruby 0.0.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +18 -0
  3. data/.travis.yml +7 -0
  4. data/FAQ.md +7 -0
  5. data/Gemfile +3 -0
  6. data/Gemfile.lock +18 -0
  7. data/HOWTO.md +17 -0
  8. data/LICENSE +19 -0
  9. data/README.md +59 -0
  10. data/Rakefile +6 -0
  11. data/TODO.txt +40 -0
  12. data/bin/console +19 -0
  13. data/btcruby.gemspec +20 -0
  14. data/documentation/address.md +73 -0
  15. data/documentation/base58.md +52 -0
  16. data/documentation/block.md +127 -0
  17. data/documentation/block_header.md +120 -0
  18. data/documentation/constants.md +88 -0
  19. data/documentation/data.md +54 -0
  20. data/documentation/diagnostics.md +90 -0
  21. data/documentation/extensions.md +76 -0
  22. data/documentation/hash_functions.md +58 -0
  23. data/documentation/hash_id.md +22 -0
  24. data/documentation/index.md +230 -0
  25. data/documentation/key.md +177 -0
  26. data/documentation/keychain.md +180 -0
  27. data/documentation/network.md +75 -0
  28. data/documentation/opcode.md +220 -0
  29. data/documentation/openssl.md +7 -0
  30. data/documentation/p2pkh.md +71 -0
  31. data/documentation/p2sh.md +64 -0
  32. data/documentation/proof_of_work.md +84 -0
  33. data/documentation/script.md +280 -0
  34. data/documentation/signature.md +71 -0
  35. data/documentation/transaction.md +213 -0
  36. data/documentation/transaction_builder.md +188 -0
  37. data/documentation/transaction_input.md +133 -0
  38. data/documentation/transaction_output.md +130 -0
  39. data/documentation/wif.md +72 -0
  40. data/documentation/wire_format.md +70 -0
  41. data/lib/btcruby/address.rb +296 -0
  42. data/lib/btcruby/base58.rb +108 -0
  43. data/lib/btcruby/big_number.rb +47 -0
  44. data/lib/btcruby/block.rb +170 -0
  45. data/lib/btcruby/block_header.rb +231 -0
  46. data/lib/btcruby/constants.rb +59 -0
  47. data/lib/btcruby/currency_formatter.rb +64 -0
  48. data/lib/btcruby/data.rb +98 -0
  49. data/lib/btcruby/diagnostics.rb +92 -0
  50. data/lib/btcruby/errors.rb +8 -0
  51. data/lib/btcruby/extensions.rb +65 -0
  52. data/lib/btcruby/hash_functions.rb +54 -0
  53. data/lib/btcruby/hash_id.rb +18 -0
  54. data/lib/btcruby/key.rb +517 -0
  55. data/lib/btcruby/keychain.rb +464 -0
  56. data/lib/btcruby/network.rb +73 -0
  57. data/lib/btcruby/opcode.rb +197 -0
  58. data/lib/btcruby/open_assets/asset.rb +35 -0
  59. data/lib/btcruby/open_assets/asset_address.rb +49 -0
  60. data/lib/btcruby/open_assets/asset_definition.rb +75 -0
  61. data/lib/btcruby/open_assets/asset_id.rb +24 -0
  62. data/lib/btcruby/open_assets/asset_marker.rb +94 -0
  63. data/lib/btcruby/open_assets/asset_processor.rb +377 -0
  64. data/lib/btcruby/open_assets/asset_transaction.rb +184 -0
  65. data/lib/btcruby/open_assets/asset_transaction_builder/errors.rb +15 -0
  66. data/lib/btcruby/open_assets/asset_transaction_builder/provider.rb +32 -0
  67. data/lib/btcruby/open_assets/asset_transaction_builder/result.rb +47 -0
  68. data/lib/btcruby/open_assets/asset_transaction_builder.rb +418 -0
  69. data/lib/btcruby/open_assets/asset_transaction_input.rb +64 -0
  70. data/lib/btcruby/open_assets/asset_transaction_output.rb +140 -0
  71. data/lib/btcruby/open_assets.rb +26 -0
  72. data/lib/btcruby/openssl.rb +536 -0
  73. data/lib/btcruby/proof_of_work.rb +110 -0
  74. data/lib/btcruby/safety.rb +26 -0
  75. data/lib/btcruby/script.rb +733 -0
  76. data/lib/btcruby/signature_hashtype.rb +37 -0
  77. data/lib/btcruby/transaction.rb +511 -0
  78. data/lib/btcruby/transaction_builder/errors.rb +15 -0
  79. data/lib/btcruby/transaction_builder/provider.rb +54 -0
  80. data/lib/btcruby/transaction_builder/result.rb +73 -0
  81. data/lib/btcruby/transaction_builder/signer.rb +28 -0
  82. data/lib/btcruby/transaction_builder.rb +520 -0
  83. data/lib/btcruby/transaction_input.rb +298 -0
  84. data/lib/btcruby/transaction_outpoint.rb +30 -0
  85. data/lib/btcruby/transaction_output.rb +315 -0
  86. data/lib/btcruby/version.rb +3 -0
  87. data/lib/btcruby/wif.rb +118 -0
  88. data/lib/btcruby/wire_format.rb +362 -0
  89. data/lib/btcruby.rb +44 -2
  90. data/sample_code/creating_a_p2sh_multisig_address.rb +21 -0
  91. data/sample_code/creating_a_transaction_manually.rb +44 -0
  92. data/sample_code/generating_an_address.rb +20 -0
  93. data/sample_code/using_transaction_builder.rb +49 -0
  94. data/spec/address_spec.rb +206 -0
  95. data/spec/all.rb +6 -0
  96. data/spec/base58_spec.rb +83 -0
  97. data/spec/block_header_spec.rb +18 -0
  98. data/spec/block_spec.rb +18 -0
  99. data/spec/currency_formatter_spec.rb +46 -0
  100. data/spec/data_spec.rb +50 -0
  101. data/spec/diagnostics_spec.rb +41 -0
  102. data/spec/key_spec.rb +205 -0
  103. data/spec/keychain_spec.rb +261 -0
  104. data/spec/network_spec.rb +48 -0
  105. data/spec/open_assets/asset_address_spec.rb +33 -0
  106. data/spec/open_assets/asset_id_spec.rb +15 -0
  107. data/spec/open_assets/asset_marker_spec.rb +47 -0
  108. data/spec/open_assets/asset_processor_spec.rb +567 -0
  109. data/spec/open_assets/asset_transaction_builder_spec.rb +273 -0
  110. data/spec/open_assets/asset_transaction_spec.rb +70 -0
  111. data/spec/proof_of_work_spec.rb +53 -0
  112. data/spec/script_spec.rb +66 -0
  113. data/spec/spec_helper.rb +8 -0
  114. data/spec/transaction_builder_spec.rb +338 -0
  115. data/spec/transaction_spec.rb +162 -0
  116. data/spec/wire_format_spec.rb +283 -0
  117. metadata +141 -7
@@ -0,0 +1,283 @@
1
+ require_relative 'spec_helper'
2
+ require 'stringio'
3
+ describe BTC::WireFormat do
4
+
5
+ def verify_varint(int, hex)
6
+
7
+ raw = hex.from_hex
8
+
9
+ # 1a. Encode to buffer
10
+ BTC::WireFormat.write_varint(int).must_equal(raw)
11
+
12
+ # 1b. Write to data buffer
13
+ data = "deadbeef".from_hex
14
+ BTC::WireFormat.write_varint(int, data: data)
15
+ data.to_hex.must_equal("deadbeef" + hex)
16
+
17
+ # 1c. Write data to stream
18
+ data = "cafebabe".from_hex
19
+ io = StringIO.new(data)
20
+ io.read # scan forward
21
+ BTC::WireFormat.write_varint(int, stream: io)
22
+ data.to_hex.must_equal("cafebabe" + hex)
23
+
24
+ # 2a. Decode from data
25
+ BTC::WireFormat.read_varint(data: raw).must_equal [int, raw.bytesize]
26
+ BTC::WireFormat.read_varint(data: "cafebabe".from_hex + raw, offset: 4).must_equal [int, 4 + raw.bytesize]
27
+
28
+ # 2b. Decode from stream
29
+ io = StringIO.new(raw + "deadbeef".from_hex)
30
+ BTC::WireFormat.read_varint(stream: io).must_equal [int, raw.bytesize]
31
+
32
+ io = StringIO.new("deadbeef".from_hex + raw + "cafebabe".from_hex)
33
+ BTC::WireFormat.read_varint(stream: io, offset: 4).must_equal [int, 4 + raw.bytesize]
34
+ end
35
+
36
+ it "should encode/decode canonical varints" do
37
+
38
+ verify_varint(0, "00")
39
+ verify_varint(252, "fc")
40
+ verify_varint(255, "fdff00")
41
+ verify_varint(12345, "fd3930")
42
+ verify_varint(65535, "fdffff")
43
+ verify_varint(65536, "fe00000100")
44
+ verify_varint(1234567890, "fed2029649")
45
+ verify_varint(1234567890123, "ffcb04fb711f010000")
46
+ verify_varint(2**64 - 1, "ffffffffffffffffff")
47
+
48
+ end
49
+
50
+ it "should decode non-canonical varints" do
51
+
52
+ BTC::WireFormat.read_varint(data: "fd0000".from_hex).first.must_equal 0x00
53
+ BTC::WireFormat.read_varint(data: "fd1100".from_hex).first.must_equal 0x11
54
+
55
+ BTC::WireFormat.read_varint(data: "fe00000000".from_hex).first.must_equal 0x00
56
+ BTC::WireFormat.read_varint(data: "fe11000000".from_hex).first.must_equal 0x11
57
+ BTC::WireFormat.read_varint(data: "fe11220000".from_hex).first.must_equal 0x2211
58
+
59
+ BTC::WireFormat.read_varint(data: "ff0000000000000000".from_hex).first.must_equal 0x00
60
+ BTC::WireFormat.read_varint(data: "ff1100000000000000".from_hex).first.must_equal 0x11
61
+ BTC::WireFormat.read_varint(data: "ff1122000000000000".from_hex).first.must_equal 0x2211
62
+ BTC::WireFormat.read_varint(data: "ff1122334400000000".from_hex).first.must_equal 0x44332211
63
+
64
+ end
65
+
66
+ it "should handle errors when decoding varints" do
67
+
68
+ proc { BTC::WireFormat.read_varint() }.must_raise ArgumentError
69
+ proc { BTC::WireFormat.read_varint(data: "".from_hex, stream: StringIO.new("")) }.must_raise ArgumentError
70
+
71
+ BTC::WireFormat.read_varint(data: "".from_hex).must_equal [nil, 0]
72
+ BTC::WireFormat.read_varint(data: "fd".from_hex).must_equal [nil, 1]
73
+ BTC::WireFormat.read_varint(data: "fd11".from_hex).must_equal [nil, 1]
74
+ BTC::WireFormat.read_varint(data: "fe".from_hex).must_equal [nil, 1]
75
+ BTC::WireFormat.read_varint(data: "fe112233".from_hex).must_equal [nil, 1]
76
+ BTC::WireFormat.read_varint(data: "ff".from_hex).must_equal [nil, 1]
77
+ BTC::WireFormat.read_varint(data: "ff11223344556677".from_hex).must_equal [nil, 1]
78
+
79
+ end
80
+
81
+ it "should handle errors when encoding varints" do
82
+
83
+ proc { BTC::WireFormat.write_varint(-1) }.must_raise ArgumentError
84
+ proc { BTC::WireFormat.write_varint(nil) }.must_raise ArgumentError
85
+ proc { BTC::WireFormat.write_varint(2**64) }.must_raise ArgumentError
86
+ proc { BTC::WireFormat.write_varint(2**64 + 1) }.must_raise ArgumentError
87
+
88
+ end
89
+
90
+ def verify_varstring(string, hex)
91
+ raw = hex.from_hex
92
+
93
+ # 1a. Encode to buffer
94
+ BTC::WireFormat.write_string(string).must_equal(raw)
95
+
96
+ # 1b. Write to data buffer
97
+ data = "deadbeef".from_hex
98
+ BTC::WireFormat.write_string(string, data: data)
99
+ data.to_hex.must_equal("deadbeef" + hex)
100
+
101
+ # 1c. Write data to stream
102
+ data = "cafebabe".from_hex
103
+ io = StringIO.new(data)
104
+ io.read # scan forward
105
+ BTC::WireFormat.write_string(string, stream: io)
106
+ data.to_hex.must_equal("cafebabe" + hex)
107
+
108
+ # 2a. Decode from data
109
+ BTC::WireFormat.read_string(data: raw).must_equal [string.b, raw.bytesize]
110
+ BTC::WireFormat.read_string(data: "cafebabe".from_hex + raw, offset: 4).must_equal [string.b, 4 + raw.bytesize]
111
+
112
+ # 2b. Decode from stream
113
+ io = StringIO.new(raw + "deadbeef".from_hex)
114
+ BTC::WireFormat.read_string(stream: io).must_equal [string.b, raw.bytesize]
115
+
116
+ io = StringIO.new("deadbeef".from_hex + raw + "cafebabe".from_hex)
117
+ BTC::WireFormat.read_string(stream: io, offset: 4).must_equal [string.b, 4 + raw.bytesize]
118
+ end
119
+
120
+ it "should encode/decode canonical varstrings" do
121
+ verify_varstring("", "00")
122
+ verify_varstring("\x01", "0101")
123
+ verify_varstring(" ", "0120")
124
+ verify_varstring(" ", "022020")
125
+ verify_varstring(" ", "03202020")
126
+ verify_varstring("\xca\xfe\xba\xbe", "04cafebabe")
127
+ verify_varstring("тест", "08d182d0b5d181d182") # 4-letter russian word for "test" (2 bytes per letter in UTF-8)
128
+ verify_varstring("\x42"*255, "fdff00" + "42"*255)
129
+ verify_varstring("\x42"*(256*256), "fe00000100" + "42"*(256*256))
130
+ end
131
+
132
+ it "should handle errors when decoding varstrings" do
133
+
134
+ proc { BTC::WireFormat.read_string() }.must_raise ArgumentError
135
+ proc { BTC::WireFormat.read_string(data: "".from_hex, stream: StringIO.new("")) }.must_raise ArgumentError
136
+
137
+ BTC::WireFormat.read_string(data: "".from_hex).must_equal [nil, 0]
138
+ BTC::WireFormat.read_string(data: "fd".from_hex).must_equal [nil, 1]
139
+ BTC::WireFormat.read_string(data: "fd11".from_hex).must_equal [nil, 1]
140
+ BTC::WireFormat.read_string(data: "fe".from_hex).must_equal [nil, 1]
141
+ BTC::WireFormat.read_string(data: "fe112233".from_hex).must_equal [nil, 1]
142
+ BTC::WireFormat.read_string(data: "ff".from_hex).must_equal [nil, 1]
143
+ BTC::WireFormat.read_string(data: "ff11223344556677".from_hex).must_equal [nil, 1]
144
+
145
+ # Not enough data in the string
146
+ BTC::WireFormat.read_string(data: "030102".from_hex).must_equal [nil, 1]
147
+ BTC::WireFormat.read_string(stream: StringIO.new("030102".from_hex)).must_equal [nil, 3]
148
+
149
+ BTC::WireFormat.read_string(data: "fd03000102".from_hex).must_equal [nil, 3]
150
+ BTC::WireFormat.read_string(stream: StringIO.new("fd03000102".from_hex)).must_equal [nil, 5]
151
+
152
+ end
153
+
154
+ it "should handle errors when encoding varstrings" do
155
+ proc { BTC::WireFormat.write_string(nil) }.must_raise ArgumentError
156
+ end
157
+
158
+ def verify_fixint(int_type, int, hex)
159
+ raw = hex.from_hex
160
+
161
+ # Check data
162
+ v, len = BTC::WireFormat.send("read_#{int_type}", data: raw)
163
+ v.must_equal int
164
+ len.must_equal raw.size
165
+
166
+ # Check data + offset + tail
167
+ v, len = BTC::WireFormat.send("read_#{int_type}", data: "abc" + raw + "def", offset: 3)
168
+ v.must_equal int
169
+ len.must_equal raw.size + 3
170
+
171
+ # Check stream
172
+ v, len = BTC::WireFormat.send("read_#{int_type}", stream: StringIO.new(raw))
173
+ v.must_equal int
174
+ len.must_equal raw.size
175
+
176
+ # Check stream + offset + tail
177
+ v, len = BTC::WireFormat.send("read_#{int_type}", stream: StringIO.new("abc" + raw + "def"), offset: 3)
178
+ v.must_equal int
179
+ len.must_equal raw.size + 3
180
+
181
+ BTC::WireFormat.send("encode_#{int_type}", int).must_equal raw
182
+ end
183
+
184
+ it "should encode/decode fix-size ints" do
185
+
186
+ verify_fixint(:uint8, 0, "00")
187
+ verify_fixint(:uint8, 0x7f, "7f")
188
+ verify_fixint(:uint8, 0x80, "80")
189
+ verify_fixint(:uint8, 0xff, "ff")
190
+
191
+ verify_fixint(:int8, 0, "00")
192
+ verify_fixint(:int8, 127, "7f")
193
+ verify_fixint(:int8, -128, "80")
194
+ verify_fixint(:int8, -1, "ff")
195
+
196
+ verify_fixint(:uint16le, 0, "0000")
197
+ verify_fixint(:uint16le, 0x7f, "7f00")
198
+ verify_fixint(:uint16le, 0x80, "8000")
199
+ verify_fixint(:uint16le, 0xbeef, "efbe")
200
+ verify_fixint(:uint16le, 0xffff, "ffff")
201
+
202
+ verify_fixint(:int16le, 0, "0000")
203
+ verify_fixint(:int16le, 0x7f, "7f00")
204
+ verify_fixint(:int16le, 0x80, "8000")
205
+ verify_fixint(:int16le, -(1<<15), "0080")
206
+ verify_fixint(:int16le, -1, "ffff")
207
+
208
+ verify_fixint(:uint32le, 0, "00000000")
209
+ verify_fixint(:uint32le, 0x7f, "7f000000")
210
+ verify_fixint(:uint32le, 0x80, "80000000")
211
+ verify_fixint(:uint32le, 0xbeef, "efbe0000")
212
+ verify_fixint(:uint32le, 0xdeadbeef, "efbeadde")
213
+ verify_fixint(:uint32le, 0xffffffff, "ffffffff")
214
+
215
+ verify_fixint(:uint64le, 0, "0000000000000000")
216
+ verify_fixint(:uint64le, 0x7f, "7f00000000000000")
217
+ verify_fixint(:uint64le, 0x80, "8000000000000000")
218
+ verify_fixint(:uint64le, 0xbeef, "efbe000000000000")
219
+ verify_fixint(:uint64le, 0xdeadbeef, "efbeadde00000000")
220
+ verify_fixint(:uint64le, 0xdeadbeefcafebabe, "bebafecaefbeadde")
221
+ verify_fixint(:uint64le, 0xffffffffffffffff, "ffffffffffffffff")
222
+
223
+ verify_fixint(:int64le, 0, "0000000000000000")
224
+ verify_fixint(:int64le, 0x7f, "7f00000000000000")
225
+ verify_fixint(:int64le, 0x80, "8000000000000000")
226
+ verify_fixint(:int64le, 0xbeef, "efbe000000000000")
227
+ verify_fixint(:int64le, 0xdeadbeef, "efbeadde00000000")
228
+ verify_fixint(:int64le, -(1<<63), "0000000000000080")
229
+ verify_fixint(:int64le, -1, "ffffffffffffffff")
230
+
231
+ end
232
+
233
+ def verify_uleb128(int, hex)
234
+
235
+ raw = hex.from_hex
236
+
237
+ # 1a. Encode to buffer
238
+ BTC::WireFormat.write_uleb128(int).must_equal(raw)
239
+
240
+ # 1b. Write to data buffer
241
+ data = "deadbeef".from_hex
242
+ BTC::WireFormat.write_uleb128(int, data: data)
243
+ data.to_hex.must_equal("deadbeef" + hex)
244
+
245
+ # 1c. Write data to stream
246
+ data = "cafebabe".from_hex
247
+ io = StringIO.new(data)
248
+ io.read # scan forward
249
+ BTC::WireFormat.write_uleb128(int, stream: io)
250
+ data.to_hex.must_equal("cafebabe" + hex)
251
+
252
+ # 2a. Decode from data
253
+ BTC::WireFormat.read_uleb128(data: raw).must_equal [int, raw.bytesize]
254
+ BTC::WireFormat.read_uleb128(data: "cafebabe".from_hex + raw, offset: 4).must_equal [int, 4 + raw.bytesize]
255
+
256
+ # 2b. Decode from stream
257
+ io1 = StringIO.new(raw)
258
+ io2 = StringIO.new(raw + "deadbeef".from_hex)
259
+ BTC::WireFormat.read_uleb128(stream: io1).must_equal [int, raw.bytesize]
260
+ BTC::WireFormat.read_uleb128(stream: io2).must_equal [int, raw.bytesize]
261
+
262
+ io1 = StringIO.new("deadbeef".from_hex + raw)
263
+ io2 = StringIO.new("deadbeef".from_hex + raw + "cafebabe".from_hex)
264
+ BTC::WireFormat.read_uleb128(stream: io1, offset: 4).must_equal [int, 4 + raw.bytesize]
265
+ BTC::WireFormat.read_uleb128(stream: io2, offset: 4).must_equal [int, 4 + raw.bytesize]
266
+ end
267
+
268
+
269
+ it "should encode/decode LEB128-encoded unsigned integers" do
270
+ verify_uleb128(0, "00")
271
+ verify_uleb128(1, "01")
272
+ verify_uleb128(127, "7f")
273
+ verify_uleb128(128, "8001")
274
+ verify_uleb128(0xff, "ff01")
275
+ verify_uleb128(0x100, "8002")
276
+ verify_uleb128(300, "ac02")
277
+ verify_uleb128(624485, "e58e26")
278
+ verify_uleb128(0xffffff, "ffffff07")
279
+ verify_uleb128(0x1000000, "80808008")
280
+ verify_uleb128(2**64, "80808080808080808002")
281
+ end
282
+
283
+ end
metadata CHANGED
@@ -1,24 +1,158 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: btcruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
- - Ryan Smith
8
7
  - Oleg Andreev
8
+ - Ryan Smith
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-08-26 00:00:00.000000000 Z
13
- dependencies: []
12
+ date: 2015-06-08 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: ffi
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: '1.9'
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 1.9.3
24
+ type: :runtime
25
+ prerelease: false
26
+ version_requirements: !ruby/object:Gem::Requirement
27
+ requirements:
28
+ - - "~>"
29
+ - !ruby/object:Gem::Version
30
+ version: '1.9'
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 1.9.3
14
34
  description: Ruby library for interacting with Bitcoin.
15
- email: btcruby@chain.com
35
+ email: oleganza+btcruby@gmail.com
16
36
  executables: []
17
37
  extensions: []
18
38
  extra_rdoc_files: []
19
39
  files:
40
+ - ".gitignore"
41
+ - ".travis.yml"
42
+ - FAQ.md
43
+ - Gemfile
44
+ - Gemfile.lock
45
+ - HOWTO.md
46
+ - LICENSE
47
+ - README.md
48
+ - Rakefile
49
+ - TODO.txt
50
+ - bin/console
51
+ - btcruby.gemspec
52
+ - documentation/address.md
53
+ - documentation/base58.md
54
+ - documentation/block.md
55
+ - documentation/block_header.md
56
+ - documentation/constants.md
57
+ - documentation/data.md
58
+ - documentation/diagnostics.md
59
+ - documentation/extensions.md
60
+ - documentation/hash_functions.md
61
+ - documentation/hash_id.md
62
+ - documentation/index.md
63
+ - documentation/key.md
64
+ - documentation/keychain.md
65
+ - documentation/network.md
66
+ - documentation/opcode.md
67
+ - documentation/openssl.md
68
+ - documentation/p2pkh.md
69
+ - documentation/p2sh.md
70
+ - documentation/proof_of_work.md
71
+ - documentation/script.md
72
+ - documentation/signature.md
73
+ - documentation/transaction.md
74
+ - documentation/transaction_builder.md
75
+ - documentation/transaction_input.md
76
+ - documentation/transaction_output.md
77
+ - documentation/wif.md
78
+ - documentation/wire_format.md
20
79
  - lib/btcruby.rb
21
- homepage: https://github.com/chain-engineering/btcruby
80
+ - lib/btcruby/address.rb
81
+ - lib/btcruby/base58.rb
82
+ - lib/btcruby/big_number.rb
83
+ - lib/btcruby/block.rb
84
+ - lib/btcruby/block_header.rb
85
+ - lib/btcruby/constants.rb
86
+ - lib/btcruby/currency_formatter.rb
87
+ - lib/btcruby/data.rb
88
+ - lib/btcruby/diagnostics.rb
89
+ - lib/btcruby/errors.rb
90
+ - lib/btcruby/extensions.rb
91
+ - lib/btcruby/hash_functions.rb
92
+ - lib/btcruby/hash_id.rb
93
+ - lib/btcruby/key.rb
94
+ - lib/btcruby/keychain.rb
95
+ - lib/btcruby/network.rb
96
+ - lib/btcruby/opcode.rb
97
+ - lib/btcruby/open_assets.rb
98
+ - lib/btcruby/open_assets/asset.rb
99
+ - lib/btcruby/open_assets/asset_address.rb
100
+ - lib/btcruby/open_assets/asset_definition.rb
101
+ - lib/btcruby/open_assets/asset_id.rb
102
+ - lib/btcruby/open_assets/asset_marker.rb
103
+ - lib/btcruby/open_assets/asset_processor.rb
104
+ - lib/btcruby/open_assets/asset_transaction.rb
105
+ - lib/btcruby/open_assets/asset_transaction_builder.rb
106
+ - lib/btcruby/open_assets/asset_transaction_builder/errors.rb
107
+ - lib/btcruby/open_assets/asset_transaction_builder/provider.rb
108
+ - lib/btcruby/open_assets/asset_transaction_builder/result.rb
109
+ - lib/btcruby/open_assets/asset_transaction_input.rb
110
+ - lib/btcruby/open_assets/asset_transaction_output.rb
111
+ - lib/btcruby/openssl.rb
112
+ - lib/btcruby/proof_of_work.rb
113
+ - lib/btcruby/safety.rb
114
+ - lib/btcruby/script.rb
115
+ - lib/btcruby/signature_hashtype.rb
116
+ - lib/btcruby/transaction.rb
117
+ - lib/btcruby/transaction_builder.rb
118
+ - lib/btcruby/transaction_builder/errors.rb
119
+ - lib/btcruby/transaction_builder/provider.rb
120
+ - lib/btcruby/transaction_builder/result.rb
121
+ - lib/btcruby/transaction_builder/signer.rb
122
+ - lib/btcruby/transaction_input.rb
123
+ - lib/btcruby/transaction_outpoint.rb
124
+ - lib/btcruby/transaction_output.rb
125
+ - lib/btcruby/version.rb
126
+ - lib/btcruby/wif.rb
127
+ - lib/btcruby/wire_format.rb
128
+ - sample_code/creating_a_p2sh_multisig_address.rb
129
+ - sample_code/creating_a_transaction_manually.rb
130
+ - sample_code/generating_an_address.rb
131
+ - sample_code/using_transaction_builder.rb
132
+ - spec/address_spec.rb
133
+ - spec/all.rb
134
+ - spec/base58_spec.rb
135
+ - spec/block_header_spec.rb
136
+ - spec/block_spec.rb
137
+ - spec/currency_formatter_spec.rb
138
+ - spec/data_spec.rb
139
+ - spec/diagnostics_spec.rb
140
+ - spec/key_spec.rb
141
+ - spec/keychain_spec.rb
142
+ - spec/network_spec.rb
143
+ - spec/open_assets/asset_address_spec.rb
144
+ - spec/open_assets/asset_id_spec.rb
145
+ - spec/open_assets/asset_marker_spec.rb
146
+ - spec/open_assets/asset_processor_spec.rb
147
+ - spec/open_assets/asset_transaction_builder_spec.rb
148
+ - spec/open_assets/asset_transaction_spec.rb
149
+ - spec/proof_of_work_spec.rb
150
+ - spec/script_spec.rb
151
+ - spec/spec_helper.rb
152
+ - spec/transaction_builder_spec.rb
153
+ - spec/transaction_spec.rb
154
+ - spec/wire_format_spec.rb
155
+ homepage: https://github.com/oleganza/btcruby
22
156
  licenses:
23
157
  - MIT
24
158
  metadata: {}
@@ -37,7 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
37
171
  - !ruby/object:Gem::Version
38
172
  version: '0'
39
173
  requirements: []
40
- rubyforge_project:
174
+ rubyforge_project: btcruby
41
175
  rubygems_version: 2.2.2
42
176
  signing_key:
43
177
  specification_version: 4