antd 0.2.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.
@@ -0,0 +1,308 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "base64"
4
+ require_relative "models"
5
+ require_relative "errors"
6
+ require_relative "client"
7
+
8
+ # Manifests (ADR-0006): `.ant` files and `ant://` links that describe a set
9
+ # of files, each with an optional path and size and either an embedded
10
+ # DataMap or a public DataMap address. The daemon builds and decodes them
11
+ # through ant-core, so callers never re-implement the format. Nothing is
12
+ # uploaded or paid for.
13
+ #
14
+ # This file holds the models and the REST methods on +Antd::Client+;
15
+ # grpc_manifests.rb adds the same methods to +Antd::GrpcClient+.
16
+ module Antd
17
+ # +ManifestEntryInfo#kind+ values.
18
+ module ManifestEntryKind
19
+ # The manifest carries the entry's DataMap: it is the key to the file.
20
+ EMBEDDED = "embedded"
21
+ # The manifest carries a public file's DataMap address.
22
+ PUBLIC = "public"
23
+ end
24
+
25
+ # +DecodedManifest#source+ values.
26
+ module ManifestSource
27
+ # `.ant` bytes or an `ant://manifest/` link.
28
+ MANIFEST = "manifest"
29
+ # A file link or bare address, reported as one public entry with no path.
30
+ FILE_LINK = "file_link"
31
+ end
32
+
33
+ # One file for +build_manifest+. Set exactly one of +data_map+ or
34
+ # +address+; a Hash with the same keys works too.
35
+ #
36
+ # - +path+: the relative path the entry extracts under, subject to the
37
+ # portable path rules. nil: it extracts under its content address.
38
+ # - +size+: the plaintext size to record, as given (the creator's claim).
39
+ # nil: none is recorded; readers take the exact size from an embedded
40
+ # root DataMap.
41
+ # - +data_map+: a hex DataMap, as the upload methods return it. The entry
42
+ # embeds it.
43
+ # - +address+: a public file's DataMap address (hex, 32 bytes).
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)
49
+ super
50
+ end
51
+ end
52
+
53
+ # What a manifest says about one entry. Unset fields are nil on both
54
+ # transports (REST omits them; gRPC sends no value or an empty string),
55
+ # so a +size+ or +exact_size+ the manifest lacks is nil, never 0.
56
+ #
57
+ # - +effective_name+: +path+, or the content address in hex when there is
58
+ # none.
59
+ # - +path+: the entry's path, or nil.
60
+ # - +size+: the size recorded in the manifest (the creator's claim), or nil.
61
+ # - +kind+: a +ManifestEntryKind+ string.
62
+ # - +content_address+: hex. The file's public DataMap address, whether or
63
+ # not it was ever made public; the same for private and public uploads
64
+ # of one file.
65
+ # - +data_map+: the embedded DataMap in the hex form the download methods
66
+ # accept. Decode only; nil for public entries.
67
+ # - +exact_size+: the exact plaintext size, from an embedded root DataMap
68
+ # or after a resolving decode; nil when unknown.
69
+ # - +error+: why a resolving decode failed for this entry, or nil. A
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).
73
+ ManifestEntryInfo = Struct.new(
74
+ :effective_name, :path, :size, :kind, :content_address, :data_map, :exact_size, :error,
75
+ :sha256,
76
+ keyword_init: true
77
+ ) do
78
+ def initialize(effective_name: "", path: nil, size: nil, kind: "", content_address: "",
79
+ data_map: nil, exact_size: nil, error: nil, sha256: nil)
80
+ super
81
+ end
82
+ end
83
+
84
+ # Result of +build_manifest+.
85
+ #
86
+ # - +manifest+: the `.ant` bytes (a binary String).
87
+ # - +link+: the `ant://manifest/` link, or nil when it would not fit the
88
+ # recommended 1,500 bytes.
89
+ # - +entries+: +ManifestEntryInfo+s in encoded order (sorted by effective
90
+ # name).
91
+ BuiltManifest = Struct.new(:manifest, :link, :entries, keyword_init: true)
92
+
93
+ # Result of +decode_manifest+ and +decode_manifest_link+.
94
+ #
95
+ # - +source+: a +ManifestSource+ string.
96
+ # - +name+: the suggested root directory name, or nil.
97
+ # - +torrent_info_hash_v1+, +torrent_info_hash_v2+: hex, or nil when absent.
98
+ # - +entries+: +ManifestEntryInfo+s.
99
+ DecodedManifest = Struct.new(
100
+ :source, :name, :torrent_info_hash_v1, :torrent_info_hash_v2, :entries,
101
+ keyword_init: true
102
+ )
103
+
104
+ # The gRPC message ceiling for manifest calls, both ways: a manifest can be
105
+ # 64 MiB, and a decode response carries its DataMaps in hex. gRPC's default
106
+ # receive limit is 4 MiB.
107
+ MANIFEST_GRPC_MAX_MESSAGE = 256 * 1024 * 1024
108
+
109
+ # The daemon's cap on the entry errors one 400 names.
110
+ MANIFEST_MAX_REPORTED_ENTRY_ERRORS = 20
111
+ private_constant :MANIFEST_MAX_REPORTED_ENTRY_ERRORS
112
+
113
+ # The daemon's message for empty decode input (empty bytes or link).
114
+ MANIFEST_DECODE_NEEDS_INPUT = "needs a manifest (base64 .ant bytes) or a link"
115
+
116
+ # Normalises +build_manifest+ entries to +ManifestEntryInput+s before
117
+ # anything is sent. A refusal is the +BadRequestError+ (400) the daemon
118
+ # would send, with its wording: every bad entry (both or neither of
119
+ # +data_map+ and +address+, nil and "" counting as unset; or a +size+ that
120
+ # is not a non-negative Integer) is collected and named as
121
+ # "N invalid entries: entries[i]: ...; entries[j]: ..." (at most 20, then
122
+ # "; and K more").
123
+ #
124
+ # @api private
125
+ # @param entries [Array<ManifestEntryInput, Hash>]
126
+ # @return [Array<ManifestEntryInput>]
127
+ # @raise [BadRequestError]
128
+ def self.manifest_entry_inputs(entries)
129
+ raise BadRequestError, "entries must be an Array" unless entries.is_a?(Array)
130
+
131
+ errors = []
132
+ inputs = entries.each_with_index.map do |e, i|
133
+ e = ManifestEntryInput.new(**e.transform_keys(&:to_sym)) if e.is_a?(Hash)
134
+ unless e.is_a?(ManifestEntryInput)
135
+ errors << "entries[#{i}]: must be a ManifestEntryInput or Hash"
136
+ next
137
+ end
138
+
139
+ has_data_map = !(e.data_map.nil? || e.data_map.empty?)
140
+ has_address = !(e.address.nil? || e.address.empty?)
141
+ if has_data_map && has_address
142
+ errors << "entries[#{i}]: give data_map or address, not both"
143
+ elsif !has_data_map && !has_address
144
+ errors << "entries[#{i}]: needs a data_map or an address"
145
+ end
146
+ unless e.size.nil? || (e.size.is_a?(Integer) && e.size >= 0)
147
+ errors << "entries[#{i}]: size must be a non-negative Integer or nil"
148
+ end
149
+ e
150
+ rescue ArgumentError
151
+ # A Hash with a key ManifestEntryInput does not have.
152
+ errors << "entries[#{i}]: unknown field (expected path, size, data_map, address, sha256)"
153
+ nil
154
+ end
155
+ raise BadRequestError, Antd.manifest_entry_errors_message(errors) unless errors.empty?
156
+
157
+ inputs
158
+ end
159
+
160
+ # The daemon's +entry_errors_message+.
161
+ #
162
+ # @api private
163
+ def self.manifest_entry_errors_message(errors)
164
+ shown = errors.first(MANIFEST_MAX_REPORTED_ENTRY_ERRORS).join("; ")
165
+ message = "#{errors.length} invalid entries: #{shown}"
166
+ message += "; and #{errors.length - MANIFEST_MAX_REPORTED_ENTRY_ERRORS} more" if errors.length > MANIFEST_MAX_REPORTED_ENTRY_ERRORS
167
+ message
168
+ end
169
+
170
+ class Client
171
+ # --- Manifests ---
172
+
173
+ # Build a `.ant` manifest from DataMaps and public addresses already in
174
+ # hand (POST /v1/manifests/build). Nothing is uploaded or paid for.
175
+ #
176
+ # By default the daemon resolves each shrunk DataMap's root (fetching its
177
+ # wrapper records) and embeds it when it is at most 64 KiB, so recipients
178
+ # skip that fetch (ADR-0006's policy). That reads from the network, so the
179
+ # call can time out; it is safe to retry.
180
+ #
181
+ # Needs antd 0.16.0 or later.
182
+ #
183
+ # @param entries [Array<ManifestEntryInput, Hash>] each with exactly one
184
+ # of +data_map+ or +address+; checked before anything is sent
185
+ # @param name [String, nil] suggested root directory name (one portable
186
+ # path component)
187
+ # @param torrent_info_hashes [Array<String>, nil] BitTorrent info hashes
188
+ # of the same files: hex, 40 characters for v1 and/or 64 for v2
189
+ # @param embed_roots [Boolean] false embeds shrunk DataMaps exactly as
190
+ # given (the wire's +embed_roots+; default true)
191
+ # @return [BuiltManifest]
192
+ # @raise [BadRequestError] an entry with both or neither of +data_map+ and
193
+ # +address+, or a bad +size+, worded as the daemon words it
194
+ # @raise [BadRequestError] an entry the daemon rejects; the message names
195
+ # +entries[i]+
196
+ def build_manifest(entries, name: nil, torrent_info_hashes: nil, embed_roots: true)
197
+ inputs = Antd.manifest_entry_inputs(entries)
198
+ wire = inputs.map do |e|
199
+ m = {}
200
+ m[:path] = e.path unless e.path.nil? || e.path.empty?
201
+ m[:size] = e.size unless e.size.nil?
202
+ if e.data_map.nil? || e.data_map.empty?
203
+ m[:address] = e.address
204
+ else
205
+ m[:data_map] = e.data_map
206
+ end
207
+ m[:sha256] = e.sha256 unless e.sha256.nil? || e.sha256.empty?
208
+ m
209
+ end
210
+ body = { entries: wire, embed_roots: embed_roots ? true : false }
211
+ body[:name] = name unless name.nil? || name.empty?
212
+ hashes = Array(torrent_info_hashes)
213
+ body[:torrent_info_hashes] = hashes unless hashes.empty?
214
+
215
+ j = do_json(:post, "/v1/manifests/build", body)
216
+ BuiltManifest.new(
217
+ manifest: manifest_bytes_from_b64(j["manifest"]),
218
+ link: manifest_string(j["link"]),
219
+ entries: manifest_entry_infos(j["entries"])
220
+ )
221
+ end
222
+
223
+ # Decode `.ant` bytes (POST /v1/manifests/decode). With +resolve+, the
224
+ # daemon fetches each entry's DataMap (and wrapper records) to report
225
+ # +exact_size+ and confirm the DataMap is on the network; content chunks
226
+ # are not fetched, and one entry's failure is reported in its +error+,
227
+ # not as a failed call. Nothing is paid for; safe to retry.
228
+ #
229
+ # Needs antd 0.16.0 or later.
230
+ #
231
+ # @param manifest [String] the `.ant` bytes
232
+ # @param resolve [Boolean]
233
+ # @return [DecodedManifest]
234
+ # @raise [BadRequestError] an empty +manifest+
235
+ # @raise [BadRequestError] bytes that are not a manifest
236
+ def decode_manifest(manifest, resolve: false)
237
+ raise BadRequestError, MANIFEST_DECODE_NEEDS_INPUT if manifest.nil? || manifest.empty?
238
+
239
+ post_manifest_decode({ manifest: b64_encode(manifest), resolve: resolve ? true : false })
240
+ end
241
+
242
+ # Decode an `ant://` manifest link, file link or bare 64-hex address
243
+ # (POST /v1/manifests/decode). See +decode_manifest+ for +resolve+.
244
+ #
245
+ # Needs antd 0.16.0 or later.
246
+ #
247
+ # @param link [String]
248
+ # @param resolve [Boolean]
249
+ # @return [DecodedManifest]
250
+ # @raise [BadRequestError] an empty +link+
251
+ # @raise [BadRequestError] a link the daemon cannot read
252
+ def decode_manifest_link(link, resolve: false)
253
+ raise BadRequestError, MANIFEST_DECODE_NEEDS_INPUT if link.nil? || link.empty?
254
+
255
+ post_manifest_decode({ link: link, resolve: resolve ? true : false })
256
+ end
257
+
258
+ private
259
+
260
+ def post_manifest_decode(body)
261
+ j = do_json(:post, "/v1/manifests/decode", body)
262
+ DecodedManifest.new(
263
+ source: j["source"] || "",
264
+ name: manifest_string(j["name"]),
265
+ torrent_info_hash_v1: manifest_string(j["torrent_info_hash_v1"]),
266
+ torrent_info_hash_v2: manifest_string(j["torrent_info_hash_v2"]),
267
+ entries: manifest_entry_infos(j["entries"])
268
+ )
269
+ end
270
+
271
+ # The build response's base64 `.ant` bytes, raw.
272
+ def manifest_bytes_from_b64(value)
273
+ b64_decode(value.to_s)
274
+ rescue ArgumentError => e
275
+ raise InternalError, "build_manifest: manifest is not valid base64: #{e.message}"
276
+ end
277
+
278
+ def manifest_entry_infos(raw)
279
+ return [] unless raw.is_a?(Array)
280
+
281
+ raw.filter_map do |e|
282
+ next unless e.is_a?(Hash)
283
+
284
+ ManifestEntryInfo.new(
285
+ effective_name: e["effective_name"] || "",
286
+ path: manifest_string(e["path"]),
287
+ size: manifest_size(e["size"]),
288
+ kind: e["kind"] || "",
289
+ content_address: e["content_address"] || "",
290
+ data_map: manifest_string(e["data_map"]),
291
+ exact_size: manifest_size(e["exact_size"]),
292
+ error: manifest_string(e["error"]),
293
+ sha256: manifest_string(e["sha256"])
294
+ )
295
+ end
296
+ end
297
+
298
+ # An optional size: a JSON integer, or nil when absent (never 0).
299
+ def manifest_size(value)
300
+ value.is_a?(Integer) && value >= 0 ? value : nil
301
+ end
302
+
303
+ # An optional string: nil when absent or empty.
304
+ def manifest_string(value)
305
+ value.is_a?(String) && !value.empty? ? value : nil
306
+ end
307
+ end
308
+ 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
- DataPutResult = Struct.new(:data_map, :chunks_stored, :payment_mode_used, keyword_init: true) do
43
- def initialize(data_map: "", chunks_stored: 0, payment_mode_used: "")
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
@@ -195,4 +202,225 @@ module Antd
195
202
  end
