cosmoverse 0.0.1.alpha
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rubocop.yml +50 -0
- data/.tool-versions +1 -0
- data/CHANGELOG.md +5 -0
- data/CODE_OF_CONDUCT.md +84 -0
- data/Gemfile +13 -0
- data/Gemfile.lock +62 -0
- data/LICENSE.txt +21 -0
- data/README.md +54 -0
- data/Rakefile +16 -0
- data/buf.gen.yaml +35 -0
- data/buf.yaml +7 -0
- data/docker/gaia/Dockerfile +13 -0
- data/docker/gaia/wait_for_next_block +10 -0
- data/docker-compose.yml +21 -0
- data/lib/cosmoverse/cosmos/bank.rb +33 -0
- data/lib/cosmoverse/cosmos/client/base.rb +27 -0
- data/lib/cosmoverse/cosmos/client/grpc.rb +28 -0
- data/lib/cosmoverse/cosmos/client/http.rb +36 -0
- data/lib/cosmoverse/cosmos/client.rb +19 -0
- data/lib/cosmoverse/cosmos/collectable.rb +50 -0
- data/lib/cosmoverse/cosmos/config.rb +26 -0
- data/lib/cosmoverse/cosmos/ibc/denom_trace.rb +58 -0
- data/lib/cosmoverse/cosmos/tx.rb +85 -0
- data/lib/cosmoverse/cosmos.rb +13 -0
- data/lib/cosmoverse/proto/amino/amino_pb.rb +20 -0
- data/lib/cosmoverse/proto/cosmos/bank/v1beta1/bank_pb.rb +71 -0
- data/lib/cosmoverse/proto/cosmos/bank/v1beta1/query_pb.rb +138 -0
- data/lib/cosmoverse/proto/cosmos/bank/v1beta1/query_services_pb.rb +89 -0
- data/lib/cosmoverse/proto/cosmos/base/abci/v1beta1/abci_pb.rb +108 -0
- data/lib/cosmoverse/proto/cosmos/base/query/v1beta1/pagination_pb.rb +39 -0
- data/lib/cosmoverse/proto/cosmos/base/v1beta1/coin_pb.rb +46 -0
- data/lib/cosmoverse/proto/cosmos/crypto/multisig/v1beta1/multisig_pb.rb +37 -0
- data/lib/cosmoverse/proto/cosmos/msg/v1/msg_pb.rb +26 -0
- data/lib/cosmoverse/proto/cosmos/query/v1/query_pb.rb +26 -0
- data/lib/cosmoverse/proto/cosmos/tx/signing/v1beta1/signing_pb.rb +65 -0
- data/lib/cosmoverse/proto/cosmos/tx/v1beta1/service_pb.rb +132 -0
- data/lib/cosmoverse/proto/cosmos/tx/v1beta1/service_services_pb.rb +61 -0
- data/lib/cosmoverse/proto/cosmos/tx/v1beta1/tx_pb.rb +114 -0
- data/lib/cosmoverse/proto/cosmos_proto/cosmos_pb.rb +37 -0
- data/lib/cosmoverse/proto/gogoproto/gogo_pb.rb +20 -0
- data/lib/cosmoverse/proto/ibc/applications/transfer/v1/query_pb.rb +70 -0
- data/lib/cosmoverse/proto/ibc/applications/transfer/v1/query_services_pb.rb +43 -0
- data/lib/cosmoverse/proto/ibc/applications/transfer/v1/transfer_pb.rb +34 -0
- data/lib/cosmoverse/proto/tendermint/abci/types_pb.rb +370 -0
- data/lib/cosmoverse/proto/tendermint/abci/types_services_pb.rb +49 -0
- data/lib/cosmoverse/proto/tendermint/crypto/keys_pb.rb +31 -0
- data/lib/cosmoverse/proto/tendermint/crypto/proof_pb.rb +52 -0
- data/lib/cosmoverse/proto/tendermint/types/block_pb.rb +33 -0
- data/lib/cosmoverse/proto/tendermint/types/evidence_pb.rb +54 -0
- data/lib/cosmoverse/proto/tendermint/types/params_pb.rb +56 -0
- data/lib/cosmoverse/proto/tendermint/types/types_pb.rb +137 -0
- data/lib/cosmoverse/proto/tendermint/types/validator_pb.rb +43 -0
- data/lib/cosmoverse/proto/tendermint/version/types_pb.rb +34 -0
- data/lib/cosmoverse/version.rb +5 -0
- data/lib/cosmoverse.rb +13 -0
- data/sig/cosmoverse.rbs +4 -0
- metadata +118 -0
@@ -0,0 +1,58 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "cosmoverse/proto/ibc/applications/transfer/v1/query_services_pb"
|
4
|
+
|
5
|
+
module Cosmoverse
|
6
|
+
module Cosmos
|
7
|
+
module Ibc
|
8
|
+
class DenomTrace
|
9
|
+
RequestParamter = Struct.new("IbcRequestParamter", :request, :request_method) do
|
10
|
+
def service_class
|
11
|
+
Cosmoverse::Proto::Ibc::Applications::Transfer::V1::Query::Service
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
class Collection
|
16
|
+
extend Cosmoverse::Cosmos::Collectable::Loadable
|
17
|
+
include Cosmoverse::Cosmos::Collectable
|
18
|
+
|
19
|
+
def records
|
20
|
+
response.denom_traces.map { |dt| DenomTrace.new(dt) }
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
attr_reader :path, :base_denom
|
25
|
+
|
26
|
+
def initialize(denom_trace)
|
27
|
+
@path = denom_trace.path
|
28
|
+
@base_denom = denom_trace.base_denom
|
29
|
+
end
|
30
|
+
|
31
|
+
def ==(other)
|
32
|
+
path == other.path && base_denom == other.base_denom
|
33
|
+
end
|
34
|
+
|
35
|
+
alias eql? ==
|
36
|
+
|
37
|
+
def hash
|
38
|
+
[self.class, path, base_denom].hash
|
39
|
+
end
|
40
|
+
|
41
|
+
def self.get(ibc_denom)
|
42
|
+
hash = ibc_denom.sub("ibc/", "")
|
43
|
+
|
44
|
+
request = Cosmoverse::Proto::Ibc::Applications::Transfer::V1::QueryDenomTraceRequest.new(hash:)
|
45
|
+
request_param = RequestParamter.new(request, :denom_trace)
|
46
|
+
new(Cosmoverse::Cosmos::Client.call(request_param).denom_trace)
|
47
|
+
end
|
48
|
+
|
49
|
+
def self.page(**args)
|
50
|
+
request = Cosmoverse::Proto::Ibc::Applications::Transfer::V1::QueryDenomTracesRequest.new
|
51
|
+
request_param = RequestParamter.new(request, :denom_traces)
|
52
|
+
|
53
|
+
Collection.get(request_param, **args)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,85 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "cosmoverse/proto/cosmos/tx/v1beta1/service_services_pb"
|
4
|
+
|
5
|
+
module Cosmoverse
|
6
|
+
module Cosmos
|
7
|
+
class Tx
|
8
|
+
DEFAULT_ORDER = :ORDER_BY_ASC
|
9
|
+
|
10
|
+
attr_reader :block_height, :tx_hash, :gas_wanted, :gas_used
|
11
|
+
|
12
|
+
RequestParamter = Struct.new("TxRequestParamter", :request, :request_method) do
|
13
|
+
def service_class
|
14
|
+
Cosmoverse::Proto::Cosmos::Tx::V1beta1::Service::Service::Service
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
TransferEvent = Struct.new("TransferEvent", :recipient, :sender, :amount)
|
19
|
+
|
20
|
+
class Collection
|
21
|
+
extend Cosmoverse::Cosmos::Collectable::Loadable
|
22
|
+
include Cosmoverse::Cosmos::Collectable
|
23
|
+
|
24
|
+
def records
|
25
|
+
response.tx_responses.map { |txr| Tx.new(txr) }
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def self.get_tx(hash)
|
30
|
+
request = Cosmoverse::Proto::Cosmos::Tx::V1beta1::Service::GetTxRequest.new(hash:)
|
31
|
+
request_param = RequestParamter.new(request, :get_tx)
|
32
|
+
response = Cosmoverse::Cosmos::Client.call(request_param)
|
33
|
+
|
34
|
+
new(response.tx_response)
|
35
|
+
end
|
36
|
+
|
37
|
+
def self.received_txs(address, **args)
|
38
|
+
events = ["transfer.recipient='#{address}'"]
|
39
|
+
request = Cosmoverse::Proto::Cosmos::Tx::V1beta1::Service::GetTxsEventRequest.new(events:,
|
40
|
+
order_by: DEFAULT_ORDER)
|
41
|
+
request_param = RequestParamter.new(request, :get_txs_event)
|
42
|
+
|
43
|
+
Collection.get(request_param, **args)
|
44
|
+
end
|
45
|
+
|
46
|
+
def self.send_txs(address, **args)
|
47
|
+
events = ["message.sender='#{address}'"]
|
48
|
+
request = Cosmoverse::Proto::Cosmos::Tx::V1beta1::Service::GetTxsEventRequest.new(events:,
|
49
|
+
order_by: DEFAULT_ORDER)
|
50
|
+
request_param = RequestParamter.new(request, :get_txs_event)
|
51
|
+
|
52
|
+
Collection.get(request_param, **args)
|
53
|
+
end
|
54
|
+
|
55
|
+
def initialize(tx_response)
|
56
|
+
@block_height = tx_response.height
|
57
|
+
@tx_hash = tx_response.txhash
|
58
|
+
@gas_wanted = tx_response.gas_wanted
|
59
|
+
@gas_used = tx_response.gas_used
|
60
|
+
@logs = tx_response.logs
|
61
|
+
end
|
62
|
+
|
63
|
+
def ==(other)
|
64
|
+
tx_hash == other.tx_hash
|
65
|
+
end
|
66
|
+
|
67
|
+
alias eql? ==
|
68
|
+
|
69
|
+
def hash
|
70
|
+
[self.class, tx_hash].hash
|
71
|
+
end
|
72
|
+
|
73
|
+
def events
|
74
|
+
@logs.map do |log|
|
75
|
+
case log.events.map(&:type)
|
76
|
+
when %w[coin_received coin_spent message transfer]
|
77
|
+
TransferEvent.new(*log.events.last.attributes.map(&:value))
|
78
|
+
else
|
79
|
+
raise "Unknown ABCIMessageLog at '#{log.msg_index}' for tx: '#{tx_hash}'"
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "cosmoverse/cosmos/config"
|
4
|
+
require "cosmoverse/cosmos/client"
|
5
|
+
require "cosmoverse/cosmos/collectable"
|
6
|
+
require "cosmoverse/cosmos/bank"
|
7
|
+
require "cosmoverse/cosmos/tx"
|
8
|
+
require "cosmoverse/cosmos/ibc/denom_trace"
|
9
|
+
|
10
|
+
module Cosmoverse
|
11
|
+
module Cosmos
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
4
|
+
# source: amino/amino.proto
|
5
|
+
|
6
|
+
require 'google/protobuf'
|
7
|
+
|
8
|
+
require 'google/protobuf/descriptor_pb'
|
9
|
+
|
10
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
11
|
+
add_file("amino/amino.proto", :syntax => :proto3) do
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
module Cosmoverse
|
16
|
+
module Proto
|
17
|
+
module Amino
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,71 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
4
|
+
# source: cosmos/bank/v1beta1/bank.proto
|
5
|
+
|
6
|
+
require 'google/protobuf'
|
7
|
+
|
8
|
+
require 'cosmoverse/proto/gogoproto/gogo_pb'
|
9
|
+
require 'cosmoverse/proto/cosmos_proto/cosmos_pb'
|
10
|
+
require 'cosmoverse/proto/cosmos/base/v1beta1/coin_pb'
|
11
|
+
require 'cosmoverse/proto/cosmos/msg/v1/msg_pb'
|
12
|
+
require 'cosmoverse/proto/amino/amino_pb'
|
13
|
+
|
14
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
15
|
+
add_file("cosmos/bank/v1beta1/bank.proto", :syntax => :proto3) do
|
16
|
+
add_message "cosmos.bank.v1beta1.Params" do
|
17
|
+
repeated :send_enabled, :message, 1, "cosmos.bank.v1beta1.SendEnabled", json_name: "sendEnabled"
|
18
|
+
optional :default_send_enabled, :bool, 2, json_name: "defaultSendEnabled"
|
19
|
+
end
|
20
|
+
add_message "cosmos.bank.v1beta1.SendEnabled" do
|
21
|
+
optional :denom, :string, 1, json_name: "denom"
|
22
|
+
optional :enabled, :bool, 2, json_name: "enabled"
|
23
|
+
end
|
24
|
+
add_message "cosmos.bank.v1beta1.Input" do
|
25
|
+
optional :address, :string, 1, json_name: "address"
|
26
|
+
repeated :coins, :message, 2, "cosmos.base.v1beta1.Coin", json_name: "coins"
|
27
|
+
end
|
28
|
+
add_message "cosmos.bank.v1beta1.Output" do
|
29
|
+
optional :address, :string, 1, json_name: "address"
|
30
|
+
repeated :coins, :message, 2, "cosmos.base.v1beta1.Coin", json_name: "coins"
|
31
|
+
end
|
32
|
+
add_message "cosmos.bank.v1beta1.Supply" do
|
33
|
+
repeated :total, :message, 1, "cosmos.base.v1beta1.Coin", json_name: "total"
|
34
|
+
end
|
35
|
+
add_message "cosmos.bank.v1beta1.DenomUnit" do
|
36
|
+
optional :denom, :string, 1, json_name: "denom"
|
37
|
+
optional :exponent, :uint32, 2, json_name: "exponent"
|
38
|
+
repeated :aliases, :string, 3, json_name: "aliases"
|
39
|
+
end
|
40
|
+
add_message "cosmos.bank.v1beta1.Metadata" do
|
41
|
+
optional :description, :string, 1, json_name: "description"
|
42
|
+
repeated :denom_units, :message, 2, "cosmos.bank.v1beta1.DenomUnit", json_name: "denomUnits"
|
43
|
+
optional :base, :string, 3, json_name: "base"
|
44
|
+
optional :display, :string, 4, json_name: "display"
|
45
|
+
optional :name, :string, 5, json_name: "name"
|
46
|
+
optional :symbol, :string, 6, json_name: "symbol"
|
47
|
+
optional :uri, :string, 7, json_name: "uri"
|
48
|
+
optional :uri_hash, :string, 8, json_name: "uriHash"
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
module Cosmoverse
|
54
|
+
module Proto
|
55
|
+
module Cosmos
|
56
|
+
module Bank
|
57
|
+
module V1beta1
|
58
|
+
module Bank
|
59
|
+
Params = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.bank.v1beta1.Params").msgclass
|
60
|
+
SendEnabled = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.bank.v1beta1.SendEnabled").msgclass
|
61
|
+
Input = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.bank.v1beta1.Input").msgclass
|
62
|
+
Output = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.bank.v1beta1.Output").msgclass
|
63
|
+
Supply = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.bank.v1beta1.Supply").msgclass
|
64
|
+
DenomUnit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.bank.v1beta1.DenomUnit").msgclass
|
65
|
+
Metadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.bank.v1beta1.Metadata").msgclass
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
@@ -0,0 +1,138 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
4
|
+
# source: cosmos/bank/v1beta1/query.proto
|
5
|
+
|
6
|
+
require 'google/protobuf'
|
7
|
+
|
8
|
+
require 'cosmoverse/proto/cosmos/base/query/v1beta1/pagination_pb'
|
9
|
+
require 'cosmoverse/proto/gogoproto/gogo_pb'
|
10
|
+
require 'google/api/annotations_pb'
|
11
|
+
require 'cosmoverse/proto/cosmos/base/v1beta1/coin_pb'
|
12
|
+
require 'cosmoverse/proto/cosmos/bank/v1beta1/bank_pb'
|
13
|
+
require 'cosmoverse/proto/cosmos_proto/cosmos_pb'
|
14
|
+
require 'cosmoverse/proto/cosmos/query/v1/query_pb'
|
15
|
+
require 'cosmoverse/proto/amino/amino_pb'
|
16
|
+
|
17
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
18
|
+
add_file("cosmos/bank/v1beta1/query.proto", :syntax => :proto3) do
|
19
|
+
add_message "cosmos.bank.v1beta1.QueryBalanceRequest" do
|
20
|
+
optional :address, :string, 1, json_name: "address"
|
21
|
+
optional :denom, :string, 2, json_name: "denom"
|
22
|
+
end
|
23
|
+
add_message "cosmos.bank.v1beta1.QueryBalanceResponse" do
|
24
|
+
optional :balance, :message, 1, "cosmos.base.v1beta1.Coin", json_name: "balance"
|
25
|
+
end
|
26
|
+
add_message "cosmos.bank.v1beta1.QueryAllBalancesRequest" do
|
27
|
+
optional :address, :string, 1, json_name: "address"
|
28
|
+
optional :pagination, :message, 2, "cosmos.base.query.v1beta1.PageRequest", json_name: "pagination"
|
29
|
+
optional :resolve_denom, :bool, 3, json_name: "resolveDenom"
|
30
|
+
end
|
31
|
+
add_message "cosmos.bank.v1beta1.QueryAllBalancesResponse" do
|
32
|
+
repeated :balances, :message, 1, "cosmos.base.v1beta1.Coin", json_name: "balances"
|
33
|
+
optional :pagination, :message, 2, "cosmos.base.query.v1beta1.PageResponse", json_name: "pagination"
|
34
|
+
end
|
35
|
+
add_message "cosmos.bank.v1beta1.QuerySpendableBalancesRequest" do
|
36
|
+
optional :address, :string, 1, json_name: "address"
|
37
|
+
optional :pagination, :message, 2, "cosmos.base.query.v1beta1.PageRequest", json_name: "pagination"
|
38
|
+
end
|
39
|
+
add_message "cosmos.bank.v1beta1.QuerySpendableBalancesResponse" do
|
40
|
+
repeated :balances, :message, 1, "cosmos.base.v1beta1.Coin", json_name: "balances"
|
41
|
+
optional :pagination, :message, 2, "cosmos.base.query.v1beta1.PageResponse", json_name: "pagination"
|
42
|
+
end
|
43
|
+
add_message "cosmos.bank.v1beta1.QuerySpendableBalanceByDenomRequest" do
|
44
|
+
optional :address, :string, 1, json_name: "address"
|
45
|
+
optional :denom, :string, 2, json_name: "denom"
|
46
|
+
end
|
47
|
+
add_message "cosmos.bank.v1beta1.QuerySpendableBalanceByDenomResponse" do
|
48
|
+
optional :balance, :message, 1, "cosmos.base.v1beta1.Coin", json_name: "balance"
|
49
|
+
end
|
50
|
+
add_message "cosmos.bank.v1beta1.QueryTotalSupplyRequest" do
|
51
|
+
optional :pagination, :message, 1, "cosmos.base.query.v1beta1.PageRequest", json_name: "pagination"
|
52
|
+
end
|
53
|
+
add_message "cosmos.bank.v1beta1.QueryTotalSupplyResponse" do
|
54
|
+
repeated :supply, :message, 1, "cosmos.base.v1beta1.Coin", json_name: "supply"
|
55
|
+
optional :pagination, :message, 2, "cosmos.base.query.v1beta1.PageResponse", json_name: "pagination"
|
56
|
+
end
|
57
|
+
add_message "cosmos.bank.v1beta1.QuerySupplyOfRequest" do
|
58
|
+
optional :denom, :string, 1, json_name: "denom"
|
59
|
+
end
|
60
|
+
add_message "cosmos.bank.v1beta1.QuerySupplyOfResponse" do
|
61
|
+
optional :amount, :message, 1, "cosmos.base.v1beta1.Coin", json_name: "amount"
|
62
|
+
end
|
63
|
+
add_message "cosmos.bank.v1beta1.QueryParamsRequest" do
|
64
|
+
end
|
65
|
+
add_message "cosmos.bank.v1beta1.QueryParamsResponse" do
|
66
|
+
optional :params, :message, 1, "cosmos.bank.v1beta1.Params", json_name: "params"
|
67
|
+
end
|
68
|
+
add_message "cosmos.bank.v1beta1.QueryDenomsMetadataRequest" do
|
69
|
+
optional :pagination, :message, 1, "cosmos.base.query.v1beta1.PageRequest", json_name: "pagination"
|
70
|
+
end
|
71
|
+
add_message "cosmos.bank.v1beta1.QueryDenomsMetadataResponse" do
|
72
|
+
repeated :metadatas, :message, 1, "cosmos.bank.v1beta1.Metadata", json_name: "metadatas"
|
73
|
+
optional :pagination, :message, 2, "cosmos.base.query.v1beta1.PageResponse", json_name: "pagination"
|
74
|
+
end
|
75
|
+
add_message "cosmos.bank.v1beta1.QueryDenomMetadataRequest" do
|
76
|
+
optional :denom, :string, 1, json_name: "denom"
|
77
|
+
end
|
78
|
+
add_message "cosmos.bank.v1beta1.QueryDenomMetadataResponse" do
|
79
|
+
optional :metadata, :message, 1, "cosmos.bank.v1beta1.Metadata", json_name: "metadata"
|
80
|
+
end
|
81
|
+
add_message "cosmos.bank.v1beta1.QueryDenomOwnersRequest" do
|
82
|
+
optional :denom, :string, 1, json_name: "denom"
|
83
|
+
optional :pagination, :message, 2, "cosmos.base.query.v1beta1.PageRequest", json_name: "pagination"
|
84
|
+
end
|
85
|
+
add_message "cosmos.bank.v1beta1.DenomOwner" do
|
86
|
+
optional :address, :string, 1, json_name: "address"
|
87
|
+
optional :balance, :message, 2, "cosmos.base.v1beta1.Coin", json_name: "balance"
|
88
|
+
end
|
89
|
+
add_message "cosmos.bank.v1beta1.QueryDenomOwnersResponse" do
|
90
|
+
repeated :denom_owners, :message, 1, "cosmos.bank.v1beta1.DenomOwner", json_name: "denomOwners"
|
91
|
+
optional :pagination, :message, 2, "cosmos.base.query.v1beta1.PageResponse", json_name: "pagination"
|
92
|
+
end
|
93
|
+
add_message "cosmos.bank.v1beta1.QuerySendEnabledRequest" do
|
94
|
+
repeated :denoms, :string, 1, json_name: "denoms"
|
95
|
+
optional :pagination, :message, 99, "cosmos.base.query.v1beta1.PageRequest", json_name: "pagination"
|
96
|
+
end
|
97
|
+
add_message "cosmos.bank.v1beta1.QuerySendEnabledResponse" do
|
98
|
+
repeated :send_enabled, :message, 1, "cosmos.bank.v1beta1.SendEnabled", json_name: "sendEnabled"
|
99
|
+
optional :pagination, :message, 99, "cosmos.base.query.v1beta1.PageResponse", json_name: "pagination"
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
module Cosmoverse
|
105
|
+
module Proto
|
106
|
+
module Cosmos
|
107
|
+
module Bank
|
108
|
+
module V1beta1
|
109
|
+
module Query
|
110
|
+
QueryBalanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.bank.v1beta1.QueryBalanceRequest").msgclass
|
111
|
+
QueryBalanceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.bank.v1beta1.QueryBalanceResponse").msgclass
|
112
|
+
QueryAllBalancesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.bank.v1beta1.QueryAllBalancesRequest").msgclass
|
113
|
+
QueryAllBalancesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.bank.v1beta1.QueryAllBalancesResponse").msgclass
|
114
|
+
QuerySpendableBalancesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.bank.v1beta1.QuerySpendableBalancesRequest").msgclass
|
115
|
+
QuerySpendableBalancesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.bank.v1beta1.QuerySpendableBalancesResponse").msgclass
|
116
|
+
QuerySpendableBalanceByDenomRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.bank.v1beta1.QuerySpendableBalanceByDenomRequest").msgclass
|
117
|
+
QuerySpendableBalanceByDenomResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.bank.v1beta1.QuerySpendableBalanceByDenomResponse").msgclass
|
118
|
+
QueryTotalSupplyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.bank.v1beta1.QueryTotalSupplyRequest").msgclass
|
119
|
+
QueryTotalSupplyResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.bank.v1beta1.QueryTotalSupplyResponse").msgclass
|
120
|
+
QuerySupplyOfRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.bank.v1beta1.QuerySupplyOfRequest").msgclass
|
121
|
+
QuerySupplyOfResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.bank.v1beta1.QuerySupplyOfResponse").msgclass
|
122
|
+
QueryParamsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.bank.v1beta1.QueryParamsRequest").msgclass
|
123
|
+
QueryParamsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.bank.v1beta1.QueryParamsResponse").msgclass
|
124
|
+
QueryDenomsMetadataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.bank.v1beta1.QueryDenomsMetadataRequest").msgclass
|
125
|
+
QueryDenomsMetadataResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.bank.v1beta1.QueryDenomsMetadataResponse").msgclass
|
126
|
+
QueryDenomMetadataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.bank.v1beta1.QueryDenomMetadataRequest").msgclass
|
127
|
+
QueryDenomMetadataResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.bank.v1beta1.QueryDenomMetadataResponse").msgclass
|
128
|
+
QueryDenomOwnersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.bank.v1beta1.QueryDenomOwnersRequest").msgclass
|
129
|
+
DenomOwner = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.bank.v1beta1.DenomOwner").msgclass
|
130
|
+
QueryDenomOwnersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.bank.v1beta1.QueryDenomOwnersResponse").msgclass
|
131
|
+
QuerySendEnabledRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.bank.v1beta1.QuerySendEnabledRequest").msgclass
|
132
|
+
QuerySendEnabledResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.bank.v1beta1.QuerySendEnabledResponse").msgclass
|
133
|
+
end
|
134
|
+
end
|
135
|
+
end
|
136
|
+
end
|
137
|
+
end
|
138
|
+
end
|
@@ -0,0 +1,89 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
4
|
+
# Source: cosmos/bank/v1beta1/query.proto for package 'Cosmoverse.Proto.Cosmos.Bank.V1beta1.Query'
|
5
|
+
|
6
|
+
require 'grpc'
|
7
|
+
require 'cosmoverse/proto/cosmos/bank/v1beta1/query_pb'
|
8
|
+
|
9
|
+
module Cosmoverse
|
10
|
+
module Proto
|
11
|
+
module Cosmos
|
12
|
+
module Bank
|
13
|
+
module V1beta1
|
14
|
+
module Query
|
15
|
+
module Query
|
16
|
+
# Query defines the gRPC querier service.
|
17
|
+
class Service
|
18
|
+
include ::GRPC::GenericService
|
19
|
+
|
20
|
+
self.marshal_class_method = :encode
|
21
|
+
self.unmarshal_class_method = :decode
|
22
|
+
self.service_name = 'cosmos.bank.v1beta1.Query'
|
23
|
+
|
24
|
+
# Balance queries the balance of a single coin for a single account.
|
25
|
+
rpc :Balance, ::Cosmoverse::Proto::Cosmos::Bank::V1beta1::Query::QueryBalanceRequest, ::Cosmoverse::Proto::Cosmos::Bank::V1beta1::Query::QueryBalanceResponse
|
26
|
+
# AllBalances queries the balance of all coins for a single account.
|
27
|
+
#
|
28
|
+
# When called from another module, this query might consume a high amount of
|
29
|
+
# gas if the pagination field is incorrectly set.
|
30
|
+
rpc :AllBalances, ::Cosmoverse::Proto::Cosmos::Bank::V1beta1::Query::QueryAllBalancesRequest, ::Cosmoverse::Proto::Cosmos::Bank::V1beta1::Query::QueryAllBalancesResponse
|
31
|
+
# SpendableBalances queries the spendable balance of all coins for a single
|
32
|
+
# account.
|
33
|
+
#
|
34
|
+
# When called from another module, this query might consume a high amount of
|
35
|
+
# gas if the pagination field is incorrectly set.
|
36
|
+
#
|
37
|
+
# Since: cosmos-sdk 0.46
|
38
|
+
rpc :SpendableBalances, ::Cosmoverse::Proto::Cosmos::Bank::V1beta1::Query::QuerySpendableBalancesRequest, ::Cosmoverse::Proto::Cosmos::Bank::V1beta1::Query::QuerySpendableBalancesResponse
|
39
|
+
# SpendableBalanceByDenom queries the spendable balance of a single denom for
|
40
|
+
# a single account.
|
41
|
+
#
|
42
|
+
# When called from another module, this query might consume a high amount of
|
43
|
+
# gas if the pagination field is incorrectly set.
|
44
|
+
#
|
45
|
+
# Since: cosmos-sdk 0.47
|
46
|
+
rpc :SpendableBalanceByDenom, ::Cosmoverse::Proto::Cosmos::Bank::V1beta1::Query::QuerySpendableBalanceByDenomRequest, ::Cosmoverse::Proto::Cosmos::Bank::V1beta1::Query::QuerySpendableBalanceByDenomResponse
|
47
|
+
# TotalSupply queries the total supply of all coins.
|
48
|
+
#
|
49
|
+
# When called from another module, this query might consume a high amount of
|
50
|
+
# gas if the pagination field is incorrectly set.
|
51
|
+
rpc :TotalSupply, ::Cosmoverse::Proto::Cosmos::Bank::V1beta1::Query::QueryTotalSupplyRequest, ::Cosmoverse::Proto::Cosmos::Bank::V1beta1::Query::QueryTotalSupplyResponse
|
52
|
+
# SupplyOf queries the supply of a single coin.
|
53
|
+
#
|
54
|
+
# When called from another module, this query might consume a high amount of
|
55
|
+
# gas if the pagination field is incorrectly set.
|
56
|
+
rpc :SupplyOf, ::Cosmoverse::Proto::Cosmos::Bank::V1beta1::Query::QuerySupplyOfRequest, ::Cosmoverse::Proto::Cosmos::Bank::V1beta1::Query::QuerySupplyOfResponse
|
57
|
+
# Params queries the parameters of x/bank module.
|
58
|
+
rpc :Params, ::Cosmoverse::Proto::Cosmos::Bank::V1beta1::Query::QueryParamsRequest, ::Cosmoverse::Proto::Cosmos::Bank::V1beta1::Query::QueryParamsResponse
|
59
|
+
# DenomsMetadata queries the client metadata of a given coin denomination.
|
60
|
+
rpc :DenomMetadata, ::Cosmoverse::Proto::Cosmos::Bank::V1beta1::Query::QueryDenomMetadataRequest, ::Cosmoverse::Proto::Cosmos::Bank::V1beta1::Query::QueryDenomMetadataResponse
|
61
|
+
# DenomsMetadata queries the client metadata for all registered coin
|
62
|
+
# denominations.
|
63
|
+
rpc :DenomsMetadata, ::Cosmoverse::Proto::Cosmos::Bank::V1beta1::Query::QueryDenomsMetadataRequest, ::Cosmoverse::Proto::Cosmos::Bank::V1beta1::Query::QueryDenomsMetadataResponse
|
64
|
+
# DenomOwners queries for all account addresses that own a particular token
|
65
|
+
# denomination.
|
66
|
+
#
|
67
|
+
# When called from another module, this query might consume a high amount of
|
68
|
+
# gas if the pagination field is incorrectly set.
|
69
|
+
#
|
70
|
+
# Since: cosmos-sdk 0.46
|
71
|
+
rpc :DenomOwners, ::Cosmoverse::Proto::Cosmos::Bank::V1beta1::Query::QueryDenomOwnersRequest, ::Cosmoverse::Proto::Cosmos::Bank::V1beta1::Query::QueryDenomOwnersResponse
|
72
|
+
# SendEnabled queries for SendEnabled entries.
|
73
|
+
#
|
74
|
+
# This query only returns denominations that have specific SendEnabled settings.
|
75
|
+
# Any denomination that does not have a specific setting will use the default
|
76
|
+
# params.default_send_enabled, and will not be returned by this query.
|
77
|
+
#
|
78
|
+
# Since: cosmos-sdk 0.47
|
79
|
+
rpc :SendEnabled, ::Cosmoverse::Proto::Cosmos::Bank::V1beta1::Query::QuerySendEnabledRequest, ::Cosmoverse::Proto::Cosmos::Bank::V1beta1::Query::QuerySendEnabledResponse
|
80
|
+
end
|
81
|
+
|
82
|
+
Stub = Service.rpc_stub_class
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
@@ -0,0 +1,108 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
4
|
+
# source: cosmos/base/abci/v1beta1/abci.proto
|
5
|
+
|
6
|
+
require 'google/protobuf'
|
7
|
+
|
8
|
+
require 'cosmoverse/proto/gogoproto/gogo_pb'
|
9
|
+
require 'cosmoverse/proto/tendermint/abci/types_pb'
|
10
|
+
require 'cosmoverse/proto/tendermint/types/block_pb'
|
11
|
+
require 'google/protobuf/any_pb'
|
12
|
+
|
13
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
14
|
+
add_file("cosmos/base/abci/v1beta1/abci.proto", :syntax => :proto3) do
|
15
|
+
add_message "cosmos.base.abci.v1beta1.TxResponse" do
|
16
|
+
optional :height, :int64, 1, json_name: "height"
|
17
|
+
optional :txhash, :string, 2, json_name: "txhash"
|
18
|
+
optional :codespace, :string, 3, json_name: "codespace"
|
19
|
+
optional :code, :uint32, 4, json_name: "code"
|
20
|
+
optional :data, :string, 5, json_name: "data"
|
21
|
+
optional :raw_log, :string, 6, json_name: "rawLog"
|
22
|
+
repeated :logs, :message, 7, "cosmos.base.abci.v1beta1.ABCIMessageLog", json_name: "logs"
|
23
|
+
optional :info, :string, 8, json_name: "info"
|
24
|
+
optional :gas_wanted, :int64, 9, json_name: "gasWanted"
|
25
|
+
optional :gas_used, :int64, 10, json_name: "gasUsed"
|
26
|
+
optional :tx, :message, 11, "google.protobuf.Any", json_name: "tx"
|
27
|
+
optional :timestamp, :string, 12, json_name: "timestamp"
|
28
|
+
repeated :events, :message, 13, "tendermint.abci.Event", json_name: "events"
|
29
|
+
end
|
30
|
+
add_message "cosmos.base.abci.v1beta1.ABCIMessageLog" do
|
31
|
+
optional :msg_index, :uint32, 1, json_name: "msgIndex"
|
32
|
+
optional :log, :string, 2, json_name: "log"
|
33
|
+
repeated :events, :message, 3, "cosmos.base.abci.v1beta1.StringEvent", json_name: "events"
|
34
|
+
end
|
35
|
+
add_message "cosmos.base.abci.v1beta1.StringEvent" do
|
36
|
+
optional :type, :string, 1, json_name: "type"
|
37
|
+
repeated :attributes, :message, 2, "cosmos.base.abci.v1beta1.Attribute", json_name: "attributes"
|
38
|
+
end
|
39
|
+
add_message "cosmos.base.abci.v1beta1.Attribute" do
|
40
|
+
optional :key, :string, 1, json_name: "key"
|
41
|
+
optional :value, :string, 2, json_name: "value"
|
42
|
+
end
|
43
|
+
add_message "cosmos.base.abci.v1beta1.GasInfo" do
|
44
|
+
optional :gas_wanted, :uint64, 1, json_name: "gasWanted"
|
45
|
+
optional :gas_used, :uint64, 2, json_name: "gasUsed"
|
46
|
+
end
|
47
|
+
add_message "cosmos.base.abci.v1beta1.Result" do
|
48
|
+
optional :data, :bytes, 1, json_name: "data"
|
49
|
+
optional :log, :string, 2, json_name: "log"
|
50
|
+
repeated :events, :message, 3, "tendermint.abci.Event", json_name: "events"
|
51
|
+
repeated :msg_responses, :message, 4, "google.protobuf.Any", json_name: "msgResponses"
|
52
|
+
end
|
53
|
+
add_message "cosmos.base.abci.v1beta1.SimulationResponse" do
|
54
|
+
optional :gas_info, :message, 1, "cosmos.base.abci.v1beta1.GasInfo", json_name: "gasInfo"
|
55
|
+
optional :result, :message, 2, "cosmos.base.abci.v1beta1.Result", json_name: "result"
|
56
|
+
end
|
57
|
+
add_message "cosmos.base.abci.v1beta1.MsgData" do
|
58
|
+
optional :msg_type, :string, 1, json_name: "msgType"
|
59
|
+
optional :data, :bytes, 2, json_name: "data"
|
60
|
+
end
|
61
|
+
add_message "cosmos.base.abci.v1beta1.TxMsgData" do
|
62
|
+
repeated :data, :message, 1, "cosmos.base.abci.v1beta1.MsgData", json_name: "data"
|
63
|
+
repeated :msg_responses, :message, 2, "google.protobuf.Any", json_name: "msgResponses"
|
64
|
+
end
|
65
|
+
add_message "cosmos.base.abci.v1beta1.SearchTxsResult" do
|
66
|
+
optional :total_count, :uint64, 1, json_name: "totalCount"
|
67
|
+
optional :count, :uint64, 2, json_name: "count"
|
68
|
+
optional :page_number, :uint64, 3, json_name: "pageNumber"
|
69
|
+
optional :page_total, :uint64, 4, json_name: "pageTotal"
|
70
|
+
optional :limit, :uint64, 5, json_name: "limit"
|
71
|
+
repeated :txs, :message, 6, "cosmos.base.abci.v1beta1.TxResponse", json_name: "txs"
|
72
|
+
end
|
73
|
+
add_message "cosmos.base.abci.v1beta1.SearchBlocksResult" do
|
74
|
+
optional :total_count, :int64, 1, json_name: "totalCount"
|
75
|
+
optional :count, :int64, 2, json_name: "count"
|
76
|
+
optional :page_number, :int64, 3, json_name: "pageNumber"
|
77
|
+
optional :page_total, :int64, 4, json_name: "pageTotal"
|
78
|
+
optional :limit, :int64, 5, json_name: "limit"
|
79
|
+
repeated :blocks, :message, 6, "tendermint.types.Block", json_name: "blocks"
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
module Cosmoverse
|
85
|
+
module Proto
|
86
|
+
module Cosmos
|
87
|
+
module Base
|
88
|
+
module Abci
|
89
|
+
module V1beta1
|
90
|
+
module Abci
|
91
|
+
TxResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.base.abci.v1beta1.TxResponse").msgclass
|
92
|
+
ABCIMessageLog = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.base.abci.v1beta1.ABCIMessageLog").msgclass
|
93
|
+
StringEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.base.abci.v1beta1.StringEvent").msgclass
|
94
|
+
Attribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.base.abci.v1beta1.Attribute").msgclass
|
95
|
+
GasInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.base.abci.v1beta1.GasInfo").msgclass
|
96
|
+
Result = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.base.abci.v1beta1.Result").msgclass
|
97
|
+
SimulationResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.base.abci.v1beta1.SimulationResponse").msgclass
|
98
|
+
MsgData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.base.abci.v1beta1.MsgData").msgclass
|
99
|
+
TxMsgData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.base.abci.v1beta1.TxMsgData").msgclass
|
100
|
+
SearchTxsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.base.abci.v1beta1.SearchTxsResult").msgclass
|
101
|
+
SearchBlocksResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.base.abci.v1beta1.SearchBlocksResult").msgclass
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
4
|
+
# source: cosmos/base/query/v1beta1/pagination.proto
|
5
|
+
|
6
|
+
require 'google/protobuf'
|
7
|
+
|
8
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
|
+
add_file("cosmos/base/query/v1beta1/pagination.proto", :syntax => :proto3) do
|
10
|
+
add_message "cosmos.base.query.v1beta1.PageRequest" do
|
11
|
+
optional :key, :bytes, 1, json_name: "key"
|
12
|
+
optional :offset, :uint64, 2, json_name: "offset"
|
13
|
+
optional :limit, :uint64, 3, json_name: "limit"
|
14
|
+
optional :count_total, :bool, 4, json_name: "countTotal"
|
15
|
+
optional :reverse, :bool, 5, json_name: "reverse"
|
16
|
+
end
|
17
|
+
add_message "cosmos.base.query.v1beta1.PageResponse" do
|
18
|
+
optional :next_key, :bytes, 1, json_name: "nextKey"
|
19
|
+
optional :total, :uint64, 2, json_name: "total"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
module Cosmoverse
|
25
|
+
module Proto
|
26
|
+
module Cosmos
|
27
|
+
module Base
|
28
|
+
module Query
|
29
|
+
module V1beta1
|
30
|
+
module Pagination
|
31
|
+
PageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.base.query.v1beta1.PageRequest").msgclass
|
32
|
+
PageResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("cosmos.base.query.v1beta1.PageResponse").msgclass
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|