@caict/bop-typescript-sdk 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (256) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/base.tsconfig.json +14 -0
  3. package/dist/bop/bop-base/base.d.ts +24 -0
  4. package/dist/bop/bop-base/base.js +253 -0
  5. package/dist/bop/bop-base/base.js.map +1 -0
  6. package/dist/bop/bop-base/index.d.ts +18 -0
  7. package/dist/bop/bop-base/index.js +69 -0
  8. package/dist/bop/bop-base/index.js.map +1 -0
  9. package/dist/bop/bop-base/permit.d.ts +11 -0
  10. package/dist/bop/bop-base/permit.js +104 -0
  11. package/dist/bop/bop-base/permit.js.map +1 -0
  12. package/dist/bop/bop-base/test/base.test.d.ts +1 -0
  13. package/dist/bop/bop-base/test/base.test.js +772 -0
  14. package/dist/bop/bop-base/test/base.test.js.map +1 -0
  15. package/dist/bop/bop-base/test/index.test.d.ts +1 -0
  16. package/dist/bop/bop-base/test/index.test.js +89 -0
  17. package/dist/bop/bop-base/test/index.test.js.map +1 -0
  18. package/dist/bop/bop-base/test/permit.test.d.ts +1 -0
  19. package/dist/bop/bop-base/test/permit.test.js +140 -0
  20. package/dist/bop/bop-base/test/permit.test.js.map +1 -0
  21. package/dist/bop/bop-proto/bop-ws.d.ts +325 -0
  22. package/dist/bop/bop-proto/bop-ws.js +3599 -0
  23. package/dist/bop/bop-proto/bop-ws.js.map +1 -0
  24. package/dist/bop/bop-proto/bop.d.ts +903 -0
  25. package/dist/bop/bop-proto/bop.js +10421 -0
  26. package/dist/bop/bop-proto/bop.js.map +1 -0
  27. package/dist/bop/bop-ws/index.d.ts +43 -0
  28. package/dist/bop/bop-ws/index.js +265 -0
  29. package/dist/bop/bop-ws/index.js.map +1 -0
  30. package/dist/bop/bop-ws/sample/sample.d.ts +1 -0
  31. package/dist/bop/bop-ws/sample/sample.js +96 -0
  32. package/dist/bop/bop-ws/sample/sample.js.map +1 -0
  33. package/dist/bop/index.d.ts +5 -0
  34. package/dist/bop/index.js +37 -0
  35. package/dist/bop/index.js.map +1 -0
  36. package/dist/bop-sdk/index.d.ts +13 -0
  37. package/dist/bop-sdk/index.js +45 -0
  38. package/dist/bop-sdk/index.js.map +1 -0
  39. package/dist/bop-sdk/interface/abstract-service/abstract-account.d.ts +8 -0
  40. package/dist/bop-sdk/interface/abstract-service/abstract-account.js +7 -0
  41. package/dist/bop-sdk/interface/abstract-service/abstract-account.js.map +1 -0
  42. package/dist/bop-sdk/interface/abstract-service/abstract-chain.d.ts +5 -0
  43. package/dist/bop-sdk/interface/abstract-service/abstract-chain.js +7 -0
  44. package/dist/bop-sdk/interface/abstract-service/abstract-chain.js.map +1 -0
  45. package/dist/bop-sdk/interface/abstract-service/abstract-contract.d.ts +6 -0
  46. package/dist/bop-sdk/interface/abstract-service/abstract-contract.js +7 -0
  47. package/dist/bop-sdk/interface/abstract-service/abstract-contract.js.map +1 -0
  48. package/dist/bop-sdk/interface/abstract-service/abstract-ledger.d.ts +8 -0
  49. package/dist/bop-sdk/interface/abstract-service/abstract-ledger.js +7 -0
  50. package/dist/bop-sdk/interface/abstract-service/abstract-ledger.js.map +1 -0
  51. package/dist/bop-sdk/interface/abstract-service/abstract-provider.d.ts +12 -0
  52. package/dist/bop-sdk/interface/abstract-service/abstract-provider.js +7 -0
  53. package/dist/bop-sdk/interface/abstract-service/abstract-provider.js.map +1 -0
  54. package/dist/bop-sdk/interface/abstract-service/abstract-signer.d.ts +17 -0
  55. package/dist/bop-sdk/interface/abstract-service/abstract-signer.js +109 -0
  56. package/dist/bop-sdk/interface/abstract-service/abstract-signer.js.map +1 -0
  57. package/dist/bop-sdk/interface/abstract-service/abstract-transaction.d.ts +17 -0
  58. package/dist/bop-sdk/interface/abstract-service/abstract-transaction.js +7 -0
  59. package/dist/bop-sdk/interface/abstract-service/abstract-transaction.js.map +1 -0
  60. package/dist/bop-sdk/interface/provider-ws.d.ts +5 -0
  61. package/dist/bop-sdk/interface/provider-ws.js +12 -0
  62. package/dist/bop-sdk/interface/provider-ws.js.map +1 -0
  63. package/dist/bop-sdk/interface/provider.d.ts +7 -0
  64. package/dist/bop-sdk/interface/provider.js +23 -0
  65. package/dist/bop-sdk/interface/provider.js.map +1 -0
  66. package/dist/bop-sdk/interface/service/3rd.d.ts +12 -0
  67. package/dist/bop-sdk/interface/service/3rd.js +49 -0
  68. package/dist/bop-sdk/interface/service/3rd.js.map +1 -0
  69. package/dist/bop-sdk/interface/service/account.d.ts +12 -0
  70. package/dist/bop-sdk/interface/service/account.js +98 -0
  71. package/dist/bop-sdk/interface/service/account.js.map +1 -0
  72. package/dist/bop-sdk/interface/service/chain.d.ts +9 -0
  73. package/dist/bop-sdk/interface/service/chain.js +55 -0
  74. package/dist/bop-sdk/interface/service/chain.js.map +1 -0
  75. package/dist/bop-sdk/interface/service/contract.d.ts +10 -0
  76. package/dist/bop-sdk/interface/service/contract.js +67 -0
  77. package/dist/bop-sdk/interface/service/contract.js.map +1 -0
  78. package/dist/bop-sdk/interface/service/helper.d.ts +20 -0
  79. package/dist/bop-sdk/interface/service/helper.js +383 -0
  80. package/dist/bop-sdk/interface/service/helper.js.map +1 -0
  81. package/dist/bop-sdk/interface/service/ledger.d.ts +12 -0
  82. package/dist/bop-sdk/interface/service/ledger.js +89 -0
  83. package/dist/bop-sdk/interface/service/ledger.js.map +1 -0
  84. package/dist/bop-sdk/interface/service/offline/check/index.js +138 -0
  85. package/dist/bop-sdk/interface/service/offline/common/constant.js +6 -0
  86. package/dist/bop-sdk/interface/service/offline/common/snowFlakeUtils.js +192 -0
  87. package/dist/bop-sdk/interface/service/offline/common/util.js +511 -0
  88. package/dist/bop-sdk/interface/service/offline/exception/customErrors.js +29 -0
  89. package/dist/bop-sdk/interface/service/offline/exception/errors.js +90 -0
  90. package/dist/bop-sdk/interface/service/offline/exception/index.js +5 -0
  91. package/dist/bop-sdk/interface/service/offline/operation/accountCreateOperation.js +28 -0
  92. package/dist/bop-sdk/interface/service/offline/operation/accountSetMetadataOperation.js +44 -0
  93. package/dist/bop-sdk/interface/service/offline/operation/accountSetPrivilegeOperation.js +49 -0
  94. package/dist/bop-sdk/interface/service/offline/operation/contractCreateOperation.js +43 -0
  95. package/dist/bop-sdk/interface/service/offline/operation/contractInvokeOperation.js +42 -0
  96. package/dist/bop-sdk/interface/service/offline/operation/contractInvokeRequestOperation.js +69 -0
  97. package/dist/bop-sdk/interface/service/offline/operation/gasSendOperation.js +29 -0
  98. package/dist/bop-sdk/interface/service/offline/operation/gasSendRequestOperation.js +61 -0
  99. package/dist/bop-sdk/interface/service/offline/operation/index.js +20 -0
  100. package/dist/bop-sdk/interface/service/offline/proto/chain_pb.js +12079 -0
  101. package/dist/bop-sdk/interface/service/offline/proto/common_pb.js +2867 -0
  102. package/dist/bop-sdk/interface/service/offline/transaction/index.js +988 -0
  103. package/dist/bop-sdk/interface/service/offline/transaction/operations.js +188 -0
  104. package/dist/bop-sdk/interface/service/offline/validate/account.js +152 -0
  105. package/dist/bop-sdk/interface/service/offline/validate/contract.js +101 -0
  106. package/dist/bop-sdk/interface/service/offline/validate/index.js +10 -0
  107. package/dist/bop-sdk/interface/service/offline/validate/transaction.js +51 -0
  108. package/dist/bop-sdk/interface/service/transaction.d.ts +21 -0
  109. package/dist/bop-sdk/interface/service/transaction.js +591 -0
  110. package/dist/bop-sdk/interface/service/transaction.js.map +1 -0
  111. package/dist/bop-sdk/interface/signer.d.ts +12 -0
  112. package/dist/bop-sdk/interface/signer.js +53 -0
  113. package/dist/bop-sdk/interface/signer.js.map +1 -0
  114. package/dist/bop-sdk/interface/test/3rd.test.d.ts +1 -0
  115. package/dist/bop-sdk/interface/test/3rd.test.js +1524 -0
  116. package/dist/bop-sdk/interface/test/3rd.test.js.map +1 -0
  117. package/dist/bop-sdk/interface/test/account.test.d.ts +1 -0
  118. package/dist/bop-sdk/interface/test/account.test.js +225 -0
  119. package/dist/bop-sdk/interface/test/account.test.js.map +1 -0
  120. package/dist/bop-sdk/interface/test/chain.test.d.ts +1 -0
  121. package/dist/bop-sdk/interface/test/chain.test.js +72 -0
  122. package/dist/bop-sdk/interface/test/chain.test.js.map +1 -0
  123. package/dist/bop-sdk/interface/test/contract.test.d.ts +1 -0
  124. package/dist/bop-sdk/interface/test/contract.test.js +266 -0
  125. package/dist/bop-sdk/interface/test/contract.test.js.map +1 -0
  126. package/dist/bop-sdk/interface/test/ledger.test.d.ts +1 -0
  127. package/dist/bop-sdk/interface/test/ledger.test.js +167 -0
  128. package/dist/bop-sdk/interface/test/ledger.test.js.map +1 -0
  129. package/dist/bop-sdk/interface/test/provider.test.d.ts +1 -0
  130. package/dist/bop-sdk/interface/test/provider.test.js +295 -0
  131. package/dist/bop-sdk/interface/test/provider.test.js.map +1 -0
  132. package/dist/bop-sdk/interface/test/signer.test.d.ts +1 -0
  133. package/dist/bop-sdk/interface/test/signer.test.js +87 -0
  134. package/dist/bop-sdk/interface/test/signer.test.js.map +1 -0
  135. package/dist/bop-sdk/interface/test/transaction.test.d.ts +1 -0
  136. package/dist/bop-sdk/interface/test/transaction.test.js +663 -0
  137. package/dist/bop-sdk/interface/test/transaction.test.js.map +1 -0
  138. package/dist/bop-sdk/proto/bop-sdk-common.d.ts +225 -0
  139. package/dist/bop-sdk/proto/bop-sdk-common.js +831 -0
  140. package/dist/bop-sdk/proto/bop-sdk-common.js.map +1 -0
  141. package/dist/bop-sdk/proto/bop-sdk-interface.d.ts +623 -0
  142. package/dist/bop-sdk/proto/bop-sdk-interface.js +8623 -0
  143. package/dist/bop-sdk/proto/bop-sdk-interface.js.map +1 -0
  144. package/dist/bop-sdk/proto/bop-sdk-utils.d.ts +107 -0
  145. package/dist/bop-sdk/proto/bop-sdk-utils.js +1160 -0
  146. package/dist/bop-sdk/proto/bop-sdk-utils.js.map +1 -0
  147. package/dist/bop-sdk/utils/abi/abi-coder.d.ts +16 -0
  148. package/dist/bop-sdk/utils/abi/abi-coder.js +101 -0
  149. package/dist/bop-sdk/utils/abi/abi-coder.js.map +1 -0
  150. package/dist/bop-sdk/utils/abi/address.d.ts +8 -0
  151. package/dist/bop-sdk/utils/abi/address.js +116 -0
  152. package/dist/bop-sdk/utils/abi/address.js.map +1 -0
  153. package/dist/bop-sdk/utils/abi/bignumber.d.ts +39 -0
  154. package/dist/bop-sdk/utils/abi/bignumber.js +316 -0
  155. package/dist/bop-sdk/utils/abi/bignumber.js.map +1 -0
  156. package/dist/bop-sdk/utils/abi/bytes.d.ts +41 -0
  157. package/dist/bop-sdk/utils/abi/bytes.js +423 -0
  158. package/dist/bop-sdk/utils/abi/bytes.js.map +1 -0
  159. package/dist/bop-sdk/utils/abi/coders/abstract-coder.d.ts +52 -0
  160. package/dist/bop-sdk/utils/abi/coders/abstract-coder.js +164 -0
  161. package/dist/bop-sdk/utils/abi/coders/abstract-coder.js.map +1 -0
  162. package/dist/bop-sdk/utils/abi/coders/address.d.ts +7 -0
  163. package/dist/bop-sdk/utils/abi/coders/address.js +52 -0
  164. package/dist/bop-sdk/utils/abi/coders/address.js.map +1 -0
  165. package/dist/bop-sdk/utils/abi/coders/anonymous.d.ts +8 -0
  166. package/dist/bop-sdk/utils/abi/coders/anonymous.js +22 -0
  167. package/dist/bop-sdk/utils/abi/coders/anonymous.js.map +1 -0
  168. package/dist/bop-sdk/utils/abi/coders/array.d.ts +13 -0
  169. package/dist/bop-sdk/utils/abi/coders/array.js +220 -0
  170. package/dist/bop-sdk/utils/abi/coders/array.js.map +1 -0
  171. package/dist/bop-sdk/utils/abi/coders/boolean.d.ts +7 -0
  172. package/dist/bop-sdk/utils/abi/coders/boolean.js +20 -0
  173. package/dist/bop-sdk/utils/abi/coders/boolean.js.map +1 -0
  174. package/dist/bop-sdk/utils/abi/coders/bytes.d.ts +11 -0
  175. package/dist/bop-sdk/utils/abi/coders/bytes.js +33 -0
  176. package/dist/bop-sdk/utils/abi/coders/bytes.js.map +1 -0
  177. package/dist/bop-sdk/utils/abi/coders/fixed-bytes.d.ts +9 -0
  178. package/dist/bop-sdk/utils/abi/coders/fixed-bytes.js +28 -0
  179. package/dist/bop-sdk/utils/abi/coders/fixed-bytes.js.map +1 -0
  180. package/dist/bop-sdk/utils/abi/coders/null.d.ts +7 -0
  181. package/dist/bop-sdk/utils/abi/coders/null.js +24 -0
  182. package/dist/bop-sdk/utils/abi/coders/null.js.map +1 -0
  183. package/dist/bop-sdk/utils/abi/coders/number.d.ts +10 -0
  184. package/dist/bop-sdk/utils/abi/coders/number.js +45 -0
  185. package/dist/bop-sdk/utils/abi/coders/number.js.map +1 -0
  186. package/dist/bop-sdk/utils/abi/coders/string.d.ts +8 -0
  187. package/dist/bop-sdk/utils/abi/coders/string.js +21 -0
  188. package/dist/bop-sdk/utils/abi/coders/string.js.map +1 -0
  189. package/dist/bop-sdk/utils/abi/coders/tuple.d.ts +10 -0
  190. package/dist/bop-sdk/utils/abi/coders/tuple.js +60 -0
  191. package/dist/bop-sdk/utils/abi/coders/tuple.js.map +1 -0
  192. package/dist/bop-sdk/utils/abi/constants/addresses.d.ts +1 -0
  193. package/dist/bop-sdk/utils/abi/constants/addresses.js +5 -0
  194. package/dist/bop-sdk/utils/abi/constants/addresses.js.map +1 -0
  195. package/dist/bop-sdk/utils/abi/constants/bignumbers.d.ts +10 -0
  196. package/dist/bop-sdk/utils/abi/constants/bignumbers.js +21 -0
  197. package/dist/bop-sdk/utils/abi/constants/bignumbers.js.map +1 -0
  198. package/dist/bop-sdk/utils/abi/constants/hashes.d.ts +1 -0
  199. package/dist/bop-sdk/utils/abi/constants/hashes.js +5 -0
  200. package/dist/bop-sdk/utils/abi/constants/hashes.js.map +1 -0
  201. package/dist/bop-sdk/utils/abi/constants/index.d.ts +4 -0
  202. package/dist/bop-sdk/utils/abi/constants/index.js +19 -0
  203. package/dist/bop-sdk/utils/abi/constants/index.js.map +1 -0
  204. package/dist/bop-sdk/utils/abi/constants/strings.d.ts +1 -0
  205. package/dist/bop-sdk/utils/abi/constants/strings.js +6 -0
  206. package/dist/bop-sdk/utils/abi/constants/strings.js.map +1 -0
  207. package/dist/bop-sdk/utils/abi/fragments.d.ts +84 -0
  208. package/dist/bop-sdk/utils/abi/fragments.js +919 -0
  209. package/dist/bop-sdk/utils/abi/fragments.js.map +1 -0
  210. package/dist/bop-sdk/utils/abi/id.d.ts +1 -0
  211. package/dist/bop-sdk/utils/abi/id.js +10 -0
  212. package/dist/bop-sdk/utils/abi/id.js.map +1 -0
  213. package/dist/bop-sdk/utils/abi/index.d.ts +4 -0
  214. package/dist/bop-sdk/utils/abi/index.js +21 -0
  215. package/dist/bop-sdk/utils/abi/index.js.map +1 -0
  216. package/dist/bop-sdk/utils/abi/interface.d.ts +83 -0
  217. package/dist/bop-sdk/utils/abi/interface.js +663 -0
  218. package/dist/bop-sdk/utils/abi/interface.js.map +1 -0
  219. package/dist/bop-sdk/utils/abi/keccak256.d.ts +2 -0
  220. package/dist/bop-sdk/utils/abi/keccak256.js +13 -0
  221. package/dist/bop-sdk/utils/abi/keccak256.js.map +1 -0
  222. package/dist/bop-sdk/utils/abi/properties.d.ts +16 -0
  223. package/dist/bop-sdk/utils/abi/properties.js +141 -0
  224. package/dist/bop-sdk/utils/abi/properties.js.map +1 -0
  225. package/dist/bop-sdk/utils/abi/strings/bytes32.d.ts +3 -0
  226. package/dist/bop-sdk/utils/abi/strings/bytes32.js +36 -0
  227. package/dist/bop-sdk/utils/abi/strings/bytes32.js.map +1 -0
  228. package/dist/bop-sdk/utils/abi/strings/idna.d.ts +4 -0
  229. package/dist/bop-sdk/utils/abi/strings/idna.js +200 -0
  230. package/dist/bop-sdk/utils/abi/strings/idna.js.map +1 -0
  231. package/dist/bop-sdk/utils/abi/strings/index.d.ts +4 -0
  232. package/dist/bop-sdk/utils/abi/strings/index.js +17 -0
  233. package/dist/bop-sdk/utils/abi/strings/index.js.map +1 -0
  234. package/dist/bop-sdk/utils/abi/strings/utf8.d.ts +26 -0
  235. package/dist/bop-sdk/utils/abi/strings/utf8.js +265 -0
  236. package/dist/bop-sdk/utils/abi/strings/utf8.js.map +1 -0
  237. package/dist/bop-sdk/utils/encryption-address.d.ts +25 -0
  238. package/dist/bop-sdk/utils/encryption-address.js +426 -0
  239. package/dist/bop-sdk/utils/encryption-address.js.map +1 -0
  240. package/dist/bop-sdk/utils/encryption-crypto.d.ts +16 -0
  241. package/dist/bop-sdk/utils/encryption-crypto.js +406 -0
  242. package/dist/bop-sdk/utils/encryption-crypto.js.map +1 -0
  243. package/dist/bop-sdk/utils/encryption-mnemonics.d.ts +7 -0
  244. package/dist/bop-sdk/utils/encryption-mnemonics.js +129 -0
  245. package/dist/bop-sdk/utils/encryption-mnemonics.js.map +1 -0
  246. package/dist/bop-sdk/utils/index.d.ts +13 -0
  247. package/dist/bop-sdk/utils/index.js +22 -0
  248. package/dist/bop-sdk/utils/index.js.map +1 -0
  249. package/dist/bop-sdk/utils/logger.d.ts +52 -0
  250. package/dist/bop-sdk/utils/logger.js +377 -0
  251. package/dist/bop-sdk/utils/logger.js.map +1 -0
  252. package/dist/index.d.ts +4 -0
  253. package/dist/index.js +18 -0
  254. package/dist/index.js.map +1 -0
  255. package/package.json +92 -88
  256. package/tsconfig.json +24 -0
