antd 0.3.0 → 0.4.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 +4 -4
- data/README.md +14 -0
- data/lib/antd/client.rb +10 -5
- data/lib/antd/grpc_client.rb +12 -6
- data/lib/antd/grpc_manifests.rb +3 -1
- data/lib/antd/manifests.rb +13 -5
- data/lib/antd/models.rb +13 -6
- data/lib/antd/v1/data_pb.rb +1 -1
- data/lib/antd/v1/files_pb.rb +1 -1
- data/lib/antd/v1/manifests_pb.rb +1 -1
- data/lib/antd/v1/upload_pb.rb +1 -1
- data/lib/antd/version.rb +1 -1
- 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: 88248e4cfde28e4e91fbdf8009f6ae4612760b8bc0d5aacdc2ebbe2145f7e785
|
|
4
|
+
data.tar.gz: 72be5e95f26b60955a218cdaca951f9a62805ab55d0105dd14fbfa54d9f86ccf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 44c61f831f79bb930096bca79eaa731efe59707b52a4029339477cfe3aedfb38f38ead592d2ac944bcad7afcf0180e876e9aadc1fc8babca62afd684d8fa1c0b
|
|
7
|
+
data.tar.gz: 3f4cd055d0f1868c53aa343582b6d28e3aafc883dcdb63b624f04fb74714f8dd24f93d6dd6f99055874856f378b184643c9d630ea7bbc52e049388c47e56b2b7
|
data/README.md
CHANGED
|
@@ -160,6 +160,12 @@ client = Antd::Client.new(base_url: "http://custom-host:9090", timeout: 30)
|
|
|
160
160
|
| `file_get_public(address, dest_path)` | Download a public file by address |
|
|
161
161
|
| `file_cost(path, is_public, payment_mode: :auto)` | Estimate upload cost — returns `UploadCostEstimate` with size, chunks, gas, payment mode |
|
|
162
162
|
|
|
163
|
+
**`sha256` on upload results.** `DataPutResult`, `DataPutPublicResult`,
|
|
164
|
+
`FilePutResult`, `FilePutPublicResult` and `FinalizeUploadResult` (from
|
|
165
|
+
`finalize_upload` and `finalize_merkle_upload`) have a `sha256` field: the
|
|
166
|
+
plaintext's SHA-256 (hex); requires antd 0.17.0 or later, none on older
|
|
167
|
+
daemons (`nil`, over REST and gRPC alike).
|
|
168
|
+
|
|
163
169
|
### Pointers
|
|
164
170
|
|
|
165
171
|
A pointer is a small, owner-signed, mutable reference. Its address is derived
|
|
@@ -361,6 +367,14 @@ only, in the hex form `data_get` and `file_get` take), `exact_size`, and
|
|
|
361
367
|
content) to fill in `exact_size`; an entry that fails gets an `error` instead
|
|
362
368
|
of failing the call.
|
|
363
369
|
|
|
370
|
+
An entry can record the file's plaintext SHA-256: give `sha256` (hex) on a
|
|
371
|
+
`ManifestEntryInput` or Hash entry, and read it back as `sha256` on the
|
|
372
|
+
`ManifestEntryInfo`, from both build and decode. Both require antd 0.17.0 or
|
|
373
|
+
later. The SDK sends `sha256` only when it is set and non-empty, and passes it
|
|
374
|
+
through unchecked: the daemon validates it (upper or lower case is accepted,
|
|
375
|
+
lowercase comes back) and a bad one raises `BadRequestError`. An entry with no
|
|
376
|
+
recorded hash reads `nil`.
|
|
377
|
+
|
|
364
378
|
`manifest` is always raw bytes: the SDK base64-encodes it for REST and sends
|
|
365
379
|
it as-is over gRPC. Sizes are `Integer`s, and anything a manifest leaves unset
|
|
366
380
|
is `nil` on both transports, so a missing `size` or `exact_size` is `nil`,
|
data/lib/antd/client.rb
CHANGED
|
@@ -61,7 +61,8 @@ module Antd
|
|
|
61
61
|
DataPutResult.new(
|
|
62
62
|
data_map: j["data_map"] || "",
|
|
63
63
|
chunks_stored: (j["chunks_stored"] || 0).to_i,
|
|
64
|
-
payment_mode_used: j["payment_mode_used"] || ""
|
|
64
|
+
payment_mode_used: j["payment_mode_used"] || "",
|
|
65
|
+
sha256: presence(j["sha256"])
|
|
65
66
|
)
|
|
66
67
|
end
|
|
67
68
|
|
|
@@ -120,7 +121,8 @@ module Antd
|
|
|
120
121
|
DataPutPublicResult.new(
|
|
121
122
|
address: j["address"] || "",
|
|
122
123
|
chunks_stored: (j["chunks_stored"] || 0).to_i,
|
|
123
|
-
payment_mode_used: j["payment_mode_used"] || ""
|
|
124
|
+
payment_mode_used: j["payment_mode_used"] || "",
|
|
125
|
+
sha256: presence(j["sha256"])
|
|
124
126
|
)
|
|
125
127
|
end
|
|
126
128
|
|
|
@@ -248,7 +250,8 @@ module Antd
|
|
|
248
250
|
storage_cost_atto: j["storage_cost_atto"] || "",
|
|
249
251
|
gas_cost_wei: j["gas_cost_wei"] || "",
|
|
250
252
|
chunks_stored: (j["chunks_stored"] || 0).to_i,
|
|
251
|
-
payment_mode_used: j["payment_mode_used"] || ""
|
|
253
|
+
payment_mode_used: j["payment_mode_used"] || "",
|
|
254
|
+
sha256: presence(j["sha256"])
|
|
252
255
|
)
|
|
253
256
|
end
|
|
254
257
|
|
|
@@ -273,7 +276,8 @@ module Antd
|
|
|
273
276
|
storage_cost_atto: j["storage_cost_atto"] || "",
|
|
274
277
|
gas_cost_wei: j["gas_cost_wei"] || "",
|
|
275
278
|
chunks_stored: (j["chunks_stored"] || 0).to_i,
|
|
276
|
-
payment_mode_used: j["payment_mode_used"] || ""
|
|
279
|
+
payment_mode_used: j["payment_mode_used"] || "",
|
|
280
|
+
sha256: presence(j["sha256"])
|
|
277
281
|
)
|
|
278
282
|
end
|
|
279
283
|
|
|
@@ -671,7 +675,8 @@ module Antd
|
|
|
671
675
|
address: j["address"] || "",
|
|
672
676
|
chunks_stored: (j["chunks_stored"] || 0).to_i,
|
|
673
677
|
data_map: j["data_map"] || "",
|
|
674
|
-
data_map_address: j["data_map_address"] || ""
|
|
678
|
+
data_map_address: j["data_map_address"] || "",
|
|
679
|
+
sha256: presence(j["sha256"])
|
|
675
680
|
)
|
|
676
681
|
end
|
|
677
682
|
|
data/lib/antd/grpc_client.rb
CHANGED
|
@@ -79,7 +79,8 @@ module Antd
|
|
|
79
79
|
def data_put(data, payment_mode: PaymentMode::AUTO)
|
|
80
80
|
req = Antd::V1::PutDataRequest.new(data: data.b, payment_mode: payment_mode)
|
|
81
81
|
resp = grpc_call { @data_stub.put(req) }
|
|
82
|
-
DataPutResult.new(data_map: resp.data_map, chunks_stored: resp.chunks_stored, payment_mode_used: resp.payment_mode_used
|
|
82
|
+
DataPutResult.new(data_map: resp.data_map, chunks_stored: resp.chunks_stored, payment_mode_used: resp.payment_mode_used,
|
|
83
|
+
sha256: presence(resp.sha256))
|
|
83
84
|
end
|
|
84
85
|
|
|
85
86
|
# Retrieve private data from a caller-held DataMap (hex).
|
|
@@ -98,7 +99,8 @@ module Antd
|
|
|
98
99
|
def data_put_public(data, payment_mode: PaymentMode::AUTO)
|
|
99
100
|
req = Antd::V1::PutPublicDataRequest.new(data: data.b, payment_mode: payment_mode)
|
|
100
101
|
resp = grpc_call { @data_stub.put_public(req) }
|
|
101
|
-
DataPutPublicResult.new(address: resp.address, chunks_stored: resp.chunks_stored, payment_mode_used: resp.payment_mode_used
|
|
102
|
+
DataPutPublicResult.new(address: resp.address, chunks_stored: resp.chunks_stored, payment_mode_used: resp.payment_mode_used,
|
|
103
|
+
sha256: presence(resp.sha256))
|
|
102
104
|
end
|
|
103
105
|
|
|
104
106
|
# Retrieve public data by address.
|
|
@@ -229,7 +231,8 @@ module Antd
|
|
|
229
231
|
storage_cost_atto: resp.storage_cost_atto,
|
|
230
232
|
gas_cost_wei: resp.gas_cost_wei,
|
|
231
233
|
chunks_stored: resp.chunks_stored,
|
|
232
|
-
payment_mode_used: resp.payment_mode_used
|
|
234
|
+
payment_mode_used: resp.payment_mode_used,
|
|
235
|
+
sha256: presence(resp.sha256)
|
|
233
236
|
)
|
|
234
237
|
end
|
|
235
238
|
|
|
@@ -255,7 +258,8 @@ module Antd
|
|
|
255
258
|
storage_cost_atto: resp.storage_cost_atto,
|
|
256
259
|
gas_cost_wei: resp.gas_cost_wei,
|
|
257
260
|
chunks_stored: resp.chunks_stored,
|
|
258
|
-
payment_mode_used: resp.payment_mode_used
|
|
261
|
+
payment_mode_used: resp.payment_mode_used,
|
|
262
|
+
sha256: presence(resp.sha256)
|
|
259
263
|
)
|
|
260
264
|
end
|
|
261
265
|
|
|
@@ -411,7 +415,8 @@ module Antd
|
|
|
411
415
|
address: resp.address,
|
|
412
416
|
chunks_stored: resp.chunks_stored.to_i,
|
|
413
417
|
data_map: resp.data_map,
|
|
414
|
-
data_map_address: resp.data_map_address
|
|
418
|
+
data_map_address: resp.data_map_address,
|
|
419
|
+
sha256: presence(resp.sha256)
|
|
415
420
|
)
|
|
416
421
|
end
|
|
417
422
|
|
|
@@ -443,7 +448,8 @@ module Antd
|
|
|
443
448
|
address: resp.address,
|
|
444
449
|
chunks_stored: resp.chunks_stored.to_i,
|
|
445
450
|
data_map: resp.data_map,
|
|
446
|
-
data_map_address: resp.data_map_address
|
|
451
|
+
data_map_address: resp.data_map_address,
|
|
452
|
+
sha256: presence(resp.sha256)
|
|
447
453
|
)
|
|
448
454
|
end
|
|
449
455
|
|
data/lib/antd/grpc_manifests.rb
CHANGED
|
@@ -103,6 +103,7 @@ module Antd
|
|
|
103
103
|
else
|
|
104
104
|
attrs[:data_map] = e.data_map
|
|
105
105
|
end
|
|
106
|
+
attrs[:sha256] = e.sha256 unless e.sha256.nil? || e.sha256.empty?
|
|
106
107
|
Antd::V1::ManifestEntryInput.new(**attrs)
|
|
107
108
|
end
|
|
108
109
|
|
|
@@ -116,7 +117,8 @@ module Antd
|
|
|
116
117
|
content_address: e.content_address,
|
|
117
118
|
data_map: manifest_pb_string(e.data_map),
|
|
118
119
|
exact_size: e.has_exact_size? ? e.exact_size : nil,
|
|
119
|
-
error: manifest_pb_string(e.error)
|
|
120
|
+
error: manifest_pb_string(e.error),
|
|
121
|
+
sha256: manifest_pb_string(e.sha256)
|
|
120
122
|
)
|
|
121
123
|
end
|
|
122
124
|
|
data/lib/antd/manifests.rb
CHANGED
|
@@ -41,8 +41,11 @@ module Antd
|
|
|
41
41
|
# - +data_map+: a hex DataMap, as the upload methods return it. The entry
|
|
42
42
|
# embeds it.
|
|
43
43
|
# - +address+: a public file's DataMap address (hex, 32 bytes).
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
# - +sha256+: the plaintext's SHA-256 to record, as hex, passed through
|
|
45
|
+
# unchecked (the daemon validates it). nil or "": none is recorded.
|
|
46
|
+
# Needs antd 0.17.0 or later.
|
|
47
|
+
ManifestEntryInput = Struct.new(:path, :size, :data_map, :address, :sha256, keyword_init: true) do
|
|
48
|
+
def initialize(path: nil, size: nil, data_map: nil, address: nil, sha256: nil)
|
|
46
49
|
super
|
|
47
50
|
end
|
|
48
51
|
end
|
|
@@ -65,12 +68,15 @@ module Antd
|
|
|
65
68
|
# or after a resolving decode; nil when unknown.
|
|
66
69
|
# - +error+: why a resolving decode failed for this entry, or nil. A
|
|
67
70
|
# failed entry does not fail the call.
|
|
71
|
+
# - +sha256+: the plaintext's SHA-256 (hex) the manifest records, or nil
|
|
72
|
+
# (antd 0.17.0 or later).
|
|
68
73
|
ManifestEntryInfo = Struct.new(
|
|
69
74
|
:effective_name, :path, :size, :kind, :content_address, :data_map, :exact_size, :error,
|
|
75
|
+
:sha256,
|
|
70
76
|
keyword_init: true
|
|
71
77
|
) do
|
|
72
78
|
def initialize(effective_name: "", path: nil, size: nil, kind: "", content_address: "",
|
|
73
|
-
data_map: nil, exact_size: nil, error: nil)
|
|
79
|
+
data_map: nil, exact_size: nil, error: nil, sha256: nil)
|
|
74
80
|
super
|
|
75
81
|
end
|
|
76
82
|
end
|
|
@@ -143,7 +149,7 @@ module Antd
|
|
|
143
149
|
e
|
|
144
150
|
rescue ArgumentError
|
|
145
151
|
# A Hash with a key ManifestEntryInput does not have.
|
|
146
|
-
errors << "entries[#{i}]: unknown field (expected path, size, data_map, address)"
|
|
152
|
+
errors << "entries[#{i}]: unknown field (expected path, size, data_map, address, sha256)"
|
|
147
153
|
nil
|
|
148
154
|
end
|
|
149
155
|
raise BadRequestError, Antd.manifest_entry_errors_message(errors) unless errors.empty?
|
|
@@ -198,6 +204,7 @@ module Antd
|
|
|
198
204
|
else
|
|
199
205
|
m[:data_map] = e.data_map
|
|
200
206
|
end
|
|
207
|
+
m[:sha256] = e.sha256 unless e.sha256.nil? || e.sha256.empty?
|
|
201
208
|
m
|
|
202
209
|
end
|
|
203
210
|
body = { entries: wire, embed_roots: embed_roots ? true : false }
|
|
@@ -282,7 +289,8 @@ module Antd
|
|
|
282
289
|
content_address: e["content_address"] || "",
|
|
283
290
|
data_map: manifest_string(e["data_map"]),
|
|
284
291
|
exact_size: manifest_size(e["exact_size"]),
|
|
285
|
-
error: manifest_string(e["error"])
|
|
292
|
+
error: manifest_string(e["error"]),
|
|
293
|
+
sha256: manifest_string(e["sha256"])
|
|
286
294
|
)
|
|
287
295
|
end
|
|
288
296
|
end
|
data/lib/antd/models.rb
CHANGED
|
@@ -39,16 +39,19 @@ module Antd
|
|
|
39
39
|
|
|
40
40
|
# Result of a private data put. The DataMap is returned to the caller;
|
|
41
41
|
# it is NOT stored on-network.
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
#
|
|
43
|
+
# +sha256+ (antd 0.17.0 or later) is the plaintext's SHA-256 as lowercase
|
|
44
|
+
# hex, or nil on an older daemon. The put results below carry it too.
|
|
45
|
+
DataPutResult = Struct.new(:data_map, :chunks_stored, :payment_mode_used, :sha256, keyword_init: true) do
|
|
46
|
+
def initialize(data_map: "", chunks_stored: 0, payment_mode_used: "", sha256: nil)
|
|
44
47
|
super
|
|
45
48
|
end
|
|
46
49
|
end
|
|
47
50
|
|
|
48
51
|
# Result of a public data put. The DataMap is stored on-network as an extra
|
|
49
52
|
# chunk; +address+ is the shareable retrieval handle.
|
|
50
|
-
DataPutPublicResult = Struct.new(:address, :chunks_stored, :payment_mode_used, keyword_init: true) do
|
|
51
|
-
def initialize(address: "", chunks_stored: 0, payment_mode_used: "")
|
|
53
|
+
DataPutPublicResult = Struct.new(:address, :chunks_stored, :payment_mode_used, :sha256, keyword_init: true) do
|
|
54
|
+
def initialize(address: "", chunks_stored: 0, payment_mode_used: "", sha256: nil)
|
|
52
55
|
super
|
|
53
56
|
end
|
|
54
57
|
end
|
|
@@ -61,6 +64,7 @@ module Antd
|
|
|
61
64
|
:gas_cost_wei, # decimal string
|
|
62
65
|
:chunks_stored, # uint64
|
|
63
66
|
:payment_mode_used, # "auto", "merkle", or "single"
|
|
67
|
+
:sha256, # plaintext SHA-256 (hex), nil before antd 0.17.0
|
|
64
68
|
keyword_init: true
|
|
65
69
|
)
|
|
66
70
|
|
|
@@ -72,6 +76,7 @@ module Antd
|
|
|
72
76
|
:gas_cost_wei,
|
|
73
77
|
:chunks_stored,
|
|
74
78
|
:payment_mode_used,
|
|
79
|
+
:sha256, # plaintext SHA-256 (hex), nil before antd 0.17.0
|
|
75
80
|
keyword_init: true
|
|
76
81
|
)
|
|
77
82
|
|
|
@@ -111,11 +116,13 @@ module Antd
|
|
|
111
116
|
# +data_map_address+ is populated only when prepare was called with
|
|
112
117
|
# +visibility: "public"+ — the DataMap chunk was paid + stored in the same
|
|
113
118
|
# external-signer batch, and this is the shareable retrieval handle.
|
|
119
|
+
# +sha256+ (antd 0.17.0 or later) is the plaintext's SHA-256 as lowercase
|
|
120
|
+
# hex, or nil on an older daemon.
|
|
114
121
|
FinalizeUploadResult = Struct.new(
|
|
115
|
-
:address, :chunks_stored, :data_map, :data_map_address,
|
|
122
|
+
:address, :chunks_stored, :data_map, :data_map_address, :sha256,
|
|
116
123
|
keyword_init: true
|
|
117
124
|
) do
|
|
118
|
-
def initialize(address: "", chunks_stored: 0, data_map: "", data_map_address: "")
|
|
125
|
+
def initialize(address: "", chunks_stored: 0, data_map: "", data_map_address: "", sha256: nil)
|
|
119
126
|
super
|
|
120
127
|
end
|
|
121
128
|
end
|
data/lib/antd/v1/data_pb.rb
CHANGED
|
@@ -7,7 +7,7 @@ require 'google/protobuf'
|
|
|
7
7
|
require 'antd/v1/common_pb'
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
descriptor_data = "\n\x12\x61ntd/v1/data.proto\x12\x07\x61ntd.v1\x1a\x14\x61ntd/v1/common.proto\"\'\n\x14GetPublicDataRequest\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\t\"%\n\x15GetPublicDataResponse\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\":\n\x14PutPublicDataRequest\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x12\x14\n\x0cpayment_mode\x18\x02 \x01(\t\"
|
|
10
|
+
descriptor_data = "\n\x12\x61ntd/v1/data.proto\x12\x07\x61ntd.v1\x1a\x14\x61ntd/v1/common.proto\"\'\n\x14GetPublicDataRequest\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\t\"%\n\x15GetPublicDataResponse\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\":\n\x14PutPublicDataRequest\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x12\x14\n\x0cpayment_mode\x18\x02 \x01(\t\"\x87\x01\n\x15PutPublicDataResponse\x12\x1b\n\x04\x63ost\x18\x01 \x01(\x0b\x32\r.antd.v1.Cost\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\t\x12\x15\n\rchunks_stored\x18\x03 \x01(\x04\x12\x19\n\x11payment_mode_used\x18\x04 \x01(\t\x12\x0e\n\x06sha256\x18\x05 \x01(\t\"\x84\x01\n\x17StreamPublicDataRequest\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\t\x12\x18\n\x10include_progress\x18\x02 \x01(\x08\x12\x13\n\x06offset\x18\x03 \x01(\x04H\x00\x88\x01\x01\x12\x13\n\x06length\x18\x04 \x01(\x04H\x01\x88\x01\x01\x42\t\n\x07_offsetB\t\n\x07_length\"R\n\tDataChunk\x12\x0e\n\x04\x64\x61ta\x18\x01 \x01(\x0cH\x00\x12-\n\x08progress\x18\x02 \x01(\x0b\x32\x19.antd.v1.DownloadProgressH\x00\x42\x06\n\x04kind\"A\n\x10\x44ownloadProgress\x12\r\n\x05phase\x18\x01 \x01(\t\x12\x0f\n\x07\x66\x65tched\x18\x02 \x01(\x04\x12\r\n\x05total\x18\x03 \x01(\x04\"\"\n\x0eGetDataRequest\x12\x10\n\x08\x64\x61ta_map\x18\x01 \x01(\t\"\x7f\n\x11StreamDataRequest\x12\x10\n\x08\x64\x61ta_map\x18\x01 \x01(\t\x12\x18\n\x10include_progress\x18\x02 \x01(\x08\x12\x13\n\x06offset\x18\x03 \x01(\x04H\x00\x88\x01\x01\x12\x13\n\x06length\x18\x04 \x01(\x04H\x01\x88\x01\x01\x42\t\n\x07_offsetB\t\n\x07_length\"\x1f\n\x0fGetDataResponse\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\"4\n\x0ePutDataRequest\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x12\x14\n\x0cpayment_mode\x18\x02 \x01(\t\"\x82\x01\n\x0fPutDataResponse\x12\x1b\n\x04\x63ost\x18\x01 \x01(\x0b\x32\r.antd.v1.Cost\x12\x10\n\x08\x64\x61ta_map\x18\x02 \x01(\t\x12\x15\n\rchunks_stored\x18\x03 \x01(\x04\x12\x19\n\x11payment_mode_used\x18\x04 \x01(\t\x12\x0e\n\x06sha256\x18\x05 \x01(\t\"5\n\x0f\x44\x61taCostRequest\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x12\x14\n\x0cpayment_mode\x18\x02 \x01(\t2\xce\x03\n\x0b\x44\x61taService\x12\x38\n\x03Put\x12\x17.antd.v1.PutDataRequest\x1a\x18.antd.v1.PutDataResponse\x12J\n\tPutPublic\x12\x1d.antd.v1.PutPublicDataRequest\x1a\x1e.antd.v1.PutPublicDataResponse\x12\x38\n\x03Get\x12\x17.antd.v1.GetDataRequest\x1a\x18.antd.v1.GetDataResponse\x12J\n\tGetPublic\x12\x1d.antd.v1.GetPublicDataRequest\x1a\x1e.antd.v1.GetPublicDataResponse\x12:\n\x06Stream\x12\x1a.antd.v1.StreamDataRequest\x1a\x12.antd.v1.DataChunk0\x01\x12\x46\n\x0cStreamPublic\x12 .antd.v1.StreamPublicDataRequest\x1a\x12.antd.v1.DataChunk0\x01\x12/\n\x04\x43ost\x12\x18.antd.v1.DataCostRequest\x1a\r.antd.v1.CostBDZ8github.com/WithAutonomi/ant-sdk/antd-go/proto/antd/v1;v1\xaa\x02\x07\x41ntd.V1b\x06proto3"
|
|
11
11
|
|
|
12
12
|
pool = ::Google::Protobuf::DescriptorPool.generated_pool
|
|
13
13
|
pool.add_serialized_file(descriptor_data)
|
data/lib/antd/v1/files_pb.rb
CHANGED
|
@@ -7,7 +7,7 @@ require 'google/protobuf'
|
|
|
7
7
|
require 'antd/v1/common_pb'
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
descriptor_data = "\n\x13\x61ntd/v1/files.proto\x12\x07\x61ntd.v1\x1a\x14\x61ntd/v1/common.proto\"4\n\x0ePutFileRequest\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x14\n\x0cpayment_mode\x18\x02 \x01(\t\"\
|
|
10
|
+
descriptor_data = "\n\x13\x61ntd/v1/files.proto\x12\x07\x61ntd.v1\x1a\x14\x61ntd/v1/common.proto\"4\n\x0ePutFileRequest\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x14\n\x0cpayment_mode\x18\x02 \x01(\t\"\xa7\x01\n\x15PutFilePublicResponse\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\t\x12\x19\n\x11storage_cost_atto\x18\x03 \x01(\t\x12\x14\n\x0cgas_cost_wei\x18\x04 \x01(\t\x12\x15\n\rchunks_stored\x18\x05 \x01(\x04\x12\x19\n\x11payment_mode_used\x18\x06 \x01(\t\x12\x0e\n\x06sha256\x18\x07 \x01(\tJ\x04\x08\x01\x10\x02R\x04\x63ost\"\x96\x01\n\x0fPutFileResponse\x12\x10\n\x08\x64\x61ta_map\x18\x01 \x01(\t\x12\x19\n\x11storage_cost_atto\x18\x02 \x01(\t\x12\x14\n\x0cgas_cost_wei\x18\x03 \x01(\t\x12\x15\n\rchunks_stored\x18\x04 \x01(\x04\x12\x19\n\x11payment_mode_used\x18\x05 \x01(\t\x12\x0e\n\x06sha256\x18\x06 \x01(\t\":\n\x14GetFilePublicRequest\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\t\x12\x11\n\tdest_path\x18\x02 \x01(\t\"5\n\x0eGetFileRequest\x12\x10\n\x08\x64\x61ta_map\x18\x01 \x01(\t\x12\x11\n\tdest_path\x18\x02 \x01(\t\"\x11\n\x0fGetFileResponse\"H\n\x0f\x46ileCostRequest\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x11\n\tis_public\x18\x02 \x01(\x08\x12\x14\n\x0cpayment_mode\x18\x03 \x01(\t2\xbe\x02\n\x0b\x46ileService\x12\x38\n\x03Put\x12\x17.antd.v1.PutFileRequest\x1a\x18.antd.v1.PutFileResponse\x12\x44\n\tPutPublic\x12\x17.antd.v1.PutFileRequest\x1a\x1e.antd.v1.PutFilePublicResponse\x12\x38\n\x03Get\x12\x17.antd.v1.GetFileRequest\x1a\x18.antd.v1.GetFileResponse\x12\x44\n\tGetPublic\x12\x1d.antd.v1.GetFilePublicRequest\x1a\x18.antd.v1.GetFileResponse\x12/\n\x04\x43ost\x12\x18.antd.v1.FileCostRequest\x1a\r.antd.v1.CostBDZ8github.com/WithAutonomi/ant-sdk/antd-go/proto/antd/v1;v1\xaa\x02\x07\x41ntd.V1b\x06proto3"
|
|
11
11
|
|
|
12
12
|
pool = ::Google::Protobuf::DescriptorPool.generated_pool
|
|
13
13
|
pool.add_serialized_file(descriptor_data)
|
data/lib/antd/v1/manifests_pb.rb
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
require 'google/protobuf'
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
descriptor_data = "\n\x17\x61ntd/v1/manifests.proto\x12\x07\x61ntd.v1\"
|
|
8
|
+
descriptor_data = "\n\x17\x61ntd/v1/manifests.proto\x12\x07\x61ntd.v1\"\x9d\x01\n\x12ManifestEntryInput\x12\x11\n\x04path\x18\x01 \x01(\tH\x01\x88\x01\x01\x12\x11\n\x04size\x18\x02 \x01(\x04H\x02\x88\x01\x01\x12\x13\n\x06sha256\x18\x05 \x01(\tH\x03\x88\x01\x01\x12\x12\n\x08\x64\x61ta_map\x18\x03 \x01(\tH\x00\x12\x11\n\x07\x61\x64\x64ress\x18\x04 \x01(\tH\x00\x42\x08\n\x06sourceB\x07\n\x05_pathB\x07\n\x05_sizeB\t\n\x07_sha256\"\xa7\x01\n\x14\x42uildManifestRequest\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x13torrent_info_hashes\x18\x02 \x03(\t\x12\x18\n\x0b\x65mbed_roots\x18\x03 \x01(\x08H\x01\x88\x01\x01\x12,\n\x07\x65ntries\x18\x04 \x03(\x0b\x32\x1b.antd.v1.ManifestEntryInputB\x07\n\x05_nameB\x0e\n\x0c_embed_roots\"\xe3\x01\n\x11ManifestEntryInfo\x12\x16\n\x0e\x65\x66\x66\x65\x63tive_name\x18\x01 \x01(\t\x12\x11\n\x04path\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x11\n\x04size\x18\x03 \x01(\x04H\x01\x88\x01\x01\x12\x0c\n\x04kind\x18\x04 \x01(\t\x12\x17\n\x0f\x63ontent_address\x18\x05 \x01(\t\x12\x10\n\x08\x64\x61ta_map\x18\x06 \x01(\t\x12\x17\n\nexact_size\x18\x07 \x01(\x04H\x02\x88\x01\x01\x12\r\n\x05\x65rror\x18\x08 \x01(\t\x12\x0e\n\x06sha256\x18\t \x01(\tB\x07\n\x05_pathB\x07\n\x05_sizeB\r\n\x0b_exact_size\"d\n\x15\x42uildManifestResponse\x12\x10\n\x08manifest\x18\x01 \x01(\x0c\x12\x0c\n\x04link\x18\x02 \x01(\t\x12+\n\x07\x65ntries\x18\x03 \x03(\x0b\x32\x1a.antd.v1.ManifestEntryInfo\"U\n\x15\x44\x65\x63odeManifestRequest\x12\x12\n\x08manifest\x18\x01 \x01(\x0cH\x00\x12\x0e\n\x04link\x18\x02 \x01(\tH\x00\x12\x0f\n\x07resolve\x18\x03 \x01(\x08\x42\x07\n\x05input\"\xad\x01\n\x16\x44\x65\x63odeManifestResponse\x12\x0e\n\x06source\x18\x01 \x01(\t\x12\x11\n\x04name\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x14torrent_info_hash_v1\x18\x03 \x01(\t\x12\x1c\n\x14torrent_info_hash_v2\x18\x04 \x01(\t\x12+\n\x07\x65ntries\x18\x05 \x03(\x0b\x32\x1a.antd.v1.ManifestEntryInfoB\x07\n\x05_name2\xa4\x01\n\x0fManifestService\x12\x46\n\x05\x42uild\x12\x1d.antd.v1.BuildManifestRequest\x1a\x1e.antd.v1.BuildManifestResponse\x12I\n\x06\x44\x65\x63ode\x12\x1e.antd.v1.DecodeManifestRequest\x1a\x1f.antd.v1.DecodeManifestResponseBDZ8github.com/WithAutonomi/ant-sdk/antd-go/proto/antd/v1;v1\xaa\x02\x07\x41ntd.V1b\x06proto3"
|
|
9
9
|
|
|
10
10
|
pool = ::Google::Protobuf::DescriptorPool.generated_pool
|
|
11
11
|
pool.add_serialized_file(descriptor_data)
|
data/lib/antd/v1/upload_pb.rb
CHANGED
|
@@ -7,7 +7,7 @@ require 'google/protobuf'
|
|
|
7
7
|
require 'antd/v1/common_pb'
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
descriptor_data = "\n\x14\x61ntd/v1/upload.proto\x12\x07\x61ntd.v1\x1a\x14\x61ntd/v1/common.proto\"[\n\x18PrepareFileUploadRequest\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x12\n\nvisibility\x18\x02 \x01(\t\x12\x1d\n\x15include_signed_quotes\x18\x03 \x01(\x08\"[\n\x18PrepareDataUploadRequest\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x12\x12\n\nvisibility\x18\x02 \x01(\t\x12\x1d\n\x15include_signed_quotes\x18\x03 \x01(\x08\"\xd0\x03\n\x15PrepareUploadResponse\x12\x11\n\tupload_id\x18\x01 \x01(\t\x12\x14\n\x0cpayment_type\x18\x02 \x01(\t\x12\'\n\x08payments\x18\x03 \x03(\x0b\x32\x15.antd.v1.PaymentEntry\x12\r\n\x05\x64\x65pth\x18\x04 \x01(\r\x12\x36\n\x10pool_commitments\x18\x05 \x03(\x0b\x32\x1c.antd.v1.PoolCommitmentEntry\x12 \n\x18merkle_payment_timestamp\x18\x06 \x01(\x04\x12\x31\n\x0emerkle_batches\x18\x0b \x03(\x0b\x32\x19.antd.v1.MerkleBatchEntry\x12\x14\n\x0ctotal_amount\x18\x07 \x01(\t\x12\x1d\n\x15payment_vault_address\x18\x08 \x01(\t\x12\x1d\n\x15payment_token_address\x18\t \x01(\t\x12\x0f\n\x07rpc_url\x18\n \x01(\t\x12\x30\n\rsigned_quotes\x18\x0c \x03(\x0b\x32\x19.antd.v1.SignedQuoteEntry\x12\x14\n\x0ctotal_chunks\x18\r \x01(\x04\x12\x1c\n\x14\x61lready_stored_count\x18\x0e \x01(\x04\"{\n\x10MerkleBatchEntry\x12\r\n\x05\x64\x65pth\x18\x01 \x01(\r\x12\x36\n\x10pool_commitments\x18\x02 \x03(\x0b\x32\x1c.antd.v1.PoolCommitmentEntry\x12 \n\x18merkle_payment_timestamp\x18\x03 \x01(\x04\"Y\n\x13PoolCommitmentEntry\x12\x11\n\tpool_hash\x18\x01 \x01(\t\x12/\n\ncandidates\x18\x02 \x03(\x0b\x32\x1b.antd.v1.CandidateNodeEntry\"=\n\x12\x43\x61ndidateNodeEntry\x12\x17\n\x0frewards_address\x18\x01 \x01(\t\x12\x0e\n\x06\x61mount\x18\x02 \x01(\t\"\xea\x01\n\x15\x46inalizeUploadRequest\x12\x11\n\tupload_id\x18\x01 \x01(\t\x12?\n\ttx_hashes\x18\x02 \x03(\x0b\x32,.antd.v1.FinalizeUploadRequest.TxHashesEntry\x12\x18\n\x10winner_pool_hash\x18\x03 \x01(\t\x12\x1a\n\x12winner_pool_hashes\x18\x05 \x03(\t\x12\x16\n\x0estore_data_map\x18\x04 \x01(\x08\x1a/\n\rTxHashesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"
|
|
10
|
+
descriptor_data = "\n\x14\x61ntd/v1/upload.proto\x12\x07\x61ntd.v1\x1a\x14\x61ntd/v1/common.proto\"[\n\x18PrepareFileUploadRequest\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x12\n\nvisibility\x18\x02 \x01(\t\x12\x1d\n\x15include_signed_quotes\x18\x03 \x01(\x08\"[\n\x18PrepareDataUploadRequest\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x12\x12\n\nvisibility\x18\x02 \x01(\t\x12\x1d\n\x15include_signed_quotes\x18\x03 \x01(\x08\"\xd0\x03\n\x15PrepareUploadResponse\x12\x11\n\tupload_id\x18\x01 \x01(\t\x12\x14\n\x0cpayment_type\x18\x02 \x01(\t\x12\'\n\x08payments\x18\x03 \x03(\x0b\x32\x15.antd.v1.PaymentEntry\x12\r\n\x05\x64\x65pth\x18\x04 \x01(\r\x12\x36\n\x10pool_commitments\x18\x05 \x03(\x0b\x32\x1c.antd.v1.PoolCommitmentEntry\x12 \n\x18merkle_payment_timestamp\x18\x06 \x01(\x04\x12\x31\n\x0emerkle_batches\x18\x0b \x03(\x0b\x32\x19.antd.v1.MerkleBatchEntry\x12\x14\n\x0ctotal_amount\x18\x07 \x01(\t\x12\x1d\n\x15payment_vault_address\x18\x08 \x01(\t\x12\x1d\n\x15payment_token_address\x18\t \x01(\t\x12\x0f\n\x07rpc_url\x18\n \x01(\t\x12\x30\n\rsigned_quotes\x18\x0c \x03(\x0b\x32\x19.antd.v1.SignedQuoteEntry\x12\x14\n\x0ctotal_chunks\x18\r \x01(\x04\x12\x1c\n\x14\x61lready_stored_count\x18\x0e \x01(\x04\"{\n\x10MerkleBatchEntry\x12\r\n\x05\x64\x65pth\x18\x01 \x01(\r\x12\x36\n\x10pool_commitments\x18\x02 \x03(\x0b\x32\x1c.antd.v1.PoolCommitmentEntry\x12 \n\x18merkle_payment_timestamp\x18\x03 \x01(\x04\"Y\n\x13PoolCommitmentEntry\x12\x11\n\tpool_hash\x18\x01 \x01(\t\x12/\n\ncandidates\x18\x02 \x03(\x0b\x32\x1b.antd.v1.CandidateNodeEntry\"=\n\x12\x43\x61ndidateNodeEntry\x12\x17\n\x0frewards_address\x18\x01 \x01(\t\x12\x0e\n\x06\x61mount\x18\x02 \x01(\t\"\xea\x01\n\x15\x46inalizeUploadRequest\x12\x11\n\tupload_id\x18\x01 \x01(\t\x12?\n\ttx_hashes\x18\x02 \x03(\x0b\x32,.antd.v1.FinalizeUploadRequest.TxHashesEntry\x12\x18\n\x10winner_pool_hash\x18\x03 \x01(\t\x12\x1a\n\x12winner_pool_hashes\x18\x05 \x03(\t\x12\x16\n\x0estore_data_map\x18\x04 \x01(\x08\x1a/\n\rTxHashesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"|\n\x16\x46inalizeUploadResponse\x12\x10\n\x08\x64\x61ta_map\x18\x01 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\t\x12\x18\n\x10\x64\x61ta_map_address\x18\x03 \x01(\t\x12\x15\n\rchunks_stored\x18\x04 \x01(\x04\x12\x0e\n\x06sha256\x18\x05 \x01(\t2\x92\x02\n\rUploadService\x12V\n\x11PrepareFileUpload\x12!.antd.v1.PrepareFileUploadRequest\x1a\x1e.antd.v1.PrepareUploadResponse\x12V\n\x11PrepareDataUpload\x12!.antd.v1.PrepareDataUploadRequest\x1a\x1e.antd.v1.PrepareUploadResponse\x12Q\n\x0e\x46inalizeUpload\x12\x1e.antd.v1.FinalizeUploadRequest\x1a\x1f.antd.v1.FinalizeUploadResponseBDZ8github.com/WithAutonomi/ant-sdk/antd-go/proto/antd/v1;v1\xaa\x02\x07\x41ntd.V1b\x06proto3"
|
|
11
11
|
|
|
12
12
|
pool = ::Google::Protobuf::DescriptorPool.generated_pool
|
|
13
13
|
pool.add_serialized_file(descriptor_data)
|
data/lib/antd/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: antd
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- WithAutonomi
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-10-
|
|
11
|
+
date: 2026-10-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: grpc
|