@gitopia/gitopiajs 0.0.2 → 0.0.4

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 (309) hide show
  1. package/package.json +3 -3
  2. package/dist/LICENSE +0 -21
  3. package/dist/amino/amino.d.ts +0 -1
  4. package/dist/amino/amino.js +0 -2
  5. package/dist/amino/bundle.d.ts +0 -1
  6. package/dist/amino/bundle.js +0 -41
  7. package/dist/binary.d.ts +0 -130
  8. package/dist/binary.js +0 -371
  9. package/dist/cosmos/bank/v1beta1/bank.d.ts +0 -407
  10. package/dist/cosmos/bank/v1beta1/bank.js +0 -664
  11. package/dist/cosmos/bank/v1beta1/query.d.ts +0 -1062
  12. package/dist/cosmos/bank/v1beta1/query.js +0 -1759
  13. package/dist/cosmos/bank/v1beta1/query.lcd.d.ts +0 -19
  14. package/dist/cosmos/bank/v1beta1/query.lcd.js +0 -173
  15. package/dist/cosmos/bank/v1beta1/query.rpc.Query.d.ts +0 -106
  16. package/dist/cosmos/bank/v1beta1/query.rpc.Query.js +0 -123
  17. package/dist/cosmos/base/query/v1beta1/pagination.d.ts +0 -190
  18. package/dist/cosmos/base/query/v1beta1/pagination.js +0 -204
  19. package/dist/cosmos/base/v1beta1/coin.d.ts +0 -193
  20. package/dist/cosmos/base/v1beta1/coin.js +0 -306
  21. package/dist/cosmos/bundle.d.ts +0 -2311
  22. package/dist/cosmos/bundle.js +0 -134
  23. package/dist/cosmos/client.d.ts +0 -84
  24. package/dist/cosmos/client.js +0 -65
  25. package/dist/cosmos/feegrant/v1beta1/feegrant.d.ts +0 -245
  26. package/dist/cosmos/feegrant/v1beta1/feegrant.js +0 -456
  27. package/dist/cosmos/feegrant/v1beta1/query.d.ts +0 -258
  28. package/dist/cosmos/feegrant/v1beta1/query.js +0 -487
  29. package/dist/cosmos/feegrant/v1beta1/query.lcd.d.ts +0 -11
  30. package/dist/cosmos/feegrant/v1beta1/query.lcd.js +0 -44
  31. package/dist/cosmos/feegrant/v1beta1/query.rpc.Query.d.ts +0 -28
  32. package/dist/cosmos/feegrant/v1beta1/query.rpc.Query.js +0 -47
  33. package/dist/cosmos/gov/v1beta1/gov.d.ts +0 -571
  34. package/dist/cosmos/gov/v1beta1/gov.js +0 -1122
  35. package/dist/cosmos/gov/v1beta1/query.d.ts +0 -636
  36. package/dist/cosmos/gov/v1beta1/query.js +0 -1264
  37. package/dist/cosmos/gov/v1beta1/query.lcd.d.ts +0 -16
  38. package/dist/cosmos/gov/v1beta1/query.lcd.js +0 -87
  39. package/dist/cosmos/gov/v1beta1/query.rpc.Query.d.ts +0 -44
  40. package/dist/cosmos/gov/v1beta1/query.rpc.Query.js +0 -92
  41. package/dist/cosmos/group/v1/query.d.ts +0 -1097
  42. package/dist/cosmos/group/v1/query.js +0 -2182
  43. package/dist/cosmos/group/v1/query.lcd.d.ts +0 -22
  44. package/dist/cosmos/group/v1/query.lcd.js +0 -158
  45. package/dist/cosmos/group/v1/query.rpc.Query.d.ts +0 -78
  46. package/dist/cosmos/group/v1/query.rpc.Query.js +0 -148
  47. package/dist/cosmos/group/v1/tx.amino.d.ts +0 -73
  48. package/dist/cosmos/group/v1/tx.amino.js +0 -77
  49. package/dist/cosmos/group/v1/tx.d.ts +0 -1198
  50. package/dist/cosmos/group/v1/tx.js +0 -2362
  51. package/dist/cosmos/group/v1/tx.registry.d.ts +0 -180
  52. package/dist/cosmos/group/v1/tx.registry.js +0 -271
  53. package/dist/cosmos/group/v1/tx.rpc.msg.d.ts +0 -51
  54. package/dist/cosmos/group/v1/tx.rpc.msg.js +0 -96
  55. package/dist/cosmos/group/v1/types.d.ts +0 -873
  56. package/dist/cosmos/group/v1/types.js +0 -1495
  57. package/dist/cosmos/msg/v1/msg.d.ts +0 -1
  58. package/dist/cosmos/msg/v1/msg.js +0 -2
  59. package/dist/cosmos/query/v1/query.d.ts +0 -1
  60. package/dist/cosmos/query/v1/query.js +0 -2
  61. package/dist/cosmos/rpc.query.d.ts +0 -59
  62. package/dist/cosmos/rpc.query.js +0 -60
  63. package/dist/cosmos/rpc.tx.d.ts +0 -10
  64. package/dist/cosmos/rpc.tx.js +0 -44
  65. package/dist/cosmos/upgrade/v1beta1/upgrade.d.ts +0 -278
  66. package/dist/cosmos/upgrade/v1beta1/upgrade.js +0 -382
  67. package/dist/cosmos_proto/bundle.d.ts +0 -32
  68. package/dist/cosmos_proto/bundle.js +0 -41
  69. package/dist/cosmos_proto/cosmos.d.ts +0 -171
  70. package/dist/cosmos_proto/cosmos.js +0 -221
  71. package/dist/esm/amino/amino.js +0 -1
  72. package/dist/esm/amino/bundle.js +0 -5
  73. package/dist/esm/binary.js +0 -366
  74. package/dist/esm/cosmos/bank/v1beta1/bank.js +0 -661
  75. package/dist/esm/cosmos/bank/v1beta1/query.js +0 -1756
  76. package/dist/esm/cosmos/bank/v1beta1/query.lcd.js +0 -169
  77. package/dist/esm/cosmos/bank/v1beta1/query.rpc.Query.js +0 -118
  78. package/dist/esm/cosmos/base/query/v1beta1/pagination.js +0 -201
  79. package/dist/esm/cosmos/base/v1beta1/coin.js +0 -303
  80. package/dist/esm/cosmos/bundle.js +0 -98
  81. package/dist/esm/cosmos/client.js +0 -27
  82. package/dist/esm/cosmos/feegrant/v1beta1/feegrant.js +0 -450
  83. package/dist/esm/cosmos/feegrant/v1beta1/query.js +0 -484
  84. package/dist/esm/cosmos/feegrant/v1beta1/query.lcd.js +0 -40
  85. package/dist/esm/cosmos/feegrant/v1beta1/query.rpc.Query.js +0 -42
  86. package/dist/esm/cosmos/gov/v1beta1/gov.js +0 -1112
  87. package/dist/esm/cosmos/gov/v1beta1/query.js +0 -1261
  88. package/dist/esm/cosmos/gov/v1beta1/query.lcd.js +0 -83
  89. package/dist/esm/cosmos/gov/v1beta1/query.rpc.Query.js +0 -87
  90. package/dist/esm/cosmos/group/v1/query.js +0 -2179
  91. package/dist/esm/cosmos/group/v1/query.lcd.js +0 -154
  92. package/dist/esm/cosmos/group/v1/query.rpc.Query.js +0 -143
  93. package/dist/esm/cosmos/group/v1/tx.amino.js +0 -74
  94. package/dist/esm/cosmos/group/v1/tx.js +0 -2354
  95. package/dist/esm/cosmos/group/v1/tx.registry.js +0 -267
  96. package/dist/esm/cosmos/group/v1/tx.rpc.msg.js +0 -92
  97. package/dist/esm/cosmos/group/v1/types.js +0 -1483
  98. package/dist/esm/cosmos/msg/v1/msg.js +0 -1
  99. package/dist/esm/cosmos/query/v1/query.js +0 -1
  100. package/dist/esm/cosmos/rpc.query.js +0 -23
  101. package/dist/esm/cosmos/rpc.tx.js +0 -7
  102. package/dist/esm/cosmos/upgrade/v1beta1/upgrade.js +0 -379
  103. package/dist/esm/cosmos_proto/bundle.js +0 -5
  104. package/dist/esm/cosmos_proto/cosmos.js +0 -216
  105. package/dist/esm/gitopia/bundle.js +0 -95
  106. package/dist/esm/gitopia/client.js +0 -32
  107. package/dist/esm/gitopia/custom-lcd-client.js +0 -50
  108. package/dist/esm/gitopia/gitopia/gitopia/attachment.js +0 -101
  109. package/dist/esm/gitopia/gitopia/gitopia/bounty.js +0 -255
  110. package/dist/esm/gitopia/gitopia/gitopia/branch.js +0 -137
  111. package/dist/esm/gitopia/gitopia/gitopia/comment.js +0 -488
  112. package/dist/esm/gitopia/gitopia/gitopia/dao.js +0 -451
  113. package/dist/esm/gitopia/gitopia/gitopia/exercised_amount.js +0 -78
  114. package/dist/esm/gitopia/gitopia/gitopia/genesis.js +0 -460
  115. package/dist/esm/gitopia/gitopia/gitopia/issue.js +0 -323
  116. package/dist/esm/gitopia/gitopia/gitopia/params.js +0 -293
  117. package/dist/esm/gitopia/gitopia/gitopia/pullRequest.js +0 -565
  118. package/dist/esm/gitopia/gitopia/gitopia/query.js +0 -7351
  119. package/dist/esm/gitopia/gitopia/gitopia/query.lcd.js +0 -452
  120. package/dist/esm/gitopia/gitopia/gitopia/query.rpc.Query.js +0 -453
  121. package/dist/esm/gitopia/gitopia/gitopia/reaction.js +0 -123
  122. package/dist/esm/gitopia/gitopia/gitopia/release.js +0 -225
  123. package/dist/esm/gitopia/gitopia/gitopia/repository.js +0 -1200
  124. package/dist/esm/gitopia/gitopia/gitopia/tag.js +0 -125
  125. package/dist/esm/gitopia/gitopia/gitopia/task.js +0 -197
  126. package/dist/esm/gitopia/gitopia/gitopia/tx.amino.js +0 -464
  127. package/dist/esm/gitopia/gitopia/gitopia/tx.js +0 -14679
  128. package/dist/esm/gitopia/gitopia/gitopia/tx.registry.js +0 -1671
  129. package/dist/esm/gitopia/gitopia/gitopia/tx.rpc.msg.js +0 -560
  130. package/dist/esm/gitopia/gitopia/gitopia/user.js +0 -340
  131. package/dist/esm/gitopia/gitopia/gitopia/whois.js +0 -146
  132. package/dist/esm/gitopia/gitopia/offchain/offchain.js +0 -144
  133. package/dist/esm/gitopia/gitopia/rewards/genesis.js +0 -82
  134. package/dist/esm/gitopia/gitopia/rewards/params.js +0 -81
  135. package/dist/esm/gitopia/gitopia/rewards/pool.js +0 -191
  136. package/dist/esm/gitopia/gitopia/rewards/query.js +0 -654
  137. package/dist/esm/gitopia/gitopia/rewards/query.lcd.js +0 -40
  138. package/dist/esm/gitopia/gitopia/rewards/query.rpc.Query.js +0 -53
  139. package/dist/esm/gitopia/gitopia/rewards/rewards.js +0 -191
  140. package/dist/esm/gitopia/gitopia/rewards/task.js +0 -176
  141. package/dist/esm/gitopia/gitopia/rewards/tx.amino.js +0 -19
  142. package/dist/esm/gitopia/gitopia/rewards/tx.js +0 -525
  143. package/dist/esm/gitopia/gitopia/rewards/tx.registry.js +0 -69
  144. package/dist/esm/gitopia/gitopia/rewards/tx.rpc.msg.js +0 -26
  145. package/dist/esm/gitopia/rpc.query.js +0 -29
  146. package/dist/esm/gitopia/rpc.tx.js +0 -13
  147. package/dist/esm/gogoproto/bundle.js +0 -5
  148. package/dist/esm/gogoproto/gogo.js +0 -1
  149. package/dist/esm/google/api/annotations.js +0 -1
  150. package/dist/esm/google/api/http.js +0 -329
  151. package/dist/esm/google/bundle.js +0 -14
  152. package/dist/esm/google/protobuf/any.js +0 -74
  153. package/dist/esm/google/protobuf/descriptor.js +0 -4848
  154. package/dist/esm/google/protobuf/duration.js +0 -71
  155. package/dist/esm/google/protobuf/timestamp.js +0 -68
  156. package/dist/esm/helpers.js +0 -129
  157. package/dist/esm/ibc/applications/transfer/v1/query.js +0 -847
  158. package/dist/esm/ibc/applications/transfer/v1/query.lcd.js +0 -70
  159. package/dist/esm/ibc/applications/transfer/v1/query.rpc.Query.js +0 -71
  160. package/dist/esm/ibc/applications/transfer/v1/transfer.js +0 -164
  161. package/dist/esm/ibc/applications/transfer/v1/tx.amino.js +0 -9
  162. package/dist/esm/ibc/applications/transfer/v1/tx.js +0 -226
  163. package/dist/esm/ibc/applications/transfer/v1/tx.registry.js +0 -33
  164. package/dist/esm/ibc/applications/transfer/v1/tx.rpc.msg.js +0 -14
  165. package/dist/esm/ibc/bundle.js +0 -44
  166. package/dist/esm/ibc/client.js +0 -29
  167. package/dist/esm/ibc/core/client/v1/client.js +0 -611
  168. package/dist/esm/ibc/rpc.query.js +0 -30
  169. package/dist/esm/ibc/rpc.tx.js +0 -14
  170. package/dist/esm/index.js +0 -19
  171. package/dist/esm/utf8.js +0 -137
  172. package/dist/esm/varint.js +0 -408
  173. package/dist/gitopia/bundle.d.ts +0 -6123
  174. package/dist/gitopia/bundle.js +0 -131
  175. package/dist/gitopia/client.d.ts +0 -492
  176. package/dist/gitopia/client.js +0 -70
  177. package/dist/gitopia/custom-lcd-client.d.ts +0 -31
  178. package/dist/gitopia/custom-lcd-client.js +0 -87
  179. package/dist/gitopia/gitopia/gitopia/attachment.d.ts +0 -39
  180. package/dist/gitopia/gitopia/gitopia/attachment.js +0 -104
  181. package/dist/gitopia/gitopia/gitopia/bounty.d.ts +0 -79
  182. package/dist/gitopia/gitopia/gitopia/bounty.js +0 -262
  183. package/dist/gitopia/gitopia/gitopia/branch.d.ts +0 -48
  184. package/dist/gitopia/gitopia/gitopia/branch.js +0 -140
  185. package/dist/gitopia/gitopia/gitopia/comment.d.ts +0 -125
  186. package/dist/gitopia/gitopia/gitopia/comment.js +0 -495
  187. package/dist/gitopia/gitopia/gitopia/dao.d.ts +0 -160
  188. package/dist/gitopia/gitopia/gitopia/dao.js +0 -454
  189. package/dist/gitopia/gitopia/gitopia/exercised_amount.d.ts +0 -34
  190. package/dist/gitopia/gitopia/gitopia/exercised_amount.js +0 -81
  191. package/dist/gitopia/gitopia/gitopia/genesis.d.ts +0 -143
  192. package/dist/gitopia/gitopia/gitopia/genesis.js +0 -463
  193. package/dist/gitopia/gitopia/gitopia/issue.d.ts +0 -88
  194. package/dist/gitopia/gitopia/gitopia/issue.js +0 -328
  195. package/dist/gitopia/gitopia/gitopia/params.d.ts +0 -115
  196. package/dist/gitopia/gitopia/gitopia/params.js +0 -296
  197. package/dist/gitopia/gitopia/gitopia/pullRequest.d.ts +0 -177
  198. package/dist/gitopia/gitopia/gitopia/pullRequest.js +0 -570
  199. package/dist/gitopia/gitopia/gitopia/query.d.ts +0 -3130
  200. package/dist/gitopia/gitopia/gitopia/query.js +0 -7355
  201. package/dist/gitopia/gitopia/gitopia/query.lcd.d.ts +0 -54
  202. package/dist/gitopia/gitopia/gitopia/query.lcd.js +0 -456
  203. package/dist/gitopia/gitopia/gitopia/query.rpc.Query.d.ts +0 -188
  204. package/dist/gitopia/gitopia/gitopia/query.rpc.Query.js +0 -458
  205. package/dist/gitopia/gitopia/gitopia/reaction.d.ts +0 -42
  206. package/dist/gitopia/gitopia/gitopia/reaction.js +0 -128
  207. package/dist/gitopia/gitopia/gitopia/release.d.ts +0 -70
  208. package/dist/gitopia/gitopia/gitopia/release.js +0 -228
  209. package/dist/gitopia/gitopia/gitopia/repository.d.ts +0 -424
  210. package/dist/gitopia/gitopia/gitopia/repository.js +0 -1207
  211. package/dist/gitopia/gitopia/gitopia/tag.d.ts +0 -45
  212. package/dist/gitopia/gitopia/gitopia/tag.js +0 -128
  213. package/dist/gitopia/gitopia/gitopia/task.d.ts +0 -64
  214. package/dist/gitopia/gitopia/gitopia/task.js +0 -204
  215. package/dist/gitopia/gitopia/gitopia/tx.amino.d.ts +0 -463
  216. package/dist/gitopia/gitopia/gitopia/tx.amino.js +0 -467
  217. package/dist/gitopia/gitopia/gitopia/tx.d.ts +0 -6246
  218. package/dist/gitopia/gitopia/gitopia/tx.js +0 -14687
  219. package/dist/gitopia/gitopia/gitopia/tx.registry.d.ts +0 -1116
  220. package/dist/gitopia/gitopia/gitopia/tx.registry.js +0 -1675
  221. package/dist/gitopia/gitopia/gitopia/tx.rpc.msg.d.ts +0 -200
  222. package/dist/gitopia/gitopia/gitopia/tx.rpc.msg.js +0 -564
  223. package/dist/gitopia/gitopia/gitopia/user.d.ts +0 -104
  224. package/dist/gitopia/gitopia/gitopia/user.js +0 -343
  225. package/dist/gitopia/gitopia/gitopia/whois.d.ts +0 -51
  226. package/dist/gitopia/gitopia/gitopia/whois.js +0 -151
  227. package/dist/gitopia/gitopia/offchain/offchain.d.ts +0 -74
  228. package/dist/gitopia/gitopia/offchain/offchain.js +0 -147
  229. package/dist/gitopia/gitopia/rewards/genesis.d.ts +0 -40
  230. package/dist/gitopia/gitopia/rewards/genesis.js +0 -85
  231. package/dist/gitopia/gitopia/rewards/params.d.ts +0 -37
  232. package/dist/gitopia/gitopia/rewards/params.js +0 -84
  233. package/dist/gitopia/gitopia/rewards/pool.d.ts +0 -59
  234. package/dist/gitopia/gitopia/rewards/pool.js +0 -196
  235. package/dist/gitopia/gitopia/rewards/query.d.ts +0 -294
  236. package/dist/gitopia/gitopia/rewards/query.js +0 -657
  237. package/dist/gitopia/gitopia/rewards/query.lcd.d.ts +0 -12
  238. package/dist/gitopia/gitopia/rewards/query.lcd.js +0 -44
  239. package/dist/gitopia/gitopia/rewards/query.rpc.Query.d.ts +0 -28
  240. package/dist/gitopia/gitopia/rewards/query.rpc.Query.js +0 -58
  241. package/dist/gitopia/gitopia/rewards/rewards.d.ts +0 -79
  242. package/dist/gitopia/gitopia/rewards/rewards.js +0 -194
  243. package/dist/gitopia/gitopia/rewards/task.d.ts +0 -54
  244. package/dist/gitopia/gitopia/rewards/task.js +0 -181
  245. package/dist/gitopia/gitopia/rewards/tx.amino.d.ts +0 -18
  246. package/dist/gitopia/gitopia/rewards/tx.amino.js +0 -22
  247. package/dist/gitopia/gitopia/rewards/tx.d.ts +0 -242
  248. package/dist/gitopia/gitopia/rewards/tx.js +0 -528
  249. package/dist/gitopia/gitopia/rewards/tx.registry.d.ts +0 -48
  250. package/dist/gitopia/gitopia/rewards/tx.registry.js +0 -73
  251. package/dist/gitopia/gitopia/rewards/tx.rpc.msg.d.ts +0 -19
  252. package/dist/gitopia/gitopia/rewards/tx.rpc.msg.js +0 -30
  253. package/dist/gitopia/rpc.query.d.ts +0 -117
  254. package/dist/gitopia/rpc.query.js +0 -66
  255. package/dist/gitopia/rpc.tx.d.ts +0 -16
  256. package/dist/gitopia/rpc.tx.js +0 -50
  257. package/dist/gogoproto/bundle.d.ts +0 -1
  258. package/dist/gogoproto/bundle.js +0 -41
  259. package/dist/gogoproto/gogo.d.ts +0 -1
  260. package/dist/gogoproto/gogo.js +0 -2
  261. package/dist/google/api/annotations.d.ts +0 -1
  262. package/dist/google/api/annotations.js +0 -2
  263. package/dist/google/api/http.d.ts +0 -1049
  264. package/dist/google/api/http.js +0 -332
  265. package/dist/google/bundle.d.ts +0 -525
  266. package/dist/google/bundle.js +0 -50
  267. package/dist/google/protobuf/any.d.ts +0 -358
  268. package/dist/google/protobuf/any.js +0 -77
  269. package/dist/google/protobuf/descriptor.d.ts +0 -3178
  270. package/dist/google/protobuf/descriptor.js +0 -4886
  271. package/dist/google/protobuf/duration.d.ts +0 -223
  272. package/dist/google/protobuf/duration.js +0 -74
  273. package/dist/google/protobuf/timestamp.d.ts +0 -314
  274. package/dist/google/protobuf/timestamp.js +0 -71
  275. package/dist/helpers.d.ts +0 -82
  276. package/dist/helpers.js +0 -144
  277. package/dist/ibc/applications/transfer/v1/query.d.ts +0 -479
  278. package/dist/ibc/applications/transfer/v1/query.js +0 -850
  279. package/dist/ibc/applications/transfer/v1/query.lcd.d.ts +0 -14
  280. package/dist/ibc/applications/transfer/v1/query.lcd.js +0 -74
  281. package/dist/ibc/applications/transfer/v1/query.rpc.Query.d.ts +0 -36
  282. package/dist/ibc/applications/transfer/v1/query.rpc.Query.js +0 -76
  283. package/dist/ibc/applications/transfer/v1/transfer.d.ts +0 -123
  284. package/dist/ibc/applications/transfer/v1/transfer.js +0 -167
  285. package/dist/ibc/applications/transfer/v1/tx.amino.d.ts +0 -8
  286. package/dist/ibc/applications/transfer/v1/tx.amino.js +0 -12
  287. package/dist/ibc/applications/transfer/v1/tx.d.ts +0 -132
  288. package/dist/ibc/applications/transfer/v1/tx.js +0 -229
  289. package/dist/ibc/applications/transfer/v1/tx.registry.d.ts +0 -24
  290. package/dist/ibc/applications/transfer/v1/tx.registry.js +0 -37
  291. package/dist/ibc/applications/transfer/v1/tx.rpc.msg.d.ts +0 -12
  292. package/dist/ibc/applications/transfer/v1/tx.rpc.msg.js +0 -18
  293. package/dist/ibc/bundle.d.ts +0 -450
  294. package/dist/ibc/bundle.js +0 -80
  295. package/dist/ibc/client.d.ts +0 -22
  296. package/dist/ibc/client.js +0 -67
  297. package/dist/ibc/core/client/v1/client.d.ts +0 -408
  298. package/dist/ibc/core/client/v1/client.js +0 -614
  299. package/dist/ibc/rpc.query.d.ts +0 -73
  300. package/dist/ibc/rpc.query.js +0 -67
  301. package/dist/ibc/rpc.tx.d.ts +0 -17
  302. package/dist/ibc/rpc.tx.js +0 -51
  303. package/dist/index.d.ts +0 -18
  304. package/dist/index.js +0 -35
  305. package/dist/package.json +0 -46
  306. package/dist/utf8.d.ts +0 -27
  307. package/dist/utf8.js +0 -141
  308. package/dist/varint.d.ts +0 -105
  309. package/dist/varint.js +0 -426