196
203
  alias_method :is_meta, :meta?
197
204
  end
205
+
206
+ # One +payments+ quote in full signed form, returned by +pointer_prepare+
207
+ # when called with +include_signed_quotes: true+. +quote+ and
208
+ # +commitment_sidecar+ are opaque base64 strings on both transports (the
209
+ # gRPC client encodes the proto's bytes the same way); only antd parses
210
+ # them. +commitment_sidecar+ is nil for baseline quotes.
211
+ SignedQuoteEntry = Struct.new(:quote_hash, :quote, :commitment_sidecar, keyword_init: true)
212
+
213
+ # --- Pointers (ADR-0016 / ADR-0018 in ant-node) ---
214
+ #
215
+ # A pointer is a small, owner-signed, mutable reference. Its address is
216
+ # derived from the owner's key and never changes; what it points at (a
217
+ # chunk, such as a public file's data map, or another pointer) can be
218
+ # changed by the owner, and the owner can hand it over to another pointer
219
+ # for good. antd signs with owner keys it loaded at startup
220
+ # (+--pointer-keys+), so a write names the pointer by its address (+owner+),
221
+ # never by a key.
222
+ #
223
+ # Every write pays, and every attempt pays again: never retry a create,
224
+ # update, transfer or finalize automatically.
225
+
226
+ # Counter of a pointer's final state, after a transfer or a freeze:
227
+ # 2^64 - 1 (u64::MAX). Nothing can replace a state at this counter.
228
+ POINTER_FINAL_COUNTER = 18_446_744_073_709_551_615
229
+
230
+ # What a pointer's target is. Pass as +kind:+ to the pointer writes; the
231
+ # daemon defaults to +CHUNK+ when it is omitted.
232
+ module PointerKind
233
+ # An immutable chunk, such as a public file's data map. The default.
234
+ CHUNK = "chunk"
235
+ # Another pointer: a forwarding the owner can still change. Use
236
+ # +pointer_transfer+ to hand a pointer over for good.
237
+ POINTER = "pointer"
238
+
239
+ # The kind a raw +kind_tag+ names (0 chunk, 1 pointer), or nil for a tag
240
+ # this SDK does not know.
241
+ #
242
+ # @param tag [Integer]
243
+ # @return [String, nil]
244
+ def self.from_tag(tag)
245
+ case tag
246
+ when 0 then CHUNK
247
+ when 1 then POINTER
248
+ end
249
+ end
250
+ end
251
+
252
+ # The write +pointer_prepare+ signs for an external signer.
253
+ module PointerOp
254
+ # Create the pointer at +target+. Refused if it already exists.
255
+ CREATE = "create"
256
+ # Point the pointer at +target+, creating it if it does not exist.
257
+ UPDATE = "update"
258
+ # Hand the pointer over for good to the pointer at +recipient+, which must
259
+ # already exist. Irreversible once stored.
260
+ TRANSFER = "transfer"
261
+ end
262
+
263
+ # Where a pointer stands with respect to finality (+PointerFinality#status+).
264
+ #
265
+ # The status is the daemon's wire string. These are the values this SDK
266
+ # knows; a newer daemon may send another, which is kept verbatim (the
267
+ # "unknown" arm: +PointerFinality#status_known?+ is false). Give a +case+
268
+ # over the status an +else+ branch.
269
+ module PointerFinalityStatus
270
+ # No peer that answered holds a final state: the owner can still move the
271
+ # pointer. Rules a final state out only when every peer answered.
272
+ OPEN = "open"
273
+ # One final state, not yet held by a majority: a transfer still
274
+ # spreading, or a write that fell short.
275
+ SETTLING = "settling"
276
+ # One final state held by a majority, but not every peer answered, so a
277
+ # rival could still be unseen. Ask again.
278
+ UNCONFIRMED = "unconfirmed"
279
+ # One final state held by a majority, every peer answered, no rival. The
280
+ # only status a recipient should rely on.
281
+ FINAL = "final"
282
+ # The owner signed two or more different final states.
283
+ FORKED = "forked"
284
+
285
+ # Every status this SDK knows.
286
+ KNOWN = [OPEN, SETTLING, UNCONFIRMED, FINAL, FORKED].freeze
287
+
288
+ # @param status [String]
289
+ # @return [Boolean] whether this SDK knows +status+
290
+ def self.known?(status)
291
+ KNOWN.include?(status)
292
+ end
293
+ end
294
+
295
+ # The state a pointer write stored (+pointer_create+ / +pointer_update+).
296
+ # +counter+ is an Integer; a final state sits at +POINTER_FINAL_COUNTER+.
297
+ PointerWriteResult = Struct.new(:address, :state_id, :counter, keyword_init: true)
298
+
299
+ # A pointer's current state, as the network serves it (+pointer_get+).
300
+ #
301
+ # - +owner+: the owner's ML-DSA-65 public key (hex, 1,952 bytes). The
302
+ # address is derived from it, so it is the proof of who owns the pointer.
303
+ # - +counter+: Integer, +POINTER_FINAL_COUNTER+ once final.
304
+ # - +kind+: "chunk", "pointer", or "unknown" for a kind the daemon does not
305
+ # know; +kind_tag+ carries the raw value either way.
306
+ # - +is_final+: the state is at the final counter, so nothing can replace it.
307
+ # - +transferred_to+: the pointer this one was handed over to, or nil.
308
+ PointerRecord = Struct.new(
309
+ :address, :owner, :counter, :kind, :kind_tag, :target, :state_id,
310
+ :is_final, :transferred_to,
311
+ keyword_init: true
312
+ ) do
313
+ # @return [Boolean] true at the final counter: transferred or frozen
314
+ def final?
315
+ is_final == true
316
+ end
317
+
318
+ # @return [String, nil] the target's +PointerKind+, if this SDK knows its tag
319
+ def target_kind
320
+ PointerKind.from_tag(kind_tag)
321
+ end
322
+ end
323
+
324
+ # Where a chain of pointers ends (+pointer_resolve+): the target's +kind+
325
+ # ("chunk", or "unknown" for a kind the daemon does not know), its raw
326
+ # +kind_tag+ and the +target+ address.
327
+ PointerTarget = Struct.new(:kind, :kind_tag, :target, keyword_init: true) do
328
+ # @return [String, nil] the target's +PointerKind+, if this SDK knows its tag
329
+ def target_kind
330
+ PointerKind.from_tag(kind_tag)
331
+ end
332
+ end
333
+
334
+ # One final state, as a finality check reports it. +holders+ is how many
335
+ # peers of the close group hold it; +transferred_to+ is nil unless the
336
+ # state is a transfer.
337
+ PointerFinalState = Struct.new(
338
+ :state_id, :kind, :kind_tag, :target, :holders, :transferred_to,
339
+ keyword_init: true
340
+ )
341
+
342
+ # Where a pointer stands, as its whole close group reports it
343
+ # (+pointer_finality+). Check it before relying on a transfer: only
344
+ # +final?+ means the transfer is beyond dispute.
345
+ #
346
+ # - +group+ / +answered+: peers in the close group, and peers that answered.
347
+ # - +status+: a +PointerFinalityStatus+ string (see there for unknown ones).
348
+ # - +counter+: +open+ only, the Integer counter a read would return, or nil
349
+ # when no state is corroborated.
350
+ # - +state+: +settling+, +unconfirmed+ and +final+, the one final state seen
351
+ # (+PointerFinalState+), else nil.
352
+ # - +states+ / +majority+: +forked+ only, every final state seen (most-held
353
+ # first) and the one a majority holds, which reads return. +states+ is
354
+ # empty and +majority+ nil otherwise.
355
+ # - +transferred_to+: the pointer this one was handed over to, once that is
356
+ # beyond dispute (status +final+), else nil.
357
+ PointerFinality = Struct.new(
358
+ :address, :group, :answered, :status, :counter, :state, :states,
359
+ :majority, :transferred_to,
360
+ keyword_init: true
361
+ ) do
362
+ # @return [Boolean] one final state, held by a majority, every peer
363
+ # answering and no rival seen
364
+ def final?
365
+ status == PointerFinalityStatus::FINAL
366
+ end
367
+
368
+ # @return [Boolean] false for a status a newer daemon added
369
+ def status_known?
370
+ PointerFinalityStatus.known?(status)
371
+ end
372
+ end
373
+
374
+ # Whose pointer decides what an address resolves to, after following every
375
+ # transfer (+pointer_controller+). +transfers+ lists every pointer the
376
+ # address was handed over to, in order; +frozen+ is true when +pointer+ is
377
+ # final without being handed over, so nobody can move it.
378
+ PointerController = Struct.new(:pointer, :transfers, :frozen, keyword_init: true)
379
+
380
+ # What a transfer stored, and where the close group says it stands.
381
+ # +finality+ (a +PointerFinality+) is nil when that check failed, and
382
+ # +finality_error+ says why; the transfer itself is stored and final either
383
+ # way. Ask again with +pointer_finality+.
384
+ PointerTransferResult = Struct.new(:address, :state_id, :finality, :finality_error, keyword_init: true)
385
+
386
+ # A pointer write signed by the daemon and quoted for an external signer
387
+ # (+pointer_prepare+). Pay +payments+ with +payForQuotes()+, then call
388
+ # +pointer_finalize+. +op+ is a +PointerOp+ string, +counter+ an Integer,
389
+ # +payment_type+ always "wave_batch" (a pointer state is paid with one
390
+ # quote). +signed_quotes+ (+SignedQuoteEntry+) is filled only when the
391
+ # prepare asked for it, else empty.
392
+ #
393
+ # While it awaits payment, other writes to the pointer raise
394
+ # +ConflictError+ until it is finalized or expires (one hour).
395
+ PointerPrepareResult = Struct.new(
396
+ :upload_id, :op, :address, :state_id, :counter, :payment_type,
397
+ :payments, :total_amount, :payment_vault_address, :payment_token_address,
398
+ :rpc_url, :signed_quotes,
399
+ keyword_init: true
400
+ )
401
+
402
+ # The state a pointer finalize stored. +finality+ is set for a transfer
403
+ # (where the close group says it stands), else nil.
404
+ PointerFinalizeResult = Struct.new(:address, :state_id, :counter, :finality, keyword_init: true)
405
+
406
+ # Parses a pointer counter. The daemon sends counters as decimal strings on
407
+ # both transports, because a final state sits at 2^64 - 1, past what a JSON
408
+ # number keeps exactly in many languages. Ruby integers are unbounded, so
409
+ # the value is checked against the daemon's u64 range here.
410
+ #
411
+ # Strict: only a String of ASCII digits within u64 parses. +Integer()+ alone
412
+ # would also take a sign, underscores or a radix prefix, and a malformed
413
+ # counter must never read as 0.
414
+ #
415
+ # @param field [String] the field name, for the error message
416
+ # @param value [Object] the wire value
417
+ # @return [Integer]
418
+ # @raise [InternalError] when +value+ is not a decimal u64
419
+ def self.parse_pointer_counter(field, value)
420
+ if value.is_a?(String) && value.match?(/\A[0-9]+\z/)
421
+ n = Integer(value, 10)
422
+ return n if n <= POINTER_FINAL_COUNTER
423
+ end
424
+ raise InternalError, "invalid pointer #{field} #{value.inspect}: expected a decimal u64"
425
+ end
198
426
  end
