libra_client 0.1.3

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.
Files changed (47) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +14 -0
  3. data/.travis.yml +7 -0
  4. data/CODE_OF_CONDUCT.md +74 -0
  5. data/Gemfile +4 -0
  6. data/Gemfile.lock +51 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +57 -0
  9. data/Rakefile +10 -0
  10. data/bin/console +16 -0
  11. data/bin/setup +8 -0
  12. data/gen_proto.sh +2 -0
  13. data/lib/libra/access_path.rb +51 -0
  14. data/lib/libra/account_address.rb +29 -0
  15. data/lib/libra/account_config.rb +57 -0
  16. data/lib/libra/account_resource.rb +38 -0
  17. data/lib/libra/mnemonic.rb +147 -0
  18. data/lib/libra/version.rb +3 -0
  19. data/lib/libra_client.rb +173 -0
  20. data/libra_client.gemspec +49 -0
  21. data/libra_client.sublime-project +16 -0
  22. data/proto-lib/access_path_pb.rb +17 -0
  23. data/proto-lib/account_state_blob_pb.rb +23 -0
  24. data/proto-lib/admission_control_pb.rb +37 -0
  25. data/proto-lib/admission_control_services_pb.rb +37 -0
  26. data/proto-lib/events_pb.rb +35 -0
  27. data/proto-lib/get_with_proof_pb.rb +88 -0
  28. data/proto-lib/ledger_info_pb.rb +31 -0
  29. data/proto-lib/mempool_status_pb.rb +21 -0
  30. data/proto-lib/proof_pb.rb +41 -0
  31. data/proto-lib/transaction_info_pb.rb +19 -0
  32. data/proto-lib/transaction_pb.rb +102 -0
  33. data/proto-lib/validator_change_pb.rb +19 -0
  34. data/proto-lib/vm_errors_pb.rb +215 -0
  35. data/protos/access_path.proto +11 -0
  36. data/protos/account_state_blob.proto +16 -0
  37. data/protos/admission_control.proto +76 -0
  38. data/protos/events.proto +38 -0
  39. data/protos/get_with_proof.proto +310 -0
  40. data/protos/ledger_info.proto +82 -0
  41. data/protos/mempool_status.proto +21 -0
  42. data/protos/proof.proto +72 -0
  43. data/protos/transaction.proto +170 -0
  44. data/protos/transaction_info.proto +26 -0
  45. data/protos/validator_change.proto +27 -0
  46. data/protos/vm_errors.proto +276 -0
  47. metadata +191 -0