@@ -1,223 +0,0 @@
1
- import { BinaryReader, BinaryWriter } from "../../binary";
2
- /**
3
- * A Duration represents a signed, fixed-length span of time represented
4
- * as a count of seconds and fractions of seconds at nanosecond
5
- * resolution. It is independent of any calendar and concepts like "day"
6
- * or "month". It is related to Timestamp in that the difference between
7
- * two Timestamp values is a Duration and it can be added or subtracted
8
- * from a Timestamp. Range is approximately +-10,000 years.
9
- *
10
- * # Examples
11
- *
12
- * Example 1: Compute Duration from two Timestamps in pseudo code.
13
- *
14
- * Timestamp start = ...;
15
- * Timestamp end = ...;
16
- * Duration duration = ...;
17
- *
18
- * duration.seconds = end.seconds - start.seconds;
19
- * duration.nanos = end.nanos - start.nanos;
20
- *
21
- * if (duration.seconds < 0 && duration.nanos > 0) {
22
- * duration.seconds += 1;
23
- * duration.nanos -= 1000000000;
24
- * } else if (duration.seconds > 0 && duration.nanos < 0) {
25
- * duration.seconds -= 1;
26
- * duration.nanos += 1000000000;
27
- * }
28
- *
29
- * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
30
- *
31
- * Timestamp start = ...;
32
- * Duration duration = ...;
33
- * Timestamp end = ...;
34
- *
35
- * end.seconds = start.seconds + duration.seconds;
36
- * end.nanos = start.nanos + duration.nanos;
37
- *
38
- * if (end.nanos < 0) {
39
- * end.seconds -= 1;
40
- * end.nanos += 1000000000;
41
- * } else if (end.nanos >= 1000000000) {
42
- * end.seconds += 1;
43
- * end.nanos -= 1000000000;
44
- * }
45
- *
46
- * Example 3: Compute Duration from datetime.timedelta in Python.
47
- *
48
- * td = datetime.timedelta(days=3, minutes=10)
49
- * duration = Duration()
50
- * duration.FromTimedelta(td)
51
- *
52
- * # JSON Mapping
53
- *
54
- * In JSON format, the Duration type is encoded as a string rather than an
55
- * object, where the string ends in the suffix "s" (indicating seconds) and
56
- * is preceded by the number of seconds, with nanoseconds expressed as
57
- * fractional seconds. For example, 3 seconds with 0 nanoseconds should be
58
- * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
59
- * be expressed in JSON format as "3.000000001s", and 3 seconds and 1
60
- * microsecond should be expressed in JSON format as "3.000001s".
61
- */
62
- export interface Duration {
63
- /**
64
- * Signed seconds of the span of time. Must be from -315,576,000,000
65
- * to +315,576,000,000 inclusive. Note: these bounds are computed from:
66
- * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
67
- */
68
- seconds: bigint;
69
- /**
70
- * Signed fractions of a second at nanosecond resolution of the span
71
- * of time. Durations less than one second are represented with a 0
72
- * `seconds` field and a positive or negative `nanos` field. For durations
73
- * of one second or more, a non-zero value for the `nanos` field must be
74
- * of the same sign as the `seconds` field. Must be from -999,999,999
75
- * to +999,999,999 inclusive.
76
- */
77
- nanos: number;
78
- }
79
- export interface DurationProtoMsg {
80
- typeUrl: "/google.protobuf.Duration";
81
- value: Uint8Array;
82
- }
83
- /**
84
- * A Duration represents a signed, fixed-length span of time represented
85
- * as a count of seconds and fractions of seconds at nanosecond
86
- * resolution. It is independent of any calendar and concepts like "day"
87
- * or "month". It is related to Timestamp in that the difference between
88
- * two Timestamp values is a Duration and it can be added or subtracted
89
- * from a Timestamp. Range is approximately +-10,000 years.
90
- *
91
- * # Examples
92
- *
93
- * Example 1: Compute Duration from two Timestamps in pseudo code.
94
- *
95
- * Timestamp start = ...;
96
- * Timestamp end = ...;
97
- * Duration duration = ...;
98
- *
99
- * duration.seconds = end.seconds - start.seconds;
100
- * duration.nanos = end.nanos - start.nanos;
101
- *
102
- * if (duration.seconds < 0 && duration.nanos > 0) {
103
- * duration.seconds += 1;
104
- * duration.nanos -= 1000000000;
105
- * } else if (duration.seconds > 0 && duration.nanos < 0) {
106
- * duration.seconds -= 1;
107
- * duration.nanos += 1000000000;
108
- * }
109
- *
110
- * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
111
- *
112
- * Timestamp start = ...;
113
- * Duration duration = ...;
114
- * Timestamp end = ...;
115
- *
116
- * end.seconds = start.seconds + duration.seconds;
117
- * end.nanos = start.nanos + duration.nanos;
118
- *
119
- * if (end.nanos < 0) {
120
- * end.seconds -= 1;
121
- * end.nanos += 1000000000;
122
- * } else if (end.nanos >= 1000000000) {
123
- * end.seconds += 1;
124
- * end.nanos -= 1000000000;
125
- * }
126
- *
127
- * Example 3: Compute Duration from datetime.timedelta in Python.
128
- *
129
- * td = datetime.timedelta(days=3, minutes=10)
130
- * duration = Duration()
131
- * duration.FromTimedelta(td)
132
- *
133
- * # JSON Mapping
134
- *
135
- * In JSON format, the Duration type is encoded as a string rather than an
136
- * object, where the string ends in the suffix "s" (indicating seconds) and
137
- * is preceded by the number of seconds, with nanoseconds expressed as
138
- * fractional seconds. For example, 3 seconds with 0 nanoseconds should be
139
- * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
140
- * be expressed in JSON format as "3.000000001s", and 3 seconds and 1
141
- * microsecond should be expressed in JSON format as "3.000001s".
142
- */
143
- export type DurationAmino = string;
144
- export interface DurationAminoMsg {
145
- type: "/google.protobuf.Duration";
146
- value: DurationAmino;
147
- }
148
- /**
149
- * A Duration represents a signed, fixed-length span of time represented
150
- * as a count of seconds and fractions of seconds at nanosecond
151
- * resolution. It is independent of any calendar and concepts like "day"
152
- * or "month". It is related to Timestamp in that the difference between
153
- * two Timestamp values is a Duration and it can be added or subtracted
154
- * from a Timestamp. Range is approximately +-10,000 years.
155
- *
156
- * # Examples
157
- *
158
- * Example 1: Compute Duration from two Timestamps in pseudo code.
159
- *
160
- * Timestamp start = ...;
161
- * Timestamp end = ...;
162
- * Duration duration = ...;
163
- *
164
- * duration.seconds = end.seconds - start.seconds;
165
- * duration.nanos = end.nanos - start.nanos;
166
- *
167
- * if (duration.seconds < 0 && duration.nanos > 0) {
168
- * duration.seconds += 1;
169
- * duration.nanos -= 1000000000;
170
- * } else if (duration.seconds > 0 && duration.nanos < 0) {
171
- * duration.seconds -= 1;
172
- * duration.nanos += 1000000000;
173
- * }
174
- *
175
- * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
176
- *
177
- * Timestamp start = ...;
178
- * Duration duration = ...;
179
- * Timestamp end = ...;
180
- *
181
- * end.seconds = start.seconds + duration.seconds;
182
- * end.nanos = start.nanos + duration.nanos;
183
- *
184
- * if (end.nanos < 0) {
185
- * end.seconds -= 1;
186
- * end.nanos += 1000000000;
187
- * } else if (end.nanos >= 1000000000) {
188
- * end.seconds += 1;
189
- * end.nanos -= 1000000000;
190
- * }
191
- *
192
- * Example 3: Compute Duration from datetime.timedelta in Python.
193
- *
194
- * td = datetime.timedelta(days=3, minutes=10)
195
- * duration = Duration()
196
- * duration.FromTimedelta(td)
197
- *
198
- * # JSON Mapping
199
- *
200
- * In JSON format, the Duration type is encoded as a string rather than an
201
- * object, where the string ends in the suffix "s" (indicating seconds) and
202
- * is preceded by the number of seconds, with nanoseconds expressed as
203
- * fractional seconds. For example, 3 seconds with 0 nanoseconds should be
204
- * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
205
- * be expressed in JSON format as "3.000000001s", and 3 seconds and 1
206
- * microsecond should be expressed in JSON format as "3.000001s".
207
- */
208
- export interface DurationSDKType {
209
- seconds: bigint;
210
- nanos: number;
211
- }
212
- export declare const Duration: {
213
- typeUrl: string;
214
- encode(message: Duration, writer?: BinaryWriter): BinaryWriter;
215
- decode(input: BinaryReader | Uint8Array, length?: number): Duration;
216
- fromPartial(object: Partial<Duration>): Duration;
217
- fromAmino(object: DurationAmino): Duration;
218
- toAmino(message: Duration): DurationAmino;
219
- fromAminoMsg(object: DurationAminoMsg): Duration;
220
- fromProtoMsg(message: DurationProtoMsg): Duration;
221
- toProto(message: Duration): Uint8Array;
222
- toProtoMsg(message: Duration): DurationProtoMsg;
223
- };
@@ -1,74 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Duration = void 0;
4
- //@ts-nocheck
5
- const binary_1 = require("../../binary");
6
- function createBaseDuration() {
7
- return {
8
- seconds: BigInt(0),
9
- nanos: 0
10
- };
11
- }
12
- exports.Duration = {
13
- typeUrl: "/google.protobuf.Duration",
14
- encode(message, writer = binary_1.BinaryWriter.create()) {
15
- if (message.seconds !== BigInt(0)) {
16
- writer.uint32(8).int64(message.seconds);
17
- }
18
- if (message.nanos !== 0) {
19
- writer.uint32(16).int32(message.nanos);
20
- }
21
- return writer;
22
- },
23
- decode(input, length) {
24
- const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
25
- let end = length === undefined ? reader.len : reader.pos + length;
26
- const message = createBaseDuration();
27
- while (reader.pos < end) {
28
- const tag = reader.uint32();
29
- switch (tag >>> 3) {
30
- case 1:
31
- message.seconds = reader.int64();
32
- break;
33
- case 2:
34
- message.nanos = reader.int32();
35
- break;
36
- default:
37
- reader.skipType(tag & 7);
38
- break;
39
- }
40
- }
41
- return message;
42
- },
43
- fromPartial(object) {
44
- const message = createBaseDuration();
45
- message.seconds = object.seconds !== undefined && object.seconds !== null ? BigInt(object.seconds.toString()) : BigInt(0);
46
- message.nanos = object.nanos ?? 0;
47
- return message;
48
- },
49
- fromAmino(object) {
50
- const value = BigInt(object);
51
- return {
52
- seconds: value / BigInt("1000000000"),
53
- nanos: Number(value % BigInt("1000000000"))
54
- };
55
- },
56
- toAmino(message) {
57
- return (message.seconds * BigInt("1000000000") + BigInt(message.nanos)).toString();
58
- },
59
- fromAminoMsg(object) {
60
- return exports.Duration.fromAmino(object.value);
61
- },
62
- fromProtoMsg(message) {
63
- return exports.Duration.decode(message.value);
64
- },
65
- toProto(message) {
66
- return exports.Duration.encode(message).finish();
67
- },
68
- toProtoMsg(message) {
69
- return {
70
- typeUrl: "/google.protobuf.Duration",
71
- value: exports.Duration.encode(message).finish()
72
- };
73
- }
74
- };
@@ -1,314 +0,0 @@
1
- import { BinaryReader, BinaryWriter } from "../../binary";
2
- /**
3
- * A Timestamp represents a point in time independent of any time zone or local
4
- * calendar, encoded as a count of seconds and fractions of seconds at
5
- * nanosecond resolution. The count is relative to an epoch at UTC midnight on
6
- * January 1, 1970, in the proleptic Gregorian calendar which extends the
7
- * Gregorian calendar backwards to year one.
8
- *
9
- * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
10
- * second table is needed for interpretation, using a [24-hour linear
11
- * smear](https://developers.google.com/time/smear).
12
- *
13
- * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
14
- * restricting to that range, we ensure that we can convert to and from [RFC
15
- * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
16
- *
17
- * # Examples
18
- *
19
- * Example 1: Compute Timestamp from POSIX `time()`.
20
- *
21
- * Timestamp timestamp;
22
- * timestamp.set_seconds(time(NULL));
23
- * timestamp.set_nanos(0);
24
- *
25
- * Example 2: Compute Timestamp from POSIX `gettimeofday()`.
26
- *
27
- * struct timeval tv;
28
- * gettimeofday(&tv, NULL);
29
- *
30
- * Timestamp timestamp;
31
- * timestamp.set_seconds(tv.tv_sec);
32
- * timestamp.set_nanos(tv.tv_usec * 1000);
33
- *
34
- * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
35
- *
36
- * FILETIME ft;
37
- * GetSystemTimeAsFileTime(&ft);
38
- * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
39
- *
40
- * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
41
- * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
42
- * Timestamp timestamp;
43
- * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
44
- * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
45
- *
46
- * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
47
- *
48
- * long millis = System.currentTimeMillis();
49
- *
50
- * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
51
- * .setNanos((int) ((millis % 1000) * 1000000)).build();
52
- *
53
- * Example 5: Compute Timestamp from Java `Instant.now()`.
54
- *
55
- * Instant now = Instant.now();
56
- *
57
- * Timestamp timestamp =
58
- * Timestamp.newBuilder().setSeconds(now.getEpochSecond())
59
- * .setNanos(now.getNano()).build();
60
- *
61
- * Example 6: Compute Timestamp from current time in Python.
62
- *
63
- * timestamp = Timestamp()
64
- * timestamp.GetCurrentTime()
65
- *
66
- * # JSON Mapping
67
- *
68
- * In JSON format, the Timestamp type is encoded as a string in the
69
- * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
70
- * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
71
- * where {year} is always expressed using four digits while {month}, {day},
72
- * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
73
- * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
74
- * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
75
- * is required. A proto3 JSON serializer should always use UTC (as indicated by
76
- * "Z") when printing the Timestamp type and a proto3 JSON parser should be
77
- * able to accept both UTC and other timezones (as indicated by an offset).
78
- *
79
- * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
80
- * 01:30 UTC on January 15, 2017.
81
- *
82
- * In JavaScript, one can convert a Date object to this format using the
83
- * standard
84
- * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
85
- * method. In Python, a standard `datetime.datetime` object can be converted
86
- * to this format using
87
- * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
88
- * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
89
- * the Joda Time's [`ISODateTimeFormat.dateTime()`](
90
- * http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
91
- * ) to obtain a formatter capable of generating timestamps in this format.
92
- */
93
- export interface Timestamp {
94
- /**
95
- * Represents seconds of UTC time since Unix epoch
96
- * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
97
- * 9999-12-31T23:59:59Z inclusive.
98
- */
99
- seconds: bigint;
100
- /**
101
- * Non-negative fractions of a second at nanosecond resolution. Negative
102
- * second values with fractions must still have non-negative nanos values
103
- * that count forward in time. Must be from 0 to 999,999,999
104
- * inclusive.
105
- */
106
- nanos: number;
107
- }
108
- export interface TimestampProtoMsg {
109
- typeUrl: "/google.protobuf.Timestamp";
110
- value: Uint8Array;
111
- }
112
- /**
113
- * A Timestamp represents a point in time independent of any time zone or local
114
- * calendar, encoded as a count of seconds and fractions of seconds at
115
- * nanosecond resolution. The count is relative to an epoch at UTC midnight on
116
- * January 1, 1970, in the proleptic Gregorian calendar which extends the
117
- * Gregorian calendar backwards to year one.
118
- *
119
- * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
120
- * second table is needed for interpretation, using a [24-hour linear
121
- * smear](https://developers.google.com/time/smear).
122
- *
123
- * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
124
- * restricting to that range, we ensure that we can convert to and from [RFC
125
- * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
126
- *
127
- * # Examples
128
- *
129
- * Example 1: Compute Timestamp from POSIX `time()`.
130
- *
131
- * Timestamp timestamp;
132
- * timestamp.set_seconds(time(NULL));
133
- * timestamp.set_nanos(0);
134
- *
135
- * Example 2: Compute Timestamp from POSIX `gettimeofday()`.
136
- *
137
- * struct timeval tv;
138
- * gettimeofday(&tv, NULL);
139
- *
140
- * Timestamp timestamp;
141
- * timestamp.set_seconds(tv.tv_sec);
142
- * timestamp.set_nanos(tv.tv_usec * 1000);
143
- *
144
- * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
145
- *
146
- * FILETIME ft;
147
- * GetSystemTimeAsFileTime(&ft);
148
- * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
149
- *
150
- * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
151
- * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
152
- * Timestamp timestamp;
153
- * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
154
- * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
155
- *
156
- * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
157
- *
158
- * long millis = System.currentTimeMillis();
159
- *
160
- * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
161
- * .setNanos((int) ((millis % 1000) * 1000000)).build();
162
- *
163
- * Example 5: Compute Timestamp from Java `Instant.now()`.
164
- *
165
- * Instant now = Instant.now();
166
- *
167
- * Timestamp timestamp =
168
- * Timestamp.newBuilder().setSeconds(now.getEpochSecond())
169
- * .setNanos(now.getNano()).build();
170
- *
171
- * Example 6: Compute Timestamp from current time in Python.
172
- *
173
- * timestamp = Timestamp()
174
- * timestamp.GetCurrentTime()
175
- *
176
- * # JSON Mapping
177
- *
178
- * In JSON format, the Timestamp type is encoded as a string in the
179
- * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
180
- * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
181
- * where {year} is always expressed using four digits while {month}, {day},
182
- * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
183
- * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
184
- * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
185
- * is required. A proto3 JSON serializer should always use UTC (as indicated by
186
- * "Z") when printing the Timestamp type and a proto3 JSON parser should be
187
- * able to accept both UTC and other timezones (as indicated by an offset).
188
- *
189
- * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
190
- * 01:30 UTC on January 15, 2017.
191
- *
192
- * In JavaScript, one can convert a Date object to this format using the
193
- * standard
194
- * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
195
- * method. In Python, a standard `datetime.datetime` object can be converted
196
- * to this format using
197
- * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
198
- * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
199
- * the Joda Time's [`ISODateTimeFormat.dateTime()`](
200
- * http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
201
- * ) to obtain a formatter capable of generating timestamps in this format.
202
- */
203
- export type TimestampAmino = string;
204
- export interface TimestampAminoMsg {
205
- type: "/google.protobuf.Timestamp";
206
- value: TimestampAmino;
207
- }
208
- /**
209
- * A Timestamp represents a point in time independent of any time zone or local
210
- * calendar, encoded as a count of seconds and fractions of seconds at
211
- * nanosecond resolution. The count is relative to an epoch at UTC midnight on
212
- * January 1, 1970, in the proleptic Gregorian calendar which extends the
213
- * Gregorian calendar backwards to year one.
214
- *
215
- * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
216
- * second table is needed for interpretation, using a [24-hour linear
217
- * smear](https://developers.google.com/time/smear).
218
- *
219
- * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
220
- * restricting to that range, we ensure that we can convert to and from [RFC
221
- * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
222
- *
223
- * # Examples
224
- *
225
- * Example 1: Compute Timestamp from POSIX `time()`.
226
- *
227
- * Timestamp timestamp;
228
- * timestamp.set_seconds(time(NULL));
229
- * timestamp.set_nanos(0);
230
- *
231
- * Example 2: Compute Timestamp from POSIX `gettimeofday()`.
232
- *
233
- * struct timeval tv;
234
- * gettimeofday(&tv, NULL);
235
- *
236
- * Timestamp timestamp;
237
- * timestamp.set_seconds(tv.tv_sec);
238
- * timestamp.set_nanos(tv.tv_usec * 1000);
239
- *
240
- * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
241
- *
242
- * FILETIME ft;
243
- * GetSystemTimeAsFileTime(&ft);
244
- * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
245
- *
246
- * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
247
- * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
248
- * Timestamp timestamp;
249
- * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
250
- * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
251
- *
252
- * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
253
- *
254
- * long millis = System.currentTimeMillis();
255
- *
256
- * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
257
- * .setNanos((int) ((millis % 1000) * 1000000)).build();
258
- *
259
- * Example 5: Compute Timestamp from Java `Instant.now()`.
260
- *
261
- * Instant now = Instant.now();
262
- *
263
- * Timestamp timestamp =
264
- * Timestamp.newBuilder().setSeconds(now.getEpochSecond())
265
- * .setNanos(now.getNano()).build();
266
- *
267
- * Example 6: Compute Timestamp from current time in Python.
268
- *
269
- * timestamp = Timestamp()
270
- * timestamp.GetCurrentTime()
271
- *
272
- * # JSON Mapping
273
- *
274
- * In JSON format, the Timestamp type is encoded as a string in the
275
- * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
276
- * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
277
- * where {year} is always expressed using four digits while {month}, {day},
278
- * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
279
- * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
280
- * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
281
- * is required. A proto3 JSON serializer should always use UTC (as indicated by
282
- * "Z") when printing the Timestamp type and a proto3 JSON parser should be
283
- * able to accept both UTC and other timezones (as indicated by an offset).
284
- *
285
- * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
286
- * 01:30 UTC on January 15, 2017.
287
- *
288
- * In JavaScript, one can convert a Date object to this format using the
289
- * standard
290
- * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
291
- * method. In Python, a standard `datetime.datetime` object can be converted
292
- * to this format using
293
- * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
294
- * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
295
- * the Joda Time's [`ISODateTimeFormat.dateTime()`](
296
- * http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
297
- * ) to obtain a formatter capable of generating timestamps in this format.
298
- */
299
- export interface TimestampSDKType {
300
- seconds: bigint;
301
- nanos: number;
302
- }
303
- export declare const Timestamp: {
304
- typeUrl: string;
305
- encode(message: Timestamp, writer?: BinaryWriter): BinaryWriter;
306
- decode(input: BinaryReader | Uint8Array, length?: number): Timestamp;
307
- fromPartial(object: Partial<Timestamp>): Timestamp;
308
- fromAmino(object: TimestampAmino): Timestamp;
309
- toAmino(message: Timestamp): TimestampAmino;
310
- fromAminoMsg(object: TimestampAminoMsg): Timestamp;
311
- fromProtoMsg(message: TimestampProtoMsg): Timestamp;
312
- toProto(message: Timestamp): Uint8Array;
313
- toProtoMsg(message: Timestamp): TimestampProtoMsg;
314
- };
@@ -1,71 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Timestamp = void 0;
4
- //@ts-nocheck
5
- const binary_1 = require("../../binary");
6
- const helpers_1 = require("../../helpers");
7
- function createBaseTimestamp() {
8
- return {
9
- seconds: BigInt(0),
10
- nanos: 0
11
- };
12
- }
13
- exports.Timestamp = {
14
- typeUrl: "/google.protobuf.Timestamp",
15
- encode(message, writer = binary_1.BinaryWriter.create()) {
16
- if (message.seconds !== BigInt(0)) {
17
- writer.uint32(8).int64(message.seconds);
18
- }
19
- if (message.nanos !== 0) {
20
- writer.uint32(16).int32(message.nanos);
21
- }
22
- return writer;
23
- },
24
- decode(input, length) {
25
- const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
26
- let end = length === undefined ? reader.len : reader.pos + length;
27
- const message = createBaseTimestamp();
28
- while (reader.pos < end) {
29
- const tag = reader.uint32();
30
- switch (tag >>> 3) {
31
- case 1:
32
- message.seconds = reader.int64();
33
- break;
34
- case 2:
35
- message.nanos = reader.int32();
36
- break;
37
- default:
38
- reader.skipType(tag & 7);
39
- break;
40
- }
41
- }
42
- return message;
43
- },
44
- fromPartial(object) {
45
- const message = createBaseTimestamp();
46
- message.seconds = object.seconds !== undefined && object.seconds !== null ? BigInt(object.seconds.toString()) : BigInt(0);
47
- message.nanos = object.nanos ?? 0;
48
- return message;
49
- },
50
- fromAmino(object) {
51
- return (0, helpers_1.fromJsonTimestamp)(object);
52
- },
53
- toAmino(message) {
54
- return (0, helpers_1.fromTimestamp)(message).toISOString().replace(/\.\d+Z$/, "Z");
55
- },
56
- fromAminoMsg(object) {
57
- return exports.Timestamp.fromAmino(object.value);
58
- },
59
- fromProtoMsg(message) {
60
- return exports.Timestamp.decode(message.value);
61
- },
62
- toProto(message) {
63
- return exports.Timestamp.encode(message).finish();
64
- },
65
- toProtoMsg(message) {
66
- return {
67
- typeUrl: "/google.protobuf.Timestamp",
68
- value: exports.Timestamp.encode(message).finish()
69
- };
70
- }
71
- };