2020-04-07 13:56:57 +00:00
{
"files" : [
{
"name" : "bdware/bdledger/api/common.proto" ,
"description" : "" ,
"package" : "bdware.bdledger.api" ,
"hasEnums" : true ,
"hasExtensions" : false ,
"hasMessages" : true ,
"hasServices" : false ,
"enums" : [
{
"name" : "ContractUnitRequestType" ,
"longName" : "Contract.ContractUnitRequestType" ,
"fullName" : "bdware.bdledger.api.Contract.ContractUnitRequestType" ,
"description" : "" ,
"values" : [
{
"name" : "START" ,
"number" : "0" ,
"description" : ""
} ,
{
"name" : "STOP" ,
"number" : "1" ,
"description" : ""
} ,
{
"name" : "EXECUTE" ,
"number" : "2" ,
"description" : ""
} ,
{
"name" : "REPLY" ,
"number" : "3" ,
"description" : ""
} ,
{
"name" : "REQUEST" ,
"number" : "4" ,
"description" : ""
} ,
{
"name" : "PREPREPARE" ,
"number" : "5" ,
"description" : ""
} ,
{
"name" : "PREPARE" ,
"number" : "6" ,
"description" : ""
} ,
{
"name" : "COMMIT" ,
"number" : "7" ,
"description" : ""
} ,
{
"name" : "ADDPEER" ,
"number" : "8" ,
"description" : ""
} ,
{
"name" : "DROPPEER" ,
"number" : "9" ,
"description" : ""
} ,
{
"name" : "STATESYNC" ,
"number" : "10" ,
"description" : ""
}
]
} ,
{
"name" : "TransactionType" ,
"longName" : "TransactionType" ,
"fullName" : "bdware.bdledger.api.TransactionType" ,
"description" : "事务类型" ,
"values" : [
{
"name" : "RECORD" ,
"number" : "0" ,
"description" : "通用数据记录"
} ,
{
"name" : "MESSAGE" ,
"number" : "1" ,
"description" : "消息"
} ,
{
"name" : "CONTRACT_CREATION" ,
"number" : "2" ,
"description" : "合约创建"
} ,
{
"name" : "CONTRACT_INVOCATION" ,
"number" : "3" ,
"description" : "合约调用"
} ,
{
"name" : "CONTRACT_STATUS" ,
"number" : "4" ,
"description" : "合约状态"
}
]
}
] ,
"extensions" : [ ] ,
"messages" : [
{
"name" : "Block" ,
"longName" : "Block" ,
"fullName" : "bdware.bdledger.api.Block" ,
"description" : "" ,
"hasExtensions" : false ,
"hasFields" : true ,
2021-07-20 01:36:57 +00:00
"hasOneofs" : false ,
2020-04-07 13:56:57 +00:00
"extensions" : [ ] ,
"fields" : [
{
"name" : "hash" ,
"description" : "区块的哈希,当区块处于待确认状态时为`null`" ,
"label" : "" ,
"type" : "bytes" ,
"longType" : "bytes" ,
"fullType" : "bytes" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
2020-04-20 16:46:04 +00:00
{
"name" : "creator" ,
"description" : "产块者账户地址" ,
"label" : "" ,
"type" : "bytes" ,
"longType" : "bytes" ,
"fullType" : "bytes" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-20 16:46:04 +00:00
"defaultValue" : ""
} ,
{
"name" : "nonce" ,
"description" : "这个区块之前产块者产生的区块数量" ,
"label" : "" ,
"type" : "uint64" ,
"longType" : "uint64" ,
"fullType" : "uint64" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-20 16:46:04 +00:00
"defaultValue" : ""
} ,
2020-04-07 13:56:57 +00:00
{
"name" : "parent_hashes" ,
"description" : "父区块的哈希" ,
"label" : "repeated" ,
"type" : "bytes" ,
"longType" : "bytes" ,
"fullType" : "bytes" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "witnesses" ,
"description" : "见证者账户地址" ,
"label" : "repeated" ,
"type" : "bytes" ,
"longType" : "bytes" ,
"fullType" : "bytes" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "timestamp" ,
"description" : "区块产生时的 UNIX 时间戳,单位为秒" ,
"label" : "" ,
"type" : "int64" ,
"longType" : "int64" ,
"fullType" : "int64" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "size" ,
"description" : "区块大小的字节数" ,
"label" : "" ,
"type" : "uint64" ,
"longType" : "uint64" ,
"fullType" : "uint64" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "transaction_count" ,
"description" : "区块包含的事务数量" ,
"label" : "" ,
"type" : "uint32" ,
"longType" : "uint32" ,
"fullType" : "uint32" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "transactions_root" ,
"description" : "区块的事务默克尔树根" ,
"label" : "" ,
"type" : "bytes" ,
"longType" : "bytes" ,
"fullType" : "bytes" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "transactions" ,
"description" : "事务对象的数组,或为空" ,
"label" : "repeated" ,
"type" : "Transaction" ,
"longType" : "Transaction" ,
"fullType" : "bdware.bdledger.api.Transaction" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "transaction_hashes" ,
2021-07-20 01:36:57 +00:00
"description" : "20字节的事务哈希的数组, 或为空" ,
2020-04-07 13:56:57 +00:00
"label" : "repeated" ,
"type" : "bytes" ,
"longType" : "bytes" ,
"fullType" : "bytes" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
}
]
} ,
{
"name" : "Contract" ,
"longName" : "Contract" ,
"fullName" : "bdware.bdledger.api.Contract" ,
"description" : "" ,
"hasExtensions" : false ,
"hasFields" : true ,
2021-07-20 01:36:57 +00:00
"hasOneofs" : false ,
2020-04-07 13:56:57 +00:00
"extensions" : [ ] ,
"fields" : [
{
"name" : "contractName" ,
"description" : "合约名称" ,
"label" : "" ,
"type" : "bytes" ,
"longType" : "bytes" ,
"fullType" : "bytes" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "randomNum" ,
"description" : "合约执行的节点数量" ,
"label" : "" ,
"type" : "uint32" ,
"longType" : "uint32" ,
"fullType" : "uint32" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "operation" ,
"description" : "合约方法" ,
"label" : "" ,
"type" : "bytes" ,
"longType" : "bytes" ,
"fullType" : "bytes" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "arg" ,
"description" : "合约方法参数" ,
"label" : "" ,
"type" : "bytes" ,
"longType" : "bytes" ,
"fullType" : "bytes" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "path" ,
"description" : "合约文件路径(合约在IDE工程的相对路径)" ,
"label" : "" ,
"type" : "bytes" ,
"longType" : "bytes" ,
"fullType" : "bytes" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "content" ,
"description" : "合约内容(可为合约文件相对路径/合约脚本)" ,
"label" : "" ,
"type" : "bytes" ,
"longType" : "bytes" ,
"fullType" : "bytes" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "pubkey" ,
"description" : "用户公钥" ,
"label" : "" ,
"type" : "bytes" ,
"longType" : "bytes" ,
"fullType" : "bytes" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
}
]
} ,
{
"name" : "Transaction" ,
"longName" : "Transaction" ,
"fullName" : "bdware.bdledger.api.Transaction" ,
"description" : "" ,
"hasExtensions" : false ,
"hasFields" : true ,
2021-07-20 01:36:57 +00:00
"hasOneofs" : false ,
2020-04-07 13:56:57 +00:00
"extensions" : [ ] ,
"fields" : [
{
"name" : "block_hash" ,
"description" : "事务所在的区块的哈希,当事务处于待确认状态时为`null`" ,
"label" : "" ,
"type" : "bytes" ,
"longType" : "bytes" ,
"fullType" : "bytes" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
2020-09-04 04:29:54 +00:00
{
"name" : "block_timestamp" ,
"description" : "事务所在的区块产生时的 UNIX 时间戳,单位为秒" ,
"label" : "" ,
"type" : "int64" ,
"longType" : "int64" ,
"fullType" : "int64" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-09-04 04:29:54 +00:00
"defaultValue" : ""
} ,
2020-04-07 13:56:57 +00:00
{
"name" : "index" ,
"description" : "事务在区块中的位置 index, 当事务处于待确认状态时为`null`" ,
"label" : "" ,
"type" : "uint32" ,
"longType" : "uint32" ,
"fullType" : "uint32" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "hash" ,
"description" : "事务的哈希" ,
"label" : "" ,
"type" : "bytes" ,
"longType" : "bytes" ,
"fullType" : "bytes" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "type" ,
"description" : "事务类型" ,
"label" : "" ,
"type" : "TransactionType" ,
"longType" : "TransactionType" ,
"fullType" : "bdware.bdledger.api.TransactionType" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "from" ,
"description" : "发送账户地址" ,
"label" : "" ,
"type" : "bytes" ,
"longType" : "bytes" ,
"fullType" : "bytes" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "nonce" ,
"description" : "这条事务之前发送者所发送的事务数量" ,
"label" : "" ,
"type" : "uint64" ,
"longType" : "uint64" ,
"fullType" : "uint64" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "to" ,
"description" : "接收账户地址,或者调用的合约地址,或者`null`如为合约创建" ,
"label" : "" ,
"type" : "bytes" ,
"longType" : "bytes" ,
"fullType" : "bytes" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "data" ,
"description" : "数据或合约代码" ,
"label" : "" ,
"type" : "bytes" ,
"longType" : "bytes" ,
"fullType" : "bytes" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "v" ,
"description" : "ECDSA recovery id" ,
"label" : "" ,
"type" : "bytes" ,
"longType" : "bytes" ,
"fullType" : "bytes" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "r" ,
"description" : "ECDSA signature r" ,
"label" : "" ,
"type" : "bytes" ,
"longType" : "bytes" ,
"fullType" : "bytes" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "s" ,
"description" : "ECDSA signature s" ,
"label" : "" ,
"type" : "bytes" ,
"longType" : "bytes" ,
"fullType" : "bytes" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
}
]
}
] ,
"services" : [ ]
} ,
{
"name" : "bdware/bdledger/api/error_details.proto" ,
"description" : "" ,
"package" : "bdware.bdledger.api" ,
"hasEnums" : false ,
"hasExtensions" : false ,
"hasMessages" : true ,
"hasServices" : false ,
"enums" : [ ] ,
"extensions" : [ ] ,
"messages" : [
{
"name" : "InvalidArgument" ,
"longName" : "InvalidArgument" ,
"fullName" : "bdware.bdledger.api.InvalidArgument" ,
"description" : "InvalidArgument indicates client specified an invalid argument.\nNote that this differs from FailedPrecondition. It indicates arguments\nthat are problematic regardless of the state of the system\n(e.g., a malformed file name)." ,
"hasExtensions" : false ,
"hasFields" : true ,
2021-07-20 01:36:57 +00:00
"hasOneofs" : false ,
2020-04-07 13:56:57 +00:00
"extensions" : [ ] ,
"fields" : [
{
"name" : "field_violations" ,
"description" : "Describes all violations in a client request." ,
"label" : "repeated" ,
"type" : "FieldViolation" ,
"longType" : "InvalidArgument.FieldViolation" ,
"fullType" : "bdware.bdledger.api.InvalidArgument.FieldViolation" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
}
]
} ,
{
"name" : "FieldViolation" ,
"longName" : "InvalidArgument.FieldViolation" ,
"fullName" : "bdware.bdledger.api.InvalidArgument.FieldViolation" ,
"description" : "A message type used to describe a single invalid field." ,
"hasExtensions" : false ,
"hasFields" : true ,
2021-07-20 01:36:57 +00:00
"hasOneofs" : false ,
2020-04-07 13:56:57 +00:00
"extensions" : [ ] ,
"fields" : [
{
"name" : "field" ,
"description" : "A path leading to a field in the request body. The value will be a\nsequence of dot-separated identifiers that identify a protocol buffer\nfield. E.g., \"field_violations.field\" would identify this field." ,
"label" : "" ,
"type" : "string" ,
"longType" : "string" ,
"fullType" : "string" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "description" ,
"description" : "A description of why the request element is bad." ,
"label" : "" ,
"type" : "string" ,
"longType" : "string" ,
"fullType" : "string" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
}
]
}
] ,
"services" : [ ]
} ,
{
"name" : "bdware/bdledger/api/ledger.proto" ,
"description" : "" ,
"package" : "bdware.bdledger.api" ,
"hasEnums" : false ,
"hasExtensions" : false ,
"hasMessages" : true ,
"hasServices" : true ,
"enums" : [ ] ,
"extensions" : [ ] ,
"messages" : [
{
"name" : "CreateLedgerRequest" ,
"longName" : "CreateLedgerRequest" ,
"fullName" : "bdware.bdledger.api.CreateLedgerRequest" ,
"description" : "" ,
"hasExtensions" : false ,
"hasFields" : true ,
2021-07-20 01:36:57 +00:00
"hasOneofs" : false ,
2020-04-07 13:56:57 +00:00
"extensions" : [ ] ,
"fields" : [
{
"name" : "name" ,
2021-07-20 01:36:57 +00:00
"description" : "账本名称" ,
2020-04-07 13:56:57 +00:00
"label" : "" ,
"type" : "string" ,
"longType" : "string" ,
"fullType" : "string" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
}
]
} ,
{
"name" : "CreateLedgerResponse" ,
"longName" : "CreateLedgerResponse" ,
"fullName" : "bdware.bdledger.api.CreateLedgerResponse" ,
"description" : "" ,
"hasExtensions" : false ,
"hasFields" : true ,
2021-07-20 01:36:57 +00:00
"hasOneofs" : false ,
2020-04-07 13:56:57 +00:00
"extensions" : [ ] ,
"fields" : [
{
"name" : "ok" ,
2021-07-20 01:36:57 +00:00
"description" : "是否创建成功" ,
2020-04-07 13:56:57 +00:00
"label" : "" ,
"type" : "bool" ,
"longType" : "bool" ,
"fullType" : "bool" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
}
]
} ,
{
"name" : "GetLedgersResponse" ,
"longName" : "GetLedgersResponse" ,
"fullName" : "bdware.bdledger.api.GetLedgersResponse" ,
"description" : "" ,
"hasExtensions" : false ,
"hasFields" : true ,
2021-07-20 01:36:57 +00:00
"hasOneofs" : false ,
2020-04-07 13:56:57 +00:00
"extensions" : [ ] ,
"fields" : [
{
"name" : "ledgers" ,
2021-07-20 01:36:57 +00:00
"description" : "帐本名称列表" ,
2020-04-07 13:56:57 +00:00
"label" : "repeated" ,
"type" : "string" ,
"longType" : "string" ,
"fullType" : "string" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
}
]
} ,
{
"name" : "SendTransactionRequest" ,
"longName" : "SendTransactionRequest" ,
"fullName" : "bdware.bdledger.api.SendTransactionRequest" ,
"description" : "" ,
"hasExtensions" : false ,
"hasFields" : true ,
2021-07-20 01:36:57 +00:00
"hasOneofs" : false ,
2020-04-07 13:56:57 +00:00
"extensions" : [ ] ,
"fields" : [
{
"name" : "ledger" ,
2021-07-20 01:36:57 +00:00
"description" : "账本名称" ,
2020-04-07 13:56:57 +00:00
"label" : "" ,
"type" : "string" ,
"longType" : "string" ,
"fullType" : "string" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "transaction" ,
2021-07-20 01:36:57 +00:00
"description" : "事务信息" ,
2020-04-07 13:56:57 +00:00
"label" : "" ,
"type" : "Transaction" ,
"longType" : "SendTransactionRequest.Transaction" ,
"fullType" : "bdware.bdledger.api.SendTransactionRequest.Transaction" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
}
]
} ,
{
"name" : "Transaction" ,
"longName" : "SendTransactionRequest.Transaction" ,
"fullName" : "bdware.bdledger.api.SendTransactionRequest.Transaction" ,
"description" : "" ,
"hasExtensions" : false ,
"hasFields" : true ,
2021-07-20 01:36:57 +00:00
"hasOneofs" : false ,
2020-04-07 13:56:57 +00:00
"extensions" : [ ] ,
"fields" : [
{
"name" : "type" ,
2021-07-20 01:36:57 +00:00
"description" : "事务类型, 目前仅支持通用数据记录, 即type为RECORD (0)" ,
2020-04-07 13:56:57 +00:00
"label" : "" ,
"type" : "TransactionType" ,
"longType" : "TransactionType" ,
"fullType" : "bdware.bdledger.api.TransactionType" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "from" ,
2021-07-20 01:36:57 +00:00
"description" : "任意20字节的地址, 用于区分使用同一节点的事务发起者" ,
2020-04-07 13:56:57 +00:00
"label" : "" ,
"type" : "bytes" ,
"longType" : "bytes" ,
"fullType" : "bytes" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
2020-09-04 04:29:54 +00:00
{
"name" : "nonce" ,
2021-07-20 01:36:57 +00:00
"description" : "正整数, 同一from每个nonce应只使用一次, 防止重复的事务( 可以每次发送事务+1) " ,
2020-09-04 04:29:54 +00:00
"label" : "" ,
"type" : "uint64" ,
"longType" : "uint64" ,
"fullType" : "uint64" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-09-04 04:29:54 +00:00
"defaultValue" : ""
} ,
2020-04-07 13:56:57 +00:00
{
"name" : "to" ,
2021-07-20 01:36:57 +00:00
"description" : "对于通用数据记录不需传递,无意义" ,
2020-04-07 13:56:57 +00:00
"label" : "" ,
"type" : "bytes" ,
"longType" : "bytes" ,
"fullType" : "bytes" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "data" ,
2021-07-20 01:36:57 +00:00
"description" : "事务数据内容,字节数组" ,
2020-04-07 13:56:57 +00:00
"label" : "" ,
"type" : "bytes" ,
"longType" : "bytes" ,
"fullType" : "bytes" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
}
]
} ,
{
"name" : "SendTransactionResponse" ,
"longName" : "SendTransactionResponse" ,
"fullName" : "bdware.bdledger.api.SendTransactionResponse" ,
"description" : "" ,
"hasExtensions" : false ,
"hasFields" : true ,
2021-07-20 01:36:57 +00:00
"hasOneofs" : false ,
2020-04-07 13:56:57 +00:00
"extensions" : [ ] ,
"fields" : [
{
"name" : "hash" ,
2021-07-20 01:36:57 +00:00
"description" : "事务哈希" ,
2020-04-07 13:56:57 +00:00
"label" : "" ,
"type" : "bytes" ,
"longType" : "bytes" ,
"fullType" : "bytes" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
}
]
}
] ,
"services" : [
{
"name" : "Ledger" ,
"longName" : "Ledger" ,
"fullName" : "bdware.bdledger.api.Ledger" ,
"description" : "" ,
"methods" : [
{
"name" : "CreateLedger" ,
"description" : "Create a new ledger\n创建一个新账本" ,
"requestType" : "CreateLedgerRequest" ,
"requestLongType" : "CreateLedgerRequest" ,
"requestFullType" : "bdware.bdledger.api.CreateLedgerRequest" ,
"requestStreaming" : false ,
"responseType" : "CreateLedgerResponse" ,
"responseLongType" : "CreateLedgerResponse" ,
"responseFullType" : "bdware.bdledger.api.CreateLedgerResponse" ,
"responseStreaming" : false
} ,
{
"name" : "GetLedgers" ,
"description" : "Get all ledgers\n查询所有帐本列表" ,
"requestType" : "Empty" ,
"requestLongType" : ".google.protobuf.Empty" ,
"requestFullType" : "google.protobuf.Empty" ,
"requestStreaming" : false ,
"responseType" : "GetLedgersResponse" ,
"responseLongType" : "GetLedgersResponse" ,
"responseFullType" : "bdware.bdledger.api.GetLedgersResponse" ,
"responseStreaming" : false
} ,
{
"name" : "SendTransaction" ,
"description" : "Send a new transaction\n发送一个新事务" ,
"requestType" : "SendTransactionRequest" ,
"requestLongType" : "SendTransactionRequest" ,
"requestFullType" : "bdware.bdledger.api.SendTransactionRequest" ,
"requestStreaming" : false ,
"responseType" : "SendTransactionResponse" ,
"responseLongType" : "SendTransactionResponse" ,
"responseFullType" : "bdware.bdledger.api.SendTransactionResponse" ,
"responseStreaming" : false
}
]
}
]
} ,
{
"name" : "bdware/bdledger/api/node.proto" ,
"description" : "" ,
"package" : "bdware.bdledger.api" ,
"hasEnums" : false ,
"hasExtensions" : false ,
"hasMessages" : true ,
"hasServices" : true ,
"enums" : [ ] ,
"extensions" : [ ] ,
"messages" : [
{
"name" : "ClientVersionResponse" ,
"longName" : "ClientVersionResponse" ,
"fullName" : "bdware.bdledger.api.ClientVersionResponse" ,
"description" : "" ,
"hasExtensions" : false ,
"hasFields" : true ,
2021-07-20 01:36:57 +00:00
"hasOneofs" : false ,
2020-04-07 13:56:57 +00:00
"extensions" : [ ] ,
"fields" : [
{
"name" : "version" ,
"description" : "节点客户端版本" ,
"label" : "" ,
"type" : "string" ,
"longType" : "string" ,
"fullType" : "string" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
}
]
}
] ,
"services" : [
{
"name" : "Node" ,
"longName" : "Node" ,
"fullName" : "bdware.bdledger.api.Node" ,
"description" : "" ,
"methods" : [
{
"name" : "ClientVersion" ,
"description" : "Get BDLedger node version\n查询BDLedger节点版本" ,
"requestType" : "Empty" ,
"requestLongType" : ".google.protobuf.Empty" ,
"requestFullType" : "google.protobuf.Empty" ,
"requestStreaming" : false ,
"responseType" : "ClientVersionResponse" ,
"responseLongType" : "ClientVersionResponse" ,
"responseFullType" : "bdware.bdledger.api.ClientVersionResponse" ,
"responseStreaming" : false
}
]
}
]
} ,
{
"name" : "bdware/bdledger/api/query.proto" ,
"description" : "" ,
"package" : "bdware.bdledger.api" ,
2020-09-04 04:29:54 +00:00
"hasEnums" : true ,
2020-04-07 13:56:57 +00:00
"hasExtensions" : false ,
"hasMessages" : true ,
"hasServices" : true ,
"enums" : [
{
"name" : "IncludeTransactions" ,
2020-09-04 04:29:54 +00:00
"longName" : "IncludeTransactions" ,
"fullName" : "bdware.bdledger.api.IncludeTransactions" ,
2021-07-20 01:36:57 +00:00
"description" : "包含事务信息详细程度" ,
2020-04-07 13:56:57 +00:00
"values" : [
{
"name" : "NONE" ,
"number" : "0" ,
2021-07-20 01:36:57 +00:00
"description" : "不包含事务数据"
2020-04-07 13:56:57 +00:00
} ,
{
"name" : "HASH" ,
"number" : "1" ,
2021-07-20 01:36:57 +00:00
"description" : "包含事务哈希列表"
2020-04-07 13:56:57 +00:00
} ,
{
"name" : "FULL" ,
"number" : "2" ,
2021-07-20 01:36:57 +00:00
"description" : "包含完整事务列表"
2020-04-07 13:56:57 +00:00
}
]
}
] ,
"extensions" : [ ] ,
"messages" : [
{
"name" : "BlockFilter" ,
"longName" : "BlockFilter" ,
"fullName" : "bdware.bdledger.api.BlockFilter" ,
2021-07-20 01:36:57 +00:00
"description" : "暂不支持" ,
2020-04-07 13:56:57 +00:00
"hasExtensions" : false ,
"hasFields" : true ,
2021-07-20 01:36:57 +00:00
"hasOneofs" : false ,
2020-04-07 13:56:57 +00:00
"extensions" : [ ] ,
"fields" : [
{
"name" : "hash" ,
"description" : "" ,
"label" : "" ,
"type" : "bytes" ,
"longType" : "bytes" ,
"fullType" : "bytes" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "timestamp" ,
"description" : "" ,
"label" : "" ,
"type" : "int64" ,
"longType" : "int64" ,
"fullType" : "int64" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
}
]
} ,
{
"name" : "BlocksRequest" ,
"longName" : "BlocksRequest" ,
"fullName" : "bdware.bdledger.api.BlocksRequest" ,
"description" : "" ,
"hasExtensions" : false ,
"hasFields" : true ,
2021-07-20 01:36:57 +00:00
"hasOneofs" : false ,
2020-04-07 13:56:57 +00:00
"extensions" : [ ] ,
"fields" : [
{
"name" : "ledger" ,
2021-07-20 01:36:57 +00:00
"description" : "账本名称" ,
2020-04-07 13:56:57 +00:00
"label" : "" ,
"type" : "string" ,
"longType" : "string" ,
"fullType" : "string" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "start_timestamp" ,
2021-07-20 01:36:57 +00:00
"description" : "查询范围开始时间戳" ,
2020-04-07 13:56:57 +00:00
"label" : "" ,
"type" : "int64" ,
"longType" : "int64" ,
"fullType" : "int64" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "end_timestamp" ,
2021-07-20 01:36:57 +00:00
"description" : "查询范围结束时间戳" ,
2020-04-07 13:56:57 +00:00
"label" : "" ,
"type" : "int64" ,
"longType" : "int64" ,
"fullType" : "int64" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "filters" ,
2021-07-20 01:36:57 +00:00
"description" : "暂不支持" ,
2020-04-07 13:56:57 +00:00
"label" : "repeated" ,
"type" : "BlockFilter" ,
"longType" : "BlockFilter" ,
"fullType" : "bdware.bdledger.api.BlockFilter" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "include_transactions" ,
2021-07-20 01:36:57 +00:00
"description" : "包含事务信息详细程度" ,
2020-04-07 13:56:57 +00:00
"label" : "" ,
"type" : "IncludeTransactions" ,
2020-09-04 04:29:54 +00:00
"longType" : "IncludeTransactions" ,
"fullType" : "bdware.bdledger.api.IncludeTransactions" ,
2020-04-07 13:56:57 +00:00
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
}
]
} ,
{
"name" : "CountBlocksResponse" ,
"longName" : "CountBlocksResponse" ,
"fullName" : "bdware.bdledger.api.CountBlocksResponse" ,
"description" : "" ,
"hasExtensions" : false ,
"hasFields" : true ,
2021-07-20 01:36:57 +00:00
"hasOneofs" : false ,
2020-04-07 13:56:57 +00:00
"extensions" : [ ] ,
"fields" : [
{
"name" : "count" ,
2021-07-20 01:36:57 +00:00
"description" : "区块数量" ,
2020-04-07 13:56:57 +00:00
"label" : "" ,
"type" : "uint64" ,
"longType" : "uint64" ,
"fullType" : "uint64" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "start_timestamp" ,
2021-07-20 01:36:57 +00:00
"description" : "本次查询有效的查询范围开始时间戳" ,
2020-04-07 13:56:57 +00:00
"label" : "" ,
"type" : "int64" ,
"longType" : "int64" ,
"fullType" : "int64" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "end_timestamp" ,
2021-07-20 01:36:57 +00:00
"description" : "本次查询有效的查询范围结束时间戳" ,
2020-04-07 13:56:57 +00:00
"label" : "" ,
"type" : "int64" ,
"longType" : "int64" ,
"fullType" : "int64" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
}
]
} ,
{
"name" : "CountTransactionsResponse" ,
"longName" : "CountTransactionsResponse" ,
"fullName" : "bdware.bdledger.api.CountTransactionsResponse" ,
"description" : "" ,
"hasExtensions" : false ,
"hasFields" : true ,
2021-07-20 01:36:57 +00:00
"hasOneofs" : false ,
2020-04-07 13:56:57 +00:00
"extensions" : [ ] ,
"fields" : [
{
"name" : "count" ,
2021-07-20 01:36:57 +00:00
"description" : "事务数量" ,
2020-04-07 13:56:57 +00:00
"label" : "" ,
"type" : "uint64" ,
"longType" : "uint64" ,
"fullType" : "uint64" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "start_timestamp" ,
2021-07-20 01:36:57 +00:00
"description" : "本次查询有效的查询范围开始时间戳" ,
2020-04-07 13:56:57 +00:00
"label" : "" ,
"type" : "int64" ,
"longType" : "int64" ,
"fullType" : "int64" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "end_timestamp" ,
2021-07-20 01:36:57 +00:00
"description" : "本次查询有效的查询范围结束时间戳" ,
2020-04-07 13:56:57 +00:00
"label" : "" ,
"type" : "int64" ,
"longType" : "int64" ,
"fullType" : "int64" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
}
]
} ,
{
"name" : "GetBlockByHashRequest" ,
"longName" : "GetBlockByHashRequest" ,
"fullName" : "bdware.bdledger.api.GetBlockByHashRequest" ,
"description" : "" ,
"hasExtensions" : false ,
"hasFields" : true ,
2021-07-20 01:36:57 +00:00
"hasOneofs" : false ,
2020-04-07 13:56:57 +00:00
"extensions" : [ ] ,
"fields" : [
{
"name" : "ledger" ,
2021-07-20 01:36:57 +00:00
"description" : "账本名称" ,
2020-04-07 13:56:57 +00:00
"label" : "" ,
"type" : "string" ,
"longType" : "string" ,
"fullType" : "string" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "hash" ,
2021-07-20 01:36:57 +00:00
"description" : "区块哈希" ,
2020-04-07 13:56:57 +00:00
"label" : "" ,
"type" : "bytes" ,
"longType" : "bytes" ,
"fullType" : "bytes" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "full_transactions" ,
2021-07-20 01:36:57 +00:00
"description" : "是否返回完整事务列表,而不是事务哈希列表" ,
2020-04-07 13:56:57 +00:00
"label" : "" ,
"type" : "bool" ,
"longType" : "bool" ,
"fullType" : "bool" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
}
]
} ,
{
"name" : "GetBlockByHashResponse" ,
"longName" : "GetBlockByHashResponse" ,
"fullName" : "bdware.bdledger.api.GetBlockByHashResponse" ,
"description" : "" ,
"hasExtensions" : false ,
"hasFields" : true ,
2021-07-20 01:36:57 +00:00
"hasOneofs" : false ,
2020-04-07 13:56:57 +00:00
"extensions" : [ ] ,
"fields" : [
{
"name" : "block" ,
2021-07-20 01:36:57 +00:00
"description" : "区块信息" ,
2020-04-07 13:56:57 +00:00
"label" : "" ,
"type" : "Block" ,
"longType" : "Block" ,
"fullType" : "bdware.bdledger.api.Block" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
}
]
} ,
{
"name" : "GetBlocksResponse" ,
"longName" : "GetBlocksResponse" ,
"fullName" : "bdware.bdledger.api.GetBlocksResponse" ,
"description" : "" ,
"hasExtensions" : false ,
"hasFields" : true ,
2021-07-20 01:36:57 +00:00
"hasOneofs" : false ,
2020-04-07 13:56:57 +00:00
"extensions" : [ ] ,
"fields" : [
{
"name" : "blocks" ,
2021-07-20 01:36:57 +00:00
"description" : "区块列表" ,
2020-04-07 13:56:57 +00:00
"label" : "repeated" ,
"type" : "Block" ,
"longType" : "Block" ,
"fullType" : "bdware.bdledger.api.Block" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "start_timestamp" ,
2021-07-20 01:36:57 +00:00
"description" : "本次查询有效的查询范围开始时间戳" ,
2020-04-07 13:56:57 +00:00
"label" : "" ,
"type" : "int64" ,
"longType" : "int64" ,
"fullType" : "int64" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "end_timestamp" ,
2021-07-20 01:36:57 +00:00
"description" : "本次查询有效的查询范围结束时间戳" ,
2020-04-07 13:56:57 +00:00
"label" : "" ,
"type" : "int64" ,
"longType" : "int64" ,
"fullType" : "int64" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
}
]
} ,
{
"name" : "GetTransactionByBlockHashAndIndexRequest" ,
"longName" : "GetTransactionByBlockHashAndIndexRequest" ,
"fullName" : "bdware.bdledger.api.GetTransactionByBlockHashAndIndexRequest" ,
"description" : "" ,
"hasExtensions" : false ,
"hasFields" : true ,
2021-07-20 01:36:57 +00:00
"hasOneofs" : false ,
2020-04-07 13:56:57 +00:00
"extensions" : [ ] ,
"fields" : [
{
"name" : "ledger" ,
2021-07-20 01:36:57 +00:00
"description" : "账本名称" ,
2020-04-07 13:56:57 +00:00
"label" : "" ,
"type" : "string" ,
"longType" : "string" ,
"fullType" : "string" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "block_hash" ,
2021-07-20 01:36:57 +00:00
"description" : "事务所属区块哈希" ,
2020-04-07 13:56:57 +00:00
"label" : "" ,
"type" : "bytes" ,
"longType" : "bytes" ,
"fullType" : "bytes" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "index" ,
2021-07-20 01:36:57 +00:00
"description" : "事务在区块中的位置" ,
2020-04-07 13:56:57 +00:00
"label" : "" ,
"type" : "uint32" ,
"longType" : "uint32" ,
"fullType" : "uint32" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
}
]
} ,
{
"name" : "GetTransactionByBlockHashAndIndexResponse" ,
"longName" : "GetTransactionByBlockHashAndIndexResponse" ,
"fullName" : "bdware.bdledger.api.GetTransactionByBlockHashAndIndexResponse" ,
"description" : "" ,
"hasExtensions" : false ,
"hasFields" : true ,
2021-07-20 01:36:57 +00:00
"hasOneofs" : false ,
2020-04-07 13:56:57 +00:00
"extensions" : [ ] ,
"fields" : [
{
"name" : "transaction" ,
2021-07-20 01:36:57 +00:00
"description" : "事务信息" ,
2020-04-07 13:56:57 +00:00
"label" : "" ,
"type" : "Transaction" ,
"longType" : "Transaction" ,
"fullType" : "bdware.bdledger.api.Transaction" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
}
]
} ,
{
"name" : "GetTransactionByHashRequest" ,
"longName" : "GetTransactionByHashRequest" ,
"fullName" : "bdware.bdledger.api.GetTransactionByHashRequest" ,
"description" : "" ,
"hasExtensions" : false ,
"hasFields" : true ,
2021-07-20 01:36:57 +00:00
"hasOneofs" : false ,
2020-04-07 13:56:57 +00:00
"extensions" : [ ] ,
"fields" : [
{
"name" : "ledger" ,
2021-07-20 01:36:57 +00:00
"description" : "账本名称" ,
2020-04-07 13:56:57 +00:00
"label" : "" ,
"type" : "string" ,
"longType" : "string" ,
"fullType" : "string" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "hash" ,
2021-07-20 01:36:57 +00:00
"description" : "事务哈希" ,
2020-04-07 13:56:57 +00:00
"label" : "" ,
"type" : "bytes" ,
"longType" : "bytes" ,
"fullType" : "bytes" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
}
]
} ,
{
"name" : "GetTransactionByHashResponse" ,
"longName" : "GetTransactionByHashResponse" ,
"fullName" : "bdware.bdledger.api.GetTransactionByHashResponse" ,
"description" : "" ,
"hasExtensions" : false ,
"hasFields" : true ,
2021-07-20 01:36:57 +00:00
"hasOneofs" : false ,
2020-04-07 13:56:57 +00:00
"extensions" : [ ] ,
"fields" : [
{
"name" : "transaction" ,
2021-07-20 01:36:57 +00:00
"description" : "事务信息" ,
2020-04-07 13:56:57 +00:00
"label" : "" ,
"type" : "Transaction" ,
"longType" : "Transaction" ,
"fullType" : "bdware.bdledger.api.Transaction" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
}
]
} ,
{
"name" : "GetTransactionsResponse" ,
"longName" : "GetTransactionsResponse" ,
"fullName" : "bdware.bdledger.api.GetTransactionsResponse" ,
"description" : "" ,
"hasExtensions" : false ,
"hasFields" : true ,
2021-07-20 01:36:57 +00:00
"hasOneofs" : false ,
2020-04-07 13:56:57 +00:00
"extensions" : [ ] ,
"fields" : [
{
"name" : "transactions" ,
2021-07-20 01:36:57 +00:00
"description" : "事务列表" ,
2020-04-07 13:56:57 +00:00
"label" : "repeated" ,
"type" : "Transaction" ,
"longType" : "Transaction" ,
"fullType" : "bdware.bdledger.api.Transaction" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "start_timestamp" ,
2021-07-20 01:36:57 +00:00
"description" : "本次查询有效的查询范围开始时间戳" ,
2020-04-07 13:56:57 +00:00
"label" : "" ,
"type" : "int64" ,
"longType" : "int64" ,
"fullType" : "int64" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "end_timestamp" ,
2021-07-20 01:36:57 +00:00
"description" : "本次查询有效的查询范围结束时间戳" ,
2020-04-07 13:56:57 +00:00
"label" : "" ,
"type" : "int64" ,
"longType" : "int64" ,
"fullType" : "int64" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
}
]
} ,
2020-09-04 04:29:54 +00:00
{
"name" : "RecentBlocksRequest" ,
"longName" : "RecentBlocksRequest" ,
"fullName" : "bdware.bdledger.api.RecentBlocksRequest" ,
"description" : "" ,
"hasExtensions" : false ,
"hasFields" : true ,
2021-07-20 01:36:57 +00:00
"hasOneofs" : false ,
2020-09-04 04:29:54 +00:00
"extensions" : [ ] ,
"fields" : [
{
"name" : "ledger" ,
2021-07-20 01:36:57 +00:00
"description" : "账本名称" ,
2020-09-04 04:29:54 +00:00
"label" : "" ,
"type" : "string" ,
"longType" : "string" ,
"fullType" : "string" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-09-04 04:29:54 +00:00
"defaultValue" : ""
} ,
{
"name" : "count" ,
2021-07-20 01:36:57 +00:00
"description" : "查询区块数量" ,
2020-09-04 04:29:54 +00:00
"label" : "" ,
"type" : "int64" ,
"longType" : "int64" ,
"fullType" : "int64" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-09-04 04:29:54 +00:00
"defaultValue" : ""
} ,
{
"name" : "include_transactions" ,
2021-07-20 01:36:57 +00:00
"description" : "包含事务信息详细程度" ,
2020-09-04 04:29:54 +00:00
"label" : "" ,
"type" : "IncludeTransactions" ,
"longType" : "IncludeTransactions" ,
"fullType" : "bdware.bdledger.api.IncludeTransactions" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-09-04 04:29:54 +00:00
"defaultValue" : ""
}
]
} ,
2020-04-07 13:56:57 +00:00
{
"name" : "TransactionFilter" ,
"longName" : "TransactionFilter" ,
"fullName" : "bdware.bdledger.api.TransactionFilter" ,
"description" : "repeated Transaction/BlockFilters are combined by \"\u0026\u0026\"(and) operator;" ,
"hasExtensions" : false ,
"hasFields" : true ,
2021-07-20 01:36:57 +00:00
"hasOneofs" : false ,
2020-04-07 13:56:57 +00:00
"extensions" : [ ] ,
"fields" : [
{
"name" : "hash" ,
"description" : "" ,
"label" : "" ,
"type" : "bytes" ,
"longType" : "bytes" ,
"fullType" : "bytes" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "from" ,
"description" : "" ,
"label" : "" ,
"type" : "bytes" ,
"longType" : "bytes" ,
"fullType" : "bytes" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "to" ,
"description" : "" ,
"label" : "" ,
"type" : "bytes" ,
"longType" : "bytes" ,
"fullType" : "bytes" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "timestamp" ,
"description" : "" ,
"label" : "" ,
"type" : "bytes" ,
"longType" : "bytes" ,
"fullType" : "bytes" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
}
]
} ,
{
"name" : "TransactionsRequest" ,
"longName" : "TransactionsRequest" ,
"fullName" : "bdware.bdledger.api.TransactionsRequest" ,
"description" : "" ,
"hasExtensions" : false ,
"hasFields" : true ,
2021-07-20 01:36:57 +00:00
"hasOneofs" : false ,
2020-04-07 13:56:57 +00:00
"extensions" : [ ] ,
"fields" : [
{
"name" : "ledger" ,
2021-07-20 01:36:57 +00:00
"description" : "账本名称" ,
2020-04-07 13:56:57 +00:00
"label" : "" ,
"type" : "string" ,
"longType" : "string" ,
"fullType" : "string" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "start_timestamp" ,
2021-07-20 01:36:57 +00:00
"description" : "查询范围开始时间戳" ,
2020-04-07 13:56:57 +00:00
"label" : "" ,
"type" : "int64" ,
"longType" : "int64" ,
"fullType" : "int64" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "end_timestamp" ,
2021-07-20 01:36:57 +00:00
"description" : "查询范围结束时间戳" ,
2020-04-07 13:56:57 +00:00
"label" : "" ,
"type" : "int64" ,
"longType" : "int64" ,
"fullType" : "int64" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
} ,
{
"name" : "filters" ,
2021-07-20 01:36:57 +00:00
"description" : "暂不支持" ,
2020-04-07 13:56:57 +00:00
"label" : "repeated" ,
"type" : "TransactionFilter" ,
"longType" : "TransactionFilter" ,
"fullType" : "bdware.bdledger.api.TransactionFilter" ,
"ismap" : false ,
2021-07-20 01:36:57 +00:00
"isoneof" : false ,
"oneofdecl" : "" ,
2020-04-07 13:56:57 +00:00
"defaultValue" : ""
}
]
}
] ,
"services" : [
{
"name" : "Query" ,
"longName" : "Query" ,
"fullName" : "bdware.bdledger.api.Query" ,
"description" : "" ,
"methods" : [
{
"name" : "GetBlockByHash" ,
"description" : "Get a block identified by its hash\n查询哈希所指定的区块" ,
"requestType" : "GetBlockByHashRequest" ,
"requestLongType" : "GetBlockByHashRequest" ,
"requestFullType" : "bdware.bdledger.api.GetBlockByHashRequest" ,
"requestStreaming" : false ,
"responseType" : "GetBlockByHashResponse" ,
"responseLongType" : "GetBlockByHashResponse" ,
"responseFullType" : "bdware.bdledger.api.GetBlockByHashResponse" ,
"responseStreaming" : false
} ,
{
"name" : "GetBlocks" ,
2021-07-20 01:36:57 +00:00
"description" : "Get blocks in a timestamp range\n查询时间范围内的区块\nRequirement: start_timestamp \u003c= end_timestamp\nIf neither 'start_timestamp' nor 'end_timestamp' is specified, then 'start_timestamp' will be set to\nthe genesis block's timestamp, and 'end_timestamp' will be set to (start_timestamp + query.maxDuration)\n(query.maxDuration is specified in go-bdledger's config file).\nIf only 'end_timestamp' is not specified, or (end_timestamp - start_timestamp \u003e query.maxDuration),\nthen 'end_timestamp' will be set to (start_timestamp + query.maxDuration).\nIf only 'start_timestamp' is not specified, then 'start_timestamp' will be set to (end_timestamp - query.maxDuration).\nIn all cases, 'start_timestamp' will never be earlier than the genesis block's timestamp,\nand 'end_timestamp' will never be later than the current timestamp when the node process the query request." ,
2020-04-07 13:56:57 +00:00
"requestType" : "BlocksRequest" ,
"requestLongType" : "BlocksRequest" ,
"requestFullType" : "bdware.bdledger.api.BlocksRequest" ,
"requestStreaming" : false ,
"responseType" : "GetBlocksResponse" ,
"responseLongType" : "GetBlocksResponse" ,
"responseFullType" : "bdware.bdledger.api.GetBlocksResponse" ,
"responseStreaming" : false
} ,
{
"name" : "CountBlocks" ,
2021-07-20 01:36:57 +00:00
"description" : "Count all blocks in a ledger, or blocks in a timestamp range\n查询帐本中的所有区块数量, 或时间范围内的区块数量\nRequirement: start_timestamp \u003c= end_timestamp\nIf neither 'start_timestamp' nor 'end_timestamp' is specified, then count all blocks in the specified ledger.\nIf only 'end_timestamp' is not specified, then count all blocks with timestamps later than 'start_timestamp'.\nIf only 'start_timestamp' is not specified, then count all blocks with timestamps earlier than 'end_timestamp'.\nIn all cases, 'start_timestamp' will never be earlier than the genesis block's timestamp,\nand 'end_timestamp' will never be later than the current timestamp when the node process the query request." ,
2020-04-07 13:56:57 +00:00
"requestType" : "BlocksRequest" ,
"requestLongType" : "BlocksRequest" ,
"requestFullType" : "bdware.bdledger.api.BlocksRequest" ,
"requestStreaming" : false ,
"responseType" : "CountBlocksResponse" ,
"responseLongType" : "CountBlocksResponse" ,
"responseFullType" : "bdware.bdledger.api.CountBlocksResponse" ,
"responseStreaming" : false
} ,
2020-09-04 04:29:54 +00:00
{
"name" : "GetRecentBlocks" ,
2021-07-20 01:36:57 +00:00
"description" : "Get recent 'count' blocks (Only support IncludeTransactions=NONE for now)\n查询最新的 'count' 个区块" ,
2020-09-04 04:29:54 +00:00
"requestType" : "RecentBlocksRequest" ,
"requestLongType" : "RecentBlocksRequest" ,
"requestFullType" : "bdware.bdledger.api.RecentBlocksRequest" ,
"requestStreaming" : false ,
"responseType" : "GetBlocksResponse" ,
"responseLongType" : "GetBlocksResponse" ,
"responseFullType" : "bdware.bdledger.api.GetBlocksResponse" ,
"responseStreaming" : false
} ,
2020-04-07 13:56:57 +00:00
{
"name" : "GetTransactionByHash" ,
"description" : "Get a transaction identified by its hash\n查询哈希所指定的事务" ,
"requestType" : "GetTransactionByHashRequest" ,
"requestLongType" : "GetTransactionByHashRequest" ,
"requestFullType" : "bdware.bdledger.api.GetTransactionByHashRequest" ,
"requestStreaming" : false ,
"responseType" : "GetTransactionByHashResponse" ,
"responseLongType" : "GetTransactionByHashResponse" ,
"responseFullType" : "bdware.bdledger.api.GetTransactionByHashResponse" ,
"responseStreaming" : false
} ,
{
"name" : "GetTransactionByBlockHashAndIndex" ,
"description" : "Get a transaction identified by hash of the block it belongs to and its index inside the block\n查询所在区块的哈希与其在区块中的index所指定的事务" ,
"requestType" : "GetTransactionByBlockHashAndIndexRequest" ,
"requestLongType" : "GetTransactionByBlockHashAndIndexRequest" ,
"requestFullType" : "bdware.bdledger.api.GetTransactionByBlockHashAndIndexRequest" ,
"requestStreaming" : false ,
"responseType" : "GetTransactionByBlockHashAndIndexResponse" ,
"responseLongType" : "GetTransactionByBlockHashAndIndexResponse" ,
"responseFullType" : "bdware.bdledger.api.GetTransactionByBlockHashAndIndexResponse" ,
"responseStreaming" : false
} ,
{
"name" : "GetTransactions" ,
2021-07-20 01:36:57 +00:00
"description" : "Get transactions in a timestamp range\n查询时间范围内的事务\n'start_timestamp' and 'end_timestamp' follow the same requirements and rules as in 'GetBlocks'." ,
2020-04-07 13:56:57 +00:00
"requestType" : "TransactionsRequest" ,
"requestLongType" : "TransactionsRequest" ,
"requestFullType" : "bdware.bdledger.api.TransactionsRequest" ,
"requestStreaming" : false ,
"responseType" : "GetTransactionsResponse" ,
"responseLongType" : "GetTransactionsResponse" ,
"responseFullType" : "bdware.bdledger.api.GetTransactionsResponse" ,
"responseStreaming" : false
} ,
{
"name" : "CountTransactions" ,
2021-07-20 01:36:57 +00:00
"description" : "Count all transactions in a ledger, or transactions in a timestamp range\n查询帐本中的所有事务数量, 或时间范围内的事务数量\n'start_timestamp' and 'end_timestamp' follow the same requirements and rules as in 'CountBlocks'." ,
2020-04-07 13:56:57 +00:00
"requestType" : "TransactionsRequest" ,
"requestLongType" : "TransactionsRequest" ,
"requestFullType" : "bdware.bdledger.api.TransactionsRequest" ,
"requestStreaming" : false ,
"responseType" : "CountTransactionsResponse" ,
"responseLongType" : "CountTransactionsResponse" ,
"responseFullType" : "bdware.bdledger.api.CountTransactionsResponse" ,
"responseStreaming" : false
}
]
}
]
} ,
{
"name" : "google/protobuf/empty.proto" ,
"description" : "" ,
"package" : "google.protobuf" ,
"hasEnums" : false ,
"hasExtensions" : false ,
"hasMessages" : true ,
"hasServices" : false ,
"enums" : [ ] ,
"extensions" : [ ] ,
"messages" : [
{
"name" : "Empty" ,
"longName" : "Empty" ,
"fullName" : "google.protobuf.Empty" ,
"description" : "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`." ,
"hasExtensions" : false ,
"hasFields" : false ,
2021-07-20 01:36:57 +00:00
"hasOneofs" : false ,
2020-04-07 13:56:57 +00:00
"extensions" : [ ] ,
"fields" : [ ]
}
] ,
"services" : [ ]
}
] ,
"scalarValueTypes" : [
{
"protoType" : "double" ,
"notes" : "" ,
"cppType" : "double" ,
"csType" : "double" ,
"goType" : "float64" ,
"javaType" : "double" ,
"phpType" : "float" ,
"pythonType" : "float" ,
"rubyType" : "Float"
} ,
{
"protoType" : "float" ,
"notes" : "" ,
"cppType" : "float" ,
"csType" : "float" ,
"goType" : "float32" ,
"javaType" : "float" ,
"phpType" : "float" ,
"pythonType" : "float" ,
"rubyType" : "Float"
} ,
{
"protoType" : "int32" ,
"notes" : "Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead." ,
"cppType" : "int32" ,
"csType" : "int" ,
"goType" : "int32" ,
"javaType" : "int" ,
"phpType" : "integer" ,
"pythonType" : "int" ,
"rubyType" : "Bignum or Fixnum (as required)"
} ,
{
"protoType" : "int64" ,
"notes" : "Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead." ,
"cppType" : "int64" ,
"csType" : "long" ,
"goType" : "int64" ,
"javaType" : "long" ,
"phpType" : "integer/string" ,
"pythonType" : "int/long" ,
"rubyType" : "Bignum"
} ,
{
"protoType" : "uint32" ,
"notes" : "Uses variable-length encoding." ,
"cppType" : "uint32" ,
"csType" : "uint" ,
"goType" : "uint32" ,
"javaType" : "int" ,
"phpType" : "integer" ,
"pythonType" : "int/long" ,
"rubyType" : "Bignum or Fixnum (as required)"
} ,
{
"protoType" : "uint64" ,
"notes" : "Uses variable-length encoding." ,
"cppType" : "uint64" ,
"csType" : "ulong" ,
"goType" : "uint64" ,
"javaType" : "long" ,
"phpType" : "integer/string" ,
"pythonType" : "int/long" ,
"rubyType" : "Bignum or Fixnum (as required)"
} ,
{
"protoType" : "sint32" ,
"notes" : "Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s." ,
"cppType" : "int32" ,
"csType" : "int" ,
"goType" : "int32" ,
"javaType" : "int" ,
"phpType" : "integer" ,
"pythonType" : "int" ,
"rubyType" : "Bignum or Fixnum (as required)"
} ,
{
"protoType" : "sint64" ,
"notes" : "Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s." ,
"cppType" : "int64" ,
"csType" : "long" ,
"goType" : "int64" ,
"javaType" : "long" ,
"phpType" : "integer/string" ,
"pythonType" : "int/long" ,
"rubyType" : "Bignum"
} ,
{
"protoType" : "fixed32" ,
"notes" : "Always four bytes. More efficient than uint32 if values are often greater than 2^28." ,
"cppType" : "uint32" ,
"csType" : "uint" ,
"goType" : "uint32" ,
"javaType" : "int" ,
"phpType" : "integer" ,
"pythonType" : "int" ,
"rubyType" : "Bignum or Fixnum (as required)"
} ,
{
"protoType" : "fixed64" ,
"notes" : "Always eight bytes. More efficient than uint64 if values are often greater than 2^56." ,
"cppType" : "uint64" ,
"csType" : "ulong" ,
"goType" : "uint64" ,
"javaType" : "long" ,
"phpType" : "integer/string" ,
"pythonType" : "int/long" ,
"rubyType" : "Bignum"
} ,
{
"protoType" : "sfixed32" ,
"notes" : "Always four bytes." ,
"cppType" : "int32" ,
"csType" : "int" ,
"goType" : "int32" ,
"javaType" : "int" ,
"phpType" : "integer" ,
"pythonType" : "int" ,
"rubyType" : "Bignum or Fixnum (as required)"
} ,
{
"protoType" : "sfixed64" ,
"notes" : "Always eight bytes." ,
"cppType" : "int64" ,
"csType" : "long" ,
"goType" : "int64" ,
"javaType" : "long" ,
"phpType" : "integer/string" ,
"pythonType" : "int/long" ,
"rubyType" : "Bignum"
} ,
{
"protoType" : "bool" ,
"notes" : "" ,
"cppType" : "bool" ,
"csType" : "bool" ,
"goType" : "bool" ,
"javaType" : "boolean" ,
"phpType" : "boolean" ,
"pythonType" : "boolean" ,
"rubyType" : "TrueClass/FalseClass"
} ,
{
"protoType" : "string" ,
"notes" : "A string must always contain UTF-8 encoded or 7-bit ASCII text." ,
"cppType" : "string" ,
"csType" : "string" ,
"goType" : "string" ,
"javaType" : "String" ,
"phpType" : "string" ,
"pythonType" : "str/unicode" ,
"rubyType" : "String (UTF-8)"
} ,
{
"protoType" : "bytes" ,
"notes" : "May contain any arbitrary sequence of bytes." ,
"cppType" : "string" ,
"csType" : "ByteString" ,
"goType" : "[]byte" ,
"javaType" : "ByteString" ,
"phpType" : "string" ,
"pythonType" : "str" ,
"rubyType" : "String (ASCII-8BIT)"
}
]
}