antd 0.1.0 → 0.3.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 +228 -10
- data/lib/antd/client.rb +282 -27
- data/lib/antd/errors.rb +353 -0
- data/lib/antd/grpc_client.rb +245 -2
- data/lib/antd/grpc_manifests.rb +128 -0
- data/lib/antd/manifests.rb +300 -0
- data/lib/antd/models.rb +221 -0
- data/lib/antd/v1/chunks_pb.rb +1 -1
- data/lib/antd/v1/common_pb.rb +2 -1
- data/lib/antd/v1/data_pb.rb +1 -1
- data/lib/antd/v1/health_pb.rb +1 -1
- data/lib/antd/v1/manifests_pb.rb +22 -0
- data/lib/antd/v1/manifests_services_pb.rb +39 -0
- data/lib/antd/v1/pointers_pb.rb +38 -0
- data/lib/antd/v1/pointers_services_pb.rb +59 -0
- data/lib/antd/v1/upload_pb.rb +2 -1
- data/lib/antd/v1/upload_services_pb.rb +4 -2
- data/lib/antd/version.rb +1 -1
- data/lib/antd.rb +2 -0
- metadata +8 -2
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\"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\"
|
|
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\"\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\"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"
|
|
11
11
|
|
|
12
12
|
pool = ::Google::Protobuf::DescriptorPool.generated_pool
|
|
13
13
|
pool.add_serialized_file(descriptor_data)
|
data/lib/antd/v1/health_pb.rb
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
require 'google/protobuf'
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
descriptor_data = "\n\x14\x61ntd/v1/health.proto\x12\x07\x61ntd.v1\"\x14\n\x12HealthCheckRequest\"\
|
|
8
|
+
descriptor_data = "\n\x14\x61ntd/v1/health.proto\x12\x07\x61ntd.v1\"\x14\n\x12HealthCheckRequest\"\xf1\x02\n\x13HealthCheckResponse\x12\x0e\n\x06status\x18\x01 \x01(\t\x12\x0f\n\x07network\x18\x02 \x01(\t\x12\x0f\n\x07version\x18\x03 \x01(\t\x12\x13\n\x0b\x65vm_network\x18\x04 \x01(\t\x12\x16\n\x0euptime_seconds\x18\x05 \x01(\x04\x12\x14\n\x0c\x62uild_commit\x18\x06 \x01(\t\x12\x1d\n\x15payment_token_address\x18\x07 \x01(\t\x12\x1d\n\x15payment_vault_address\x18\x08 \x01(\t\x12\x13\n\x0bwrite_ready\x18\t \x01(\x08\x12\x17\n\x0f\x63onnected_peers\x18\n \x01(\r\x12\x1a\n\x12routing_table_size\x18\x0b \x01(\r\x12\x1d\n\x15rebootstrap_threshold\x18\x0c \x01(\r\x12#\n\x16last_store_ok_secs_ago\x18\r \x01(\x04H\x00\x88\x01\x01\x42\x19\n\x17_last_store_ok_secs_ago2S\n\rHealthService\x12\x42\n\x05\x43heck\x12\x1b.antd.v1.HealthCheckRequest\x1a\x1c.antd.v1.HealthCheckResponseBDZ8github.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)
|
|
@@ -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\"}\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\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_size\"\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\"\xd3\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(\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
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
|
+
# Source: antd/v1/manifests.proto for package 'antd.v1'
|
|
3
|
+
|
|
4
|
+
require 'grpc'
|
|
5
|
+
require 'antd/v1/manifests_pb'
|
|
6
|
+
|
|
7
|
+
module Antd
|
|
8
|
+
module V1
|
|
9
|
+
module ManifestService
|
|
10
|
+
# ADR-0006 file manifests: `.ant` files and `ant://` links (V2-1570).
|
|
11
|
+
#
|
|
12
|
+
# Stateless. The format, content addresses, link encoding and portable path
|
|
13
|
+
# rules all come from ant-core, so callers never re-implement them. The
|
|
14
|
+
# network is touched only to resolve DataMaps: the embedding policy on
|
|
15
|
+
# Build, and `resolve` on Decode.
|
|
16
|
+
#
|
|
17
|
+
# Both calls are unary. A manifest is one document of at most 64 MiB that is
|
|
18
|
+
# produced and parsed whole, so the server accepts requests up to 100 MiB
|
|
19
|
+
# (the REST body limit); clients receiving a large manifest must raise their
|
|
20
|
+
# receive limit (antd-go does this per call).
|
|
21
|
+
class Service
|
|
22
|
+
|
|
23
|
+
include ::GRPC::GenericService
|
|
24
|
+
|
|
25
|
+
self.marshal_class_method = :encode
|
|
26
|
+
self.unmarshal_class_method = :decode
|
|
27
|
+
self.service_name = 'antd.v1.ManifestService'
|
|
28
|
+
|
|
29
|
+
# Build a manifest from DataMaps and public addresses already in hand.
|
|
30
|
+
# Nothing is uploaded or paid for.
|
|
31
|
+
rpc :Build, ::Antd::V1::BuildManifestRequest, ::Antd::V1::BuildManifestResponse
|
|
32
|
+
# Decode `.ant` bytes, a manifest link, a file link or a bare address.
|
|
33
|
+
rpc :Decode, ::Antd::V1::DecodeManifestRequest, ::Antd::V1::DecodeManifestResponse
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
Stub = Service.rpc_stub_class
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: antd/v1/pointers.proto
|
|
4
|
+
|
|
5
|
+
require 'google/protobuf'
|
|
6
|
+
|
|
7
|
+
require 'antd/v1/common_pb'
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
descriptor_data = "\n\x16\x61ntd/v1/pointers.proto\x12\x07\x61ntd.v1\x1a\x14\x61ntd/v1/common.proto\"\x18\n\x16ListPointerKeysRequest\"<\n\x17ListPointerKeysResponse\x12!\n\x04keys\x18\x01 \x03(\x0b\x32\x13.antd.v1.PointerKey\"\x1d\n\nPointerKey\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\t\"B\n\x13PointerWriteRequest\x12\r\n\x05owner\x18\x01 \x01(\t\x12\x0e\n\x06target\x18\x02 \x01(\t\x12\x0c\n\x04kind\x18\x03 \x01(\t\"J\n\x14PointerWriteResponse\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\t\x12\x10\n\x08state_id\x18\x02 \x01(\t\x12\x0f\n\x07\x63ounter\x18\x03 \x01(\t\":\n\x16PointerTransferRequest\x12\r\n\x05owner\x18\x01 \x01(\t\x12\x11\n\trecipient\x18\x02 \x01(\t\"\x80\x01\n\x17PointerTransferResponse\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\t\x12\x10\n\x08state_id\x18\x02 \x01(\t\x12*\n\x08\x66inality\x18\x03 \x01(\x0b\x32\x18.antd.v1.PointerFinality\x12\x16\n\x0e\x66inality_error\x18\x04 \x01(\t\"$\n\x11GetPointerRequest\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\t\"\xac\x01\n\rPointerRecord\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\t\x12\r\n\x05owner\x18\x02 \x01(\t\x12\x0f\n\x07\x63ounter\x18\x03 \x01(\t\x12\x0c\n\x04kind\x18\x04 \x01(\t\x12\x10\n\x08kind_tag\x18\x05 \x01(\r\x12\x0e\n\x06target\x18\x06 \x01(\t\x12\x10\n\x08state_id\x18\x07 \x01(\t\x12\x10\n\x08is_final\x18\x08 \x01(\x08\x12\x16\n\x0etransferred_to\x18\t \x01(\t\"(\n\x15ResolvePointerRequest\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\t\"A\n\x0fPointerResolved\x12\x0c\n\x04kind\x18\x01 \x01(\t\x12\x10\n\x08kind_tag\x18\x02 \x01(\r\x12\x0e\n\x06target\x18\x03 \x01(\t\")\n\x16PointerFinalityRequest\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\t\"~\n\x11PointerFinalState\x12\x10\n\x08state_id\x18\x01 \x01(\t\x12\x0c\n\x04kind\x18\x02 \x01(\t\x12\x10\n\x08kind_tag\x18\x03 \x01(\r\x12\x0e\n\x06target\x18\x04 \x01(\t\x12\x0f\n\x07holders\x18\x05 \x01(\r\x12\x16\n\x0etransferred_to\x18\x06 \x01(\t\"\x81\x02\n\x0fPointerFinality\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\t\x12\r\n\x05group\x18\x02 \x01(\r\x12\x10\n\x08\x61nswered\x18\x03 \x01(\r\x12\x0e\n\x06status\x18\x04 \x01(\t\x12\x0f\n\x07\x63ounter\x18\x05 \x01(\t\x12)\n\x05state\x18\x06 \x01(\x0b\x32\x1a.antd.v1.PointerFinalState\x12*\n\x06states\x18\x07 \x03(\x0b\x32\x1a.antd.v1.PointerFinalState\x12,\n\x08majority\x18\x08 \x01(\x0b\x32\x1a.antd.v1.PointerFinalState\x12\x16\n\x0etransferred_to\x18\t \x01(\t\"+\n\x18PointerControllerRequest\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\t\"G\n\x11PointerController\x12\x0f\n\x07pointer\x18\x01 \x01(\t\x12\x11\n\ttransfers\x18\x02 \x03(\t\x12\x0e\n\x06\x66rozen\x18\x03 \x01(\x08\"\x82\x01\n\x15PreparePointerRequest\x12\r\n\x05owner\x18\x01 \x01(\t\x12\n\n\x02op\x18\x02 \x01(\t\x12\x0e\n\x06target\x18\x03 \x01(\t\x12\x0c\n\x04kind\x18\x04 \x01(\t\x12\x11\n\trecipient\x18\x05 \x01(\t\x12\x1d\n\x15include_signed_quotes\x18\x06 \x01(\x08\"\xc1\x02\n\x16PreparePointerResponse\x12\x11\n\tupload_id\x18\x01 \x01(\t\x12\n\n\x02op\x18\x02 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\x03 \x01(\t\x12\x10\n\x08state_id\x18\x04 \x01(\t\x12\x0f\n\x07\x63ounter\x18\x05 \x01(\t\x12\x14\n\x0cpayment_type\x18\x06 \x01(\t\x12\'\n\x08payments\x18\x07 \x03(\x0b\x32\x15.antd.v1.PaymentEntry\x12\x14\n\x0ctotal_amount\x18\x08 \x01(\t\x12\x1d\n\x15payment_vault_address\x18\t \x01(\t\x12\x1d\n\x15payment_token_address\x18\n \x01(\t\x12\x0f\n\x07rpc_url\x18\x0b \x01(\t\x12\x30\n\rsigned_quotes\x18\x0c \x03(\x0b\x32\x19.antd.v1.SignedQuoteEntry\"\x9e\x01\n\x16\x46inalizePointerRequest\x12\x11\n\tupload_id\x18\x01 \x01(\t\x12@\n\ttx_hashes\x18\x02 \x03(\x0b\x32-.antd.v1.FinalizePointerRequest.TxHashesEntry\x1a/\n\rTxHashesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"y\n\x17\x46inalizePointerResponse\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\t\x12\x10\n\x08state_id\x18\x02 \x01(\t\x12\x0f\n\x07\x63ounter\x18\x03 \x01(\t\x12*\n\x08\x66inality\x18\x04 \x01(\x0b\x32\x18.antd.v1.PointerFinality2\xeb\x05\n\x0ePointerService\x12M\n\x08ListKeys\x12\x1f.antd.v1.ListPointerKeysRequest\x1a .antd.v1.ListPointerKeysResponse\x12\x45\n\x06\x43reate\x12\x1c.antd.v1.PointerWriteRequest\x1a\x1d.antd.v1.PointerWriteResponse\x12\x45\n\x06Update\x12\x1c.antd.v1.PointerWriteRequest\x1a\x1d.antd.v1.PointerWriteResponse\x12M\n\x08Transfer\x12\x1f.antd.v1.PointerTransferRequest\x1a .antd.v1.PointerTransferResponse\x12\x39\n\x03Get\x12\x1a.antd.v1.GetPointerRequest\x1a\x16.antd.v1.PointerRecord\x12\x43\n\x07Resolve\x12\x1e.antd.v1.ResolvePointerRequest\x1a\x18.antd.v1.PointerResolved\x12\x45\n\x08\x46inality\x12\x1f.antd.v1.PointerFinalityRequest\x1a\x18.antd.v1.PointerFinality\x12K\n\nController\x12!.antd.v1.PointerControllerRequest\x1a\x1a.antd.v1.PointerController\x12J\n\x07Prepare\x12\x1e.antd.v1.PreparePointerRequest\x1a\x1f.antd.v1.PreparePointerResponse\x12M\n\x08\x46inalize\x12\x1f.antd.v1.FinalizePointerRequest\x1a .antd.v1.FinalizePointerResponseBDZ8github.com/WithAutonomi/ant-sdk/antd-go/proto/antd/v1;v1\xaa\x02\x07\x41ntd.V1b\x06proto3"
|
|
11
|
+
|
|
12
|
+
pool = ::Google::Protobuf::DescriptorPool.generated_pool
|
|
13
|
+
pool.add_serialized_file(descriptor_data)
|
|
14
|
+
|
|
15
|
+
module Antd
|
|
16
|
+
module V1
|
|
17
|
+
ListPointerKeysRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("antd.v1.ListPointerKeysRequest").msgclass
|
|
18
|
+
ListPointerKeysResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("antd.v1.ListPointerKeysResponse").msgclass
|
|
19
|
+
PointerKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("antd.v1.PointerKey").msgclass
|
|
20
|
+
PointerWriteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("antd.v1.PointerWriteRequest").msgclass
|
|
21
|
+
PointerWriteResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("antd.v1.PointerWriteResponse").msgclass
|
|
22
|
+
PointerTransferRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("antd.v1.PointerTransferRequest").msgclass
|
|
23
|
+
PointerTransferResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("antd.v1.PointerTransferResponse").msgclass
|
|
24
|
+
GetPointerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("antd.v1.GetPointerRequest").msgclass
|
|
25
|
+
PointerRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("antd.v1.PointerRecord").msgclass
|
|
26
|
+
ResolvePointerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("antd.v1.ResolvePointerRequest").msgclass
|
|
27
|
+
PointerResolved = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("antd.v1.PointerResolved").msgclass
|
|
28
|
+
PointerFinalityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("antd.v1.PointerFinalityRequest").msgclass
|
|
29
|
+
PointerFinalState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("antd.v1.PointerFinalState").msgclass
|
|
30
|
+
PointerFinality = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("antd.v1.PointerFinality").msgclass
|
|
31
|
+
PointerControllerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("antd.v1.PointerControllerRequest").msgclass
|
|
32
|
+
PointerController = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("antd.v1.PointerController").msgclass
|
|
33
|
+
PreparePointerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("antd.v1.PreparePointerRequest").msgclass
|
|
34
|
+
PreparePointerResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("antd.v1.PreparePointerResponse").msgclass
|
|
35
|
+
FinalizePointerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("antd.v1.FinalizePointerRequest").msgclass
|
|
36
|
+
FinalizePointerResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("antd.v1.FinalizePointerResponse").msgclass
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
|
+
# Source: antd/v1/pointers.proto for package 'antd.v1'
|
|
3
|
+
|
|
4
|
+
require 'grpc'
|
|
5
|
+
require 'antd/v1/pointers_pb'
|
|
6
|
+
|
|
7
|
+
module Antd
|
|
8
|
+
module V1
|
|
9
|
+
module PointerService
|
|
10
|
+
# Pointers: owner-signed, paid, mutable references (ADR-0016 in ant-node),
|
|
11
|
+
# with ownership transfer by final redirection (ADR-0018). Mirrors the REST
|
|
12
|
+
# `/v1/pointers` surface 1:1.
|
|
13
|
+
#
|
|
14
|
+
# antd signs with owner keys it loaded at startup (`--pointer-keys`). A write
|
|
15
|
+
# names the pointer by its address (`owner`), never by a key; `ListKeys`
|
|
16
|
+
# lists the pointers this daemon can write.
|
|
17
|
+
#
|
|
18
|
+
# Addresses, state ids and targets are 64 hex characters. Counters are
|
|
19
|
+
# decimal strings: a final state sits at u64::MAX.
|
|
20
|
+
#
|
|
21
|
+
# Every write pays, and every attempt pays again. Do not retry Create,
|
|
22
|
+
# Update or Transfer automatically; a Finalize that fails with
|
|
23
|
+
# `CLOSE_GROUP_SHORTFALL` is retried by repeating it with the same
|
|
24
|
+
# `upload_id`, which reuses the payment.
|
|
25
|
+
class Service
|
|
26
|
+
|
|
27
|
+
include ::GRPC::GenericService
|
|
28
|
+
|
|
29
|
+
self.marshal_class_method = :encode
|
|
30
|
+
self.unmarshal_class_method = :decode
|
|
31
|
+
self.service_name = 'antd.v1.PointerService'
|
|
32
|
+
|
|
33
|
+
rpc :ListKeys, ::Antd::V1::ListPointerKeysRequest, ::Antd::V1::ListPointerKeysResponse
|
|
34
|
+
# Create a pointer with the daemon wallet. ALREADY_EXISTS if it exists.
|
|
35
|
+
rpc :Create, ::Antd::V1::PointerWriteRequest, ::Antd::V1::PointerWriteResponse
|
|
36
|
+
# Point a pointer at a new target with the daemon wallet, creating it if
|
|
37
|
+
# it does not exist. FAILED_PRECONDITION if the pointer is final.
|
|
38
|
+
rpc :Update, ::Antd::V1::PointerWriteRequest, ::Antd::V1::PointerWriteResponse
|
|
39
|
+
# Hand a pointer over to the recipient's pointer for good, with the daemon
|
|
40
|
+
# wallet. Irreversible once stored.
|
|
41
|
+
rpc :Transfer, ::Antd::V1::PointerTransferRequest, ::Antd::V1::PointerTransferResponse
|
|
42
|
+
rpc :Get, ::Antd::V1::GetPointerRequest, ::Antd::V1::PointerRecord
|
|
43
|
+
# Follow a chain of pointers to the target at its end.
|
|
44
|
+
rpc :Resolve, ::Antd::V1::ResolvePointerRequest, ::Antd::V1::PointerResolved
|
|
45
|
+
# Ask the whole close group whether a pointer is final, and on what.
|
|
46
|
+
rpc :Finality, ::Antd::V1::PointerFinalityRequest, ::Antd::V1::PointerFinality
|
|
47
|
+
# Follow a pointer's transfers to the pointer whose owner now decides.
|
|
48
|
+
rpc :Controller, ::Antd::V1::PointerControllerRequest, ::Antd::V1::PointerController
|
|
49
|
+
# External signer: sign a write with a loaded key and quote it. Mirrors
|
|
50
|
+
# REST `/v1/pointers/prepare`; the payment shape is ChunkService's.
|
|
51
|
+
rpc :Prepare, ::Antd::V1::PreparePointerRequest, ::Antd::V1::PreparePointerResponse
|
|
52
|
+
# External signer: store the prepared write once it is paid.
|
|
53
|
+
rpc :Finalize, ::Antd::V1::FinalizePointerRequest, ::Antd::V1::FinalizePointerResponse
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
Stub = Service.rpc_stub_class
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
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\"
|
|
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\"l\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\x32\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)
|
|
@@ -17,6 +17,7 @@ module Antd
|
|
|
17
17
|
PrepareFileUploadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("antd.v1.PrepareFileUploadRequest").msgclass
|
|
18
18
|
PrepareDataUploadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("antd.v1.PrepareDataUploadRequest").msgclass
|
|
19
19
|
PrepareUploadResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("antd.v1.PrepareUploadResponse").msgclass
|
|
20
|
+
MerkleBatchEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("antd.v1.MerkleBatchEntry").msgclass
|
|
20
21
|
PoolCommitmentEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("antd.v1.PoolCommitmentEntry").msgclass
|
|
21
22
|
CandidateNodeEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("antd.v1.CandidateNodeEntry").msgclass
|
|
22
23
|
FinalizeUploadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("antd.v1.FinalizeUploadRequest").msgclass
|
|
@@ -40,8 +40,10 @@ module Antd
|
|
|
40
40
|
rpc :PrepareDataUpload, ::Antd::V1::PrepareDataUploadRequest, ::Antd::V1::PrepareUploadResponse
|
|
41
41
|
# Phase 2: finalize an upload after the external EVM payment has landed.
|
|
42
42
|
# For wave-batch uploads pass `tx_hashes`; for merkle uploads pass
|
|
43
|
-
# `
|
|
44
|
-
#
|
|
43
|
+
# `winner_pool_hashes` — one `MerklePaymentMade` winner hash per entry in
|
|
44
|
+
# the prepare response's `merkle_batches` (`winner_pool_hash` remains
|
|
45
|
+
# accepted when there is exactly one batch). The server-side stored upload
|
|
46
|
+
# state is consumed (one-shot) once inputs validate.
|
|
45
47
|
rpc :FinalizeUpload, ::Antd::V1::FinalizeUploadRequest, ::Antd::V1::FinalizeUploadResponse
|
|
46
48
|
end
|
|
47
49
|
|
data/lib/antd/version.rb
CHANGED
data/lib/antd.rb
CHANGED
|
@@ -5,10 +5,12 @@ require_relative "antd/models"
|
|
|
5
5
|
require_relative "antd/errors"
|
|
6
6
|
require_relative "antd/discover"
|
|
7
7
|
require_relative "antd/client"
|
|
8
|
+
require_relative "antd/manifests"
|
|
8
9
|
|
|
9
10
|
# gRPC client is optional — requires the `grpc` gem and proto-generated stubs.
|
|
10
11
|
begin
|
|
11
12
|
require_relative "antd/grpc_client"
|
|
13
|
+
require_relative "antd/grpc_manifests"
|
|
12
14
|
rescue LoadError
|
|
13
15
|
# grpc gem not installed; GrpcClient not available
|
|
14
16
|
end
|
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.3.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-
|
|
11
|
+
date: 2026-10-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: grpc
|
|
@@ -97,6 +97,8 @@ files:
|
|
|
97
97
|
- lib/antd/discover.rb
|
|
98
98
|
- lib/antd/errors.rb
|
|
99
99
|
- lib/antd/grpc_client.rb
|
|
100
|
+
- lib/antd/grpc_manifests.rb
|
|
101
|
+
- lib/antd/manifests.rb
|
|
100
102
|
- lib/antd/models.rb
|
|
101
103
|
- lib/antd/v1/chunks_pb.rb
|
|
102
104
|
- lib/antd/v1/chunks_services_pb.rb
|
|
@@ -107,6 +109,10 @@ files:
|
|
|
107
109
|
- lib/antd/v1/files_services_pb.rb
|
|
108
110
|
- lib/antd/v1/health_pb.rb
|
|
109
111
|
- lib/antd/v1/health_services_pb.rb
|
|
112
|
+
- lib/antd/v1/manifests_pb.rb
|
|
113
|
+
- lib/antd/v1/manifests_services_pb.rb
|
|
114
|
+
- lib/antd/v1/pointers_pb.rb
|
|
115
|
+
- lib/antd/v1/pointers_services_pb.rb
|
|
110
116
|
- lib/antd/v1/upload_pb.rb
|
|
111
117
|
- lib/antd/v1/upload_services_pb.rb
|
|
112
118
|
- lib/antd/v1/wallet_pb.rb
|