@ottochain/sdk 0.2.0

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 (330) hide show
  1. package/README.md +305 -0
  2. package/dist/apps/contracts/index.d.ts +21 -0
  3. package/dist/apps/contracts/index.js +39 -0
  4. package/dist/apps/contracts/types.d.ts +24 -0
  5. package/dist/apps/contracts/types.js +48 -0
  6. package/dist/apps/identity/index.d.ts +22 -0
  7. package/dist/apps/identity/index.js +40 -0
  8. package/dist/apps/identity/types.d.ts +30 -0
  9. package/dist/apps/identity/types.js +53 -0
  10. package/dist/apps/index.d.ts +29 -0
  11. package/dist/apps/index.js +60 -0
  12. package/dist/apps/markets/index.d.ts +26 -0
  13. package/dist/apps/markets/index.js +46 -0
  14. package/dist/apps/markets/types.d.ts +185 -0
  15. package/dist/apps/markets/types.js +252 -0
  16. package/dist/apps/oracles/index.d.ts +26 -0
  17. package/dist/apps/oracles/index.js +46 -0
  18. package/dist/apps/oracles/types.d.ts +211 -0
  19. package/dist/apps/oracles/types.js +306 -0
  20. package/dist/cjs/apps/contracts/index.js +60 -0
  21. package/dist/cjs/apps/contracts/state-machines/contract.json +420 -0
  22. package/dist/cjs/apps/contracts/state-machines/escrow.json +426 -0
  23. package/dist/cjs/apps/contracts/types.js +48 -0
  24. package/dist/cjs/apps/corporate/index.js +112 -0
  25. package/dist/cjs/apps/corporate/state-machines/corporate-board.json +1064 -0
  26. package/dist/cjs/apps/corporate/state-machines/corporate-bylaws.json +751 -0
  27. package/dist/cjs/apps/corporate/state-machines/corporate-committee.json +957 -0
  28. package/dist/cjs/apps/corporate/state-machines/corporate-compliance.json +1293 -0
  29. package/dist/cjs/apps/corporate/state-machines/corporate-entity.json +861 -0
  30. package/dist/cjs/apps/corporate/state-machines/corporate-officers.json +843 -0
  31. package/dist/cjs/apps/corporate/state-machines/corporate-proxy.json +783 -0
  32. package/dist/cjs/apps/corporate/state-machines/corporate-resolution.json +1174 -0
  33. package/dist/cjs/apps/corporate/state-machines/corporate-securities.json +1215 -0
  34. package/dist/cjs/apps/corporate/state-machines/corporate-shareholders.json +1298 -0
  35. package/dist/cjs/apps/corporate/types.js +44 -0
  36. package/dist/cjs/apps/governance/index.js +203 -0
  37. package/dist/cjs/apps/governance/state-machines/dao-multisig.json +711 -0
  38. package/dist/cjs/apps/governance/state-machines/dao-single.json +258 -0
  39. package/dist/cjs/apps/governance/state-machines/dao-threshold.json +660 -0
  40. package/dist/cjs/apps/governance/state-machines/dao-token.json +680 -0
  41. package/dist/cjs/apps/governance/state-machines/governance-constitution.json +401 -0
  42. package/dist/cjs/apps/governance/state-machines/governance-executive.json +441 -0
  43. package/dist/cjs/apps/governance/state-machines/governance-judiciary.json +626 -0
  44. package/dist/cjs/apps/governance/state-machines/governance-legislature.json +726 -0
  45. package/dist/cjs/apps/governance/state-machines/governance-simple.json +679 -0
  46. package/dist/cjs/apps/governance/types.js +42 -0
  47. package/dist/cjs/apps/identity/constants.js +58 -0
  48. package/dist/cjs/apps/identity/index.js +78 -0
  49. package/dist/cjs/apps/identity/state-machines/agent-identity.json +320 -0
  50. package/dist/cjs/apps/identity/types.js +53 -0
  51. package/dist/cjs/apps/index.js +58 -0
  52. package/dist/cjs/apps/markets/index.js +55 -0
  53. package/dist/cjs/apps/markets/state-machines/market-universal.json +354 -0
  54. package/dist/cjs/apps/markets/types.js +219 -0
  55. package/dist/cjs/apps/oracles/index.js +62 -0
  56. package/dist/cjs/apps/oracles/state-machines/oracle.json +452 -0
  57. package/dist/cjs/apps/oracles/types.js +282 -0
  58. package/dist/cjs/errors.js +293 -0
  59. package/dist/cjs/generated/google/protobuf/struct.js +514 -0
  60. package/dist/cjs/generated/google/protobuf/timestamp.js +92 -0
  61. package/dist/cjs/generated/index.js +150 -0
  62. package/dist/cjs/generated/ottochain/apps/contracts/v1/contract.js +873 -0
  63. package/dist/cjs/generated/ottochain/apps/contracts/v1/contract_pb.js +100 -0
  64. package/dist/cjs/generated/ottochain/apps/corporate/v1/corporate.js +4515 -0
  65. package/dist/cjs/generated/ottochain/apps/corporate/v1/corporate_pb.js +392 -0
  66. package/dist/cjs/generated/ottochain/apps/governance/v1/governance.js +3255 -0
  67. package/dist/cjs/generated/ottochain/apps/governance/v1/governance_pb.js +235 -0
  68. package/dist/cjs/generated/ottochain/apps/identity/v1/agent.js +619 -0
  69. package/dist/cjs/generated/ottochain/apps/identity/v1/agent_pb.js +116 -0
  70. package/dist/cjs/generated/ottochain/apps/identity/v1/attestation.js +780 -0
  71. package/dist/cjs/generated/ottochain/apps/identity/v1/attestation_pb.js +79 -0
  72. package/dist/cjs/generated/ottochain/apps/markets/v1/market.js +1261 -0
  73. package/dist/cjs/generated/ottochain/apps/markets/v1/market_pb.js +151 -0
  74. package/dist/cjs/generated/ottochain/apps/oracles/v1/oracle.js +1223 -0
  75. package/dist/cjs/generated/ottochain/apps/oracles/v1/oracle_pb.js +109 -0
  76. package/dist/cjs/generated/ottochain/v1/common.js +10 -0
  77. package/dist/cjs/generated/ottochain/v1/common_pb.js +37 -0
  78. package/dist/cjs/generated/ottochain/v1/fiber.js +1057 -0
  79. package/dist/cjs/generated/ottochain/v1/fiber_pb.js +86 -0
  80. package/dist/cjs/generated/ottochain/v1/messages.js +740 -0
  81. package/dist/cjs/generated/ottochain/v1/messages_pb.js +44 -0
  82. package/dist/cjs/generated/ottochain/v1/records.js +1253 -0
  83. package/dist/cjs/generated/ottochain/v1/records_pb.js +44 -0
  84. package/dist/cjs/index.js +79 -0
  85. package/dist/cjs/metakit/binary.js +58 -0
  86. package/dist/cjs/metakit/canonicalize.js +40 -0
  87. package/dist/cjs/metakit/codec.js +45 -0
  88. package/dist/cjs/metakit/currency-transaction.js +319 -0
  89. package/dist/cjs/metakit/currency-types.js +13 -0
  90. package/dist/cjs/metakit/hash.js +84 -0
  91. package/dist/cjs/metakit/index.js +74 -0
  92. package/dist/cjs/metakit/network/client.js +78 -0
  93. package/dist/cjs/metakit/network/currency-l1-client.js +101 -0
  94. package/dist/cjs/metakit/network/data-l1-client.js +76 -0
  95. package/dist/cjs/metakit/network/index.js +16 -0
  96. package/dist/cjs/metakit/network/types.js +20 -0
  97. package/dist/cjs/metakit/sign.js +120 -0
  98. package/dist/cjs/metakit/signed-object.js +100 -0
  99. package/dist/cjs/metakit/types.js +14 -0
  100. package/dist/cjs/metakit/verify.js +217 -0
  101. package/dist/cjs/metakit/wallet.js +127 -0
  102. package/dist/cjs/ottochain/index.js +47 -0
  103. package/dist/cjs/ottochain/metagraph-client.js +157 -0
  104. package/dist/cjs/ottochain/snapshot.js +110 -0
  105. package/dist/cjs/ottochain/types.js +11 -0
  106. package/dist/cjs/package.json +1 -0
  107. package/dist/cjs/types.js +25 -0
  108. package/dist/cjs/validation.js +312 -0
  109. package/dist/errors.d.ts +221 -0
  110. package/dist/errors.js +293 -0
  111. package/dist/esm/apps/contracts/index.js +42 -0
  112. package/dist/esm/apps/contracts/state-machines/contract.json +420 -0
  113. package/dist/esm/apps/contracts/state-machines/escrow.json +426 -0
  114. package/dist/esm/apps/contracts/types.js +44 -0
  115. package/dist/esm/apps/corporate/index.js +57 -0
  116. package/dist/esm/apps/corporate/state-machines/corporate-board.json +1064 -0
  117. package/dist/esm/apps/corporate/state-machines/corporate-bylaws.json +751 -0
  118. package/dist/esm/apps/corporate/state-machines/corporate-committee.json +957 -0
  119. package/dist/esm/apps/corporate/state-machines/corporate-compliance.json +1293 -0
  120. package/dist/esm/apps/corporate/state-machines/corporate-entity.json +861 -0
  121. package/dist/esm/apps/corporate/state-machines/corporate-officers.json +843 -0
  122. package/dist/esm/apps/corporate/state-machines/corporate-proxy.json +783 -0
  123. package/dist/esm/apps/corporate/state-machines/corporate-resolution.json +1174 -0
  124. package/dist/esm/apps/corporate/state-machines/corporate-securities.json +1215 -0
  125. package/dist/esm/apps/corporate/state-machines/corporate-shareholders.json +1298 -0
  126. package/dist/esm/apps/corporate/types.js +38 -0
  127. package/dist/esm/apps/governance/index.js +154 -0
  128. package/dist/esm/apps/governance/state-machines/dao-multisig.json +711 -0
  129. package/dist/esm/apps/governance/state-machines/dao-single.json +258 -0
  130. package/dist/esm/apps/governance/state-machines/dao-threshold.json +660 -0
  131. package/dist/esm/apps/governance/state-machines/dao-token.json +680 -0
  132. package/dist/esm/apps/governance/state-machines/governance-constitution.json +401 -0
  133. package/dist/esm/apps/governance/state-machines/governance-executive.json +441 -0
  134. package/dist/esm/apps/governance/state-machines/governance-judiciary.json +626 -0
  135. package/dist/esm/apps/governance/state-machines/governance-legislature.json +726 -0
  136. package/dist/esm/apps/governance/state-machines/governance-simple.json +679 -0
  137. package/dist/esm/apps/governance/types.js +35 -0
  138. package/dist/esm/apps/identity/constants.js +53 -0
  139. package/dist/esm/apps/identity/index.js +50 -0
  140. package/dist/esm/apps/identity/state-machines/agent-identity.json +320 -0
  141. package/dist/esm/apps/identity/types.js +50 -0
  142. package/dist/esm/apps/index.js +32 -0
  143. package/dist/esm/apps/markets/index.js +34 -0
  144. package/dist/esm/apps/markets/state-machines/market-universal.json +354 -0
  145. package/dist/esm/apps/markets/types.js +206 -0
  146. package/dist/esm/apps/oracles/index.js +42 -0
  147. package/dist/esm/apps/oracles/state-machines/oracle.json +452 -0
  148. package/dist/esm/apps/oracles/types.js +267 -0
  149. package/dist/esm/errors.js +283 -0
  150. package/dist/esm/generated/google/protobuf/struct.js +508 -0
  151. package/dist/esm/generated/google/protobuf/timestamp.js +89 -0
  152. package/dist/esm/generated/index.js +26 -0
  153. package/dist/esm/generated/ottochain/apps/contracts/v1/contract.js +867 -0
  154. package/dist/esm/generated/ottochain/apps/contracts/v1/contract_pb.js +97 -0
  155. package/dist/esm/generated/ottochain/apps/corporate/v1/corporate.js +4493 -0
  156. package/dist/esm/generated/ottochain/apps/corporate/v1/corporate_pb.js +389 -0
  157. package/dist/esm/generated/ottochain/apps/governance/v1/governance.js +3240 -0
  158. package/dist/esm/generated/ottochain/apps/governance/v1/governance_pb.js +232 -0
  159. package/dist/esm/generated/ottochain/apps/identity/v1/agent.js +610 -0
  160. package/dist/esm/generated/ottochain/apps/identity/v1/agent_pb.js +113 -0
  161. package/dist/esm/generated/ottochain/apps/identity/v1/attestation.js +774 -0
  162. package/dist/esm/generated/ottochain/apps/identity/v1/attestation_pb.js +76 -0
  163. package/dist/esm/generated/ottochain/apps/markets/v1/market.js +1252 -0
  164. package/dist/esm/generated/ottochain/apps/markets/v1/market_pb.js +148 -0
  165. package/dist/esm/generated/ottochain/apps/oracles/v1/oracle.js +1217 -0
  166. package/dist/esm/generated/ottochain/apps/oracles/v1/oracle_pb.js +106 -0
  167. package/dist/esm/generated/ottochain/v1/common.js +7 -0
  168. package/dist/esm/generated/ottochain/v1/common_pb.js +34 -0
  169. package/dist/esm/generated/ottochain/v1/fiber.js +1051 -0
  170. package/dist/esm/generated/ottochain/v1/fiber_pb.js +83 -0
  171. package/dist/esm/generated/ottochain/v1/messages.js +737 -0
  172. package/dist/esm/generated/ottochain/v1/messages_pb.js +41 -0
  173. package/dist/esm/generated/ottochain/v1/records.js +1250 -0
  174. package/dist/esm/generated/ottochain/v1/records_pb.js +41 -0
  175. package/dist/esm/index.js +33 -0
  176. package/dist/esm/metakit/binary.js +53 -0
  177. package/dist/esm/metakit/canonicalize.js +33 -0
  178. package/dist/esm/metakit/codec.js +38 -0
  179. package/dist/esm/metakit/currency-transaction.js +306 -0
  180. package/dist/esm/metakit/currency-types.js +10 -0
  181. package/dist/esm/metakit/hash.js +77 -0
  182. package/dist/esm/metakit/index.js +30 -0
  183. package/dist/esm/metakit/network/client.js +74 -0
  184. package/dist/esm/metakit/network/currency-l1-client.js +97 -0
  185. package/dist/esm/metakit/network/data-l1-client.js +72 -0
  186. package/dist/esm/metakit/network/index.js +9 -0
  187. package/dist/esm/metakit/network/types.js +16 -0
  188. package/dist/esm/metakit/sign.js +114 -0
  189. package/dist/esm/metakit/signed-object.js +94 -0
  190. package/dist/esm/metakit/types.js +11 -0
  191. package/dist/esm/metakit/verify.js +210 -0
  192. package/dist/esm/metakit/wallet.js +117 -0
  193. package/dist/esm/ottochain/index.js +13 -0
  194. package/dist/esm/ottochain/metagraph-client.js +153 -0
  195. package/dist/esm/ottochain/snapshot.js +100 -0
  196. package/dist/esm/ottochain/types.js +10 -0
  197. package/dist/esm/package.json +1 -0
  198. package/dist/esm/types.js +20 -0
  199. package/dist/esm/validation.js +301 -0
  200. package/dist/generated/index.d.ts +15 -0
  201. package/dist/generated/index.js +34 -0
  202. package/dist/generated/ottochain/apps/contracts/v1/contract_pb.d.ts +274 -0
  203. package/dist/generated/ottochain/apps/contracts/v1/contract_pb.js +100 -0
  204. package/dist/generated/ottochain/apps/identity/v1/agent_pb.d.ts +211 -0
  205. package/dist/generated/ottochain/apps/identity/v1/agent_pb.js +116 -0
  206. package/dist/generated/ottochain/apps/identity/v1/attestation_pb.d.ts +238 -0
  207. package/dist/generated/ottochain/apps/identity/v1/attestation_pb.js +79 -0
  208. package/dist/generated/ottochain/apps/markets/v1/market_pb.d.ts +436 -0
  209. package/dist/generated/ottochain/apps/markets/v1/market_pb.js +151 -0
  210. package/dist/generated/ottochain/apps/oracles/v1/oracle_pb.d.ts +393 -0
  211. package/dist/generated/ottochain/apps/oracles/v1/oracle_pb.js +109 -0
  212. package/dist/generated/ottochain/v1/common_pb.d.ts +86 -0
  213. package/dist/generated/ottochain/v1/common_pb.js +37 -0
  214. package/dist/generated/ottochain/v1/fiber_pb.d.ts +292 -0
  215. package/dist/generated/ottochain/v1/fiber_pb.js +86 -0
  216. package/dist/generated/ottochain/v1/messages_pb.d.ts +190 -0
  217. package/dist/generated/ottochain/v1/messages_pb.js +44 -0
  218. package/dist/generated/ottochain/v1/records_pb.d.ts +221 -0
  219. package/dist/generated/ottochain/v1/records_pb.js +44 -0
  220. package/dist/index.d.ts +21 -0
  221. package/dist/index.js +77 -0
  222. package/dist/metakit/binary.d.ts +38 -0
  223. package/dist/metakit/binary.js +58 -0
  224. package/dist/metakit/canonicalize.d.ts +26 -0
  225. package/dist/metakit/canonicalize.js +40 -0
  226. package/dist/metakit/codec.d.ts +16 -0
  227. package/dist/metakit/codec.js +45 -0
  228. package/dist/metakit/currency-transaction.d.ts +157 -0
  229. package/dist/metakit/currency-transaction.js +319 -0
  230. package/dist/metakit/currency-types.d.ts +55 -0
  231. package/dist/metakit/currency-types.js +13 -0
  232. package/dist/metakit/hash.d.ts +50 -0
  233. package/dist/metakit/hash.js +84 -0
  234. package/dist/metakit/index.d.ts +23 -0
  235. package/dist/metakit/index.js +74 -0
  236. package/dist/metakit/network/client.d.ts +23 -0
  237. package/dist/metakit/network/client.js +78 -0
  238. package/dist/metakit/network/currency-l1-client.d.ts +71 -0
  239. package/dist/metakit/network/currency-l1-client.js +101 -0
  240. package/dist/metakit/network/data-l1-client.d.ts +57 -0
  241. package/dist/metakit/network/data-l1-client.js +76 -0
  242. package/dist/metakit/network/index.d.ts +10 -0
  243. package/dist/metakit/network/index.js +16 -0
  244. package/dist/metakit/network/types.d.ts +74 -0
  245. package/dist/metakit/network/types.js +20 -0
  246. package/dist/metakit/sign.d.ts +65 -0
  247. package/dist/metakit/sign.js +120 -0
  248. package/dist/metakit/signed-object.d.ts +66 -0
  249. package/dist/metakit/signed-object.js +100 -0
  250. package/dist/metakit/types.d.ts +67 -0
  251. package/dist/metakit/types.js +14 -0
  252. package/dist/metakit/verify.d.ts +55 -0
  253. package/dist/metakit/verify.js +217 -0
  254. package/dist/metakit/wallet.d.ts +70 -0
  255. package/dist/metakit/wallet.js +127 -0
  256. package/dist/ottochain/index.d.ts +13 -0
  257. package/dist/ottochain/index.js +45 -0
  258. package/dist/ottochain/metagraph-client.d.ts +111 -0
  259. package/dist/ottochain/metagraph-client.js +157 -0
  260. package/dist/ottochain/snapshot.d.ts +86 -0
  261. package/dist/ottochain/snapshot.js +110 -0
  262. package/dist/ottochain/types.d.ts +278 -0
  263. package/dist/ottochain/types.js +11 -0
  264. package/dist/types/apps/contracts/index.d.ts +30 -0
  265. package/dist/types/apps/contracts/types.d.ts +24 -0
  266. package/dist/types/apps/corporate/index.d.ts +27 -0
  267. package/dist/types/apps/corporate/types.d.ts +9861 -0
  268. package/dist/types/apps/governance/index.d.ts +77 -0
  269. package/dist/types/apps/governance/types.d.ts +344 -0
  270. package/dist/types/apps/identity/constants.d.ts +27 -0
  271. package/dist/types/apps/identity/index.d.ts +39 -0
  272. package/dist/types/apps/identity/types.d.ts +30 -0
  273. package/dist/types/apps/index.d.ts +31 -0
  274. package/dist/types/apps/markets/index.d.ts +26 -0
  275. package/dist/types/apps/markets/types.d.ts +155 -0
  276. package/dist/types/apps/oracles/index.d.ts +34 -0
  277. package/dist/types/apps/oracles/types.d.ts +193 -0
  278. package/dist/types/errors.d.ts +221 -0
  279. package/dist/types/generated/google/protobuf/struct.d.ts +134 -0
  280. package/dist/types/generated/google/protobuf/timestamp.d.ts +134 -0
  281. package/dist/types/generated/index.d.ts +18 -0
  282. package/dist/types/generated/ottochain/apps/contracts/v1/contract.d.ts +112 -0
  283. package/dist/types/generated/ottochain/apps/contracts/v1/contract_pb.d.ts +274 -0
  284. package/dist/types/generated/ottochain/apps/corporate/v1/corporate.d.ts +376 -0
  285. package/dist/types/generated/ottochain/apps/corporate/v1/corporate_pb.d.ts +1172 -0
  286. package/dist/types/generated/ottochain/apps/governance/v1/governance.d.ts +296 -0
  287. package/dist/types/generated/ottochain/apps/governance/v1/governance_pb.d.ts +772 -0
  288. package/dist/types/generated/ottochain/apps/identity/v1/agent.d.ts +94 -0
  289. package/dist/types/generated/ottochain/apps/identity/v1/agent_pb.d.ts +211 -0
  290. package/dist/types/generated/ottochain/apps/identity/v1/attestation.d.ts +102 -0
  291. package/dist/types/generated/ottochain/apps/identity/v1/attestation_pb.d.ts +238 -0
  292. package/dist/types/generated/ottochain/apps/markets/v1/market.d.ts +174 -0
  293. package/dist/types/generated/ottochain/apps/markets/v1/market_pb.d.ts +436 -0
  294. package/dist/types/generated/ottochain/apps/oracles/v1/oracle.d.ts +150 -0
  295. package/dist/types/generated/ottochain/apps/oracles/v1/oracle_pb.d.ts +393 -0
  296. package/dist/types/generated/ottochain/v1/common.d.ts +1 -0
  297. package/dist/types/generated/ottochain/v1/common_pb.d.ts +86 -0
  298. package/dist/types/generated/ottochain/v1/fiber.d.ts +130 -0
  299. package/dist/types/generated/ottochain/v1/fiber_pb.d.ts +292 -0
  300. package/dist/types/generated/ottochain/v1/messages.d.ts +89 -0
  301. package/dist/types/generated/ottochain/v1/messages_pb.d.ts +190 -0
  302. package/dist/types/generated/ottochain/v1/records.d.ts +128 -0
  303. package/dist/types/generated/ottochain/v1/records_pb.d.ts +221 -0
  304. package/dist/types/index.d.ts +22 -0
  305. package/dist/types/metakit/binary.d.ts +38 -0
  306. package/dist/types/metakit/canonicalize.d.ts +26 -0
  307. package/dist/types/metakit/codec.d.ts +16 -0
  308. package/dist/types/metakit/currency-transaction.d.ts +157 -0
  309. package/dist/types/metakit/currency-types.d.ts +55 -0
  310. package/dist/types/metakit/hash.d.ts +50 -0
  311. package/dist/types/metakit/index.d.ts +23 -0
  312. package/dist/types/metakit/network/client.d.ts +23 -0
  313. package/dist/types/metakit/network/currency-l1-client.d.ts +71 -0
  314. package/dist/types/metakit/network/data-l1-client.d.ts +57 -0
  315. package/dist/types/metakit/network/index.d.ts +10 -0
  316. package/dist/types/metakit/network/types.d.ts +74 -0
  317. package/dist/types/metakit/sign.d.ts +65 -0
  318. package/dist/types/metakit/signed-object.d.ts +66 -0
  319. package/dist/types/metakit/types.d.ts +67 -0
  320. package/dist/types/metakit/verify.d.ts +55 -0
  321. package/dist/types/metakit/wallet.d.ts +70 -0
  322. package/dist/types/ottochain/index.d.ts +13 -0
  323. package/dist/types/ottochain/metagraph-client.d.ts +111 -0
  324. package/dist/types/ottochain/snapshot.d.ts +86 -0
  325. package/dist/types/ottochain/types.d.ts +210 -0
  326. package/dist/types/types.d.ts +51 -0
  327. package/dist/types/validation.d.ts +449 -0
  328. package/dist/validation.d.ts +449 -0
  329. package/dist/validation.js +312 -0
  330. package/package.json +136 -0