@@ -0,0 +1,903 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ export declare const protobufPackage = "bop";
3
+ /** 开放平台状态码定义 */
4
+ export declare enum StatusCodes {
5
+ /** SUCCESS - 成功状态 */
6
+ SUCCESS = 0,
7
+ /** INTERNAL_SERVER_ERROR - 服务内部错误 */
8
+ INTERNAL_SERVER_ERROR = 1,
9
+ /** INVALID_PARAMETER - 参数错误 */
10
+ INVALID_PARAMETER = 2,
11
+ /** OBJECT_ALREADY_EXISTS - 对象已存在,如重复提交交易 */
12
+ OBJECT_ALREADY_EXISTS = 3,
13
+ /** OBJECT_NOT_FOUND - 对象不存在,如查询不到账号、TX、区块等 */
14
+ OBJECT_NOT_FOUND = 4,
15
+ /** TX_TIMEOUT - TX 超时 */
16
+ TX_TIMEOUT = 5,
17
+ /** ACCOUNT_FORBIDDEN - 账户禁止使用 */
18
+ ACCOUNT_FORBIDDEN = 6,
19
+ /** MATH_OVERFLOW - 数学计算溢出 */
20
+ MATH_OVERFLOW = 7,
21
+ /** ILLEGAL_PUBLIC_KEY - 公钥非法 */
22
+ ILLEGAL_PUBLIC_KEY = 90,
23
+ /** ILLEGAL_PRIVATE_KEY - 私钥非法 */
24
+ ILLEGAL_PRIVATE_KEY = 91,
25
+ /** INSUFFICIENT_SIGNATURE_WEIGHT - 签名权重不够,达不到操作的门限值 */
26
+ INSUFFICIENT_SIGNATURE_WEIGHT = 93,
27
+ /** ILLEGAL_ADDRESS - 地址非法 */
28
+ ILLEGAL_ADDRESS = 94,
29
+ /** MISSING_TRANSACTION_OPERATION - 交易缺失操作 */
30
+ MISSING_TRANSACTION_OPERATION = 97,
31
+ /** TOO_MANY_OPERATIONS - 单笔交易内超过了100个操作 */
32
+ TOO_MANY_OPERATIONS = 98,
33
+ /** INVALID_NONCE - 交易序号错误,nonce错误 */
34
+ INVALID_NONCE = 99,
35
+ /** INSUFFICIENT_BALANCE - 余额不足 */
36
+ INSUFFICIENT_BALANCE = 100,
37
+ /** SOURCE_AND_DESTINATION_EQUAL - 源和目的账号相等 */
38
+ SOURCE_AND_DESTINATION_EQUAL = 101,
39
+ /** ACCOUNT_ALREADY_EXISTS - 创建账号操作,目标账号已存在 */
40
+ ACCOUNT_ALREADY_EXISTS = 102,
41
+ /** ACCOUNT_NOT_FOUND - 账户不存在 */
42
+ ACCOUNT_NOT_FOUND = 103,
43
+ /** INSUFFICIENT_INITIAL_ASSETS - 创建账号初始化资产小于配置文件中最小费用 */
44
+ INSUFFICIENT_INITIAL_ASSETS = 106,
45
+ /** INSUFFICIENT_FEE - 费用不足 */
46
+ INSUFFICIENT_FEE = 111,
47
+ /** WEIGHT_OUT_OF_RANGE - 权重值不在有效范围 */
48
+ WEIGHT_OUT_OF_RANGE = 120,
49
+ /** THRESHOLD_OUT_OF_RANGE - 门限值不在有效范围 */
50
+ THRESHOLD_OUT_OF_RANGE = 121,
51
+ /** MISMATCHING_METADATA_VERSION - metadata的version版本号不与已有的匹配 */
52
+ MISMATCHING_METADATA_VERSION = 144,
53
+ /** TRANSACTION_DATA_TOO_LARGE - 交易数据超出上限 */
54
+ TRANSACTION_DATA_TOO_LARGE = 146,
55
+ /** CONTRACT_EXECUTION_FAILED - 合约执行失败 */
56
+ CONTRACT_EXECUTION_FAILED = 151,
57
+ /** CONTRACT_PARSE_FAILED - 合约语法分析失败 */
58
+ CONTRACT_PARSE_FAILED = 152,
59
+ /** CONTRACT_RECURSION_DEPTH_EXCEEDED - 合约递归深度超出上限 */
60
+ CONTRACT_RECURSION_DEPTH_EXCEEDED = 153,
61
+ /** CONTRACT_GENERATED_TOO_MANY_TRANSACTIONS - 合约产生的交易超出上限 */
62
+ CONTRACT_GENERATED_TOO_MANY_TRANSACTIONS = 154,
63
+ /** CONTRACT_EXECUTION_TIMEOUT - 合约执行超时 */
64
+ CONTRACT_EXECUTION_TIMEOUT = 155,
65
+ /** NON_CONTRACT_ADDRESS - 目标地址非合约账户 */
66
+ NON_CONTRACT_ADDRESS = 156,
67
+ /** FAILED_TO_INSERT_INTO_TX_QUEUE - 插入交易缓存队列失败 */
68
+ FAILED_TO_INSERT_INTO_TX_QUEUE = 160,
69
+ /** FORBIDDEN_SPARK_TOKEN_TRANSFER - 禁止转移星火令 */
70
+ FORBIDDEN_SPARK_TOKEN_TRANSFER = 161,
71
+ /** SERVICE_DOMAIN_NOT_FOUND - 服务域不存在 */
72
+ SERVICE_DOMAIN_NOT_FOUND = 170,
73
+ /** SNAPSHOT_NOT_FOUND_FOR_FAST_SYNC - 快速同步的快照不存在 */
74
+ SNAPSHOT_NOT_FOUND_FOR_FAST_SYNC = 180,
75
+ /** ERROR_RETRIEVING_SNAPSHOT_FOR_FAST_SYNC - 快速同步获取快照数据错误 */
76
+ ERROR_RETRIEVING_SNAPSHOT_FOR_FAST_SYNC = 181,
77
+ /** DUPLICATE_NONCE_IN_CACHE - 交易nonce重复,nonce在缓存中 (需重新发送交易) */
78
+ DUPLICATE_NONCE_IN_CACHE = 183,
79
+ /** INVALID_MAX_BLOCK_NUMBER - 交易最大区块数错误,小于当前区块高度 (需要重新获取区块高度序列化接口) */
80
+ INVALID_MAX_BLOCK_NUMBER = 184,
81
+ /** API_NOT_FOUND - 请求的API不存在 */
82
+ API_NOT_FOUND = 1013,
83
+ /** API_DEPRECATED - 请求的API已停用 */
84
+ API_DEPRECATED = 1015,
85
+ /** TIMEOUT - timeout */
86
+ TIMEOUT = 1016,
87
+ /** PARAMETER_TYPE_PARSING_EXCEPTION - 参数类型解析异常 */
88
+ PARAMETER_TYPE_PARSING_EXCEPTION = -3,
89
+ /** INVALID_PARAMETER_EXCEPTION - 无效参数异常 */
90
+ INVALID_PARAMETER_EXCEPTION = -6,
91
+ /** REQUEST_TYPE_EXCEPTION - 请求类型异常 */
92
+ REQUEST_TYPE_EXCEPTION = -7,
93
+ /** UNIFIED_VALIDATION_EXCEPTION - 统一验证参数异常 */
94
+ UNIFIED_VALIDATION_EXCEPTION = -9,
95
+ /** METHOD_NOT_ALLOWED - 不支持当前请求类型 */
96
+ METHOD_NOT_ALLOWED = 405,
97
+ /** SENSITIVE_WORDS_IN_TRANSACTION - 交易数据中包含敏感词汇 */
98
+ SENSITIVE_WORDS_IN_TRANSACTION = 1101,
99
+ /** CONTRACT_ADDRESS_NOT_IN_WHITELIST - 您的合约地址未在项目合约白名单 */
100
+ CONTRACT_ADDRESS_NOT_IN_WHITELIST = 1102,
101
+ /** ILLEGAL_TRANSACTION_DATA - 请检查交易数据是否合规 */
102
+ ILLEGAL_TRANSACTION_DATA = 1103,
103
+ /** TRANSACTION_TYPE_NOT_FOUND - 交易类型不存在 */
104
+ TRANSACTION_TYPE_NOT_FOUND = 1105,
105
+ /** REMOTE_CALL_FAILED - 远程调用失败 */
106
+ REMOTE_CALL_FAILED = 1106,
107
+ /** TRANSACTION_POOL_TYPE_NOT_FOUND - 交易池类型不存在 */
108
+ TRANSACTION_POOL_TYPE_NOT_FOUND = 1107,
109
+ /** PARAMETER_OUT_OF_RANGE - 参数超出限制 */
110
+ PARAMETER_OUT_OF_RANGE = 1108,
111
+ /** ILLEGAL_PARAMETER - 非法参数 */
112
+ ILLEGAL_PARAMETER = 1109,
113
+ /** TX_TYPE_REQUIRED - 当bid 或 tx_id为不为空时,tx_type为必填 */
114
+ TX_TYPE_REQUIRED = 1110,
115
+ /** BUSINESS_PARAMETER_CANNOT_BE_EMPTY - 业务参数不能为空 */
116
+ BUSINESS_PARAMETER_CANNOT_BE_EMPTY = 1111,
117
+ /** API_KEY_NOT_FOUND - API Key不存在 */
118
+ API_KEY_NOT_FOUND = 1122,
119
+ /** REQUEST_RATE_EXCEEDED_PER_SECOND - 每秒请求频次超出限制 */
120
+ REQUEST_RATE_EXCEEDED_PER_SECOND = 1200,
121
+ /** REQUEST_RATE_EXCEEDED_PER_DAY - 每日请求频次超出限制 */
122
+ REQUEST_RATE_EXCEEDED_PER_DAY = 1201,
123
+ /** NO_RESOURCES_AVAILABLE - 您已无资源可用 */
124
+ NO_RESOURCES_AVAILABLE = 1202,
125
+ /** PROJECT_DELETED - 项目已被删除 */
126
+ PROJECT_DELETED = 1203,
127
+ /** PROJECT_DISABLED - 项目已禁用 */
128
+ PROJECT_DISABLED = 1204,
129
+ /** PROJECT_BLACKLISTED - 项目被拉入黑名单 */
130
+ PROJECT_BLACKLISTED = 1205,
131
+ /** ACCOUNT_BLACKLISTED - 账户被拉入黑名单 */
132
+ ACCOUNT_BLACKLISTED = 1206,
133
+ /** API_SECRET_REQUIRED_IN_HEADER - 请在Header中传入API Secret */
134
+ API_SECRET_REQUIRED_IN_HEADER = 1207,
135
+ /** MISMATCHING_API_SECRET - 传入的API Secret与项目不匹配 */
136
+ MISMATCHING_API_SECRET = 1208,
137
+ /** ENHANCED_TRANSACTION_SERVICE_NOT_ENABLED - 增强交易服务未开启 */
138
+ ENHANCED_TRANSACTION_SERVICE_NOT_ENABLED = 1209,
139
+ /** MISMATCHING_PROJECT_AND_API_TYPE - 项目类型与API类型不一致 */
140
+ MISMATCHING_PROJECT_AND_API_TYPE = 1210,
141
+ /** PROJECT_WITHOUT_MAINNET_PERMISSION - 当前项目还没有主网权限 */
142
+ PROJECT_WITHOUT_MAINNET_PERMISSION = 1211,
143
+ /** IN_PLATFORM_QUEUE - 平台队列中 */
144
+ IN_PLATFORM_QUEUE = 1311,
145
+ /** TRANSACTION_SUBMITTED_TO_SPARKCHAIN - 交易已提交到星火链 */
146
+ TRANSACTION_SUBMITTED_TO_SPARKCHAIN = 1312,
147
+ /** TRANSACTION_POOL_TIMEOUT_DISCARD - 平台交易池超时丢弃 */
148
+ TRANSACTION_POOL_TIMEOUT_DISCARD = 1313,
149
+ /** NO_TRANSACTION_POOL_FOR_PROJECT - 项目暂无交易池(增强交易) */
150
+ NO_TRANSACTION_POOL_FOR_PROJECT = 1314,
151
+ /** TRANSACTION_ALREADY_EXISTS - 交易已存在 */
152
+ TRANSACTION_ALREADY_EXISTS = 1315,
153
+ /** SPARKCHAIN_TIMEOUT_DISCARD - 星火链超时丢弃 */
154
+ SPARKCHAIN_TIMEOUT_DISCARD = 1316,
155
+ /** TOO_MANY_TRANSACTION_OPERATIONS - 交易操作频繁 */
156
+ TOO_MANY_TRANSACTION_OPERATIONS = 1317,
157
+ URL_ERROR = 9999,
158
+ UNRECOGNIZED = -1
159
+ }
160
+ export declare function statusCodesFromJSON(object: any): StatusCodes;
161
+ export declare function statusCodesToJSON(object: StatusCodes): string;
162
+ /**
163
+ * 账号备案 permit
164
+ * 备案或取消备案的请求项
165
+ */
166
+ export interface BidStatus {
167
+ /** 申请账号(长度在1-64之间) */
168
+ bid?: string | undefined;
169
+ /** 账号状态,0:取消许可,1:许可(长度为1) */
170
+ status?: string | undefined;
171
+ }
172
+ /** 备案或取消备案的请求消息 */
173
+ export interface ApplyRequest {
174
+ /** 申请备案、取消备案bid集合,上限100条 */
175
+ data?: BidStatus[] | undefined;
176
+ }
177
+ export interface ApplyResult {
178
+ requestNo?: string | undefined;
179
+ }
180
+ export interface ApplyResponse {
181
+ trace?: string | undefined;
182
+ result?: ApplyResult | undefined;
183
+ success?: boolean | undefined;
184
+ errorCode?: StatusCodes | undefined;
185
+ errorDesc?: string | undefined;
186
+ }
187
+ export interface ApplyStatusRequest {
188
+ requestNo?: string | undefined;
189
+ }
190
+ export interface ApplyStatusResult {
191
+ /** 请求的序号 */
192
+ requestNo?: string | undefined;
193
+ /** 存储状态(0:待处理,1:处理中,2:处理成功,3:处理失败) */
194
+ status?: string | undefined;
195
+ /** 数据上链交易hash */
196
+ txHash?: string | undefined;
197
+ /** 错误描述(如果处理失败,则提供详细错误信息) */
198
+ errorDesc?: string | undefined;
199
+ }
200
+ export interface ApplyStatusResponse {
201
+ trace?: string | undefined;
202
+ result?: ApplyStatusResult | undefined;
203
+ success?: boolean | undefined;
204
+ errorCode?: StatusCodes | undefined;
205
+ errorDesc?: string | undefined;
206
+ }
207
+ export interface DetailRequest {
208
+ requestNo?: string | undefined;
209
+ }
210
+ export interface DetailResult {
211
+ /** 请求的序号 */
212
+ requestNo?: string | undefined;
213
+ /** 数据上链交易hash(假设为字符串) */
214
+ txHash?: string | undefined;
215
+ /** bid集合(字符串列表) */
216
+ bidList?: string | undefined;
217
+ }
218
+ export interface DetailResponse {
219
+ trace?: string | undefined;
220
+ result?: DetailResult | undefined;
221
+ success?: boolean | undefined;
222
+ errorCode?: StatusCodes | undefined;
223
+ errorDesc?: string | undefined;
224
+ }
225
+ /** base */
226
+ export interface HelloResult {
227
+ chainCode?: string | undefined;
228
+ licenseVersion?: string | undefined;
229
+ monitorVersion?: string | undefined;
230
+ overlayVersion?: string | undefined;
231
+ websocketPort?: number | undefined;
232
+ addressPrefix?: string | undefined;
233
+ chainVersion?: string | undefined;
234
+ currentTime?: string | undefined;
235
+ hashType?: string | undefined;
236
+ ledgerVersion?: string | undefined;
237
+ networkId?: string | undefined;
238
+ }
239
+ export interface HelloResponse {
240
+ trace?: string | undefined;
241
+ result?: HelloResult | undefined;
242
+ success?: boolean | undefined;
243
+ errorCode?: StatusCodes | undefined;
244
+ errorDesc?: string | undefined;
245
+ }
246
+ /** 获取链上某个账户的信息 */
247
+ export interface GetAccountRequest {
248
+ address?: string | undefined;
249
+ height?: number | undefined;
250
+ key?: string | undefined;
251
+ }
252
+ export interface Contract {
253
+ type?: Contract_ContractType | undefined;
254
+ payload?: string | undefined;
255
+ }
256
+ export declare enum Contract_ContractType {
257
+ JAVASCRIPT = 0,
258
+ EVM = 1,
259
+ SYSTEM = 2,
260
+ UNRECOGNIZED = -1
261
+ }
262
+ export declare function contract_ContractTypeFromJSON(object: any): Contract_ContractType;
263
+ export declare function contract_ContractTypeToJSON(object: Contract_ContractType): string;
264
+ export interface Signer {
265
+ address?: string | undefined;
266
+ weight?: number | undefined;
267
+ }
268
+ export declare enum Signer_Limit {
269
+ SIGNER_NONE = 0,
270
+ SIGNER = 100,
271
+ UNRECOGNIZED = -1
272
+ }
273
+ export declare function signer_LimitFromJSON(object: any): Signer_Limit;
274
+ export declare function signer_LimitToJSON(object: Signer_Limit): string;
275
+ export interface AccountPrivilege {
276
+ masterWeight?: number | undefined;
277
+ signers?: Signer[] | undefined;
278
+ thresholds?: AccountThreshold | undefined;
279
+ }
280
+ export interface OperationTypeThreshold {
281
+ type?: OperationTypeThreshold_Type | undefined;
282
+ threshold?: number | undefined;
283
+ }
284
+ export declare enum OperationTypeThreshold_Type {
285
+ UNKNOWN = 0,
286
+ CREATE_ACCOUNT = 1,
287
+ SET_METADATA = 4,
288
+ SET_SIGNER_WEIGHT = 5,
289
+ SET_THRESHOLD = 6,
290
+ PAY_COIN = 7,
291
+ LOG = 8,
292
+ SET_PRIVILEGE = 9,
293
+ UPGRADE_CONTRACT = 10,
294
+ SET_CONTROLLED_AREA = 11,
295
+ AUTHORIZE_TRANSFER = 12,
296
+ UNRECOGNIZED = -1
297
+ }
298
+ export declare function operationTypeThreshold_TypeFromJSON(object: any): OperationTypeThreshold_Type;
299
+ export declare function operationTypeThreshold_TypeToJSON(object: OperationTypeThreshold_Type): string;
300
+ export interface AccountThreshold {
301
+ txThreshold?: number | undefined;
302
+ typeThresholds?: OperationTypeThreshold[] | undefined;
303
+ }
304
+ export interface KeyPair {
305
+ key?: string | undefined;
306
+ value?: string | undefined;
307
+ version?: number | undefined;
308
+ }
309
+ export interface GetAccountResult {
310
+ address?: string | undefined;
311
+ balance?: number | undefined;
312
+ nonce?: number | undefined;
313
+ authTransfer?: boolean | undefined;
314
+ metadatasHash?: string | undefined;
315
+ contract?: Contract | undefined;
316
+ priv?: AccountPrivilege | undefined;
317
+ metadatas?: KeyPair[] | undefined;
318
+ }
319
+ export interface GetAccountResponse {
320
+ trace?: string | undefined;
321
+ result?: GetAccountResult | undefined;
322
+ success?: boolean | undefined;
323
+ errorCode?: StatusCodes | undefined;
324
+ errorDesc?: string | undefined;
325
+ }
326
+ export interface GetAccountBaseRequest {
327
+ address?: string | undefined;
328
+ }
329
+ export interface GetAccountBaseResponse {
330
+ trace?: string | undefined;
331
+ result?: GetAccountResult | undefined;
332
+ success?: boolean | undefined;
333
+ errorCode?: StatusCodes | undefined;
334
+ errorDesc?: string | undefined;
335
+ }
336
+ /** 获取指定账户metadata数据 */
337
+ export interface GetAccountMetadataRequest {
338
+ address?: string | undefined;
339
+ key?: string | undefined;
340
+ }
341
+ export interface GetAccountMetadataResponse {
342
+ trace?: string | undefined;
343
+ result?: {
344
+ [key: string]: KeyPair;
345
+ } | undefined;
346
+ success?: boolean | undefined;
347
+ errorCode?: StatusCodes | undefined;
348
+ errorDesc?: string | undefined;
349
+ }
350
+ export interface GetAccountMetadataResponse_ResultEntry {
351
+ key: string;
352
+ value?: KeyPair | undefined;
353
+ }
354
+ export interface GetLedgerRequest {
355
+ seq?: number | undefined;
356
+ withValidator?: boolean | undefined;
357
+ withLeader?: boolean | undefined;
358
+ }
359
+ export interface LedgerHeader {
360
+ seq?: number | undefined;
361
+ hash?: string | undefined;
362
+ previousHash?: string | undefined;
363
+ accountTreeHash?: string | undefined;
364
+ closeTime?: number | undefined;
365
+ consensusValueHash?: string | undefined;
366
+ version?: number | undefined;
367
+ txCount?: number | undefined;
368
+ validatorsHash?: string | undefined;
369
+ feesHash?: string | undefined;
370
+ }
371
+ export interface GetLedgerResult {
372
+ leader?: string | undefined;
373
+ validators?: string[] | undefined;
374
+ header?: LedgerHeader | undefined;
375
+ ledgerLength?: number | undefined;
376
+ }
377
+ export interface GetLedgerResponse {
378
+ trace?: string | undefined;
379
+ result?: GetLedgerResult | undefined;
380
+ success?: boolean | undefined;
381
+ errorCode?: StatusCodes | undefined;
382
+ errorDesc?: string | undefined;
383
+ }
384
+ export interface Signature {
385
+ publicKey?: string | undefined;
386
+ signData?: string | undefined;
387
+ }
388
+ export interface TxBlob {
389
+ transactionBlob?: string | undefined;
390
+ signatures?: Signature[] | undefined;
391
+ }
392
+ export interface SubmitTransactionRequest {
393
+ items?: TxBlob[] | undefined;
394
+ }
395
+ export interface SubmitTransactionResult {
396
+ hash?: string | undefined;
397
+ errorCode?: StatusCodes | undefined;
398
+ errorDesc?: string | undefined;
399
+ }
400
+ export interface SubmitTransactionResponse {
401
+ results?: SubmitTransactionResult[] | undefined;
402
+ successCount?: number | undefined;
403
+ }
404
+ export interface GetTransactionHistoryRequest {
405
+ hash?: string | undefined;
406
+ ledgerSeq?: number | undefined;
407
+ start?: number | undefined;
408
+ limit?: number | undefined;
409
+ }
410
+ export interface OperationCreateAccount {
411
+ destAddress?: string | undefined;
412
+ contract?: Contract | undefined;
413
+ priv?: AccountPrivilege | undefined;
414
+ metadatas?: KeyPair[] | undefined;
415
+ initBalance?: number | undefined;
416
+ initInput?: string | undefined;
417
+ }
418
+ export interface OperationPayCoin {
419
+ destAddress?: string | undefined;
420
+ amount?: number | undefined;
421
+ input?: string | undefined;
422
+ }
423
+ export interface OperationSetMetadata {
424
+ key?: string | undefined;
425
+ value?: string | undefined;
426
+ /** optional */
427
+ version?: number | undefined;
428
+ deleteFlag?: boolean | undefined;
429
+ }
430
+ export interface OperationUpgradeContract {
431
+ destAddress?: string | undefined;
432
+ payload?: string | undefined;
433
+ type?: number | undefined;
434
+ }
435
+ export interface OperationSetSignerWeight {
436
+ /** required, [-1,MAX(UINT32)] -1: indicates no setting */
437
+ masterWeight?: number | undefined;
438
+ /** address:weight, if weight is 0, it indicates deleting this signer */
439
+ signers?: Signer[] | undefined;
440
+ }
441
+ export interface OperationSetThreshold {
442
+ txThreshold?: number | undefined;
443
+ /** type:threshold, threshold:0 indicates deleting this type */
444
+ typeThresholds?: OperationTypeThreshold[] | undefined;
445
+ }
446
+ export interface OperationLog {
447
+ topic?: string | undefined;
448
+ datas?: string[] | undefined;
449
+ /** for evm */
450
+ topics?: string[] | undefined;
451
+ }
452
+ export interface OperationSetPrivilege {
453
+ masterWeight?: string | undefined;
454
+ signers?: Signer[] | undefined;
455
+ txThreshold?: string | undefined;
456
+ typeThresholds?: OperationTypeThreshold[] | undefined;
457
+ }
458
+ export interface ControlledArea {
459
+ trusted?: ControlledArea_trustFlag | undefined;
460
+ status?: ControlledArea_statusFalg | undefined;
461
+ attributes?: KeyPair[] | undefined;
462
+ }
463
+ export declare enum ControlledArea_trustFlag {
464
+ UNCERT = 0,
465
+ TRUSTED = 1,
466
+ UNTRUSTED = 2,
467
+ UNRECOGNIZED = -1
468
+ }
469
+ export declare function controlledArea_trustFlagFromJSON(object: any): ControlledArea_trustFlag;
470
+ export declare function controlledArea_trustFlagToJSON(object: ControlledArea_trustFlag): string;
471
+ export declare enum ControlledArea_statusFalg {
472
+ ENABLED = 0,
473
+ DISABLED = 1,
474
+ UNRECOGNIZED = -1
475
+ }
476
+ export declare function controlledArea_statusFalgFromJSON(object: any): ControlledArea_statusFalg;
477
+ export declare function controlledArea_statusFalgToJSON(object: ControlledArea_statusFalg): string;
478
+ export interface OperationSetControlledArea {
479
+ destAddress?: string | undefined;
480
+ sTrusted?: boolean | undefined;
481
+ sStatus?: boolean | undefined;
482
+ trusted?: ControlledArea_trustFlag | undefined;
483
+ status?: ControlledArea_statusFalg | undefined;
484
+ attributes?: KeyPair[] | undefined;
485
+ }
486
+ export interface OperationAuthorizeTransfer {
487
+ destAddress?: string | undefined;
488
+ auth?: boolean | undefined;
489
+ }
490
+ export interface Operation {
491
+ type?: Operation_Type | undefined;
492
+ sourceAddress?: string | undefined;
493
+ metadata?: string | undefined;
494
+ createAccount?: OperationCreateAccount | undefined;
495
+ setMetadata?: OperationSetMetadata | undefined;
496
+ setSignerWeight?: OperationSetSignerWeight | undefined;
497
+ setThreshold?: OperationSetThreshold | undefined;
498
+ payCoin?: OperationPayCoin | undefined;
499
+ log?: OperationLog | undefined;
500
+ setPrivilege?: OperationSetPrivilege | undefined;
501
+ upgradeContract?: OperationUpgradeContract | undefined;
502
+ setControlledArea?: OperationSetControlledArea | undefined;
503
+ authorizeTransfer?: OperationAuthorizeTransfer | undefined;
504
+ }
505
+ export declare enum Operation_Type {
506
+ UNKNOWN = 0,
507
+ CREATE_ACCOUNT = 1,
508
+ SET_METADATA = 4,
509
+ SET_SIGNER_WEIGHT = 5,
510
+ SET_THRESHOLD = 6,
511
+ PAY_COIN = 7,
512
+ LOG = 8,
513
+ SET_PRIVILEGE = 9,
514
+ UPGRADE_CONTRACT = 10,
515
+ SET_CONTROLLED_AREA = 11,
516
+ AUTHORIZE_TRANSFER = 12,
517
+ UNRECOGNIZED = -1
518
+ }
519
+ export declare function operation_TypeFromJSON(object: any): Operation_Type;
520
+ export declare function operation_TypeToJSON(object: Operation_Type): string;
521
+ export interface Transaction {
522
+ sourceAddress?: string | undefined;
523
+ feeLimit?: number | undefined;
524
+ gasPrice?: number | undefined;
525
+ nonce?: string | undefined;
526
+ metadata?: string | undefined;
527
+ nonceType?: Transaction_TxType | undefined;
528
+ maxLedgerSeq?: number | undefined;
529
+ operations?: Operation[] | undefined;
530
+ }
531
+ export declare enum Transaction_TxType {
532
+ INCREASE_NONCE = 0,
533
+ RANDOM_NONCE = 1,
534
+ UNRECOGNIZED = -1
535
+ }
536
+ export declare function transaction_TxTypeFromJSON(object: any): Transaction_TxType;
537
+ export declare function transaction_TxTypeToJSON(object: Transaction_TxType): string;
538
+ export interface TransactionEnv {
539
+ hash?: string | undefined;
540
+ actualFee?: number | undefined;
541
+ closeTime?: number | undefined;
542
+ contractTxHashes?: string[] | undefined;
543
+ errorCode?: StatusCodes | undefined;
544
+ errorDesc?: string | undefined;
545
+ ledgerSeq?: number | undefined;
546
+ signatures?: Signature[] | undefined;
547
+ transaction?: Transaction | undefined;
548
+ txSize?: number | undefined;
549
+ blob?: string | undefined;
550
+ }
551
+ export interface GetTransactionHistoryResult {
552
+ totalCount?: number | undefined;
553
+ transactions?: TransactionEnv[] | undefined;
554
+ }
555
+ export interface GetTransactionHistoryResponse {
556
+ trace?: string | undefined;
557
+ result?: GetTransactionHistoryResult | undefined;
558
+ success?: boolean | undefined;
559
+ errorCode?: StatusCodes | undefined;
560
+ errorDesc?: string | undefined;
561
+ }
562
+ export interface TestTransaction {
563
+ transactionJson?: Transaction | undefined;
564
+ signatureNumber?: number | undefined;
565
+ }
566
+ export interface TestTransactionRequest {
567
+ items?: TestTransaction[] | undefined;
568
+ }
569
+ export interface TestTransactionResult {
570
+ stat?: TestTransactionResult_Stat | undefined;
571
+ hash?: string | undefined;
572
+ txs?: TestTransactionResult_TestTx[] | undefined;
573
+ }
574
+ export interface TestTransactionResult_Stat {
575
+ applyTime?: number | undefined;
576
+ memoryUsage?: number | undefined;
577
+ stackUsage?: number | undefined;
578
+ step?: number | undefined;
579
+ }
580
+ export interface TestTransactionResult_TransactionEnv {
581
+ transaction?: Transaction | undefined;
582
+ }
583
+ export interface TestTransactionResult_TestTx {
584
+ gas?: number | undefined;
585
+ transactionEnv?: TestTransactionResult_TransactionEnv | undefined;
586
+ actualFee?: number | undefined;
587
+ }
588
+ export interface TestTransactionResponse {
589
+ trace?: string | undefined;
590
+ result?: TestTransactionResult | undefined;
591
+ success?: boolean | undefined;
592
+ errorCode?: StatusCodes | undefined;
593
+ errorDesc?: string | undefined;
594
+ }
595
+ export interface CallContractRequest {
596
+ contractAddress?: string | undefined;
597
+ input?: string | undefined;
598
+ feeLimit?: number | undefined;
599
+ gasPrice?: number | undefined;
600
+ sourceAddress?: string | undefined;
601
+ optType?: number | undefined;
602
+ }
603
+ export interface CallContractResultSystem {
604
+ queryRets?: QueryReturnSystem[] | undefined;
605
+ }
606
+ export interface QueryReturnSystem {
607
+ error?: Error | undefined;
608
+ result?: SystemContractResult | undefined;
609
+ }
610
+ export interface SystemContractResult {
611
+ data?: string | undefined;
612
+ }
613
+ export interface CallContractResultJs {
614
+ queryRets?: QueryReturnJs[] | undefined;
615
+ }
616
+ /** 查询返回消息 */
617
+ export interface QueryReturnJs {
618
+ error?: Error | undefined;
619
+ result?: JsContractResult | undefined;
620
+ }
621
+ export interface JsContractResult {
622
+ /** "string" 或 "bool" */
623
+ type?: string | undefined;
624
+ value?: string | undefined;
625
+ }
626
+ export interface CallContractResultEvm {
627
+ queryRets?: QueryReturnEvm[] | undefined;
628
+ }
629
+ export interface QueryReturnEvm {
630
+ error?: Error | undefined;
631
+ result?: EvmContractResult | undefined;
632
+ }
633
+ export interface EvmContractResult {
634
+ code?: number | undefined;
635
+ data?: string | undefined;
636
+ desc?: string | undefined;
637
+ eumcode?: string | undefined;
638
+ gasused?: number | undefined;
639
+ }
640
+ /** 错误消息 */
641
+ export interface Error {
642
+ data?: string | undefined;
643
+ }
644
+ export interface QueryReturn {
645
+ error?: string | undefined;
646
+ result?: string | undefined;
647
+ }
648
+ export interface CallContractResult {
649
+ queryRets?: QueryReturn[] | undefined;
650
+ }
651
+ export interface CallContractResponse {
652
+ trace?: string | undefined;
653
+ result?: CallContractResult | undefined;
654
+ success?: boolean | undefined;
655
+ errorCode?: StatusCodes | undefined;
656
+ errorDesc?: string | undefined;
657
+ }
658
+ export interface QueryRequest {
659
+ bid?: string | undefined;
660
+ hash?: string | undefined;
661
+ /** 增强交易字段,暂时保留 */
662
+ txId?: string | undefined;
663
+ startTime?: string | undefined;
664
+ endTime?: string | undefined;
665
+ txType?: QueryRequest_TxType | undefined;
666
+ page?: number | undefined;
667
+ pageSize?: number | undefined;
668
+ ledgerSeq?: number | undefined;
669
+ }
670
+ export declare enum QueryRequest_TxType {
671
+ BASE_TX = 0,
672
+ ENHANCED_TX = 1,
673
+ UNRECOGNIZED = -1
674
+ }
675
+ export declare function queryRequest_TxTypeFromJSON(object: any): QueryRequest_TxType;
676
+ export declare function queryRequest_TxTypeToJSON(object: QueryRequest_TxType): string;
677
+ export interface TransactionBase {
678
+ id?: string | undefined;
679
+ txId?: string | undefined;
680
+ hash?: string | undefined;
681
+ apiKey?: string | undefined;
682
+ txType?: TransactionBase_TxType | undefined;
683
+ createTime?: string | undefined;
684
+ ledgerSeq?: number | undefined;
685
+ sourceAddress?: string | undefined;
686
+ actualFee?: number | undefined;
687
+ status?: StatusCodes | undefined;
688
+ statusDesc?: string | undefined;
689
+ baseTransaction?: TransactionEnv | undefined;
690
+ }
691
+ export declare enum TransactionBase_NetworkType {
692
+ /** UNKNOWN - 保留0作为未知或默认值 */
693
+ UNKNOWN = 0,
694
+ /** DOMESTIC_SPARK_EXPERIENCE - 国内星火体验网 */
695
+ DOMESTIC_SPARK_EXPERIENCE = 1,
696
+ /** DOMESTIC_SPARK_MAINNET - 国内星火主网 */
697
+ DOMESTIC_SPARK_MAINNET = 2,
698
+ /** INTERNATIONAL_SPARK_EXPERIENCE - 国际星火体验网 */
699
+ INTERNATIONAL_SPARK_EXPERIENCE = 3,
700
+ /** INTERNATIONAL_SPARK_MAINNET - 国际星火主网 */
701
+ INTERNATIONAL_SPARK_MAINNET = 4,
702
+ UNRECOGNIZED = -1
703
+ }
704
+ export declare function transactionBase_NetworkTypeFromJSON(object: any): TransactionBase_NetworkType;
705
+ export declare function transactionBase_NetworkTypeToJSON(object: TransactionBase_NetworkType): string;
706
+ export declare enum TransactionBase_TxType {
707
+ BASE_TX = 0,
708
+ ENHANCED_TX = 1,
709
+ UNRECOGNIZED = -1
710
+ }
711
+ export declare function transactionBase_TxTypeFromJSON(object: any): TransactionBase_TxType;
712
+ export declare function transactionBase_TxTypeToJSON(object: TransactionBase_TxType): string;
713
+ export interface QueryResult {
714
+ count?: number | undefined;
715
+ totalPage?: number | undefined;
716
+ transactionBases?: TransactionBase[] | undefined;
717
+ }
718
+ export interface QueryResponse {
719
+ trace?: string | undefined;
720
+ result?: QueryResult | undefined;
721
+ success?: boolean | undefined;
722
+ errorCode?: StatusCodes | undefined;
723
+ errorDesc?: string | undefined;
724
+ }
725
+ export interface GetTransactionCacheRequest {
726
+ limit?: number | undefined;
727
+ hash?: string | undefined;
728
+ address?: string | undefined;
729
+ }
730
+ export declare enum GetTransactionCacheRequest_PoolType {
731
+ PLATFORM = 0,
732
+ CHAIN = 1,
733
+ UNRECOGNIZED = -1
734
+ }
735
+ export declare function getTransactionCacheRequest_PoolTypeFromJSON(object: any): GetTransactionCacheRequest_PoolType;
736
+ export declare function getTransactionCacheRequest_PoolTypeToJSON(object: GetTransactionCacheRequest_PoolType): string;
737
+ export interface PlatformTransaction {
738
+ transactions?: TransactionBase | undefined;
739
+ }
740
+ export interface ChainTransaction {
741
+ status?: string | undefined;
742
+ incomingTime?: string | undefined;
743
+ hash?: string | undefined;
744
+ signatures?: Signature[] | undefined;
745
+ transaction?: Transaction | undefined;
746
+ }
747
+ export interface GetTransactionCacheChainResult {
748
+ totalCount?: number | undefined;
749
+ transactions?: ChainTransaction[] | undefined;
750
+ }
751
+ export interface GetTransactionCachePlatResult {
752
+ totalCount?: number | undefined;
753
+ transactions?: TransactionEnv[] | undefined;
754
+ }
755
+ export interface GetTransactionCacheChainResponse {
756
+ trace?: string | undefined;
757
+ result?: GetTransactionCacheChainResult | undefined;
758
+ success?: boolean | undefined;
759
+ errorCode?: StatusCodes | undefined;
760
+ errorDesc?: string | undefined;
761
+ }
762
+ export interface GetTransactionCachePlatResponse {
763
+ trace?: string | undefined;
764
+ result?: GetTransactionCachePlatResult | undefined;
765
+ success?: boolean | undefined;
766
+ errorCode?: StatusCodes | undefined;
767
+ errorDesc?: string | undefined;
768
+ }
769
+ export interface DiscardRequest {
770
+ hash?: string | undefined;
771
+ page?: number | undefined;
772
+ pageSize?: number | undefined;
773
+ }
774
+ export interface DiscardResult {
775
+ count?: number | undefined;
776
+ totalPage?: number | undefined;
777
+ transactionBases?: TransactionBase[] | undefined;
778
+ }
779
+ export interface DiscardResponse {
780
+ trace?: string | undefined;
781
+ result?: DiscardResult | undefined;
782
+ success?: boolean | undefined;
783
+ errorCode?: StatusCodes | undefined;
784
+ errorDesc?: string | undefined;
785
+ }
786
+ export interface GetTxCacheSizeResult {
787
+ queueSize?: number | undefined;
788
+ }
789
+ export interface GetTxCacheSizeResponse {
790
+ trace?: string | undefined;
791
+ result?: GetTxCacheSizeResult | undefined;
792
+ success?: boolean | undefined;
793
+ errorCode?: StatusCodes | undefined;
794
+ errorDesc?: string | undefined;
795
+ }
796
+ export declare const BidStatus: MessageFns<BidStatus>;
797
+ export declare const ApplyRequest: MessageFns<ApplyRequest>;
798
+ export declare const ApplyResult: MessageFns<ApplyResult>;
799
+ export declare const ApplyResponse: MessageFns<ApplyResponse>;
800
+ export declare const ApplyStatusRequest: MessageFns<ApplyStatusRequest>;
801
+ export declare const ApplyStatusResult: MessageFns<ApplyStatusResult>;
802
+ export declare const ApplyStatusResponse: MessageFns<ApplyStatusResponse>;
803
+ export declare const DetailRequest: MessageFns<DetailRequest>;
804
+ export declare const DetailResult: MessageFns<DetailResult>;
805
+ export declare const DetailResponse: MessageFns<DetailResponse>;
806
+ export declare const HelloResult: MessageFns<HelloResult>;
807
+ export declare const HelloResponse: MessageFns<HelloResponse>;
808
+ export declare const GetAccountRequest: MessageFns<GetAccountRequest>;
809
+ export declare const Contract: MessageFns<Contract>;
810
+ export declare const Signer: MessageFns<Signer>;
811
+ export declare const AccountPrivilege: MessageFns<AccountPrivilege>;
812
+ export declare const OperationTypeThreshold: MessageFns<OperationTypeThreshold>;
813
+ export declare const AccountThreshold: MessageFns<AccountThreshold>;
814
+ export declare const KeyPair: MessageFns<KeyPair>;
815
+ export declare const GetAccountResult: MessageFns<GetAccountResult>;
816
+ export declare const GetAccountResponse: MessageFns<GetAccountResponse>;
817
+ export declare const GetAccountBaseRequest: MessageFns<GetAccountBaseRequest>;
818
+ export declare const GetAccountBaseResponse: MessageFns<GetAccountBaseResponse>;
819
+ export declare const GetAccountMetadataRequest: MessageFns<GetAccountMetadataRequest>;
820
+ export declare const GetAccountMetadataResponse: MessageFns<GetAccountMetadataResponse>;
821
+ export declare const GetAccountMetadataResponse_ResultEntry: MessageFns<GetAccountMetadataResponse_ResultEntry>;
822
+ export declare const GetLedgerRequest: MessageFns<GetLedgerRequest>;
823
+ export declare const LedgerHeader: MessageFns<LedgerHeader>;
824
+ export declare const GetLedgerResult: MessageFns<GetLedgerResult>;
825
+ export declare const GetLedgerResponse: MessageFns<GetLedgerResponse>;
826
+ export declare const Signature: MessageFns<Signature>;
827
+ export declare const TxBlob: MessageFns<TxBlob>;
828
+ export declare const SubmitTransactionRequest: MessageFns<SubmitTransactionRequest>;
829
+ export declare const SubmitTransactionResult: MessageFns<SubmitTransactionResult>;
830
+ export declare const SubmitTransactionResponse: MessageFns<SubmitTransactionResponse>;
831
+ export declare const GetTransactionHistoryRequest: MessageFns<GetTransactionHistoryRequest>;
832
+ export declare const OperationCreateAccount: MessageFns<OperationCreateAccount>;
833
+ export declare const OperationPayCoin: MessageFns<OperationPayCoin>;
834
+ export declare const OperationSetMetadata: MessageFns<OperationSetMetadata>;
835
+ export declare const OperationUpgradeContract: MessageFns<OperationUpgradeContract>;
836
+ export declare const OperationSetSignerWeight: MessageFns<OperationSetSignerWeight>;
837
+ export declare const OperationSetThreshold: MessageFns<OperationSetThreshold>;
838
+ export declare const OperationLog: MessageFns<OperationLog>;
839
+ export declare const OperationSetPrivilege: MessageFns<OperationSetPrivilege>;
840
+ export declare const ControlledArea: MessageFns<ControlledArea>;
841
+ export declare const OperationSetControlledArea: MessageFns<OperationSetControlledArea>;
842
+ export declare const OperationAuthorizeTransfer: MessageFns<OperationAuthorizeTransfer>;
843
+ export declare const Operation: MessageFns<Operation>;
844
+ export declare const Transaction: MessageFns<Transaction>;
845
+ export declare const TransactionEnv: MessageFns<TransactionEnv>;
846
+ export declare const GetTransactionHistoryResult: MessageFns<GetTransactionHistoryResult>;
847
+ export declare const GetTransactionHistoryResponse: MessageFns<GetTransactionHistoryResponse>;
848
+ export declare const TestTransaction: MessageFns<TestTransaction>;
849
+ export declare const TestTransactionRequest: MessageFns<TestTransactionRequest>;
850
+ export declare const TestTransactionResult: MessageFns<TestTransactionResult>;
851
+ export declare const TestTransactionResult_Stat: MessageFns<TestTransactionResult_Stat>;
852
+ export declare const TestTransactionResult_TransactionEnv: MessageFns<TestTransactionResult_TransactionEnv>;
853
+ export declare const TestTransactionResult_TestTx: MessageFns<TestTransactionResult_TestTx>;
854
+ export declare const TestTransactionResponse: MessageFns<TestTransactionResponse>;
855
+ export declare const CallContractRequest: MessageFns<CallContractRequest>;
856
+ export declare const CallContractResultSystem: MessageFns<CallContractResultSystem>;
857
+ export declare const QueryReturnSystem: MessageFns<QueryReturnSystem>;
858
+ export declare const SystemContractResult: MessageFns<SystemContractResult>;
859
+ export declare const CallContractResultJs: MessageFns<CallContractResultJs>;
860
+ export declare const QueryReturnJs: MessageFns<QueryReturnJs>;
861
+ export declare const JsContractResult: MessageFns<JsContractResult>;
862
+ export declare const CallContractResultEvm: MessageFns<CallContractResultEvm>;
863
+ export declare const QueryReturnEvm: MessageFns<QueryReturnEvm>;
864
+ export declare const EvmContractResult: MessageFns<EvmContractResult>;
865
+ export declare const Error: MessageFns<Error>;
866
+ export declare const QueryReturn: MessageFns<QueryReturn>;
867
+ export declare const CallContractResult: MessageFns<CallContractResult>;
868
+ export declare const CallContractResponse: MessageFns<CallContractResponse>;
869
+ export declare const QueryRequest: MessageFns<QueryRequest>;
870
+ export declare const TransactionBase: MessageFns<TransactionBase>;
871
+ export declare const QueryResult: MessageFns<QueryResult>;
872
+ export declare const QueryResponse: MessageFns<QueryResponse>;
873
+ export declare const GetTransactionCacheRequest: MessageFns<GetTransactionCacheRequest>;
874
+ export declare const PlatformTransaction: MessageFns<PlatformTransaction>;
875
+ export declare const ChainTransaction: MessageFns<ChainTransaction>;
876
+ export declare const GetTransactionCacheChainResult: MessageFns<GetTransactionCacheChainResult>;
877
+ export declare const GetTransactionCachePlatResult: MessageFns<GetTransactionCachePlatResult>;
878
+ export declare const GetTransactionCacheChainResponse: MessageFns<GetTransactionCacheChainResponse>;
879
+ export declare const GetTransactionCachePlatResponse: MessageFns<GetTransactionCachePlatResponse>;
880
+ export declare const DiscardRequest: MessageFns<DiscardRequest>;
881
+ export declare const DiscardResult: MessageFns<DiscardResult>;
882
+ export declare const DiscardResponse: MessageFns<DiscardResponse>;
883
+ export declare const GetTxCacheSizeResult: MessageFns<GetTxCacheSizeResult>;
884
+ export declare const GetTxCacheSizeResponse: MessageFns<GetTxCacheSizeResponse>;
885
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
886
+ export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
887
+ [K in keyof T]?: DeepPartial<T[K]>;
888
+ } : Partial<T>;
889
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
890
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
891
+ [K in keyof P]: Exact<P[K], I[K]>;
892
+ } & {
893
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
894
+ };
895
+ export interface MessageFns<T> {
896
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
897
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
898
+ fromJSON(object: any): T;
899
+ toJSON(message: T): unknown;
900
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
901
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
902
+ }
903
+ export {};