@@ -0,0 +1,37 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: admission_control.proto for package 'admission_control'
3
+ # Original file comments:
4
+ # Copyright (c) The Libra Core Contributors
5
+ # SPDX-License-Identifier: Apache-2.0
6
+ #
7
+
8
+ require 'grpc'
9
+ require 'admission_control_pb'
10
+
11
+ module AdmissionControl
12
+ module AdmissionControl
13
+ # -----------------------------------------------------------------------------
14
+ # ---------------- Service definition
15
+ # -----------------------------------------------------------------------------
16
+ class Service
17
+
18
+ include GRPC::GenericService
19
+
20
+ self.marshal_class_method = :encode
21
+ self.unmarshal_class_method = :decode
22
+ self.service_name = 'admission_control.AdmissionControl'
23
+
24
+ # Public API to submit transaction to a validator.
25
+ rpc :SubmitTransaction, SubmitTransactionRequest, SubmitTransactionResponse
26
+ # This API is used to update the client to the latest ledger version and
27
+ # optionally also request 1..n other pieces of data. This allows for batch
28
+ # queries. All queries return proofs that a client should check to validate
29
+ # the data. Note that if a client only wishes to update to the latest
30
+ # LedgerInfo and receive the proof of this latest version, they can simply
31
+ # omit the requested_items (or pass an empty list)
32
+ rpc :UpdateToLatestLedger, Types::UpdateToLatestLedgerRequest, Types::UpdateToLatestLedgerResponse
33
+ end
34
+
35
+ Stub = Service.rpc_stub_class
36
+ end
37
+ end
@@ -0,0 +1,35 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: events.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'access_path_pb'
7
+ require 'proof_pb'
8
+ Google::Protobuf::DescriptorPool.generated_pool.build do
9
+ add_file("events.proto", :syntax => :proto3) do
10
+ add_message "types.Event" do
11
+ optional :access_path, :message, 1, "types.AccessPath"
12
+ optional :sequence_number, :uint64, 2
13
+ optional :event_data, :bytes, 3
14
+ end
15
+ add_message "types.EventWithProof" do
16
+ optional :transaction_version, :uint64, 1
17
+ optional :event_index, :uint64, 2
18
+ optional :event, :message, 3, "types.Event"
19
+ optional :proof, :message, 4, "types.EventProof"
20
+ end
21
+ add_message "types.EventsList" do
22
+ repeated :events, :message, 1, "types.Event"
23
+ end
24
+ add_message "types.EventsForVersions" do
25
+ repeated :events_for_version, :message, 1, "types.EventsList"
26
+ end
27
+ end
28
+ end
29
+
30
+ module Types
31
+ Event = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.Event").msgclass
32
+ EventWithProof = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.EventWithProof").msgclass
33
+ EventsList = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.EventsList").msgclass
34
+ EventsForVersions = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.EventsForVersions").msgclass
35
+ end
@@ -0,0 +1,88 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: get_with_proof.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'access_path_pb'
7
+ require 'account_state_blob_pb'
8
+ require 'events_pb'
9
+ require 'ledger_info_pb'
10
+ require 'transaction_pb'
11
+ require 'validator_change_pb'
12
+ Google::Protobuf::DescriptorPool.generated_pool.build do
13
+ add_file("get_with_proof.proto", :syntax => :proto3) do
14
+ add_message "types.UpdateToLatestLedgerRequest" do
15
+ optional :client_known_version, :uint64, 1
16
+ repeated :requested_items, :message, 2, "types.RequestItem"
17
+ end
18
+ add_message "types.RequestItem" do
19
+ oneof :requested_items do
20
+ optional :get_account_state_request, :message, 1, "types.GetAccountStateRequest"
21
+ optional :get_account_transaction_by_sequence_number_request, :message, 2, "types.GetAccountTransactionBySequenceNumberRequest"
22
+ optional :get_events_by_event_access_path_request, :message, 3, "types.GetEventsByEventAccessPathRequest"
23
+ optional :get_transactions_request, :message, 4, "types.GetTransactionsRequest"
24
+ end
25
+ end
26
+ add_message "types.UpdateToLatestLedgerResponse" do
27
+ repeated :response_items, :message, 1, "types.ResponseItem"
28
+ optional :ledger_info_with_sigs, :message, 2, "types.LedgerInfoWithSignatures"
29
+ repeated :validator_change_events, :message, 3, "types.ValidatorChangeEventWithProof"
30
+ end
31
+ add_message "types.ResponseItem" do
32
+ oneof :response_items do
33
+ optional :get_account_state_response, :message, 3, "types.GetAccountStateResponse"
34
+ optional :get_account_transaction_by_sequence_number_response, :message, 4, "types.GetAccountTransactionBySequenceNumberResponse"
35
+ optional :get_events_by_event_access_path_response, :message, 5, "types.GetEventsByEventAccessPathResponse"
36
+ optional :get_transactions_response, :message, 6, "types.GetTransactionsResponse"
37
+ end
38
+ end
39
+ add_message "types.GetAccountStateRequest" do
40
+ optional :address, :bytes, 1
41
+ end
42
+ add_message "types.GetAccountStateResponse" do
43
+ optional :account_state_with_proof, :message, 1, "types.AccountStateWithProof"
44
+ end
45
+ add_message "types.GetAccountTransactionBySequenceNumberRequest" do
46
+ optional :account, :bytes, 1
47
+ optional :sequence_number, :uint64, 2
48
+ optional :fetch_events, :bool, 3
49
+ end
50
+ add_message "types.GetAccountTransactionBySequenceNumberResponse" do
51
+ optional :signed_transaction_with_proof, :message, 2, "types.SignedTransactionWithProof"
52
+ optional :proof_of_current_sequence_number, :message, 3, "types.AccountStateWithProof"
53
+ end
54
+ add_message "types.GetEventsByEventAccessPathRequest" do
55
+ optional :access_path, :message, 1, "types.AccessPath"
56
+ optional :start_event_seq_num, :uint64, 2
57
+ optional :ascending, :bool, 3
58
+ optional :limit, :uint64, 4
59
+ end
60
+ add_message "types.GetEventsByEventAccessPathResponse" do
61
+ repeated :events_with_proof, :message, 1, "types.EventWithProof"
62
+ optional :proof_of_latest_event, :message, 2, "types.AccountStateWithProof"
63
+ end
64
+ add_message "types.GetTransactionsRequest" do
65
+ optional :start_version, :uint64, 1
66
+ optional :limit, :uint64, 2
67
+ optional :fetch_events, :bool, 3
68
+ end
69
+ add_message "types.GetTransactionsResponse" do
70
+ optional :txn_list_with_proof, :message, 1, "types.TransactionListWithProof"
71
+ end
72
+ end
73
+ end
74
+
75
+ module Types
76
+ UpdateToLatestLedgerRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.UpdateToLatestLedgerRequest").msgclass
77
+ RequestItem = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.RequestItem").msgclass
78
+ UpdateToLatestLedgerResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.UpdateToLatestLedgerResponse").msgclass
79
+ ResponseItem = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.ResponseItem").msgclass
80
+ GetAccountStateRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.GetAccountStateRequest").msgclass
81
+ GetAccountStateResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.GetAccountStateResponse").msgclass
82
+ GetAccountTransactionBySequenceNumberRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.GetAccountTransactionBySequenceNumberRequest").msgclass
83
+ GetAccountTransactionBySequenceNumberResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.GetAccountTransactionBySequenceNumberResponse").msgclass
84
+ GetEventsByEventAccessPathRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.GetEventsByEventAccessPathRequest").msgclass
85
+ GetEventsByEventAccessPathResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.GetEventsByEventAccessPathResponse").msgclass
86
+ GetTransactionsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.GetTransactionsRequest").msgclass
87
+ GetTransactionsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.GetTransactionsResponse").msgclass
88
+ end
@@ -0,0 +1,31 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: ledger_info.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("ledger_info.proto", :syntax => :proto3) do
8
+ add_message "types.LedgerInfo" do
9
+ optional :version, :uint64, 1
10
+ optional :transaction_accumulator_hash, :bytes, 2
11
+ optional :consensus_data_hash, :bytes, 3
12
+ optional :consensus_block_id, :bytes, 4
13
+ optional :epoch_num, :uint64, 5
14
+ optional :timestamp_usecs, :uint64, 6
15
+ end
16
+ add_message "types.LedgerInfoWithSignatures" do
17
+ repeated :signatures, :message, 1, "types.ValidatorSignature"
18
+ optional :ledger_info, :message, 2, "types.LedgerInfo"
19
+ end
20
+ add_message "types.ValidatorSignature" do
21
+ optional :validator_id, :bytes, 1
22
+ optional :signature, :bytes, 2
23
+ end
24
+ end
25
+ end
26
+
27
+ module Types
28
+ LedgerInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.LedgerInfo").msgclass
29
+ LedgerInfoWithSignatures = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.LedgerInfoWithSignatures").msgclass
30
+ ValidatorSignature = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.ValidatorSignature").msgclass
31
+ end
@@ -0,0 +1,21 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: mempool_status.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("mempool_status.proto", :syntax => :proto3) do
8
+ add_enum "mempool.MempoolAddTransactionStatus" do
9
+ value :Valid, 0
10
+ value :InsufficientBalance, 1
11
+ value :InvalidSeqNumber, 2
12
+ value :MempoolIsFull, 3
13
+ value :TooManyTransactions, 4
14
+ value :InvalidUpdate, 5
15
+ end
16
+ end
17
+ end
18
+
19
+ module Mempool
20
+ MempoolAddTransactionStatus = Google::Protobuf::DescriptorPool.generated_pool.lookup("mempool.MempoolAddTransactionStatus").enummodule
21
+ end
@@ -0,0 +1,41 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: proof.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'transaction_info_pb'
7
+ Google::Protobuf::DescriptorPool.generated_pool.build do
8
+ add_file("proof.proto", :syntax => :proto3) do
9
+ add_message "types.AccumulatorProof" do
10
+ optional :bitmap, :uint64, 1
11
+ repeated :non_default_siblings, :bytes, 2
12
+ end
13
+ add_message "types.SparseMerkleProof" do
14
+ optional :leaf, :bytes, 1
15
+ optional :bitmap, :bytes, 2
16
+ repeated :non_default_siblings, :bytes, 3
17
+ end
18
+ add_message "types.SignedTransactionProof" do
19
+ optional :ledger_info_to_transaction_info_proof, :message, 1, "types.AccumulatorProof"
20
+ optional :transaction_info, :message, 2, "types.TransactionInfo"
21
+ end
22
+ add_message "types.AccountStateProof" do
23
+ optional :ledger_info_to_transaction_info_proof, :message, 1, "types.AccumulatorProof"
24
+ optional :transaction_info, :message, 2, "types.TransactionInfo"
25
+ optional :transaction_info_to_account_proof, :message, 3, "types.SparseMerkleProof"
26
+ end
27
+ add_message "types.EventProof" do
28
+ optional :ledger_info_to_transaction_info_proof, :message, 1, "types.AccumulatorProof"
29
+ optional :transaction_info, :message, 2, "types.TransactionInfo"
30
+ optional :transaction_info_to_event_proof, :message, 3, "types.AccumulatorProof"
31
+ end
32
+ end
33
+ end
34
+
35
+ module Types
36
+ AccumulatorProof = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.AccumulatorProof").msgclass
37
+ SparseMerkleProof = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.SparseMerkleProof").msgclass
38
+ SignedTransactionProof = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.SignedTransactionProof").msgclass
39
+ AccountStateProof = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.AccountStateProof").msgclass
40
+ EventProof = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.EventProof").msgclass
41
+ end
@@ -0,0 +1,19 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: transaction_info.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("transaction_info.proto", :syntax => :proto3) do
8
+ add_message "types.TransactionInfo" do
9
+ optional :signed_transaction_hash, :bytes, 1
10
+ optional :state_root_hash, :bytes, 2
11
+ optional :event_root_hash, :bytes, 3
12
+ optional :gas_used, :uint64, 4
13
+ end
14
+ end
15
+ end
16
+
17
+ module Types
18
+ TransactionInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.TransactionInfo").msgclass
19
+ end
@@ -0,0 +1,102 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: transaction.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'access_path_pb'
7
+ require 'events_pb'
8
+ require 'proof_pb'
9
+ require 'transaction_info_pb'
10
+ require 'google/protobuf/wrappers_pb'
11
+ Google::Protobuf::DescriptorPool.generated_pool.build do
12
+ add_file("transaction.proto", :syntax => :proto3) do
13
+ add_message "types.RawTransaction" do
14
+ optional :sender_account, :bytes, 1
15
+ optional :sequence_number, :uint64, 2
16
+ optional :max_gas_amount, :uint64, 5
17
+ optional :gas_unit_price, :uint64, 6
18
+ optional :expiration_time, :uint64, 7
19
+ oneof :payload do
20
+ optional :program, :message, 3, "types.Program"
21
+ optional :write_set, :message, 4, "types.WriteSet"
22
+ end
23
+ end
24
+ add_message "types.Program" do
25
+ optional :code, :bytes, 1
26
+ repeated :arguments, :message, 2, "types.TransactionArgument"
27
+ repeated :modules, :bytes, 3
28
+ end
29
+ add_message "types.TransactionArgument" do
30
+ optional :type, :enum, 1, "types.TransactionArgument.ArgType"
31
+ optional :data, :bytes, 2
32
+ end
33
+ add_enum "types.TransactionArgument.ArgType" do
34
+ value :U64, 0
35
+ value :ADDRESS, 1
36
+ value :STRING, 2
37
+ value :BYTEARRAY, 3
38
+ end
39
+ add_message "types.SignedTransaction" do
40
+ optional :raw_txn_bytes, :bytes, 1
41
+ optional :sender_public_key, :bytes, 2
42
+ optional :sender_signature, :bytes, 3
43
+ end
44
+ add_message "types.SignedTransactionWithProof" do
45
+ optional :version, :uint64, 1
46
+ optional :signed_transaction, :message, 2, "types.SignedTransaction"
47
+ optional :proof, :message, 3, "types.SignedTransactionProof"
48
+ optional :events, :message, 4, "types.EventsList"
49
+ end
50
+ add_message "types.SignedTransactionsBlock" do
51
+ repeated :transactions, :message, 1, "types.SignedTransaction"
52
+ optional :validator_public_key, :bytes, 2
53
+ optional :validator_signature, :bytes, 3
54
+ end
55
+ add_message "types.WriteSet" do
56
+ repeated :write_set, :message, 1, "types.WriteOp"
57
+ end
58
+ add_message "types.WriteOp" do
59
+ optional :access_path, :message, 1, "types.AccessPath"
60
+ optional :value, :bytes, 2
61
+ optional :type, :enum, 3, "types.WriteOpType"
62
+ end
63
+ add_message "types.AccountState" do
64
+ optional :address, :bytes, 1
65
+ optional :blob, :bytes, 2
66
+ end
67
+ add_message "types.TransactionToCommit" do
68
+ optional :signed_txn, :message, 1, "types.SignedTransaction"
69
+ repeated :account_states, :message, 2, "types.AccountState"
70
+ repeated :events, :message, 3, "types.Event"
71
+ optional :gas_used, :uint64, 4
72
+ end
73
+ add_message "types.TransactionListWithProof" do
74
+ repeated :transactions, :message, 1, "types.SignedTransaction"
75
+ repeated :infos, :message, 2, "types.TransactionInfo"
76
+ optional :events_for_versions, :message, 3, "types.EventsForVersions"
77
+ optional :first_transaction_version, :message, 4, "google.protobuf.UInt64Value"
78
+ optional :proof_of_first_transaction, :message, 5, "types.AccumulatorProof"
79
+ optional :proof_of_last_transaction, :message, 6, "types.AccumulatorProof"
80
+ end
81
+ add_enum "types.WriteOpType" do
82
+ value :Write, 0
83
+ value :Delete, 1
84
+ end
85
+ end
86
+ end
87
+
88
+ module Types
89
+ RawTransaction = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.RawTransaction").msgclass
90
+ Program = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.Program").msgclass
91
+ TransactionArgument = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.TransactionArgument").msgclass
92
+ TransactionArgument::ArgType = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.TransactionArgument.ArgType").enummodule
93
+ SignedTransaction = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.SignedTransaction").msgclass
94
+ SignedTransactionWithProof = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.SignedTransactionWithProof").msgclass
95
+ SignedTransactionsBlock = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.SignedTransactionsBlock").msgclass
96
+ WriteSet = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.WriteSet").msgclass
97
+ WriteOp = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.WriteOp").msgclass
98
+ AccountState = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.AccountState").msgclass
99
+ TransactionToCommit = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.TransactionToCommit").msgclass
100
+ TransactionListWithProof = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.TransactionListWithProof").msgclass
101
+ WriteOpType = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.WriteOpType").enummodule
102
+ end
@@ -0,0 +1,19 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: validator_change.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'events_pb'
7
+ require 'ledger_info_pb'
8
+ Google::Protobuf::DescriptorPool.generated_pool.build do
9
+ add_file("validator_change.proto", :syntax => :proto3) do
10
+ add_message "types.ValidatorChangeEventWithProof" do
11
+ optional :ledger_info_with_sigs, :message, 1, "types.LedgerInfoWithSignatures"
12
+ optional :event_with_proof, :message, 2, "types.EventWithProof"
13
+ end
14
+ end
15
+ end
16
+
17
+ module Types
18
+ ValidatorChangeEventWithProof = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.ValidatorChangeEventWithProof").msgclass
19
+ end
@@ -0,0 +1,215 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: vm_errors.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("vm_errors.proto", :syntax => :proto3) do
8
+ add_message "types.VMValidationStatus" do
9
+ optional :code, :enum, 1, "types.VMValidationStatusCode"
10
+ optional :message, :string, 2
11
+ end
12
+ add_message "types.VMVerificationStatusList" do
13
+ repeated :status_list, :message, 1, "types.VMVerificationStatus"
14
+ end
15
+ add_message "types.VMVerificationStatus" do
16
+ optional :status_kind, :enum, 1, "types.VMVerificationStatus.StatusKind"
17
+ optional :module_idx, :uint32, 2
18
+ optional :error_kind, :enum, 3, "types.VMVerificationErrorKind"
19
+ optional :message, :string, 4
20
+ end
21
+ add_enum "types.VMVerificationStatus.StatusKind" do
22
+ value :SCRIPT, 0
23
+ value :MODULE, 1
24
+ end
25
+ add_message "types.AssertionFailure" do
26
+ optional :assertion_error_code, :uint64, 1
27
+ end
28
+ add_message "types.ArithmeticError" do
29
+ optional :error_code, :enum, 1, "types.ArithmeticError.ArithmeticErrorType"
30
+ end
31
+ add_enum "types.ArithmeticError.ArithmeticErrorType" do
32
+ value :UnknownArithmeticError, 0
33
+ value :Underflow, 1
34
+ value :Overflow, 2
35
+ value :DivisionByZero, 3
36
+ end
37
+ add_message "types.DynamicReferenceError" do
38
+ optional :error_code, :enum, 1, "types.DynamicReferenceError.DynamicReferenceErrorType"
39
+ end
40
+ add_enum "types.DynamicReferenceError.DynamicReferenceErrorType" do
41
+ value :UnknownDynamicReferenceError, 0
42
+ value :MoveOfBorrowedResource, 1
43
+ value :GlobalRefAlreadyReleased, 2
44
+ value :MissingReleaseRef, 3
45
+ value :GlobalAlreadyBorrowed, 4
46
+ end
47
+ add_message "types.ExecutionStatus" do
48
+ oneof :execution_status do
49
+ optional :runtime_status, :enum, 1, "types.RuntimeStatus"
50
+ optional :assertion_failure, :message, 2, "types.AssertionFailure"
51
+ optional :arithmetic_error, :message, 3, "types.ArithmeticError"
52
+ optional :reference_error, :message, 4, "types.DynamicReferenceError"
53
+ end
54
+ end
55
+ add_message "types.VMStatus" do
56
+ oneof :error_type do
57
+ optional :validation, :message, 1, "types.VMValidationStatus"
58
+ optional :verification, :message, 2, "types.VMVerificationStatusList"
59
+ optional :invariant_violation, :enum, 3, "types.VMInvariantViolationError"
60
+ optional :deserialization, :enum, 4, "types.BinaryError"
61
+ optional :execution, :message, 5, "types.ExecutionStatus"
62
+ end
63
+ end
64
+ add_enum "types.VMValidationStatusCode" do
65
+ value :UnknownValidationStatus, 0
66
+ value :InvalidSignature, 1
67
+ value :InvalidAuthKey, 2
68
+ value :SequenceNumberTooOld, 3
69
+ value :SequenceNumberTooNew, 4
70
+ value :InsufficientBalanceForTransactionFee, 5
71
+ value :TransactionExpired, 6
72
+ value :SendingAccountDoesNotExist, 7
73
+ value :RejectedWriteSet, 8
74
+ value :InvalidWriteSet, 9
75
+ value :ExceededMaxTransactionSize, 10
76
+ value :UnknownScript, 11
77
+ value :UnknownModule, 12
78
+ value :MaxGasUnitsExceedsMaxGasUnitsBound, 13
79
+ value :MaxGasUnitsBelowMinTransactionGasUnits, 14
80
+ value :GasUnitPriceBelowMinBound, 15
81
+ value :GasUnitPriceAboveMaxBound, 16
82
+ end
83
+ add_enum "types.VMVerificationErrorKind" do
84
+ value :UnknownVerificationError, 0
85
+ value :IndexOutOfBounds, 1
86
+ value :RangeOutOfBounds, 2
87
+ value :InvalidSignatureToken, 3
88
+ value :InvalidFieldDefReference, 4
89
+ value :RecursiveStructDefinition, 5
90
+ value :InvalidResourceField, 6
91
+ value :InvalidFallThrough, 7
92
+ value :JoinFailure, 8
93
+ value :NegativeStackSizeWithinBlock, 9
94
+ value :UnbalancedStack, 10
95
+ value :InvalidMainFunctionSignature, 11
96
+ value :DuplicateElement, 12
97
+ value :InvalidModuleHandle, 13
98
+ value :UnimplementedHandle, 14
99
+ value :InconsistentFields, 15
100
+ value :UnusedFields, 16
101
+ value :LookupFailed, 17
102
+ value :VisibilityMismatch, 18
103
+ value :TypeResolutionFailure, 19
104
+ value :TypeMismatch, 20
105
+ value :MissingDependency, 21
106
+ value :PopReferenceError, 22
107
+ value :PopResourceError, 23
108
+ value :ReleaseRefTypeMismatchError, 24
109
+ value :BrTypeMismatchError, 25
110
+ value :AssertTypeMismatchError, 26
111
+ value :StLocTypeMismatchError, 27
112
+ value :StLocUnsafeToDestroyError, 28
113
+ value :RetUnsafeToDestroyError, 29
114
+ value :RetTypeMismatchError, 30
115
+ value :FreezeRefTypeMismatchError, 31
116
+ value :FreezeRefExistsMutableBorrowError, 32
117
+ value :BorrowFieldTypeMismatchError, 33
118
+ value :BorrowFieldBadFieldError, 34
119
+ value :BorrowFieldExistsMutableBorrowError, 35
120
+ value :CopyLocUnavailableError, 36
121
+ value :CopyLocResourceError, 37
122
+ value :CopyLocExistsBorrowError, 38
123
+ value :MoveLocUnavailableError, 39
124
+ value :MoveLocExistsBorrowError, 40
125
+ value :BorrowLocReferenceError, 41
126
+ value :BorrowLocUnavailableError, 42
127
+ value :BorrowLocExistsBorrowError, 43
128
+ value :CallTypeMismatchError, 44
129
+ value :CallBorrowedMutableReferenceError, 45
130
+ value :PackTypeMismatchError, 46
131
+ value :UnpackTypeMismatchError, 47
132
+ value :ReadRefTypeMismatchError, 48
133
+ value :ReadRefResourceError, 49
134
+ value :ReadRefExistsMutableBorrowError, 50
135
+ value :WriteRefTypeMismatchError, 51
136
+ value :WriteRefResourceError, 52
137
+ value :WriteRefExistsBorrowError, 53
138
+ value :WriteRefNoMutableReferenceError, 54
139
+ value :IntegerOpTypeMismatchError, 55
140
+ value :BooleanOpTypeMismatchError, 56
141
+ value :EqualityOpTypeMismatchError, 57
142
+ value :ExistsResourceTypeMismatchError, 58
143
+ value :BorrowGlobalTypeMismatchError, 59
144
+ value :BorrowGlobalNoResourceError, 60
145
+ value :MoveFromTypeMismatchError, 61
146
+ value :MoveFromNoResourceError, 62
147
+ value :MoveToSenderTypeMismatchError, 63
148
+ value :MoveToSenderNoResourceError, 64
149
+ value :CreateAccountTypeMismatchError, 65
150
+ value :ModuleAddressDoesNotMatchSender, 66
151
+ value :NoModuleHandles, 67
152
+ end
153
+ add_enum "types.VMInvariantViolationError" do
154
+ value :UnknownInvariantViolationError, 0
155
+ value :OutOfBoundsIndex, 1
156
+ value :OutOfBoundsRange, 2
157
+ value :EmptyValueStack, 3
158
+ value :EmptyCallStack, 4
159
+ value :PCOverflow, 5
160
+ value :LinkerError, 6
161
+ value :LocalReferenceError, 7
162
+ value :StorageError, 8
163
+ end
164
+ add_enum "types.BinaryError" do
165
+ value :UnknownBinaryError, 0
166
+ value :Malformed, 1
167
+ value :BadMagic, 2
168
+ value :UnknownVersion, 3
169
+ value :UnknownTableType, 4
170
+ value :UnknownSignatureType, 5
171
+ value :UnknownSerializedType, 6
172
+ value :UnknownOpcode, 7
173
+ value :BadHeaderTable, 8
174
+ value :UnexpectedSignatureType, 9
175
+ value :DuplicateTable, 10
176
+ end
177
+ add_enum "types.RuntimeStatus" do
178
+ value :UnknownRuntimeStatus, 0
179
+ value :Executed, 1
180
+ value :OutOfGas, 2
181
+ value :ResourceDoesNotExist, 3
182
+ value :ResourceAlreadyExists, 4
183
+ value :EvictedAccountAccess, 5
184
+ value :AccountAddressAlreadyExists, 6
185
+ value :TypeError, 7
186
+ value :MissingData, 8
187
+ value :DataFormatError, 9
188
+ value :InvalidData, 10
189
+ value :RemoteDataError, 11
190
+ value :CannotWriteExistingResource, 12
191
+ value :ValueSerializationError, 13
192
+ value :ValueDeserializationError, 14
193
+ value :DuplicateModuleName, 15
194
+ end
195
+ end
196
+ end
197
+
198
+ module Types
199
+ VMValidationStatus = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.VMValidationStatus").msgclass
200
+ VMVerificationStatusList = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.VMVerificationStatusList").msgclass
201
+ VMVerificationStatus = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.VMVerificationStatus").msgclass
202
+ VMVerificationStatus::StatusKind = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.VMVerificationStatus.StatusKind").enummodule
203
+ AssertionFailure = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.AssertionFailure").msgclass
204
+ ArithmeticError = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.ArithmeticError").msgclass
205
+ ArithmeticError::ArithmeticErrorType = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.ArithmeticError.ArithmeticErrorType").enummodule
206
+ DynamicReferenceError = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.DynamicReferenceError").msgclass
207
+ DynamicReferenceError::DynamicReferenceErrorType = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.DynamicReferenceError.DynamicReferenceErrorType").enummodule
208
+ ExecutionStatus = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.ExecutionStatus").msgclass
209
+ VMStatus = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.VMStatus").msgclass
210
+ VMValidationStatusCode = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.VMValidationStatusCode").enummodule
211
+ VMVerificationErrorKind = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.VMVerificationErrorKind").enummodule
212
+ VMInvariantViolationError = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.VMInvariantViolationError").enummodule
213
+ BinaryError = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.BinaryError").enummodule
214
+ RuntimeStatus = Google::Protobuf::DescriptorPool.generated_pool.lookup("types.RuntimeStatus").enummodule
215
+ end