@@ -0,0 +1,514 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.11.2
5
+ // protoc unknown
6
+ // source: google/protobuf/struct.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.ListValue = exports.Value = exports.Struct_FieldsEntry = exports.Struct = exports.nullValueToNumber = exports.nullValueToJSON = exports.nullValueFromJSON = exports.NullValue = exports.protobufPackage = void 0;
9
+ /* eslint-disable */
10
+ const wire_1 = require("@bufbuild/protobuf/wire");
11
+ exports.protobufPackage = "google.protobuf";
12
+ /**
13
+ * `NullValue` is a singleton enumeration to represent the null value for the
14
+ * `Value` type union.
15
+ *
16
+ * The JSON representation for `NullValue` is JSON `null`.
17
+ */
18
+ var NullValue;
19
+ (function (NullValue) {
20
+ /** NULL_VALUE - Null value. */
21
+ NullValue["NULL_VALUE"] = "NULL_VALUE";
22
+ NullValue["UNRECOGNIZED"] = "UNRECOGNIZED";
23
+ })(NullValue || (exports.NullValue = NullValue = {}));
24
+ function nullValueFromJSON(object) {
25
+ switch (object) {
26
+ case 0:
27
+ case "NULL_VALUE":
28
+ return NullValue.NULL_VALUE;
29
+ case -1:
30
+ case "UNRECOGNIZED":
31
+ default:
32
+ return NullValue.UNRECOGNIZED;
33
+ }
34
+ }
35
+ exports.nullValueFromJSON = nullValueFromJSON;
36
+ function nullValueToJSON(object) {
37
+ switch (object) {
38
+ case NullValue.NULL_VALUE:
39
+ return "NULL_VALUE";
40
+ case NullValue.UNRECOGNIZED:
41
+ default:
42
+ return "UNRECOGNIZED";
43
+ }
44
+ }
45
+ exports.nullValueToJSON = nullValueToJSON;
46
+ function nullValueToNumber(object) {
47
+ switch (object) {
48
+ case NullValue.NULL_VALUE:
49
+ return 0;
50
+ case NullValue.UNRECOGNIZED:
51
+ default:
52
+ return -1;
53
+ }
54
+ }
55
+ exports.nullValueToNumber = nullValueToNumber;
56
+ function createBaseStruct() {
57
+ return { fields: {} };
58
+ }
59
+ exports.Struct = {
60
+ encode(message, writer = new wire_1.BinaryWriter()) {
61
+ globalThis.Object.entries(message.fields).forEach(([key, value]) => {
62
+ if (value !== undefined) {
63
+ exports.Struct_FieldsEntry.encode({ key: key, value }, writer.uint32(10).fork()).join();
64
+ }
65
+ });
66
+ return writer;
67
+ },
68
+ decode(input, length) {
69
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
70
+ const end = length === undefined ? reader.len : reader.pos + length;
71
+ const message = createBaseStruct();
72
+ while (reader.pos < end) {
73
+ const tag = reader.uint32();
74
+ switch (tag >>> 3) {
75
+ case 1: {
76
+ if (tag !== 10) {
77
+ break;
78
+ }
79
+ const entry1 = exports.Struct_FieldsEntry.decode(reader, reader.uint32());
80
+ if (entry1.value !== undefined) {
81
+ message.fields[entry1.key] = entry1.value;
82
+ }
83
+ continue;
84
+ }
85
+ }
86
+ if ((tag & 7) === 4 || tag === 0) {
87
+ break;
88
+ }
89
+ reader.skip(tag & 7);
90
+ }
91
+ return message;
92
+ },
93
+ fromJSON(object) {
94
+ return {
95
+ fields: isObject(object.fields)
96
+ ? globalThis.Object.entries(object.fields).reduce((acc, [key, value]) => {
97
+ acc[key] = value;
98
+ return acc;
99
+ }, {})
100
+ : {},
101
+ };
102
+ },
103
+ toJSON(message) {
104
+ const obj = {};
105
+ if (message.fields) {
106
+ const entries = globalThis.Object.entries(message.fields);
107
+ if (entries.length > 0) {
108
+ obj.fields = {};
109
+ entries.forEach(([k, v]) => {
110
+ obj.fields[k] = v;
111
+ });
112
+ }
113
+ }
114
+ return obj;
115
+ },
116
+ create(base) {
117
+ return exports.Struct.fromPartial(base ?? {});
118
+ },
119
+ fromPartial(object) {
120
+ const message = createBaseStruct();
121
+ message.fields = globalThis.Object.entries(object.fields ?? {}).reduce((acc, [key, value]) => {
122
+ if (value !== undefined) {
123
+ acc[key] = value;
124
+ }
125
+ return acc;
126
+ }, {});
127
+ return message;
128
+ },
129
+ wrap(object) {
130
+ const struct = createBaseStruct();
131
+ if (object !== undefined) {
132
+ for (const key of globalThis.Object.keys(object)) {
133
+ struct.fields[key] = object[key];
134
+ }
135
+ }
136
+ return struct;
137
+ },
138
+ unwrap(message) {
139
+ const object = {};
140
+ if (message.fields) {
141
+ for (const key of globalThis.Object.keys(message.fields)) {
142
+ object[key] = message.fields[key];
143
+ }
144
+ }
145
+ return object;
146
+ },
147
+ };
148
+ function createBaseStruct_FieldsEntry() {
149
+ return { key: "", value: undefined };
150
+ }
151
+ exports.Struct_FieldsEntry = {
152
+ encode(message, writer = new wire_1.BinaryWriter()) {
153
+ if (message.key !== "") {
154
+ writer.uint32(10).string(message.key);
155
+ }
156
+ if (message.value !== undefined) {
157
+ exports.Value.encode(exports.Value.wrap(message.value), writer.uint32(18).fork()).join();
158
+ }
159
+ return writer;
160
+ },
161
+ decode(input, length) {
162
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
163
+ const end = length === undefined ? reader.len : reader.pos + length;
164
+ const message = createBaseStruct_FieldsEntry();
165
+ while (reader.pos < end) {
166
+ const tag = reader.uint32();
167
+ switch (tag >>> 3) {
168
+ case 1: {
169
+ if (tag !== 10) {
170
+ break;
171
+ }
172
+ message.key = reader.string();
173
+ continue;
174
+ }
175
+ case 2: {
176
+ if (tag !== 18) {
177
+ break;
178
+ }
179
+ message.value = exports.Value.unwrap(exports.Value.decode(reader, reader.uint32()));
180
+ continue;
181
+ }
182
+ }
183
+ if ((tag & 7) === 4 || tag === 0) {
184
+ break;
185
+ }
186
+ reader.skip(tag & 7);
187
+ }
188
+ return message;
189
+ },
190
+ fromJSON(object) {
191
+ return {
192
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
193
+ value: isSet(object?.value) ? object.value : undefined,
194
+ };
195
+ },
196
+ toJSON(message) {
197
+ const obj = {};
198
+ if (message.key !== "") {
199
+ obj.key = message.key;
200
+ }
201
+ if (message.value !== undefined) {
202
+ obj.value = message.value;
203
+ }
204
+ return obj;
205
+ },
206
+ create(base) {
207
+ return exports.Struct_FieldsEntry.fromPartial(base ?? {});
208
+ },
209
+ fromPartial(object) {
210
+ const message = createBaseStruct_FieldsEntry();
211
+ message.key = object.key ?? "";
212
+ message.value = object.value ?? undefined;
213
+ return message;
214
+ },
215
+ };
216
+ function createBaseValue() {
217
+ return { kind: undefined };
218
+ }
219
+ exports.Value = {
220
+ encode(message, writer = new wire_1.BinaryWriter()) {
221
+ switch (message.kind?.$case) {
222
+ case "nullValue":
223
+ writer.uint32(8).int32(nullValueToNumber(message.kind.nullValue));
224
+ break;
225
+ case "numberValue":
226
+ writer.uint32(17).double(message.kind.numberValue);
227
+ break;
228
+ case "stringValue":
229
+ writer.uint32(26).string(message.kind.stringValue);
230
+ break;
231
+ case "boolValue":
232
+ writer.uint32(32).bool(message.kind.boolValue);
233
+ break;
234
+ case "structValue":
235
+ exports.Struct.encode(exports.Struct.wrap(message.kind.structValue), writer.uint32(42).fork()).join();
236
+ break;
237
+ case "listValue":
238
+ exports.ListValue.encode(exports.ListValue.wrap(message.kind.listValue), writer.uint32(50).fork()).join();
239
+ break;
240
+ }
241
+ return writer;
242
+ },
243
+ decode(input, length) {
244
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
245
+ const end = length === undefined ? reader.len : reader.pos + length;
246
+ const message = createBaseValue();
247
+ while (reader.pos < end) {
248
+ const tag = reader.uint32();
249
+ switch (tag >>> 3) {
250
+ case 1: {
251
+ if (tag !== 8) {
252
+ break;
253
+ }
254
+ message.kind = { $case: "nullValue", nullValue: nullValueFromJSON(reader.int32()) };
255
+ continue;
256
+ }
257
+ case 2: {
258
+ if (tag !== 17) {
259
+ break;
260
+ }
261
+ message.kind = { $case: "numberValue", numberValue: reader.double() };
262
+ continue;
263
+ }
264
+ case 3: {
265
+ if (tag !== 26) {
266
+ break;
267
+ }
268
+ message.kind = { $case: "stringValue", stringValue: reader.string() };
269
+ continue;
270
+ }
271
+ case 4: {
272
+ if (tag !== 32) {
273
+ break;
274
+ }
275
+ message.kind = { $case: "boolValue", boolValue: reader.bool() };
276
+ continue;
277
+ }
278
+ case 5: {
279
+ if (tag !== 42) {
280
+ break;
281
+ }
282
+ message.kind = { $case: "structValue", structValue: exports.Struct.unwrap(exports.Struct.decode(reader, reader.uint32())) };
283
+ continue;
284
+ }
285
+ case 6: {
286
+ if (tag !== 50) {
287
+ break;
288
+ }
289
+ message.kind = { $case: "listValue", listValue: exports.ListValue.unwrap(exports.ListValue.decode(reader, reader.uint32())) };
290
+ continue;
291
+ }
292
+ }
293
+ if ((tag & 7) === 4 || tag === 0) {
294
+ break;
295
+ }
296
+ reader.skip(tag & 7);
297
+ }
298
+ return message;
299
+ },
300
+ fromJSON(object) {
301
+ return {
302
+ kind: isSet(object.nullValue)
303
+ ? { $case: "nullValue", nullValue: nullValueFromJSON(object.nullValue) }
304
+ : isSet(object.null_value)
305
+ ? { $case: "nullValue", nullValue: nullValueFromJSON(object.null_value) }
306
+ : isSet(object.numberValue)
307
+ ? { $case: "numberValue", numberValue: globalThis.Number(object.numberValue) }
308
+ : isSet(object.number_value)
309
+ ? { $case: "numberValue", numberValue: globalThis.Number(object.number_value) }
310
+ : isSet(object.stringValue)
311
+ ? { $case: "stringValue", stringValue: globalThis.String(object.stringValue) }
312
+ : isSet(object.string_value)
313
+ ? { $case: "stringValue", stringValue: globalThis.String(object.string_value) }
314
+ : isSet(object.boolValue)
315
+ ? { $case: "boolValue", boolValue: globalThis.Boolean(object.boolValue) }
316
+ : isSet(object.bool_value)
317
+ ? { $case: "boolValue", boolValue: globalThis.Boolean(object.bool_value) }
318
+ : isSet(object.structValue)
319
+ ? { $case: "structValue", structValue: object.structValue }
320
+ : isSet(object.struct_value)
321
+ ? { $case: "structValue", structValue: object.struct_value }
322
+ : isSet(object.listValue)
323
+ ? { $case: "listValue", listValue: [...object.listValue] }
324
+ : isSet(object.list_value)
325
+ ? { $case: "listValue", listValue: [...object.list_value] }
326
+ : undefined,
327
+ };
328
+ },
329
+ toJSON(message) {
330
+ const obj = {};
331
+ if (message.kind?.$case === "nullValue") {
332
+ obj.nullValue = nullValueToJSON(message.kind.nullValue);
333
+ }
334
+ else if (message.kind?.$case === "numberValue") {
335
+ obj.numberValue = message.kind.numberValue;
336
+ }
337
+ else if (message.kind?.$case === "stringValue") {
338
+ obj.stringValue = message.kind.stringValue;
339
+ }
340
+ else if (message.kind?.$case === "boolValue") {
341
+ obj.boolValue = message.kind.boolValue;
342
+ }
343
+ else if (message.kind?.$case === "structValue") {
344
+ obj.structValue = message.kind.structValue;
345
+ }
346
+ else if (message.kind?.$case === "listValue") {
347
+ obj.listValue = message.kind.listValue;
348
+ }
349
+ return obj;
350
+ },
351
+ create(base) {
352
+ return exports.Value.fromPartial(base ?? {});
353
+ },
354
+ fromPartial(object) {
355
+ const message = createBaseValue();
356
+ switch (object.kind?.$case) {
357
+ case "nullValue": {
358
+ if (object.kind?.nullValue !== undefined && object.kind?.nullValue !== null) {
359
+ message.kind = { $case: "nullValue", nullValue: object.kind.nullValue };
360
+ }
361
+ break;
362
+ }
363
+ case "numberValue": {
364
+ if (object.kind?.numberValue !== undefined && object.kind?.numberValue !== null) {
365
+ message.kind = { $case: "numberValue", numberValue: object.kind.numberValue };
366
+ }
367
+ break;
368
+ }
369
+ case "stringValue": {
370
+ if (object.kind?.stringValue !== undefined && object.kind?.stringValue !== null) {
371
+ message.kind = { $case: "stringValue", stringValue: object.kind.stringValue };
372
+ }
373
+ break;
374
+ }
375
+ case "boolValue": {
376
+ if (object.kind?.boolValue !== undefined && object.kind?.boolValue !== null) {
377
+ message.kind = { $case: "boolValue", boolValue: object.kind.boolValue };
378
+ }
379
+ break;
380
+ }
381
+ case "structValue": {
382
+ if (object.kind?.structValue !== undefined && object.kind?.structValue !== null) {
383
+ message.kind = { $case: "structValue", structValue: object.kind.structValue };
384
+ }
385
+ break;
386
+ }
387
+ case "listValue": {
388
+ if (object.kind?.listValue !== undefined && object.kind?.listValue !== null) {
389
+ message.kind = { $case: "listValue", listValue: object.kind.listValue };
390
+ }
391
+ break;
392
+ }
393
+ }
394
+ return message;
395
+ },
396
+ wrap(value) {
397
+ const result = createBaseValue();
398
+ if (value === null) {
399
+ result.kind = { $case: "nullValue", nullValue: NullValue.NULL_VALUE };
400
+ }
401
+ else if (typeof value === "boolean") {
402
+ result.kind = { $case: "boolValue", boolValue: value };
403
+ }
404
+ else if (typeof value === "number") {
405
+ result.kind = { $case: "numberValue", numberValue: value };
406
+ }
407
+ else if (typeof value === "string") {
408
+ result.kind = { $case: "stringValue", stringValue: value };
409
+ }
410
+ else if (globalThis.Array.isArray(value)) {
411
+ result.kind = { $case: "listValue", listValue: value };
412
+ }
413
+ else if (typeof value === "object") {
414
+ result.kind = { $case: "structValue", structValue: value };
415
+ }
416
+ else if (typeof value !== "undefined") {
417
+ throw new globalThis.Error("Unsupported any value type: " + typeof value);
418
+ }
419
+ return result;
420
+ },
421
+ unwrap(message) {
422
+ if (message.kind?.$case === "nullValue") {
423
+ return null;
424
+ }
425
+ else if (message.kind?.$case === "numberValue") {
426
+ return message.kind?.numberValue;
427
+ }
428
+ else if (message.kind?.$case === "stringValue") {
429
+ return message.kind?.stringValue;
430
+ }
431
+ else if (message.kind?.$case === "boolValue") {
432
+ return message.kind?.boolValue;
433
+ }
434
+ else if (message.kind?.$case === "structValue") {
435
+ return message.kind?.structValue;
436
+ }
437
+ else if (message.kind?.$case === "listValue") {
438
+ return message.kind?.listValue;
439
+ }
440
+ else {
441
+ return undefined;
442
+ }
443
+ },
444
+ };
445
+ function createBaseListValue() {
446
+ return { values: [] };
447
+ }
448
+ exports.ListValue = {
449
+ encode(message, writer = new wire_1.BinaryWriter()) {
450
+ for (const v of message.values) {
451
+ exports.Value.encode(exports.Value.wrap(v), writer.uint32(10).fork()).join();
452
+ }
453
+ return writer;
454
+ },
455
+ decode(input, length) {
456
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
457
+ const end = length === undefined ? reader.len : reader.pos + length;
458
+ const message = createBaseListValue();
459
+ while (reader.pos < end) {
460
+ const tag = reader.uint32();
461
+ switch (tag >>> 3) {
462
+ case 1: {
463
+ if (tag !== 10) {
464
+ break;
465
+ }
466
+ message.values.push(exports.Value.unwrap(exports.Value.decode(reader, reader.uint32())));
467
+ continue;
468
+ }
469
+ }
470
+ if ((tag & 7) === 4 || tag === 0) {
471
+ break;
472
+ }
473
+ reader.skip(tag & 7);
474
+ }
475
+ return message;
476
+ },
477
+ fromJSON(object) {
478
+ return { values: globalThis.Array.isArray(object?.values) ? [...object.values] : [] };
479
+ },
480
+ toJSON(message) {
481
+ const obj = {};
482
+ if (message.values?.length) {
483
+ obj.values = message.values;
484
+ }
485
+ return obj;
486
+ },
487
+ create(base) {
488
+ return exports.ListValue.fromPartial(base ?? {});
489
+ },
490
+ fromPartial(object) {
491
+ const message = createBaseListValue();
492
+ message.values = object.values?.map((e) => e) || [];
493
+ return message;
494
+ },
495
+ wrap(array) {
496
+ const result = createBaseListValue();
497
+ result.values = array ?? [];
498
+ return result;
499
+ },
500
+ unwrap(message) {
501
+ if (message?.hasOwnProperty("values") && globalThis.Array.isArray(message.values)) {
502
+ return message.values;
503
+ }
504
+ else {
505
+ return message;
506
+ }
507
+ },
508
+ };
509
+ function isObject(value) {
510
+ return typeof value === "object" && value !== null;
511
+ }
512
+ function isSet(value) {
513
+ return value !== null && value !== undefined;
514
+ }
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.11.2
5
+ // protoc unknown
6
+ // source: google/protobuf/timestamp.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.Timestamp = exports.protobufPackage = void 0;
9
+ /* eslint-disable */
10
+ const wire_1 = require("@bufbuild/protobuf/wire");
11
+ exports.protobufPackage = "google.protobuf";
12
+ function createBaseTimestamp() {
13
+ return { seconds: 0, nanos: 0 };
14
+ }
15
+ exports.Timestamp = {
16
+ encode(message, writer = new wire_1.BinaryWriter()) {
17
+ if (message.seconds !== 0) {
18
+ writer.uint32(8).int64(message.seconds);
19
+ }
20
+ if (message.nanos !== 0) {
21
+ writer.uint32(16).int32(message.nanos);
22
+ }
23
+ return writer;
24
+ },
25
+ decode(input, length) {
26
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
27
+ const end = length === undefined ? reader.len : reader.pos + length;
28
+ const message = createBaseTimestamp();
29
+ while (reader.pos < end) {
30
+ const tag = reader.uint32();
31
+ switch (tag >>> 3) {
32
+ case 1: {
33
+ if (tag !== 8) {
34
+ break;
35
+ }
36
+ message.seconds = longToNumber(reader.int64());
37
+ continue;
38
+ }
39
+ case 2: {
40
+ if (tag !== 16) {
41
+ break;
42
+ }
43
+ message.nanos = reader.int32();
44
+ continue;
45
+ }
46
+ }
47
+ if ((tag & 7) === 4 || tag === 0) {
48
+ break;
49
+ }
50
+ reader.skip(tag & 7);
51
+ }
52
+ return message;
53
+ },
54
+ fromJSON(object) {
55
+ return {
56
+ seconds: isSet(object.seconds) ? globalThis.Number(object.seconds) : 0,
57
+ nanos: isSet(object.nanos) ? globalThis.Number(object.nanos) : 0,
58
+ };
59
+ },
60
+ toJSON(message) {
61
+ const obj = {};
62
+ if (message.seconds !== 0) {
63
+ obj.seconds = Math.round(message.seconds);
64
+ }
65
+ if (message.nanos !== 0) {
66
+ obj.nanos = Math.round(message.nanos);
67
+ }
68
+ return obj;
69
+ },
70
+ create(base) {
71
+ return exports.Timestamp.fromPartial(base ?? {});
72
+ },
73
+ fromPartial(object) {
74
+ const message = createBaseTimestamp();
75
+ message.seconds = object.seconds ?? 0;
76
+ message.nanos = object.nanos ?? 0;
77
+ return message;
78
+ },
79
+ };
80
+ function longToNumber(int64) {
81
+ const num = globalThis.Number(int64.toString());
82
+ if (num > globalThis.Number.MAX_SAFE_INTEGER) {
83
+ throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
84
+ }
85
+ if (num < globalThis.Number.MIN_SAFE_INTEGER) {
86
+ throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
87
+ }
88
+ return num;
89
+ }
90
+ function isSet(value) {
91
+ return value !== null && value !== undefined;
92
+ }