2020-04-07 13:56:57 +00:00
<!DOCTYPE html>
< html >
< head >
< title > Protocol Documentation< / title >
< meta charset = "UTF-8" >
< link rel = "stylesheet" type = "text/css" href = "https://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic" / >
< style >
body {
width: 60em;
margin: 1em auto;
color: #222;
font-family: "Ubuntu", sans-serif;
padding-bottom: 4em;
}
h1 {
font-weight: normal;
border-bottom: 1px solid #aaa;
padding-bottom: 0.5ex;
}
h2 {
border-bottom: 1px solid #aaa;
padding-bottom: 0.5ex;
margin: 1.5em 0;
}
h3 {
font-weight: normal;
border-bottom: 1px solid #aaa;
padding-bottom: 0.5ex;
}
a {
text-decoration: none;
color: #567e25;
}
table {
width: 100%;
font-size: 80%;
border-collapse: collapse;
}
thead {
font-weight: 700;
background-color: #dcdcdc;
}
tbody tr:nth-child(even) {
background-color: #fbfbfb;
}
td {
border: 1px solid #ccc;
padding: 0.5ex 2ex;
}
td p {
text-indent: 1em;
margin: 0;
}
td p:nth-child(1) {
text-indent: 0;
}
.field-table td:nth-child(1) {
width: 10em;
}
.field-table td:nth-child(2) {
width: 10em;
}
.field-table td:nth-child(3) {
width: 6em;
}
.field-table td:nth-child(4) {
width: auto;
}
.extension-table td:nth-child(1) {
width: 10em;
}
.extension-table td:nth-child(2) {
width: 10em;
}
.extension-table td:nth-child(3) {
width: 10em;
}
.extension-table td:nth-child(4) {
width: 5em;
}
.extension-table td:nth-child(5) {
width: auto;
}
.enum-table td:nth-child(1) {
width: 10em;
}
.enum-table td:nth-child(2) {
width: 10em;
}
.enum-table td:nth-child(3) {
width: auto;
}
.scalar-value-types-table tr {
height: 3em;
}
#toc-container ul {
list-style-type: none;
padding-left: 1em;
line-height: 180%;
margin: 0;
}
#toc > li > a {
font-weight: bold;
}
.file-heading {
width: 100%;
display: table;
border-bottom: 1px solid #aaa;
margin: 4em 0 1.5em 0;
}
.file-heading h2 {
border: none;
display: table-cell;
}
.file-heading a {
text-align: right;
display: table-cell;
}
.badge {
width: 1.6em;
height: 1.6em;
display: inline-block;
line-height: 1.6em;
text-align: center;
font-weight: bold;
font-size: 60%;
color: #89ba48;
background-color: #dff0c8;
margin: 0.5ex 1em 0.5ex -1em;
border: 1px solid #fbfbfb;
border-radius: 1ex;
}
< / style >
< link rel = "stylesheet" type = "text/css" href = "stylesheet.css" / >
< / head >
< body >
< h1 id = "title" > Protocol Documentation< / h1 >
< h2 > Table of Contents< / h2 >
< div id = "toc-container" >
< ul id = "toc" >
< li >
< a href = "#bdware%2fbdledger%2fapi%2fcommon.proto" > bdware/bdledger/api/common.proto< / a >
< ul >
< li >
< a href = "#bdware.bdledger.api.Block" > < span class = "badge" > M< / span > Block< / a >
< / li >
< li >
< a href = "#bdware.bdledger.api.Contract" > < span class = "badge" > M< / span > Contract< / a >
< / li >
< li >
< a href = "#bdware.bdledger.api.Transaction" > < span class = "badge" > M< / span > Transaction< / a >
< / li >
< li >
< a href = "#bdware.bdledger.api.Contract.ContractUnitRequestType" > < span class = "badge" > E< / span > Contract.ContractUnitRequestType< / a >
< / li >
< li >
< a href = "#bdware.bdledger.api.TransactionType" > < span class = "badge" > E< / span > TransactionType< / a >
< / li >
< / ul >
< / li >
< li >
< a href = "#bdware%2fbdledger%2fapi%2ferror_details.proto" > bdware/bdledger/api/error_details.proto< / a >
< ul >
< li >
< a href = "#bdware.bdledger.api.InvalidArgument" > < span class = "badge" > M< / span > InvalidArgument< / a >
< / li >
< li >
< a href = "#bdware.bdledger.api.InvalidArgument.FieldViolation" > < span class = "badge" > M< / span > InvalidArgument.FieldViolation< / a >
< / li >
< / ul >
< / li >
< li >
< a href = "#bdware%2fbdledger%2fapi%2fledger.proto" > bdware/bdledger/api/ledger.proto< / a >
< ul >
< li >
< a href = "#bdware.bdledger.api.CreateLedgerRequest" > < span class = "badge" > M< / span > CreateLedgerRequest< / a >
< / li >
< li >
< a href = "#bdware.bdledger.api.CreateLedgerResponse" > < span class = "badge" > M< / span > CreateLedgerResponse< / a >
< / li >
< li >
< a href = "#bdware.bdledger.api.GetLedgersResponse" > < span class = "badge" > M< / span > GetLedgersResponse< / a >
< / li >
< li >
< a href = "#bdware.bdledger.api.SendTransactionRequest" > < span class = "badge" > M< / span > SendTransactionRequest< / a >
< / li >
< li >
< a href = "#bdware.bdledger.api.SendTransactionRequest.Transaction" > < span class = "badge" > M< / span > SendTransactionRequest.Transaction< / a >
< / li >
< li >
< a href = "#bdware.bdledger.api.SendTransactionResponse" > < span class = "badge" > M< / span > SendTransactionResponse< / a >
< / li >
< li >
< a href = "#bdware.bdledger.api.Ledger" > < span class = "badge" > S< / span > Ledger< / a >
< / li >
< / ul >
< / li >
< li >
< a href = "#bdware%2fbdledger%2fapi%2fnode.proto" > bdware/bdledger/api/node.proto< / a >
< ul >
< li >
< a href = "#bdware.bdledger.api.ClientVersionResponse" > < span class = "badge" > M< / span > ClientVersionResponse< / a >
< / li >
< li >
< a href = "#bdware.bdledger.api.Node" > < span class = "badge" > S< / span > Node< / a >
< / li >
< / ul >
< / li >
< li >
< a href = "#bdware%2fbdledger%2fapi%2fquery.proto" > bdware/bdledger/api/query.proto< / a >
< ul >
< li >
< a href = "#bdware.bdledger.api.BlockFilter" > < span class = "badge" > M< / span > BlockFilter< / a >
< / li >
< li >
< a href = "#bdware.bdledger.api.BlocksRequest" > < span class = "badge" > M< / span > BlocksRequest< / a >
< / li >
< li >
< a href = "#bdware.bdledger.api.CountBlocksResponse" > < span class = "badge" > M< / span > CountBlocksResponse< / a >
< / li >
< li >
< a href = "#bdware.bdledger.api.CountTransactionsResponse" > < span class = "badge" > M< / span > CountTransactionsResponse< / a >
< / li >
< li >
< a href = "#bdware.bdledger.api.GetBlockByHashRequest" > < span class = "badge" > M< / span > GetBlockByHashRequest< / a >
< / li >
< li >
< a href = "#bdware.bdledger.api.GetBlockByHashResponse" > < span class = "badge" > M< / span > GetBlockByHashResponse< / a >
< / li >
< li >
< a href = "#bdware.bdledger.api.GetBlocksResponse" > < span class = "badge" > M< / span > GetBlocksResponse< / a >
< / li >
< li >
< a href = "#bdware.bdledger.api.GetTransactionByBlockHashAndIndexRequest" > < span class = "badge" > M< / span > GetTransactionByBlockHashAndIndexRequest< / a >
< / li >
< li >
< a href = "#bdware.bdledger.api.GetTransactionByBlockHashAndIndexResponse" > < span class = "badge" > M< / span > GetTransactionByBlockHashAndIndexResponse< / a >
< / li >
< li >
< a href = "#bdware.bdledger.api.GetTransactionByHashRequest" > < span class = "badge" > M< / span > GetTransactionByHashRequest< / a >
< / li >
< li >
< a href = "#bdware.bdledger.api.GetTransactionByHashResponse" > < span class = "badge" > M< / span > GetTransactionByHashResponse< / a >
< / li >
< li >
< a href = "#bdware.bdledger.api.GetTransactionsResponse" > < span class = "badge" > M< / span > GetTransactionsResponse< / a >
< / li >
2020-09-04 04:29:54 +00:00
< li >
< a href = "#bdware.bdledger.api.RecentBlocksRequest" > < span class = "badge" > M< / span > RecentBlocksRequest< / a >
< / li >
2020-04-07 13:56:57 +00:00
< li >
< a href = "#bdware.bdledger.api.TransactionFilter" > < span class = "badge" > M< / span > TransactionFilter< / a >
< / li >
< li >
< a href = "#bdware.bdledger.api.TransactionsRequest" > < span class = "badge" > M< / span > TransactionsRequest< / a >
< / li >
< li >
2020-09-04 04:29:54 +00:00
< a href = "#bdware.bdledger.api.IncludeTransactions" > < span class = "badge" > E< / span > IncludeTransactions< / a >
2020-04-07 13:56:57 +00:00
< / li >
< li >
< a href = "#bdware.bdledger.api.Query" > < span class = "badge" > S< / span > Query< / a >
< / li >
< / ul >
< / li >
< li >
< a href = "#google%2fprotobuf%2fempty.proto" > google/protobuf/empty.proto< / a >
< ul >
< li >
< a href = "#google.protobuf.Empty" > < span class = "badge" > M< / span > Empty< / a >
< / li >
< / ul >
< / li >
< li > < a href = "#scalar-value-types" > Scalar Value Types< / a > < / li >
< / ul >
< / div >
< div class = "file-heading" >
< h2 id = "bdware/bdledger/api/common.proto" > bdware/bdledger/api/common.proto< / h2 > < a href = "#title" > Top< / a >
< / div >
< p > < / p >
< h3 id = "bdware.bdledger.api.Block" > Block< / h3 >
< p > < / p >
< table class = "field-table" >
< thead >
< tr > < td > Field< / td > < td > Type< / td > < td > Label< / td > < td > Description< / td > < / tr >
< / thead >
< tbody >
< tr >
< td > hash< / td >
< td > < a href = "#bytes" > bytes< / a > < / td >
< td > < / td >
< td > < p > 区块的哈希,当区块处于待确认状态时为`null` < / p > < / td >
< / tr >
2020-04-20 16:46:04 +00:00
< tr >
< td > creator< / td >
< td > < a href = "#bytes" > bytes< / a > < / td >
< td > < / td >
< td > < p > 产块者账户地址 < / p > < / td >
< / tr >
< tr >
< td > nonce< / td >
< td > < a href = "#uint64" > uint64< / a > < / td >
< td > < / td >
< td > < p > 这个区块之前产块者产生的区块数量 < / p > < / td >
< / tr >
2020-04-07 13:56:57 +00:00
< tr >
< td > parent_hashes< / td >
< td > < a href = "#bytes" > bytes< / a > < / td >
< td > repeated< / td >
< td > < p > 父区块的哈希 < / p > < / td >
< / tr >
< tr >
< td > witnesses< / td >
< td > < a href = "#bytes" > bytes< / a > < / td >
< td > repeated< / td >
< td > < p > 见证者账户地址 < / p > < / td >
< / tr >
< tr >
< td > timestamp< / td >
< td > < a href = "#int64" > int64< / a > < / td >
< td > < / td >
< td > < p > 区块产生时的 UNIX 时间戳,单位为秒 < / p > < / td >
< / tr >
< tr >
< td > size< / td >
< td > < a href = "#uint64" > uint64< / a > < / td >
< td > < / td >
< td > < p > 区块大小的字节数 < / p > < / td >
< / tr >
< tr >
< td > transaction_count< / td >
< td > < a href = "#uint32" > uint32< / a > < / td >
< td > < / td >
< td > < p > 区块包含的事务数量 < / p > < / td >
< / tr >
< tr >
< td > transactions_root< / td >
< td > < a href = "#bytes" > bytes< / a > < / td >
< td > < / td >
< td > < p > 区块的事务默克尔树根 < / p > < / td >
< / tr >
< tr >
< td > transactions< / td >
< td > < a href = "#bdware.bdledger.api.Transaction" > Transaction< / a > < / td >
< td > repeated< / td >
< td > < p > 事务对象的数组,或为空 < / p > < / td >
< / tr >
< tr >
< td > transaction_hashes< / td >
< td > < a href = "#bytes" > bytes< / a > < / td >
< td > repeated< / td >
< td > < p > 20字节的交易哈希的数组, 或为空 < / p > < / td >
< / tr >
< / tbody >
< / table >
< h3 id = "bdware.bdledger.api.Contract" > Contract< / h3 >
< p > < / p >
< table class = "field-table" >
< thead >
< tr > < td > Field< / td > < td > Type< / td > < td > Label< / td > < td > Description< / td > < / tr >
< / thead >
< tbody >
< tr >
< td > contractName< / td >
< td > < a href = "#bytes" > bytes< / a > < / td >
< td > < / td >
< td > < p > 合约名称 < / p > < / td >
< / tr >
< tr >
< td > randomNum< / td >
< td > < a href = "#uint32" > uint32< / a > < / td >
< td > < / td >
< td > < p > 合约执行的节点数量 < / p > < / td >
< / tr >
< tr >
< td > operation< / td >
< td > < a href = "#bytes" > bytes< / a > < / td >
< td > < / td >
< td > < p > 合约方法 < / p > < / td >
< / tr >
< tr >
< td > arg< / td >
< td > < a href = "#bytes" > bytes< / a > < / td >
< td > < / td >
< td > < p > 合约方法参数 < / p > < / td >
< / tr >
< tr >
< td > path< / td >
< td > < a href = "#bytes" > bytes< / a > < / td >
< td > < / td >
< td > < p > 合约文件路径(合约在IDE工程的相对路径) < / p > < / td >
< / tr >
< tr >
< td > content< / td >
< td > < a href = "#bytes" > bytes< / a > < / td >
< td > < / td >
< td > < p > 合约内容(可为合约文件相对路径/合约脚本) < / p > < / td >
< / tr >
< tr >
< td > pubkey< / td >
< td > < a href = "#bytes" > bytes< / a > < / td >
< td > < / td >
< td > < p > 用户公钥 < / p > < / td >
< / tr >
< / tbody >
< / table >
< h3 id = "bdware.bdledger.api.Transaction" > Transaction< / h3 >
< p > < / p >
< table class = "field-table" >
< thead >
< tr > < td > Field< / td > < td > Type< / td > < td > Label< / td > < td > Description< / td > < / tr >
< / thead >
< tbody >
< tr >
< td > block_hash< / td >
< td > < a href = "#bytes" > bytes< / a > < / td >
< td > < / td >
< td > < p > 事务所在的区块的哈希,当事务处于待确认状态时为`null` < / p > < / td >
< / tr >
2020-09-04 04:29:54 +00:00
< tr >
< td > block_timestamp< / td >
< td > < a href = "#int64" > int64< / a > < / td >
< td > < / td >
< td > < p > 事务所在的区块产生时的 UNIX 时间戳,单位为秒 < / p > < / td >
< / tr >
2020-04-07 13:56:57 +00:00
< tr >
< td > index< / td >
< td > < a href = "#uint32" > uint32< / a > < / td >
< td > < / td >
< td > < p > 事务在区块中的位置 index, 当事务处于待确认状态时为`null` < / p > < / td >
< / tr >
< tr >
< td > hash< / td >
< td > < a href = "#bytes" > bytes< / a > < / td >
< td > < / td >
< td > < p > 事务的哈希 < / p > < / td >
< / tr >
< tr >
< td > type< / td >
< td > < a href = "#bdware.bdledger.api.TransactionType" > TransactionType< / a > < / td >
< td > < / td >
< td > < p > 事务类型 < / p > < / td >
< / tr >
< tr >
< td > from< / td >
< td > < a href = "#bytes" > bytes< / a > < / td >
< td > < / td >
< td > < p > 发送账户地址 < / p > < / td >
< / tr >
< tr >
< td > nonce< / td >
< td > < a href = "#uint64" > uint64< / a > < / td >
< td > < / td >
< td > < p > 这条事务之前发送者所发送的事务数量 < / p > < / td >
< / tr >
< tr >
< td > to< / td >
< td > < a href = "#bytes" > bytes< / a > < / td >
< td > < / td >
< td > < p > 接收账户地址,或者调用的合约地址,或者`null`如为合约创建 < / p > < / td >
< / tr >
< tr >
< td > data< / td >
< td > < a href = "#bytes" > bytes< / a > < / td >
< td > < / td >
< td > < p > 数据或合约代码 < / p > < / td >
< / tr >
< tr >
< td > v< / td >
< td > < a href = "#bytes" > bytes< / a > < / td >
< td > < / td >
< td > < p > ECDSA recovery id < / p > < / td >
< / tr >
< tr >
< td > r< / td >
< td > < a href = "#bytes" > bytes< / a > < / td >
< td > < / td >
< td > < p > ECDSA signature r < / p > < / td >
< / tr >
< tr >
< td > s< / td >
< td > < a href = "#bytes" > bytes< / a > < / td >
< td > < / td >
< td > < p > ECDSA signature s < / p > < / td >
< / tr >
< / tbody >
< / table >
< h3 id = "bdware.bdledger.api.Contract.ContractUnitRequestType" > Contract.ContractUnitRequestType< / h3 >
< p > < / p >
< table class = "enum-table" >
< thead >
< tr > < td > Name< / td > < td > Number< / td > < td > Description< / td > < / tr >
< / thead >
< tbody >
< tr >
< td > START< / td >
< td > 0< / td >
< td > < p > < / p > < / td >
< / tr >
< tr >
< td > STOP< / td >
< td > 1< / td >
< td > < p > < / p > < / td >
< / tr >
< tr >
< td > EXECUTE< / td >
< td > 2< / td >
< td > < p > < / p > < / td >
< / tr >
< tr >
< td > REPLY< / td >
< td > 3< / td >
< td > < p > < / p > < / td >
< / tr >
< tr >
< td > REQUEST< / td >
< td > 4< / td >
< td > < p > < / p > < / td >
< / tr >
< tr >
< td > PREPREPARE< / td >
< td > 5< / td >
< td > < p > < / p > < / td >
< / tr >
< tr >
< td > PREPARE< / td >
< td > 6< / td >
< td > < p > < / p > < / td >
< / tr >
< tr >
< td > COMMIT< / td >
< td > 7< / td >
< td > < p > < / p > < / td >
< / tr >
< tr >
< td > ADDPEER< / td >
< td > 8< / td >
< td > < p > < / p > < / td >
< / tr >
< tr >
< td > DROPPEER< / td >
< td > 9< / td >
< td > < p > < / p > < / td >
< / tr >
< tr >
< td > STATESYNC< / td >
< td > 10< / td >
< td > < p > < / p > < / td >
< / tr >
< / tbody >
< / table >
< h3 id = "bdware.bdledger.api.TransactionType" > TransactionType< / h3 >
< p > 事务类型< / p >
< table class = "enum-table" >
< thead >
< tr > < td > Name< / td > < td > Number< / td > < td > Description< / td > < / tr >
< / thead >
< tbody >
< tr >
< td > RECORD< / td >
< td > 0< / td >
< td > < p > 通用数据记录< / p > < / td >
< / tr >
< tr >
< td > MESSAGE< / td >
< td > 1< / td >
< td > < p > 消息< / p > < / td >
< / tr >
< tr >
< td > CONTRACT_CREATION< / td >
< td > 2< / td >
< td > < p > 合约创建< / p > < / td >
< / tr >
< tr >
< td > CONTRACT_INVOCATION< / td >
< td > 3< / td >
< td > < p > 合约调用< / p > < / td >
< / tr >
< tr >
< td > CONTRACT_STATUS< / td >
< td > 4< / td >
< td > < p > 合约状态< / p > < / td >
< / tr >
< / tbody >
< / table >
< div class = "file-heading" >
< h2 id = "bdware/bdledger/api/error_details.proto" > bdware/bdledger/api/error_details.proto< / h2 > < a href = "#title" > Top< / a >
< / div >
< p > < / p >
< h3 id = "bdware.bdledger.api.InvalidArgument" > InvalidArgument< / h3 >
< p > InvalidArgument indicates client specified an invalid argument.< / p > < p > Note that this differs from FailedPrecondition. It indicates arguments< / p > < p > that are problematic regardless of the state of the system< / p > < p > (e.g., a malformed file name).< / p >
< table class = "field-table" >
< thead >
< tr > < td > Field< / td > < td > Type< / td > < td > Label< / td > < td > Description< / td > < / tr >
< / thead >
< tbody >
< tr >
< td > field_violations< / td >
< td > < a href = "#bdware.bdledger.api.InvalidArgument.FieldViolation" > InvalidArgument.FieldViolation< / a > < / td >
< td > repeated< / td >
< td > < p > Describes all violations in a client request. < / p > < / td >
< / tr >
< / tbody >
< / table >
< h3 id = "bdware.bdledger.api.InvalidArgument.FieldViolation" > InvalidArgument.FieldViolation< / h3 >
< p > A message type used to describe a single invalid field.< / p >
< table class = "field-table" >
< thead >
< tr > < td > Field< / td > < td > Type< / td > < td > Label< / td > < td > Description< / td > < / tr >
< / thead >
< tbody >
< tr >
< td > field< / td >
< td > < a href = "#string" > string< / a > < / td >
< td > < / td >
< td > < p > A path leading to a field in the request body. The value will be a
sequence of dot-separated identifiers that identify a protocol buffer
field. E.g., " field_violations.field" would identify this field. < / p > < / td >
< / tr >
< tr >
< td > description< / td >
< td > < a href = "#string" > string< / a > < / td >
< td > < / td >
< td > < p > A description of why the request element is bad. < / p > < / td >
< / tr >
< / tbody >
< / table >
< div class = "file-heading" >
< h2 id = "bdware/bdledger/api/ledger.proto" > bdware/bdledger/api/ledger.proto< / h2 > < a href = "#title" > Top< / a >
< / div >
< p > < / p >
< h3 id = "bdware.bdledger.api.CreateLedgerRequest" > CreateLedgerRequest< / h3 >
< p > < / p >
< table class = "field-table" >
< thead >
< tr > < td > Field< / td > < td > Type< / td > < td > Label< / td > < td > Description< / td > < / tr >
< / thead >
< tbody >
< tr >
< td > name< / td >
< td > < a href = "#string" > string< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< / tbody >
< / table >
< h3 id = "bdware.bdledger.api.CreateLedgerResponse" > CreateLedgerResponse< / h3 >
< p > < / p >
< table class = "field-table" >
< thead >
< tr > < td > Field< / td > < td > Type< / td > < td > Label< / td > < td > Description< / td > < / tr >
< / thead >
< tbody >
< tr >
< td > ok< / td >
< td > < a href = "#bool" > bool< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< / tbody >
< / table >
< h3 id = "bdware.bdledger.api.GetLedgersResponse" > GetLedgersResponse< / h3 >
< p > < / p >
< table class = "field-table" >
< thead >
< tr > < td > Field< / td > < td > Type< / td > < td > Label< / td > < td > Description< / td > < / tr >
< / thead >
< tbody >
< tr >
< td > ledgers< / td >
< td > < a href = "#string" > string< / a > < / td >
< td > repeated< / td >
< td > < p > < / p > < / td >
< / tr >
< / tbody >
< / table >
< h3 id = "bdware.bdledger.api.SendTransactionRequest" > SendTransactionRequest< / h3 >
< p > < / p >
< table class = "field-table" >
< thead >
< tr > < td > Field< / td > < td > Type< / td > < td > Label< / td > < td > Description< / td > < / tr >
< / thead >
< tbody >
< tr >
< td > ledger< / td >
< td > < a href = "#string" > string< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< tr >
< td > transaction< / td >
< td > < a href = "#bdware.bdledger.api.SendTransactionRequest.Transaction" > SendTransactionRequest.Transaction< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< / tbody >
< / table >
< h3 id = "bdware.bdledger.api.SendTransactionRequest.Transaction" > SendTransactionRequest.Transaction< / h3 >
< p > < / p >
< table class = "field-table" >
< thead >
< tr > < td > Field< / td > < td > Type< / td > < td > Label< / td > < td > Description< / td > < / tr >
< / thead >
< tbody >
< tr >
< td > type< / td >
< td > < a href = "#bdware.bdledger.api.TransactionType" > TransactionType< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< tr >
< td > from< / td >
< td > < a href = "#bytes" > bytes< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
2020-09-04 04:29:54 +00:00
< tr >
< td > nonce< / td >
< td > < a href = "#uint64" > uint64< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
2020-04-07 13:56:57 +00:00
< tr >
< td > to< / td >
< td > < a href = "#bytes" > bytes< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< tr >
< td > data< / td >
< td > < a href = "#bytes" > bytes< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< / tbody >
< / table >
< h3 id = "bdware.bdledger.api.SendTransactionResponse" > SendTransactionResponse< / h3 >
< p > < / p >
< table class = "field-table" >
< thead >
< tr > < td > Field< / td > < td > Type< / td > < td > Label< / td > < td > Description< / td > < / tr >
< / thead >
< tbody >
< tr >
< td > hash< / td >
< td > < a href = "#bytes" > bytes< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< / tbody >
< / table >
< h3 id = "bdware.bdledger.api.Ledger" > Ledger< / h3 >
< p > < / p >
< table class = "enum-table" >
< thead >
< tr > < td > Method Name< / td > < td > Request Type< / td > < td > Response Type< / td > < td > Description< / td > < / tr >
< / thead >
< tbody >
< tr >
< td > CreateLedger< / td >
< td > < a href = "#bdware.bdledger.api.CreateLedgerRequest" > CreateLedgerRequest< / a > < / td >
< td > < a href = "#bdware.bdledger.api.CreateLedgerResponse" > CreateLedgerResponse< / a > < / td >
< td > < p > Create a new ledger
创建一个新账本< / p > < / td >
< / tr >
< tr >
< td > GetLedgers< / td >
< td > < a href = "#google.protobuf.Empty" > .google.protobuf.Empty< / a > < / td >
< td > < a href = "#bdware.bdledger.api.GetLedgersResponse" > GetLedgersResponse< / a > < / td >
< td > < p > Get all ledgers
查询所有帐本列表< / p > < / td >
< / tr >
< tr >
< td > SendTransaction< / td >
< td > < a href = "#bdware.bdledger.api.SendTransactionRequest" > SendTransactionRequest< / a > < / td >
< td > < a href = "#bdware.bdledger.api.SendTransactionResponse" > SendTransactionResponse< / a > < / td >
< td > < p > Send a new transaction
发送一个新事务< / p > < / td >
< / tr >
< / tbody >
< / table >
< div class = "file-heading" >
< h2 id = "bdware/bdledger/api/node.proto" > bdware/bdledger/api/node.proto< / h2 > < a href = "#title" > Top< / a >
< / div >
< p > < / p >
< h3 id = "bdware.bdledger.api.ClientVersionResponse" > ClientVersionResponse< / h3 >
< p > < / p >
< table class = "field-table" >
< thead >
< tr > < td > Field< / td > < td > Type< / td > < td > Label< / td > < td > Description< / td > < / tr >
< / thead >
< tbody >
< tr >
< td > version< / td >
< td > < a href = "#string" > string< / a > < / td >
< td > < / td >
< td > < p > 节点客户端版本 < / p > < / td >
< / tr >
< / tbody >
< / table >
< h3 id = "bdware.bdledger.api.Node" > Node< / h3 >
< p > < / p >
< table class = "enum-table" >
< thead >
< tr > < td > Method Name< / td > < td > Request Type< / td > < td > Response Type< / td > < td > Description< / td > < / tr >
< / thead >
< tbody >
< tr >
< td > ClientVersion< / td >
< td > < a href = "#google.protobuf.Empty" > .google.protobuf.Empty< / a > < / td >
< td > < a href = "#bdware.bdledger.api.ClientVersionResponse" > ClientVersionResponse< / a > < / td >
< td > < p > Get BDLedger node version
查询BDLedger节点版本< / p > < / td >
< / tr >
< / tbody >
< / table >
< div class = "file-heading" >
< h2 id = "bdware/bdledger/api/query.proto" > bdware/bdledger/api/query.proto< / h2 > < a href = "#title" > Top< / a >
< / div >
< p > < / p >
< h3 id = "bdware.bdledger.api.BlockFilter" > BlockFilter< / h3 >
< p > < / p >
< table class = "field-table" >
< thead >
< tr > < td > Field< / td > < td > Type< / td > < td > Label< / td > < td > Description< / td > < / tr >
< / thead >
< tbody >
< tr >
< td > hash< / td >
< td > < a href = "#bytes" > bytes< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< tr >
< td > timestamp< / td >
< td > < a href = "#int64" > int64< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< / tbody >
< / table >
< h3 id = "bdware.bdledger.api.BlocksRequest" > BlocksRequest< / h3 >
< p > < / p >
< table class = "field-table" >
< thead >
< tr > < td > Field< / td > < td > Type< / td > < td > Label< / td > < td > Description< / td > < / tr >
< / thead >
< tbody >
< tr >
< td > ledger< / td >
< td > < a href = "#string" > string< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< tr >
< td > start_timestamp< / td >
< td > < a href = "#int64" > int64< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< tr >
< td > end_timestamp< / td >
< td > < a href = "#int64" > int64< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< tr >
< td > filters< / td >
< td > < a href = "#bdware.bdledger.api.BlockFilter" > BlockFilter< / a > < / td >
< td > repeated< / td >
< td > < p > < / p > < / td >
< / tr >
< tr >
< td > include_transactions< / td >
2020-09-04 04:29:54 +00:00
< td > < a href = "#bdware.bdledger.api.IncludeTransactions" > IncludeTransactions< / a > < / td >
2020-04-07 13:56:57 +00:00
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< / tbody >
< / table >
< h3 id = "bdware.bdledger.api.CountBlocksResponse" > CountBlocksResponse< / h3 >
< p > < / p >
< table class = "field-table" >
< thead >
< tr > < td > Field< / td > < td > Type< / td > < td > Label< / td > < td > Description< / td > < / tr >
< / thead >
< tbody >
< tr >
< td > count< / td >
< td > < a href = "#uint64" > uint64< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< tr >
< td > start_timestamp< / td >
< td > < a href = "#int64" > int64< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< tr >
< td > end_timestamp< / td >
< td > < a href = "#int64" > int64< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< / tbody >
< / table >
< h3 id = "bdware.bdledger.api.CountTransactionsResponse" > CountTransactionsResponse< / h3 >
< p > < / p >
< table class = "field-table" >
< thead >
< tr > < td > Field< / td > < td > Type< / td > < td > Label< / td > < td > Description< / td > < / tr >
< / thead >
< tbody >
< tr >
< td > count< / td >
< td > < a href = "#uint64" > uint64< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< tr >
< td > start_timestamp< / td >
< td > < a href = "#int64" > int64< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< tr >
< td > end_timestamp< / td >
< td > < a href = "#int64" > int64< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< / tbody >
< / table >
< h3 id = "bdware.bdledger.api.GetBlockByHashRequest" > GetBlockByHashRequest< / h3 >
< p > < / p >
< table class = "field-table" >
< thead >
< tr > < td > Field< / td > < td > Type< / td > < td > Label< / td > < td > Description< / td > < / tr >
< / thead >
< tbody >
< tr >
< td > ledger< / td >
< td > < a href = "#string" > string< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< tr >
< td > hash< / td >
< td > < a href = "#bytes" > bytes< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< tr >
< td > full_transactions< / td >
< td > < a href = "#bool" > bool< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< / tbody >
< / table >
< h3 id = "bdware.bdledger.api.GetBlockByHashResponse" > GetBlockByHashResponse< / h3 >
< p > < / p >
< table class = "field-table" >
< thead >
< tr > < td > Field< / td > < td > Type< / td > < td > Label< / td > < td > Description< / td > < / tr >
< / thead >
< tbody >
< tr >
< td > block< / td >
< td > < a href = "#bdware.bdledger.api.Block" > Block< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< / tbody >
< / table >
< h3 id = "bdware.bdledger.api.GetBlocksResponse" > GetBlocksResponse< / h3 >
< p > < / p >
< table class = "field-table" >
< thead >
< tr > < td > Field< / td > < td > Type< / td > < td > Label< / td > < td > Description< / td > < / tr >
< / thead >
< tbody >
< tr >
< td > blocks< / td >
< td > < a href = "#bdware.bdledger.api.Block" > Block< / a > < / td >
< td > repeated< / td >
< td > < p > < / p > < / td >
< / tr >
< tr >
< td > start_timestamp< / td >
< td > < a href = "#int64" > int64< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< tr >
< td > end_timestamp< / td >
< td > < a href = "#int64" > int64< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< / tbody >
< / table >
< h3 id = "bdware.bdledger.api.GetTransactionByBlockHashAndIndexRequest" > GetTransactionByBlockHashAndIndexRequest< / h3 >
< p > < / p >
< table class = "field-table" >
< thead >
< tr > < td > Field< / td > < td > Type< / td > < td > Label< / td > < td > Description< / td > < / tr >
< / thead >
< tbody >
< tr >
< td > ledger< / td >
< td > < a href = "#string" > string< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< tr >
< td > block_hash< / td >
< td > < a href = "#bytes" > bytes< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< tr >
< td > index< / td >
< td > < a href = "#uint32" > uint32< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< / tbody >
< / table >
< h3 id = "bdware.bdledger.api.GetTransactionByBlockHashAndIndexResponse" > GetTransactionByBlockHashAndIndexResponse< / h3 >
< p > < / p >
< table class = "field-table" >
< thead >
< tr > < td > Field< / td > < td > Type< / td > < td > Label< / td > < td > Description< / td > < / tr >
< / thead >
< tbody >
< tr >
< td > transaction< / td >
< td > < a href = "#bdware.bdledger.api.Transaction" > Transaction< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< / tbody >
< / table >
< h3 id = "bdware.bdledger.api.GetTransactionByHashRequest" > GetTransactionByHashRequest< / h3 >
< p > < / p >
< table class = "field-table" >
< thead >
< tr > < td > Field< / td > < td > Type< / td > < td > Label< / td > < td > Description< / td > < / tr >
< / thead >
< tbody >
< tr >
< td > ledger< / td >
< td > < a href = "#string" > string< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< tr >
< td > hash< / td >
< td > < a href = "#bytes" > bytes< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< / tbody >
< / table >
< h3 id = "bdware.bdledger.api.GetTransactionByHashResponse" > GetTransactionByHashResponse< / h3 >
< p > < / p >
< table class = "field-table" >
< thead >
< tr > < td > Field< / td > < td > Type< / td > < td > Label< / td > < td > Description< / td > < / tr >
< / thead >
< tbody >
< tr >
< td > transaction< / td >
< td > < a href = "#bdware.bdledger.api.Transaction" > Transaction< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< / tbody >
< / table >
< h3 id = "bdware.bdledger.api.GetTransactionsResponse" > GetTransactionsResponse< / h3 >
< p > < / p >
< table class = "field-table" >
< thead >
< tr > < td > Field< / td > < td > Type< / td > < td > Label< / td > < td > Description< / td > < / tr >
< / thead >
< tbody >
< tr >
< td > transactions< / td >
< td > < a href = "#bdware.bdledger.api.Transaction" > Transaction< / a > < / td >
< td > repeated< / td >
< td > < p > < / p > < / td >
< / tr >
< tr >
< td > start_timestamp< / td >
< td > < a href = "#int64" > int64< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< tr >
< td > end_timestamp< / td >
< td > < a href = "#int64" > int64< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< / tbody >
< / table >
2020-09-04 04:29:54 +00:00
< h3 id = "bdware.bdledger.api.RecentBlocksRequest" > RecentBlocksRequest< / h3 >
< p > < / p >
< table class = "field-table" >
< thead >
< tr > < td > Field< / td > < td > Type< / td > < td > Label< / td > < td > Description< / td > < / tr >
< / thead >
< tbody >
< tr >
< td > ledger< / td >
< td > < a href = "#string" > string< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< tr >
< td > count< / td >
< td > < a href = "#int64" > int64< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< tr >
< td > include_transactions< / td >
< td > < a href = "#bdware.bdledger.api.IncludeTransactions" > IncludeTransactions< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< / tbody >
< / table >
2020-04-07 13:56:57 +00:00
< h3 id = "bdware.bdledger.api.TransactionFilter" > TransactionFilter< / h3 >
< p > repeated Transaction/BlockFilters are combined by "& & "(and) operator;< / p >
< table class = "field-table" >
< thead >
< tr > < td > Field< / td > < td > Type< / td > < td > Label< / td > < td > Description< / td > < / tr >
< / thead >
< tbody >
< tr >
< td > hash< / td >
< td > < a href = "#bytes" > bytes< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< tr >
< td > from< / td >
< td > < a href = "#bytes" > bytes< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< tr >
< td > to< / td >
< td > < a href = "#bytes" > bytes< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< tr >
< td > timestamp< / td >
< td > < a href = "#bytes" > bytes< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< / tbody >
< / table >
< h3 id = "bdware.bdledger.api.TransactionsRequest" > TransactionsRequest< / h3 >
< p > < / p >
< table class = "field-table" >
< thead >
< tr > < td > Field< / td > < td > Type< / td > < td > Label< / td > < td > Description< / td > < / tr >
< / thead >
< tbody >
< tr >
< td > ledger< / td >
< td > < a href = "#string" > string< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< tr >
< td > start_timestamp< / td >
< td > < a href = "#int64" > int64< / a > < / td >
< td > < / td >
< td > < p > required < / p > < / td >
< / tr >
< tr >
< td > end_timestamp< / td >
< td > < a href = "#int64" > int64< / a > < / td >
< td > < / td >
< td > < p > < / p > < / td >
< / tr >
< tr >
< td > filters< / td >
< td > < a href = "#bdware.bdledger.api.TransactionFilter" > TransactionFilter< / a > < / td >
< td > repeated< / td >
< td > < p > < / p > < / td >
< / tr >
< / tbody >
< / table >
2020-09-04 04:29:54 +00:00
< h3 id = "bdware.bdledger.api.IncludeTransactions" > IncludeTransactions< / h3 >
2020-04-07 13:56:57 +00:00
< p > < / p >
< table class = "enum-table" >
< thead >
< tr > < td > Name< / td > < td > Number< / td > < td > Description< / td > < / tr >
< / thead >
< tbody >
< tr >
< td > NONE< / td >
< td > 0< / td >
< td > < p > 不包含交易数据< / p > < / td >
< / tr >
< tr >
< td > HASH< / td >
< td > 1< / td >
< td > < p > 包含交易哈希列表< / p > < / td >
< / tr >
< tr >
< td > FULL< / td >
< td > 2< / td >
< td > < p > 包含完整交易列表< / p > < / td >
< / tr >
< / tbody >
< / table >
< h3 id = "bdware.bdledger.api.Query" > Query< / h3 >
< p > < / p >
< table class = "enum-table" >
< thead >
< tr > < td > Method Name< / td > < td > Request Type< / td > < td > Response Type< / td > < td > Description< / td > < / tr >
< / thead >
< tbody >
< tr >
< td > GetBlockByHash< / td >
< td > < a href = "#bdware.bdledger.api.GetBlockByHashRequest" > GetBlockByHashRequest< / a > < / td >
< td > < a href = "#bdware.bdledger.api.GetBlockByHashResponse" > GetBlockByHashResponse< / a > < / td >
< td > < p > Get a block identified by its hash
查询哈希所指定的区块< / p > < / td >
< / tr >
< tr >
< td > GetBlocks< / td >
< td > < a href = "#bdware.bdledger.api.BlocksRequest" > BlocksRequest< / a > < / td >
< td > < a href = "#bdware.bdledger.api.GetBlocksResponse" > GetBlocksResponse< / a > < / td >
< td > < p > Get blocks in a timestamp range
查询时间范围内的区块
start_timestamp is required< / p > < / td >
< / tr >
< tr >
< td > CountBlocks< / td >
< td > < a href = "#bdware.bdledger.api.BlocksRequest" > BlocksRequest< / a > < / td >
< td > < a href = "#bdware.bdledger.api.CountBlocksResponse" > CountBlocksResponse< / a > < / td >
< td > < p > Count all blocks in a ledger, or blocks in a timestamp range
查询帐本中的所有区块数量,或时间范围内的区块数量< / p > < / td >
< / tr >
2020-09-04 04:29:54 +00:00
< tr >
< td > GetRecentBlocks< / td >
< td > < a href = "#bdware.bdledger.api.RecentBlocksRequest" > RecentBlocksRequest< / a > < / td >
< td > < a href = "#bdware.bdledger.api.GetBlocksResponse" > GetBlocksResponse< / a > < / td >
< td > < p > Get recent ' count' blocks (Only support IncludeTransactions=NONE for now)
查询最新的n个区块< / p > < / td >
< / tr >
2020-04-07 13:56:57 +00:00
< tr >
< td > GetTransactionByHash< / td >
< td > < a href = "#bdware.bdledger.api.GetTransactionByHashRequest" > GetTransactionByHashRequest< / a > < / td >
< td > < a href = "#bdware.bdledger.api.GetTransactionByHashResponse" > GetTransactionByHashResponse< / a > < / td >
< td > < p > Get a transaction identified by its hash
查询哈希所指定的事务< / p > < / td >
< / tr >
< tr >
< td > GetTransactionByBlockHashAndIndex< / td >
< td > < a href = "#bdware.bdledger.api.GetTransactionByBlockHashAndIndexRequest" > GetTransactionByBlockHashAndIndexRequest< / a > < / td >
< td > < a href = "#bdware.bdledger.api.GetTransactionByBlockHashAndIndexResponse" > GetTransactionByBlockHashAndIndexResponse< / a > < / td >
< td > < p > Get a transaction identified by hash of the block it belongs to and its index inside the block
查询所在区块的哈希与其在区块中的index所指定的事务< / p > < / td >
< / tr >
< tr >
< td > GetTransactions< / td >
< td > < a href = "#bdware.bdledger.api.TransactionsRequest" > TransactionsRequest< / a > < / td >
< td > < a href = "#bdware.bdledger.api.GetTransactionsResponse" > GetTransactionsResponse< / a > < / td >
< td > < p > Get transactions in a timestamp range
查询时间范围内的事务< / p > < / td >
< / tr >
< tr >
< td > CountTransactions< / td >
< td > < a href = "#bdware.bdledger.api.TransactionsRequest" > TransactionsRequest< / a > < / td >
< td > < a href = "#bdware.bdledger.api.CountTransactionsResponse" > CountTransactionsResponse< / a > < / td >
< td > < p > Count all transactions in a ledger, or transactions in a timestamp range
查询帐本中的所有事务数量,或时间范围内的事务数量
start_timestamp is required< / p > < / td >
< / tr >
< / tbody >
< / table >
< div class = "file-heading" >
< h2 id = "google/protobuf/empty.proto" > google/protobuf/empty.proto< / h2 > < a href = "#title" > Top< / a >
< / div >
< p > < / p >
< h3 id = "google.protobuf.Empty" > Empty< / h3 >
< p > A generic empty message that you can re-use to avoid defining duplicated< / p > < p > empty messages in your APIs. A typical example is to use it as the request< / p > < p > or the response type of an API method. For instance:< / p > < p > service Foo {< / p > < p > rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);< / p > < p > }< / p > < p > The JSON representation for `Empty` is empty JSON object `{}`.< / p >
< h2 id = "scalar-value-types" > Scalar Value Types< / h2 >
< table class = "scalar-value-types-table" >
< thead >
< tr > < td > .proto Type< / td > < td > Notes< / td > < td > C++< / td > < td > Java< / td > < td > Python< / td > < td > Go< / td > < td > C#< / td > < td > PHP< / td > < td > Ruby< / td > < / tr >
< / thead >
< tbody >
< tr id = "double" >
< td > double< / td >
< td > < / td >
< td > double< / td >
< td > double< / td >
< td > float< / td >
< td > float64< / td >
< td > double< / td >
< td > float< / td >
< td > Float< / td >
< / tr >
< tr id = "float" >
< td > float< / td >
< td > < / td >
< td > float< / td >
< td > float< / td >
< td > float< / td >
< td > float32< / td >
< td > float< / td >
< td > float< / td >
< td > Float< / td >
< / tr >
< tr id = "int32" >
< td > int32< / td >
< td > Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.< / td >
< td > int32< / td >
< td > int< / td >
< td > int< / td >
< td > int32< / td >
< td > int< / td >
< td > integer< / td >
< td > Bignum or Fixnum (as required)< / td >
< / tr >
< tr id = "int64" >
< td > int64< / td >
< td > Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.< / td >
< td > int64< / td >
< td > long< / td >
< td > int/long< / td >
< td > int64< / td >
< td > long< / td >
< td > integer/string< / td >
< td > Bignum< / td >
< / tr >
< tr id = "uint32" >
< td > uint32< / td >
< td > Uses variable-length encoding.< / td >
< td > uint32< / td >
< td > int< / td >
< td > int/long< / td >
< td > uint32< / td >
< td > uint< / td >
< td > integer< / td >
< td > Bignum or Fixnum (as required)< / td >
< / tr >
< tr id = "uint64" >
< td > uint64< / td >
< td > Uses variable-length encoding.< / td >
< td > uint64< / td >
< td > long< / td >
< td > int/long< / td >
< td > uint64< / td >
< td > ulong< / td >
< td > integer/string< / td >
< td > Bignum or Fixnum (as required)< / td >
< / tr >
< tr id = "sint32" >
< td > sint32< / td >
< td > Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.< / td >
< td > int32< / td >
< td > int< / td >
< td > int< / td >
< td > int32< / td >
< td > int< / td >
< td > integer< / td >
< td > Bignum or Fixnum (as required)< / td >
< / tr >
< tr id = "sint64" >
< td > sint64< / td >
< td > Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.< / td >
< td > int64< / td >
< td > long< / td >
< td > int/long< / td >
< td > int64< / td >
< td > long< / td >
< td > integer/string< / td >
< td > Bignum< / td >
< / tr >
< tr id = "fixed32" >
< td > fixed32< / td >
< td > Always four bytes. More efficient than uint32 if values are often greater than 2^28.< / td >
< td > uint32< / td >
< td > int< / td >
< td > int< / td >
< td > uint32< / td >
< td > uint< / td >
< td > integer< / td >
< td > Bignum or Fixnum (as required)< / td >
< / tr >
< tr id = "fixed64" >
< td > fixed64< / td >
< td > Always eight bytes. More efficient than uint64 if values are often greater than 2^56.< / td >
< td > uint64< / td >
< td > long< / td >
< td > int/long< / td >
< td > uint64< / td >
< td > ulong< / td >
< td > integer/string< / td >
< td > Bignum< / td >
< / tr >
< tr id = "sfixed32" >
< td > sfixed32< / td >
< td > Always four bytes.< / td >
< td > int32< / td >
< td > int< / td >
< td > int< / td >
< td > int32< / td >
< td > int< / td >
< td > integer< / td >
< td > Bignum or Fixnum (as required)< / td >
< / tr >
< tr id = "sfixed64" >
< td > sfixed64< / td >
< td > Always eight bytes.< / td >
< td > int64< / td >
< td > long< / td >
< td > int/long< / td >
< td > int64< / td >
< td > long< / td >
< td > integer/string< / td >
< td > Bignum< / td >
< / tr >
< tr id = "bool" >
< td > bool< / td >
< td > < / td >
< td > bool< / td >
< td > boolean< / td >
< td > boolean< / td >
< td > bool< / td >
< td > bool< / td >
< td > boolean< / td >
< td > TrueClass/FalseClass< / td >
< / tr >
< tr id = "string" >
< td > string< / td >
< td > A string must always contain UTF-8 encoded or 7-bit ASCII text.< / td >
< td > string< / td >
< td > String< / td >
< td > str/unicode< / td >
< td > string< / td >
< td > string< / td >
< td > string< / td >
< td > String (UTF-8)< / td >
< / tr >
< tr id = "bytes" >
< td > bytes< / td >
< td > May contain any arbitrary sequence of bytes.< / td >
< td > string< / td >
< td > ByteString< / td >
< td > str< / td >
< td > []byte< / td >
< td > ByteString< / td >
< td > string< / td >
< td > String (ASCII-8BIT)< / td >
< / tr >
< / tbody >
< / table >
< / body >
< / html >