@@ -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\"w\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\"D\n\x17StreamPublicDataRequest\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\t\x12\x18\n\x10include_progress\x18\x02 \x01(\x08\"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\"?\n\x11StreamDataRequest\x12\x10\n\x08\x64\x61ta_map\x18\x01 \x01(\t\x12\x18\n\x10include_progress\x18\x02 \x01(\x08\"\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\"r\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\"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"
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)
@@ -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\"\x97\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(\tJ\x04\x08\x01\x10\x02R\x04\x63ost\"\x86\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\":\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"
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)
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: antd/v1/manifests.proto
4
+
5
+ require 'google/protobuf'
6
+
7
+
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
+
10
+ pool = ::Google::Protobuf::DescriptorPool.generated_pool
11
+ pool.add_serialized_file(descriptor_data)
12
+
13
+ module Antd
14
+ module V1
15
+ ManifestEntryInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("antd.v1.ManifestEntryInput").msgclass
16
+ BuildManifestRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("antd.v1.BuildManifestRequest").msgclass
17
+ ManifestEntryInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("antd.v1.ManifestEntryInfo").msgclass
18
+ BuildManifestResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("antd.v1.BuildManifestResponse").msgclass
19
+ DecodeManifestRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("antd.v1.DecodeManifestRequest").msgclass
20
+ DecodeManifestResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("antd.v1.DecodeManifestResponse").msgclass
21
+ end
22
+ end