@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,610 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.11.2
4
+ // protoc unknown
5
+ // source: ottochain/apps/identity/v1/agent.proto
6
+ /* eslint-disable */
7
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
8
+ import { Timestamp } from "../../../../google/protobuf/timestamp.js";
9
+ export const protobufPackage = "ottochain.apps.identity.v1";
10
+ /** Agent lifecycle states in the identity state machine */
11
+ export var AgentState;
12
+ (function (AgentState) {
13
+ AgentState["AGENT_STATE_UNSPECIFIED"] = "AGENT_STATE_UNSPECIFIED";
14
+ /** AGENT_STATE_REGISTERED - Initial state after registration */
15
+ AgentState["AGENT_STATE_REGISTERED"] = "AGENT_STATE_REGISTERED";
16
+ /** AGENT_STATE_ACTIVE - Activated and participating */
17
+ AgentState["AGENT_STATE_ACTIVE"] = "AGENT_STATE_ACTIVE";
18
+ /** AGENT_STATE_CHALLENGED - Under dispute/challenge */
19
+ AgentState["AGENT_STATE_CHALLENGED"] = "AGENT_STATE_CHALLENGED";
20
+ /** AGENT_STATE_SUSPENDED - Challenge upheld, temporarily suspended */
21
+ AgentState["AGENT_STATE_SUSPENDED"] = "AGENT_STATE_SUSPENDED";
22
+ /** AGENT_STATE_PROBATION - Recovering from suspension */
23
+ AgentState["AGENT_STATE_PROBATION"] = "AGENT_STATE_PROBATION";
24
+ /** AGENT_STATE_WITHDRAWN - Voluntarily exited (terminal) */
25
+ AgentState["AGENT_STATE_WITHDRAWN"] = "AGENT_STATE_WITHDRAWN";
26
+ AgentState["UNRECOGNIZED"] = "UNRECOGNIZED";
27
+ })(AgentState || (AgentState = {}));
28
+ export function agentStateFromJSON(object) {
29
+ switch (object) {
30
+ case 0:
31
+ case "AGENT_STATE_UNSPECIFIED":
32
+ return AgentState.AGENT_STATE_UNSPECIFIED;
33
+ case 1:
34
+ case "AGENT_STATE_REGISTERED":
35
+ return AgentState.AGENT_STATE_REGISTERED;
36
+ case 2:
37
+ case "AGENT_STATE_ACTIVE":
38
+ return AgentState.AGENT_STATE_ACTIVE;
39
+ case 3:
40
+ case "AGENT_STATE_CHALLENGED":
41
+ return AgentState.AGENT_STATE_CHALLENGED;
42
+ case 4:
43
+ case "AGENT_STATE_SUSPENDED":
44
+ return AgentState.AGENT_STATE_SUSPENDED;
45
+ case 5:
46
+ case "AGENT_STATE_PROBATION":
47
+ return AgentState.AGENT_STATE_PROBATION;
48
+ case 6:
49
+ case "AGENT_STATE_WITHDRAWN":
50
+ return AgentState.AGENT_STATE_WITHDRAWN;
51
+ case -1:
52
+ case "UNRECOGNIZED":
53
+ default:
54
+ return AgentState.UNRECOGNIZED;
55
+ }
56
+ }
57
+ export function agentStateToJSON(object) {
58
+ switch (object) {
59
+ case AgentState.AGENT_STATE_UNSPECIFIED:
60
+ return "AGENT_STATE_UNSPECIFIED";
61
+ case AgentState.AGENT_STATE_REGISTERED:
62
+ return "AGENT_STATE_REGISTERED";
63
+ case AgentState.AGENT_STATE_ACTIVE:
64
+ return "AGENT_STATE_ACTIVE";
65
+ case AgentState.AGENT_STATE_CHALLENGED:
66
+ return "AGENT_STATE_CHALLENGED";
67
+ case AgentState.AGENT_STATE_SUSPENDED:
68
+ return "AGENT_STATE_SUSPENDED";
69
+ case AgentState.AGENT_STATE_PROBATION:
70
+ return "AGENT_STATE_PROBATION";
71
+ case AgentState.AGENT_STATE_WITHDRAWN:
72
+ return "AGENT_STATE_WITHDRAWN";
73
+ case AgentState.UNRECOGNIZED:
74
+ default:
75
+ return "UNRECOGNIZED";
76
+ }
77
+ }
78
+ export function agentStateToNumber(object) {
79
+ switch (object) {
80
+ case AgentState.AGENT_STATE_UNSPECIFIED:
81
+ return 0;
82
+ case AgentState.AGENT_STATE_REGISTERED:
83
+ return 1;
84
+ case AgentState.AGENT_STATE_ACTIVE:
85
+ return 2;
86
+ case AgentState.AGENT_STATE_CHALLENGED:
87
+ return 3;
88
+ case AgentState.AGENT_STATE_SUSPENDED:
89
+ return 4;
90
+ case AgentState.AGENT_STATE_PROBATION:
91
+ return 5;
92
+ case AgentState.AGENT_STATE_WITHDRAWN:
93
+ return 6;
94
+ case AgentState.UNRECOGNIZED:
95
+ default:
96
+ return -1;
97
+ }
98
+ }
99
+ /** Platform where agent identity is linked */
100
+ export var Platform;
101
+ (function (Platform) {
102
+ Platform["PLATFORM_UNSPECIFIED"] = "PLATFORM_UNSPECIFIED";
103
+ Platform["PLATFORM_DISCORD"] = "PLATFORM_DISCORD";
104
+ Platform["PLATFORM_TELEGRAM"] = "PLATFORM_TELEGRAM";
105
+ Platform["PLATFORM_TWITTER"] = "PLATFORM_TWITTER";
106
+ Platform["PLATFORM_GITHUB"] = "PLATFORM_GITHUB";
107
+ Platform["PLATFORM_CUSTOM"] = "PLATFORM_CUSTOM";
108
+ Platform["UNRECOGNIZED"] = "UNRECOGNIZED";
109
+ })(Platform || (Platform = {}));
110
+ export function platformFromJSON(object) {
111
+ switch (object) {
112
+ case 0:
113
+ case "PLATFORM_UNSPECIFIED":
114
+ return Platform.PLATFORM_UNSPECIFIED;
115
+ case 1:
116
+ case "PLATFORM_DISCORD":
117
+ return Platform.PLATFORM_DISCORD;
118
+ case 2:
119
+ case "PLATFORM_TELEGRAM":
120
+ return Platform.PLATFORM_TELEGRAM;
121
+ case 3:
122
+ case "PLATFORM_TWITTER":
123
+ return Platform.PLATFORM_TWITTER;
124
+ case 4:
125
+ case "PLATFORM_GITHUB":
126
+ return Platform.PLATFORM_GITHUB;
127
+ case 5:
128
+ case "PLATFORM_CUSTOM":
129
+ return Platform.PLATFORM_CUSTOM;
130
+ case -1:
131
+ case "UNRECOGNIZED":
132
+ default:
133
+ return Platform.UNRECOGNIZED;
134
+ }
135
+ }
136
+ export function platformToJSON(object) {
137
+ switch (object) {
138
+ case Platform.PLATFORM_UNSPECIFIED:
139
+ return "PLATFORM_UNSPECIFIED";
140
+ case Platform.PLATFORM_DISCORD:
141
+ return "PLATFORM_DISCORD";
142
+ case Platform.PLATFORM_TELEGRAM:
143
+ return "PLATFORM_TELEGRAM";
144
+ case Platform.PLATFORM_TWITTER:
145
+ return "PLATFORM_TWITTER";
146
+ case Platform.PLATFORM_GITHUB:
147
+ return "PLATFORM_GITHUB";
148
+ case Platform.PLATFORM_CUSTOM:
149
+ return "PLATFORM_CUSTOM";
150
+ case Platform.UNRECOGNIZED:
151
+ default:
152
+ return "UNRECOGNIZED";
153
+ }
154
+ }
155
+ export function platformToNumber(object) {
156
+ switch (object) {
157
+ case Platform.PLATFORM_UNSPECIFIED:
158
+ return 0;
159
+ case Platform.PLATFORM_DISCORD:
160
+ return 1;
161
+ case Platform.PLATFORM_TELEGRAM:
162
+ return 2;
163
+ case Platform.PLATFORM_TWITTER:
164
+ return 3;
165
+ case Platform.PLATFORM_GITHUB:
166
+ return 4;
167
+ case Platform.PLATFORM_CUSTOM:
168
+ return 5;
169
+ case Platform.UNRECOGNIZED:
170
+ default:
171
+ return -1;
172
+ }
173
+ }
174
+ function createBasePlatformLink() {
175
+ return {
176
+ platform: Platform.PLATFORM_UNSPECIFIED,
177
+ platformUserId: "",
178
+ platformUsername: "",
179
+ linkedAt: undefined,
180
+ verified: false,
181
+ };
182
+ }
183
+ export const PlatformLink = {
184
+ encode(message, writer = new BinaryWriter()) {
185
+ if (message.platform !== Platform.PLATFORM_UNSPECIFIED) {
186
+ writer.uint32(8).int32(platformToNumber(message.platform));
187
+ }
188
+ if (message.platformUserId !== "") {
189
+ writer.uint32(18).string(message.platformUserId);
190
+ }
191
+ if (message.platformUsername !== "") {
192
+ writer.uint32(26).string(message.platformUsername);
193
+ }
194
+ if (message.linkedAt !== undefined) {
195
+ Timestamp.encode(toTimestamp(message.linkedAt), writer.uint32(34).fork()).join();
196
+ }
197
+ if (message.verified !== false) {
198
+ writer.uint32(40).bool(message.verified);
199
+ }
200
+ return writer;
201
+ },
202
+ decode(input, length) {
203
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
204
+ const end = length === undefined ? reader.len : reader.pos + length;
205
+ const message = createBasePlatformLink();
206
+ while (reader.pos < end) {
207
+ const tag = reader.uint32();
208
+ switch (tag >>> 3) {
209
+ case 1: {
210
+ if (tag !== 8) {
211
+ break;
212
+ }
213
+ message.platform = platformFromJSON(reader.int32());
214
+ continue;
215
+ }
216
+ case 2: {
217
+ if (tag !== 18) {
218
+ break;
219
+ }
220
+ message.platformUserId = reader.string();
221
+ continue;
222
+ }
223
+ case 3: {
224
+ if (tag !== 26) {
225
+ break;
226
+ }
227
+ message.platformUsername = reader.string();
228
+ continue;
229
+ }
230
+ case 4: {
231
+ if (tag !== 34) {
232
+ break;
233
+ }
234
+ message.linkedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
235
+ continue;
236
+ }
237
+ case 5: {
238
+ if (tag !== 40) {
239
+ break;
240
+ }
241
+ message.verified = reader.bool();
242
+ continue;
243
+ }
244
+ }
245
+ if ((tag & 7) === 4 || tag === 0) {
246
+ break;
247
+ }
248
+ reader.skip(tag & 7);
249
+ }
250
+ return message;
251
+ },
252
+ fromJSON(object) {
253
+ return {
254
+ platform: isSet(object.platform) ? platformFromJSON(object.platform) : Platform.PLATFORM_UNSPECIFIED,
255
+ platformUserId: isSet(object.platformUserId)
256
+ ? globalThis.String(object.platformUserId)
257
+ : isSet(object.platform_user_id)
258
+ ? globalThis.String(object.platform_user_id)
259
+ : "",
260
+ platformUsername: isSet(object.platformUsername)
261
+ ? globalThis.String(object.platformUsername)
262
+ : isSet(object.platform_username)
263
+ ? globalThis.String(object.platform_username)
264
+ : "",
265
+ linkedAt: isSet(object.linkedAt)
266
+ ? fromJsonTimestamp(object.linkedAt)
267
+ : isSet(object.linked_at)
268
+ ? fromJsonTimestamp(object.linked_at)
269
+ : undefined,
270
+ verified: isSet(object.verified) ? globalThis.Boolean(object.verified) : false,
271
+ };
272
+ },
273
+ toJSON(message) {
274
+ const obj = {};
275
+ if (message.platform !== Platform.PLATFORM_UNSPECIFIED) {
276
+ obj.platform = platformToJSON(message.platform);
277
+ }
278
+ if (message.platformUserId !== "") {
279
+ obj.platformUserId = message.platformUserId;
280
+ }
281
+ if (message.platformUsername !== "") {
282
+ obj.platformUsername = message.platformUsername;
283
+ }
284
+ if (message.linkedAt !== undefined) {
285
+ obj.linkedAt = message.linkedAt.toISOString();
286
+ }
287
+ if (message.verified !== false) {
288
+ obj.verified = message.verified;
289
+ }
290
+ return obj;
291
+ },
292
+ create(base) {
293
+ return PlatformLink.fromPartial(base ?? {});
294
+ },
295
+ fromPartial(object) {
296
+ const message = createBasePlatformLink();
297
+ message.platform = object.platform ?? Platform.PLATFORM_UNSPECIFIED;
298
+ message.platformUserId = object.platformUserId ?? "";
299
+ message.platformUsername = object.platformUsername ?? "";
300
+ message.linkedAt = object.linkedAt ?? undefined;
301
+ message.verified = object.verified ?? false;
302
+ return message;
303
+ },
304
+ };
305
+ function createBaseAgentIdentity() {
306
+ return {
307
+ address: "",
308
+ publicKey: "",
309
+ displayName: "",
310
+ reputation: 0,
311
+ state: AgentState.AGENT_STATE_UNSPECIFIED,
312
+ platformLinks: [],
313
+ createdAt: undefined,
314
+ updatedAt: undefined,
315
+ };
316
+ }
317
+ export const AgentIdentity = {
318
+ encode(message, writer = new BinaryWriter()) {
319
+ if (message.address !== "") {
320
+ writer.uint32(10).string(message.address);
321
+ }
322
+ if (message.publicKey !== "") {
323
+ writer.uint32(18).string(message.publicKey);
324
+ }
325
+ if (message.displayName !== "") {
326
+ writer.uint32(26).string(message.displayName);
327
+ }
328
+ if (message.reputation !== 0) {
329
+ writer.uint32(32).int32(message.reputation);
330
+ }
331
+ if (message.state !== AgentState.AGENT_STATE_UNSPECIFIED) {
332
+ writer.uint32(40).int32(agentStateToNumber(message.state));
333
+ }
334
+ for (const v of message.platformLinks) {
335
+ PlatformLink.encode(v, writer.uint32(50).fork()).join();
336
+ }
337
+ if (message.createdAt !== undefined) {
338
+ Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(58).fork()).join();
339
+ }
340
+ if (message.updatedAt !== undefined) {
341
+ Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(66).fork()).join();
342
+ }
343
+ return writer;
344
+ },
345
+ decode(input, length) {
346
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
347
+ const end = length === undefined ? reader.len : reader.pos + length;
348
+ const message = createBaseAgentIdentity();
349
+ while (reader.pos < end) {
350
+ const tag = reader.uint32();
351
+ switch (tag >>> 3) {
352
+ case 1: {
353
+ if (tag !== 10) {
354
+ break;
355
+ }
356
+ message.address = reader.string();
357
+ continue;
358
+ }
359
+ case 2: {
360
+ if (tag !== 18) {
361
+ break;
362
+ }
363
+ message.publicKey = reader.string();
364
+ continue;
365
+ }
366
+ case 3: {
367
+ if (tag !== 26) {
368
+ break;
369
+ }
370
+ message.displayName = reader.string();
371
+ continue;
372
+ }
373
+ case 4: {
374
+ if (tag !== 32) {
375
+ break;
376
+ }
377
+ message.reputation = reader.int32();
378
+ continue;
379
+ }
380
+ case 5: {
381
+ if (tag !== 40) {
382
+ break;
383
+ }
384
+ message.state = agentStateFromJSON(reader.int32());
385
+ continue;
386
+ }
387
+ case 6: {
388
+ if (tag !== 50) {
389
+ break;
390
+ }
391
+ message.platformLinks.push(PlatformLink.decode(reader, reader.uint32()));
392
+ continue;
393
+ }
394
+ case 7: {
395
+ if (tag !== 58) {
396
+ break;
397
+ }
398
+ message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
399
+ continue;
400
+ }
401
+ case 8: {
402
+ if (tag !== 66) {
403
+ break;
404
+ }
405
+ message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
406
+ continue;
407
+ }
408
+ }
409
+ if ((tag & 7) === 4 || tag === 0) {
410
+ break;
411
+ }
412
+ reader.skip(tag & 7);
413
+ }
414
+ return message;
415
+ },
416
+ fromJSON(object) {
417
+ return {
418
+ address: isSet(object.address) ? globalThis.String(object.address) : "",
419
+ publicKey: isSet(object.publicKey)
420
+ ? globalThis.String(object.publicKey)
421
+ : isSet(object.public_key)
422
+ ? globalThis.String(object.public_key)
423
+ : "",
424
+ displayName: isSet(object.displayName)
425
+ ? globalThis.String(object.displayName)
426
+ : isSet(object.display_name)
427
+ ? globalThis.String(object.display_name)
428
+ : "",
429
+ reputation: isSet(object.reputation) ? globalThis.Number(object.reputation) : 0,
430
+ state: isSet(object.state) ? agentStateFromJSON(object.state) : AgentState.AGENT_STATE_UNSPECIFIED,
431
+ platformLinks: globalThis.Array.isArray(object?.platformLinks)
432
+ ? object.platformLinks.map((e) => PlatformLink.fromJSON(e))
433
+ : globalThis.Array.isArray(object?.platform_links)
434
+ ? object.platform_links.map((e) => PlatformLink.fromJSON(e))
435
+ : [],
436
+ createdAt: isSet(object.createdAt)
437
+ ? fromJsonTimestamp(object.createdAt)
438
+ : isSet(object.created_at)
439
+ ? fromJsonTimestamp(object.created_at)
440
+ : undefined,
441
+ updatedAt: isSet(object.updatedAt)
442
+ ? fromJsonTimestamp(object.updatedAt)
443
+ : isSet(object.updated_at)
444
+ ? fromJsonTimestamp(object.updated_at)
445
+ : undefined,
446
+ };
447
+ },
448
+ toJSON(message) {
449
+ const obj = {};
450
+ if (message.address !== "") {
451
+ obj.address = message.address;
452
+ }
453
+ if (message.publicKey !== "") {
454
+ obj.publicKey = message.publicKey;
455
+ }
456
+ if (message.displayName !== "") {
457
+ obj.displayName = message.displayName;
458
+ }
459
+ if (message.reputation !== 0) {
460
+ obj.reputation = Math.round(message.reputation);
461
+ }
462
+ if (message.state !== AgentState.AGENT_STATE_UNSPECIFIED) {
463
+ obj.state = agentStateToJSON(message.state);
464
+ }
465
+ if (message.platformLinks?.length) {
466
+ obj.platformLinks = message.platformLinks.map((e) => PlatformLink.toJSON(e));
467
+ }
468
+ if (message.createdAt !== undefined) {
469
+ obj.createdAt = message.createdAt.toISOString();
470
+ }
471
+ if (message.updatedAt !== undefined) {
472
+ obj.updatedAt = message.updatedAt.toISOString();
473
+ }
474
+ return obj;
475
+ },
476
+ create(base) {
477
+ return AgentIdentity.fromPartial(base ?? {});
478
+ },
479
+ fromPartial(object) {
480
+ const message = createBaseAgentIdentity();
481
+ message.address = object.address ?? "";
482
+ message.publicKey = object.publicKey ?? "";
483
+ message.displayName = object.displayName ?? "";
484
+ message.reputation = object.reputation ?? 0;
485
+ message.state = object.state ?? AgentState.AGENT_STATE_UNSPECIFIED;
486
+ message.platformLinks = object.platformLinks?.map((e) => PlatformLink.fromPartial(e)) || [];
487
+ message.createdAt = object.createdAt ?? undefined;
488
+ message.updatedAt = object.updatedAt ?? undefined;
489
+ return message;
490
+ },
491
+ };
492
+ function createBaseAgentIdentityDefinition() {
493
+ return { initialReputation: 0, activationThreshold: 0, suspensionDurationEpochs: 0 };
494
+ }
495
+ export const AgentIdentityDefinition = {
496
+ encode(message, writer = new BinaryWriter()) {
497
+ if (message.initialReputation !== 0) {
498
+ writer.uint32(8).int32(message.initialReputation);
499
+ }
500
+ if (message.activationThreshold !== 0) {
501
+ writer.uint32(16).int32(message.activationThreshold);
502
+ }
503
+ if (message.suspensionDurationEpochs !== 0) {
504
+ writer.uint32(24).int32(message.suspensionDurationEpochs);
505
+ }
506
+ return writer;
507
+ },
508
+ decode(input, length) {
509
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
510
+ const end = length === undefined ? reader.len : reader.pos + length;
511
+ const message = createBaseAgentIdentityDefinition();
512
+ while (reader.pos < end) {
513
+ const tag = reader.uint32();
514
+ switch (tag >>> 3) {
515
+ case 1: {
516
+ if (tag !== 8) {
517
+ break;
518
+ }
519
+ message.initialReputation = reader.int32();
520
+ continue;
521
+ }
522
+ case 2: {
523
+ if (tag !== 16) {
524
+ break;
525
+ }
526
+ message.activationThreshold = reader.int32();
527
+ continue;
528
+ }
529
+ case 3: {
530
+ if (tag !== 24) {
531
+ break;
532
+ }
533
+ message.suspensionDurationEpochs = reader.int32();
534
+ continue;
535
+ }
536
+ }
537
+ if ((tag & 7) === 4 || tag === 0) {
538
+ break;
539
+ }
540
+ reader.skip(tag & 7);
541
+ }
542
+ return message;
543
+ },
544
+ fromJSON(object) {
545
+ return {
546
+ initialReputation: isSet(object.initialReputation)
547
+ ? globalThis.Number(object.initialReputation)
548
+ : isSet(object.initial_reputation)
549
+ ? globalThis.Number(object.initial_reputation)
550
+ : 0,
551
+ activationThreshold: isSet(object.activationThreshold)
552
+ ? globalThis.Number(object.activationThreshold)
553
+ : isSet(object.activation_threshold)
554
+ ? globalThis.Number(object.activation_threshold)
555
+ : 0,
556
+ suspensionDurationEpochs: isSet(object.suspensionDurationEpochs)
557
+ ? globalThis.Number(object.suspensionDurationEpochs)
558
+ : isSet(object.suspension_duration_epochs)
559
+ ? globalThis.Number(object.suspension_duration_epochs)
560
+ : 0,
561
+ };
562
+ },
563
+ toJSON(message) {
564
+ const obj = {};
565
+ if (message.initialReputation !== 0) {
566
+ obj.initialReputation = Math.round(message.initialReputation);
567
+ }
568
+ if (message.activationThreshold !== 0) {
569
+ obj.activationThreshold = Math.round(message.activationThreshold);
570
+ }
571
+ if (message.suspensionDurationEpochs !== 0) {
572
+ obj.suspensionDurationEpochs = Math.round(message.suspensionDurationEpochs);
573
+ }
574
+ return obj;
575
+ },
576
+ create(base) {
577
+ return AgentIdentityDefinition.fromPartial(base ?? {});
578
+ },
579
+ fromPartial(object) {
580
+ const message = createBaseAgentIdentityDefinition();
581
+ message.initialReputation = object.initialReputation ?? 0;
582
+ message.activationThreshold = object.activationThreshold ?? 0;
583
+ message.suspensionDurationEpochs = object.suspensionDurationEpochs ?? 0;
584
+ return message;
585
+ },
586
+ };
587
+ function toTimestamp(date) {
588
+ const seconds = Math.trunc(date.getTime() / 1000);
589
+ const nanos = (date.getTime() % 1000) * 1000000;
590
+ return { seconds, nanos };
591
+ }
592
+ function fromTimestamp(t) {
593
+ let millis = (t.seconds || 0) * 1000;
594
+ millis += (t.nanos || 0) / 1000000;
595
+ return new globalThis.Date(millis);
596
+ }
597
+ function fromJsonTimestamp(o) {
598
+ if (o instanceof globalThis.Date) {
599
+ return o;
600
+ }
601
+ else if (typeof o === "string") {
602
+ return new globalThis.Date(o);
603
+ }
604
+ else {
605
+ return fromTimestamp(Timestamp.fromJSON(o));
606
+ }
607
+ }
608
+ function isSet(value) {
609
+ return value !== null && value !== undefined;
610
+ }