code.vegaprotocol.io/vega@v0.79.0/protos/sources/blockexplorer/api/v1/blockexplorer.proto (about) 1 syntax = "proto3"; 2 3 package blockexplorer.api.v1; 4 5 import "google/api/field_behavior.proto"; 6 import "protoc-gen-openapiv2/options/annotations.proto"; 7 import "vega/commands/v1/signature.proto"; 8 import "vega/commands/v1/transaction.proto"; 9 10 option go_package = "code.vegaprotocol.io/vega/protos/blockexplorer/api/v1"; 11 option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { 12 info: { 13 title: "Vega block explorer APIs"; 14 version: "v0.79.0"; 15 } 16 schemes: [ 17 HTTP, 18 HTTPS 19 ] 20 host: "lb.testnet.vega.xyz" 21 }; 22 23 service BlockExplorerService { 24 // Get transaction 25 // 26 // Get a transaction from the Vega blockchain 27 rpc GetTransaction(GetTransactionRequest) returns (GetTransactionResponse) {} 28 29 // List transactions 30 // 31 // List transactions from the Vega blockchain from the newest to the oldest transactions. 32 rpc ListTransactions(ListTransactionsRequest) returns (ListTransactionsResponse) {} 33 34 // Info 35 // 36 // Get information about the block explorer. 37 // Response contains a semver formatted version of the data node and the commit hash, from which the block explorer was built 38 rpc Info(InfoRequest) returns (InfoResponse); 39 } 40 41 // node information 42 message InfoRequest {} 43 44 message InfoResponse { 45 // Semver formatted version of the data node 46 string version = 1; 47 // Commit hash from which the data node was built 48 string commit_hash = 2; 49 } 50 51 message GetTransactionRequest { 52 // Hash of the transaction 53 string hash = 1 [(google.api.field_behavior) = REQUIRED]; 54 } 55 56 message GetTransactionResponse { 57 // Transaction corresponding to the hash 58 Transaction transaction = 1; 59 } 60 61 message ListTransactionsRequest { 62 reserved 1; 63 // Cursor to paginate the request. It can be used in conjunction with the `after` cursor. 64 optional string before = 2; 65 // Cursor to paginate the request. It can be used in conjunction with the `before` cursor. 66 optional string after = 3; 67 // Filters to apply to the request 68 map<string, string> filters = 4; 69 // Transaction command types filter, for listing transactions with specified command types 70 repeated string cmd_types = 5; 71 // Transaction command types exclusion filter, for listing all the transactions except the ones with specified command types 72 repeated string exclude_cmd_types = 6; 73 // Party IDs filter, can be sender or receiver 74 repeated string parties = 7; 75 // Number of transactions to be returned from the blockchain. 76 // Use in conjunction with the `after` cursor to paginate forwards. Paginating forwards means toward the most recent 77 // transactions. 78 // It cannot be used in conjunction with the `before` cursor. 79 // On its own, this will return the `first` most recent transactions. 80 uint32 first = 8; 81 // Number of transactions to be returned from the blockchain. 82 // Use in conjunction with the `before` cursor to paginate backwards. Paginating forwards means toward the least recent 83 // transactions. 84 // It cannot be used in conjunction with the `after` cursor. 85 // On its own, this will return the `last` oldest transactions. 86 uint32 last = 9; 87 } 88 89 message ListTransactionsResponse { 90 // Transaction corresponding to the specific request and filters 91 repeated Transaction transactions = 3; 92 } 93 94 message Transaction { 95 // Height of the block the transaction was found in 96 uint64 block = 1; 97 // Index of the transaction in the block 98 uint32 index = 2; 99 // Hash of the transaction 100 string hash = 3; 101 // Vega public key of the transaction's submitter 102 string submitter = 4; 103 // Type of transaction 104 string type = 5; 105 // Results code of the transaction. 0 indicates the transaction was successful 106 uint32 code = 6; 107 // Cursor for this transaction. This is used for paginating results 108 string cursor = 7; 109 // Actual command of the transaction 110 vega.commands.v1.InputData command = 8; 111 // Signature generated by the submitter for the transaction 112 vega.commands.v1.Signature signature = 9; 113 // Optional error happening when processing / checking the transaction 114 // This should be set if error code is not 0 115 optional string error = 10; 116 // Timestamp when the transaction happened, using RFC3399 format. 117 string created_at = 11; 118 // Version format of the transaction 119 vega.commands.v1.TxVersion version = 12; 120 // Proof of Work parameters of the transaction 121 vega.commands.v1.ProofOfWork pow = 13; 122 }