bitbadgesjs-sdk 0.0.6 → 0.1.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 (341) hide show
  1. package/dist/amino/objectConverter.d.ts +1 -1
  2. package/dist/amino/objectConverter.d.ts.map +1 -1
  3. package/dist/amino/registry.js +3 -3
  4. package/dist/amino/registry.js.map +1 -1
  5. package/dist/eip712/payload/createTypedData.d.ts +1 -1
  6. package/dist/eip712/payload/createTypedData.d.ts.map +1 -1
  7. package/dist/eip712/payload/createTypes/parseMessage.d.ts +1 -1
  8. package/dist/eip712/payload/createTypes/parseMessage.d.ts.map +1 -1
  9. package/dist/eip712/payload/createTypes/parseMessage.js.map +1 -1
  10. package/dist/eip712/payload/createTypes/parsePayload.d.ts +1 -1
  11. package/dist/eip712/payload/createTypes/parsePayload.d.ts.map +1 -1
  12. package/dist/eip712/payload/createTypes/parsePayload.js.map +1 -1
  13. package/dist/eip712/payload/flattenPayload.d.ts +1 -1
  14. package/dist/eip712/payload/flattenPayload.d.ts.map +1 -1
  15. package/dist/eip712/payload/samples/getSampleMsg.js +1 -1
  16. package/dist/eip712/payload/samples/getSampleMsg.js.map +1 -1
  17. package/dist/index.d.ts +9 -9
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +9 -9
  20. package/dist/index.js.map +1 -1
  21. package/dist/transactions/messages/base.d.ts +3 -3
  22. package/dist/transactions/messages/base.d.ts.map +1 -1
  23. package/dist/transactions/messages/base.js +6 -9
  24. package/dist/transactions/messages/base.js.map +1 -1
  25. package/dist/transactions/messages/bitbadges/badges/msgCreateAddressLists.d.ts +12 -5
  26. package/dist/transactions/messages/bitbadges/badges/msgCreateAddressLists.d.ts.map +1 -1
  27. package/dist/transactions/messages/bitbadges/badges/msgCreateAddressLists.js +26 -14
  28. package/dist/transactions/messages/bitbadges/badges/msgCreateAddressLists.js.map +1 -1
  29. package/dist/transactions/messages/bitbadges/badges/msgCreateCollection.d.ts +24 -6
  30. package/dist/transactions/messages/bitbadges/badges/msgCreateCollection.d.ts.map +1 -1
  31. package/dist/transactions/messages/bitbadges/badges/msgCreateCollection.js +75 -43
  32. package/dist/transactions/messages/bitbadges/badges/msgCreateCollection.js.map +1 -1
  33. package/dist/transactions/messages/bitbadges/badges/msgDeleteCollection.d.ts +14 -6
  34. package/dist/transactions/messages/bitbadges/badges/msgDeleteCollection.d.ts.map +1 -1
  35. package/dist/transactions/messages/bitbadges/badges/msgDeleteCollection.js +32 -21
  36. package/dist/transactions/messages/bitbadges/badges/msgDeleteCollection.js.map +1 -1
  37. package/dist/transactions/messages/bitbadges/badges/msgTransferBadges.d.ts +14 -6
  38. package/dist/transactions/messages/bitbadges/badges/msgTransferBadges.d.ts.map +1 -1
  39. package/dist/transactions/messages/bitbadges/badges/msgTransferBadges.js +35 -23
  40. package/dist/transactions/messages/bitbadges/badges/msgTransferBadges.js.map +1 -1
  41. package/dist/transactions/messages/bitbadges/badges/msgUniversalUpdateCollection.d.ts +22 -6
  42. package/dist/transactions/messages/bitbadges/badges/msgUniversalUpdateCollection.d.ts.map +1 -1
  43. package/dist/transactions/messages/bitbadges/badges/msgUniversalUpdateCollection.js +118 -55
  44. package/dist/transactions/messages/bitbadges/badges/msgUniversalUpdateCollection.js.map +1 -1
  45. package/dist/transactions/messages/bitbadges/badges/msgUpdateCollection.d.ts +11 -6
  46. package/dist/transactions/messages/bitbadges/badges/msgUpdateCollection.d.ts.map +1 -1
  47. package/dist/transactions/messages/bitbadges/badges/msgUpdateCollection.js +108 -52
  48. package/dist/transactions/messages/bitbadges/badges/msgUpdateCollection.js.map +1 -1
  49. package/dist/transactions/messages/bitbadges/badges/msgUpdateUserApprovals.d.ts +23 -6
  50. package/dist/transactions/messages/bitbadges/badges/msgUpdateUserApprovals.d.ts.map +1 -1
  51. package/dist/transactions/messages/bitbadges/badges/msgUpdateUserApprovals.js +71 -31
  52. package/dist/transactions/messages/bitbadges/badges/msgUpdateUserApprovals.js.map +1 -1
  53. package/dist/transactions/messages/bitbadges/protocols/msgCreateProtocol.d.ts +15 -3
  54. package/dist/transactions/messages/bitbadges/protocols/msgCreateProtocol.d.ts.map +1 -1
  55. package/dist/transactions/messages/bitbadges/protocols/msgCreateProtocol.js +35 -6
  56. package/dist/transactions/messages/bitbadges/protocols/msgCreateProtocol.js.map +1 -1
  57. package/dist/transactions/messages/bitbadges/protocols/msgDeleteProtocol.d.ts +12 -5
  58. package/dist/transactions/messages/bitbadges/protocols/msgDeleteProtocol.d.ts.map +1 -1
  59. package/dist/transactions/messages/bitbadges/protocols/msgDeleteProtocol.js +26 -6
  60. package/dist/transactions/messages/bitbadges/protocols/msgDeleteProtocol.js.map +1 -1
  61. package/dist/transactions/messages/bitbadges/protocols/msgSetCollectionForProtocol.d.ts +14 -4
  62. package/dist/transactions/messages/bitbadges/protocols/msgSetCollectionForProtocol.d.ts.map +1 -1
  63. package/dist/transactions/messages/bitbadges/protocols/msgSetCollectionForProtocol.js +36 -6
  64. package/dist/transactions/messages/bitbadges/protocols/msgSetCollectionForProtocol.js.map +1 -1
  65. package/dist/transactions/messages/bitbadges/protocols/msgUnsetCollectionForProtocol.d.ts +12 -3
  66. package/dist/transactions/messages/bitbadges/protocols/msgUnsetCollectionForProtocol.d.ts.map +1 -1
  67. package/dist/transactions/messages/bitbadges/protocols/msgUnsetCollectionForProtocol.js +26 -6
  68. package/dist/transactions/messages/bitbadges/protocols/msgUnsetCollectionForProtocol.js.map +1 -1
  69. package/dist/transactions/messages/bitbadges/protocols/msgUpdateProtocol.d.ts +15 -3
  70. package/dist/transactions/messages/bitbadges/protocols/msgUpdateProtocol.d.ts.map +1 -1
  71. package/dist/transactions/messages/bitbadges/protocols/msgUpdateProtocol.js +35 -6
  72. package/dist/transactions/messages/bitbadges/protocols/msgUpdateProtocol.js.map +1 -1
  73. package/dist/transactions/messages/bitbadges/wasmx/msgExecuteContractCompat.d.ts +14 -3
  74. package/dist/transactions/messages/bitbadges/wasmx/msgExecuteContractCompat.d.ts.map +1 -1
  75. package/dist/transactions/messages/bitbadges/wasmx/msgExecuteContractCompat.js +32 -6
  76. package/dist/transactions/messages/bitbadges/wasmx/msgExecuteContractCompat.js.map +1 -1
  77. package/dist/transactions/messages/bitbadges/wasmx/msgInstantiateContractCompat.d.ts +14 -3
  78. package/dist/transactions/messages/bitbadges/wasmx/msgInstantiateContractCompat.d.ts.map +1 -1
  79. package/dist/transactions/messages/bitbadges/wasmx/msgInstantiateContractCompat.js +32 -11
  80. package/dist/transactions/messages/bitbadges/wasmx/msgInstantiateContractCompat.js.map +1 -1
  81. package/dist/transactions/messages/bitbadges/wasmx/msgStoreCodeCompat.d.ts +15 -2
  82. package/dist/transactions/messages/bitbadges/wasmx/msgStoreCodeCompat.d.ts.map +1 -1
  83. package/dist/transactions/messages/bitbadges/wasmx/msgStoreCodeCompat.js +26 -9
  84. package/dist/transactions/messages/bitbadges/wasmx/msgStoreCodeCompat.js.map +1 -1
  85. package/dist/transactions/messages/common.d.ts +1 -1
  86. package/dist/transactions/messages/common.d.ts.map +1 -1
  87. package/dist/transactions/messages/msgSend.d.ts +2 -2
  88. package/dist/transactions/messages/msgSend.d.ts.map +1 -1
  89. package/dist/transactions/messages/transaction.d.ts +2 -2
  90. package/dist/transactions/messages/transaction.d.ts.map +1 -1
  91. package/dist/transactions/messages/transaction.js +1 -1
  92. package/dist/transactions/messages/transaction.js.map +1 -1
  93. package/dist/transactions/messages/txRaw.d.ts +2 -2
  94. package/dist/transactions/messages/txRaw.d.ts.map +1 -1
  95. package/dist/transactions/messages/txRaw.js.map +1 -1
  96. package/dist/transactions/messages/web3Extension.d.ts +2 -2
  97. package/dist/transactions/messages/web3Extension.d.ts.map +1 -1
  98. package/dist/transactions/messages/web3Extension.js +4 -4
  99. package/dist/transactions/messages/web3Extension.js.map +1 -1
  100. package/dist/tsconfig.build.tsbuildinfo +1 -1
  101. package/dist/types/badges/aminoRegistry.d.ts +3 -0
  102. package/dist/types/badges/aminoRegistry.d.ts.map +1 -0
  103. package/dist/types/badges/aminoRegistry.js.map +1 -0
  104. package/dist/{proto-types → types}/badges/string-numbers.d.ts +2 -2
  105. package/dist/types/badges/string-numbers.d.ts.map +1 -0
  106. package/dist/types/badges/string-numbers.js.map +1 -0
  107. package/dist/types/badges/typeutils/approvals.d.ts +320 -0
  108. package/dist/types/badges/typeutils/approvals.d.ts.map +1 -0
  109. package/dist/types/badges/typeutils/approvals.js +690 -0
  110. package/dist/types/badges/typeutils/approvals.js.map +1 -0
  111. package/dist/types/badges/typeutils/permissions.d.ts +230 -0
  112. package/dist/types/badges/typeutils/permissions.d.ts.map +1 -0
  113. package/dist/types/badges/typeutils/permissions.js +675 -0
  114. package/dist/types/badges/typeutils/permissions.js.map +1 -0
  115. package/dist/types/badges/typeutils/typeUtils.d.ts +411 -0
  116. package/dist/types/badges/typeutils/typeUtils.d.ts.map +1 -0
  117. package/dist/types/badges/typeutils/typeUtils.js +1086 -0
  118. package/dist/types/badges/typeutils/typeUtils.js.map +1 -0
  119. package/dist/{proto-types → types}/base.d.ts +1 -1
  120. package/dist/types/base.d.ts.map +1 -0
  121. package/dist/types/base.js.map +1 -0
  122. package/dist/types/protocols/aminoRegistry.d.ts +3 -0
  123. package/dist/types/protocols/aminoRegistry.d.ts.map +1 -0
  124. package/dist/types/protocols/aminoRegistry.js.map +1 -0
  125. package/dist/types/protocols/types.d.ts +24 -0
  126. package/dist/types/protocols/types.d.ts.map +1 -0
  127. package/dist/types/protocols/types.js +50 -0
  128. package/dist/types/protocols/types.js.map +1 -0
  129. package/dist/types/txRaw.d.ts.map +1 -0
  130. package/dist/types/txRaw.js.map +1 -0
  131. package/dist/{proto-types → types}/utils.d.ts +2 -1
  132. package/dist/types/utils.d.ts.map +1 -0
  133. package/dist/types/utils.js.map +1 -0
  134. package/dist/types/wasmx/aminoRegistry.d.ts +3 -0
  135. package/dist/types/wasmx/aminoRegistry.d.ts.map +1 -0
  136. package/dist/types/wasmx/aminoRegistry.js.map +1 -0
  137. package/dist/{proto-types → types}/web3Extension.d.ts +1 -1
  138. package/dist/types/web3Extension.d.ts.map +1 -0
  139. package/dist/{proto-types → types}/web3Extension.js +3 -3
  140. package/dist/types/web3Extension.js.map +1 -0
  141. package/dist/utils/addressLists.d.ts +1 -4
  142. package/dist/utils/addressLists.d.ts.map +1 -1
  143. package/dist/utils/addressLists.js +28 -44
  144. package/dist/utils/addressLists.js.map +1 -1
  145. package/dist/utils/aliases.d.ts +1 -1
  146. package/dist/utils/aliases.d.ts.map +1 -1
  147. package/dist/utils/api-sdk.d.ts +40 -45
  148. package/dist/utils/api-sdk.d.ts.map +1 -1
  149. package/dist/utils/api-sdk.js +84 -137
  150. package/dist/utils/api-sdk.js.map +1 -1
  151. package/dist/utils/api-utils.d.ts +3 -2
  152. package/dist/utils/api-utils.d.ts.map +1 -1
  153. package/dist/utils/api-utils.js +19 -37
  154. package/dist/utils/api-utils.js.map +1 -1
  155. package/dist/utils/approved_transfers_casts.d.ts.map +1 -1
  156. package/dist/utils/approved_transfers_casts.js +27 -24
  157. package/dist/utils/approved_transfers_casts.js.map +1 -1
  158. package/dist/utils/badgeMetadata.d.ts +4 -4
  159. package/dist/utils/badgeMetadata.d.ts.map +1 -1
  160. package/dist/utils/badgeMetadata.js +19 -17
  161. package/dist/utils/badgeMetadata.js.map +1 -1
  162. package/dist/utils/balances.d.ts +12 -16
  163. package/dist/utils/balances.d.ts.map +1 -1
  164. package/dist/utils/balances.js +119 -141
  165. package/dist/utils/balances.js.map +1 -1
  166. package/dist/utils/batch-utils.d.ts +11 -4
  167. package/dist/utils/batch-utils.d.ts.map +1 -1
  168. package/dist/utils/batch-utils.js +41 -20
  169. package/dist/utils/batch-utils.js.map +1 -1
  170. package/dist/utils/chains.d.ts +0 -2
  171. package/dist/utils/chains.d.ts.map +1 -1
  172. package/dist/utils/chains.js +12 -15
  173. package/dist/utils/chains.js.map +1 -1
  174. package/dist/utils/constants.d.ts.map +1 -1
  175. package/dist/utils/constants.js +5 -4
  176. package/dist/utils/constants.js.map +1 -1
  177. package/dist/utils/display.d.ts +1 -1
  178. package/dist/utils/display.d.ts.map +1 -1
  179. package/dist/utils/display.js +7 -5
  180. package/dist/utils/display.js.map +1 -1
  181. package/dist/utils/distribution.d.ts +4 -4
  182. package/dist/utils/distribution.d.ts.map +1 -1
  183. package/dist/utils/distribution.js +32 -31
  184. package/dist/utils/distribution.js.map +1 -1
  185. package/dist/utils/firstMatches.d.ts +2 -2
  186. package/dist/utils/firstMatches.d.ts.map +1 -1
  187. package/dist/utils/firstMatches.js +20 -19
  188. package/dist/utils/firstMatches.js.map +1 -1
  189. package/dist/utils/index.d.ts +1 -2
  190. package/dist/utils/index.d.ts.map +1 -1
  191. package/dist/utils/index.js +1 -2
  192. package/dist/utils/index.js.map +1 -1
  193. package/dist/utils/math.d.ts +8 -2
  194. package/dist/utils/math.d.ts.map +1 -1
  195. package/dist/utils/math.js +63 -15
  196. package/dist/utils/math.js.map +1 -1
  197. package/dist/utils/metadataIds.d.ts +2 -2
  198. package/dist/utils/metadataIds.d.ts.map +1 -1
  199. package/dist/utils/metadataIds.js +8 -8
  200. package/dist/utils/metadataIds.js.map +1 -1
  201. package/dist/utils/node-rest-api/balances.d.ts +1 -1
  202. package/dist/utils/node-rest-api/balances.d.ts.map +1 -1
  203. package/dist/utils/node-rest-api/gov.d.ts +1 -1
  204. package/dist/utils/node-rest-api/gov.d.ts.map +1 -1
  205. package/dist/utils/node-rest-api/staking.d.ts +1 -1
  206. package/dist/utils/node-rest-api/staking.d.ts.map +1 -1
  207. package/dist/utils/overlaps.d.ts.map +1 -1
  208. package/dist/utils/overlaps.js +67 -67
  209. package/dist/utils/overlaps.js.map +1 -1
  210. package/dist/utils/permission_checks.d.ts +10 -10
  211. package/dist/utils/permission_checks.d.ts.map +1 -1
  212. package/dist/utils/permission_checks.js +58 -57
  213. package/dist/utils/permission_checks.js.map +1 -1
  214. package/dist/utils/permissions.d.ts +2 -2
  215. package/dist/utils/permissions.d.ts.map +1 -1
  216. package/dist/utils/permissions.js +20 -18
  217. package/dist/utils/permissions.js.map +1 -1
  218. package/dist/utils/types/activity.d.ts +51 -74
  219. package/dist/utils/types/activity.d.ts.map +1 -1
  220. package/dist/utils/types/activity.js +118 -105
  221. package/dist/utils/types/activity.js.map +1 -1
  222. package/dist/utils/types/api.d.ts +349 -134
  223. package/dist/utils/types/api.d.ts.map +1 -1
  224. package/dist/utils/types/api.js +512 -248
  225. package/dist/utils/types/api.js.map +1 -1
  226. package/dist/utils/types/coin.d.ts +9 -3
  227. package/dist/utils/types/coin.d.ts.map +1 -1
  228. package/dist/utils/types/coin.js +17 -9
  229. package/dist/utils/types/coin.js.map +1 -1
  230. package/dist/utils/types/collections.d.ts +263 -26
  231. package/dist/utils/types/collections.d.ts.map +1 -1
  232. package/dist/utils/types/collections.js +717 -99
  233. package/dist/utils/types/collections.js.map +1 -1
  234. package/dist/utils/types/db.d.ts +434 -187
  235. package/dist/utils/types/db.d.ts.map +1 -1
  236. package/dist/utils/types/db.js +859 -502
  237. package/dist/utils/types/db.js.map +1 -1
  238. package/dist/utils/types/indexer.d.ts +2 -2
  239. package/dist/utils/types/indexer.d.ts.map +1 -1
  240. package/dist/utils/types/metadata.d.ts +77 -9
  241. package/dist/utils/types/metadata.d.ts.map +1 -1
  242. package/dist/utils/types/metadata.js +133 -18
  243. package/dist/utils/types/metadata.js.map +1 -1
  244. package/dist/utils/types/routes.d.ts +49 -47
  245. package/dist/utils/types/routes.d.ts.map +1 -1
  246. package/dist/utils/types/routes.js +50 -93
  247. package/dist/utils/types/routes.js.map +1 -1
  248. package/dist/utils/types/schemas.d.ts +120 -0
  249. package/dist/utils/types/schemas.d.ts.map +1 -0
  250. package/dist/utils/types/schemas.js +261 -0
  251. package/dist/utils/types/schemas.js.map +1 -0
  252. package/dist/utils/types/transfers.d.ts +11 -5
  253. package/dist/utils/types/transfers.d.ts.map +1 -1
  254. package/dist/utils/types/transfers.js +22 -13
  255. package/dist/utils/types/transfers.js.map +1 -1
  256. package/dist/utils/types/types.d.ts +6 -6
  257. package/dist/utils/types/types.d.ts.map +1 -1
  258. package/dist/utils/types/types.js +3 -6
  259. package/dist/utils/types/types.js.map +1 -1
  260. package/dist/utils/types/users.d.ts +125 -15
  261. package/dist/utils/types/users.d.ts.map +1 -1
  262. package/dist/utils/types/users.js +275 -57
  263. package/dist/utils/types/users.js.map +1 -1
  264. package/dist/utils/uintRanges.d.ts +10 -14
  265. package/dist/utils/uintRanges.d.ts.map +1 -1
  266. package/dist/utils/uintRanges.js +53 -65
  267. package/dist/utils/uintRanges.js.map +1 -1
  268. package/dist/utils/update_checks.d.ts +2 -2
  269. package/dist/utils/update_checks.d.ts.map +1 -1
  270. package/dist/utils/update_checks.js +247 -185
  271. package/dist/utils/update_checks.js.map +1 -1
  272. package/dist/utils/userApprovals.d.ts.map +1 -1
  273. package/dist/utils/userApprovals.js +19 -34
  274. package/dist/utils/userApprovals.js.map +1 -1
  275. package/dist/utils/validate_permissions_updates.d.ts +2 -2
  276. package/dist/utils/validate_permissions_updates.d.ts.map +1 -1
  277. package/dist/utils/validate_permissions_updates.js.map +1 -1
  278. package/package.json +8 -16
  279. package/dist/proto-types/badges/aminoRegistry.d.ts +0 -3
  280. package/dist/proto-types/badges/aminoRegistry.d.ts.map +0 -1
  281. package/dist/proto-types/badges/aminoRegistry.js.map +0 -1
  282. package/dist/proto-types/badges/string-numbers.d.ts.map +0 -1
  283. package/dist/proto-types/badges/string-numbers.js.map +0 -1
  284. package/dist/proto-types/badges/typeutils/approvals.d.ts +0 -127
  285. package/dist/proto-types/badges/typeutils/approvals.d.ts.map +0 -1
  286. package/dist/proto-types/badges/typeutils/approvals.js +0 -209
  287. package/dist/proto-types/badges/typeutils/approvals.js.map +0 -1
  288. package/dist/proto-types/badges/typeutils/permissions.d.ts +0 -88
  289. package/dist/proto-types/badges/typeutils/permissions.d.ts.map +0 -1
  290. package/dist/proto-types/badges/typeutils/permissions.js +0 -124
  291. package/dist/proto-types/badges/typeutils/permissions.js.map +0 -1
  292. package/dist/proto-types/badges/typeutils/typeUtils.d.ts +0 -119
  293. package/dist/proto-types/badges/typeutils/typeUtils.d.ts.map +0 -1
  294. package/dist/proto-types/badges/typeutils/typeUtils.js +0 -146
  295. package/dist/proto-types/badges/typeutils/typeUtils.js.map +0 -1
  296. package/dist/proto-types/base.d.ts.map +0 -1
  297. package/dist/proto-types/base.js.map +0 -1
  298. package/dist/proto-types/protocols/aminoRegistry.d.ts +0 -3
  299. package/dist/proto-types/protocols/aminoRegistry.d.ts.map +0 -1
  300. package/dist/proto-types/protocols/aminoRegistry.js.map +0 -1
  301. package/dist/proto-types/protocols/types.d.ts +0 -8
  302. package/dist/proto-types/protocols/types.d.ts.map +0 -1
  303. package/dist/proto-types/protocols/types.js +0 -3
  304. package/dist/proto-types/protocols/types.js.map +0 -1
  305. package/dist/proto-types/txRaw.d.ts.map +0 -1
  306. package/dist/proto-types/txRaw.js.map +0 -1
  307. package/dist/proto-types/utils.d.ts.map +0 -1
  308. package/dist/proto-types/utils.js.map +0 -1
  309. package/dist/proto-types/wasmx/aminoRegistry.d.ts +0 -3
  310. package/dist/proto-types/wasmx/aminoRegistry.d.ts.map +0 -1
  311. package/dist/proto-types/wasmx/aminoRegistry.js.map +0 -1
  312. package/dist/proto-types/web3Extension.d.ts.map +0 -1
  313. package/dist/proto-types/web3Extension.js.map +0 -1
  314. package/dist/utils/collections.d.ts +0 -7
  315. package/dist/utils/collections.d.ts.map +0 -1
  316. package/dist/utils/collections.js +0 -99
  317. package/dist/utils/collections.js.map +0 -1
  318. package/dist/utils/timeline_helpers.d.ts +0 -30
  319. package/dist/utils/timeline_helpers.d.ts.map +0 -1
  320. package/dist/utils/timeline_helpers.js +0 -74
  321. package/dist/utils/timeline_helpers.js.map +0 -1
  322. package/dist/utils/timelines.d.ts +0 -32
  323. package/dist/utils/timelines.d.ts.map +0 -1
  324. package/dist/utils/timelines.js +0 -106
  325. package/dist/utils/timelines.js.map +0 -1
  326. package/dist/utils/types/utils.d.ts +0 -2
  327. package/dist/utils/types/utils.d.ts.map +0 -1
  328. package/dist/utils/types/utils.js +0 -26
  329. package/dist/utils/types/utils.js.map +0 -1
  330. package/dist/utils/utils/compare.d.ts +0 -2
  331. package/dist/utils/utils/compare.d.ts.map +0 -1
  332. package/dist/utils/utils/compare.js +0 -42
  333. package/dist/utils/utils/compare.js.map +0 -1
  334. /package/dist/{proto-types → types}/badges/aminoRegistry.js +0 -0
  335. /package/dist/{proto-types → types}/badges/string-numbers.js +0 -0
  336. /package/dist/{proto-types → types}/base.js +0 -0
  337. /package/dist/{proto-types → types}/protocols/aminoRegistry.js +0 -0
  338. /package/dist/{proto-types → types}/txRaw.d.ts +0 -0
  339. /package/dist/{proto-types → types}/txRaw.js +0 -0
  340. /package/dist/{proto-types → types}/utils.js +0 -0
  341. /package/dist/{proto-types → types}/wasmx/aminoRegistry.js +0 -0
@@ -0,0 +1,675 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CollectionApprovalPermission = exports.TimedUpdateWithBadgeIdsPermission = exports.BalancesActionPermission = exports.TimedUpdatePermission = exports.ActionPermission = exports.CollectionPermissions = exports.getPermissionVariablesFromName = exports.UserIncomingApprovalPermission = exports.UserOutgoingApprovalPermission = exports.UserPermissions = void 0;
4
+ const __1 = require("../../..");
5
+ const string_numbers_1 = require("../string-numbers");
6
+ const typeUtils_1 = require("./typeUtils");
7
+ const proto_1 = require("../../../proto");
8
+ class UserPermissions extends typeUtils_1.BaseNumberTypeClass {
9
+ canUpdateOutgoingApprovals;
10
+ canUpdateIncomingApprovals;
11
+ canUpdateAutoApproveSelfInitiatedOutgoingTransfers;
12
+ canUpdateAutoApproveSelfInitiatedIncomingTransfers;
13
+ constructor(msg) {
14
+ super();
15
+ this.canUpdateOutgoingApprovals = msg.canUpdateOutgoingApprovals.map(x => new UserOutgoingApprovalPermission(x));
16
+ this.canUpdateIncomingApprovals = msg.canUpdateIncomingApprovals.map(x => new UserIncomingApprovalPermission(x));
17
+ this.canUpdateAutoApproveSelfInitiatedOutgoingTransfers = msg.canUpdateAutoApproveSelfInitiatedOutgoingTransfers.map(x => new ActionPermission(x));
18
+ this.canUpdateAutoApproveSelfInitiatedIncomingTransfers = msg.canUpdateAutoApproveSelfInitiatedIncomingTransfers.map(x => new ActionPermission(x));
19
+ }
20
+ static required() {
21
+ return new UserPermissions({
22
+ canUpdateOutgoingApprovals: [],
23
+ canUpdateIncomingApprovals: [],
24
+ canUpdateAutoApproveSelfInitiatedOutgoingTransfers: [],
25
+ canUpdateAutoApproveSelfInitiatedIncomingTransfers: []
26
+ });
27
+ }
28
+ convert(convertFunction) {
29
+ return new UserPermissions((0, typeUtils_1.deepCopy)({
30
+ canUpdateOutgoingApprovals: this.canUpdateOutgoingApprovals.map((x) => x.convert(convertFunction)),
31
+ canUpdateIncomingApprovals: this.canUpdateIncomingApprovals.map((x) => x.convert(convertFunction)),
32
+ canUpdateAutoApproveSelfInitiatedOutgoingTransfers: this.canUpdateAutoApproveSelfInitiatedOutgoingTransfers.map((x) => x.convert(convertFunction)),
33
+ canUpdateAutoApproveSelfInitiatedIncomingTransfers: this.canUpdateAutoApproveSelfInitiatedIncomingTransfers.map((x) => x.convert(convertFunction))
34
+ }));
35
+ }
36
+ toProto() {
37
+ return new proto_1.badges.UserPermissions(this.convert(string_numbers_1.Stringify));
38
+ }
39
+ static fromJson(jsonValue, convertFunction, options) {
40
+ return this.convertFromProto(proto_1.badges.UserPermissions.fromJson(jsonValue, options), convertFunction);
41
+ }
42
+ static fromJsonString(jsonString, convertFunction, options) {
43
+ return this.convertFromProto(proto_1.badges.UserPermissions.fromJsonString(jsonString, options), convertFunction);
44
+ }
45
+ static convertFromProto(protoMsg, convertFunction) {
46
+ return new UserPermissions({
47
+ canUpdateOutgoingApprovals: protoMsg.canUpdateOutgoingApprovals.map(x => UserOutgoingApprovalPermission.convertFromProto(x, convertFunction)),
48
+ canUpdateIncomingApprovals: protoMsg.canUpdateIncomingApprovals.map(x => UserIncomingApprovalPermission.convertFromProto(x, convertFunction)),
49
+ canUpdateAutoApproveSelfInitiatedOutgoingTransfers: protoMsg.canUpdateAutoApproveSelfInitiatedOutgoingTransfers.map(x => ActionPermission.convertFromProto(x, convertFunction)),
50
+ canUpdateAutoApproveSelfInitiatedIncomingTransfers: protoMsg.canUpdateAutoApproveSelfInitiatedIncomingTransfers.map(x => ActionPermission.convertFromProto(x, convertFunction))
51
+ });
52
+ }
53
+ }
54
+ exports.UserPermissions = UserPermissions;
55
+ class UserOutgoingApprovalPermission extends typeUtils_1.BaseNumberTypeClass {
56
+ toListId;
57
+ initiatedByListId;
58
+ transferTimes;
59
+ badgeIds;
60
+ ownershipTimes;
61
+ approvalId;
62
+ amountTrackerId;
63
+ challengeTrackerId;
64
+ permanentlyPermittedTimes;
65
+ permanentlyForbiddenTimes;
66
+ constructor(msg) {
67
+ super();
68
+ this.toListId = msg.toListId;
69
+ this.initiatedByListId = msg.initiatedByListId;
70
+ this.transferTimes = msg.transferTimes.map(x => new typeUtils_1.UintRange(x));
71
+ this.badgeIds = msg.badgeIds.map(x => new typeUtils_1.UintRange(x));
72
+ this.ownershipTimes = msg.ownershipTimes.map(x => new typeUtils_1.UintRange(x));
73
+ this.approvalId = msg.approvalId;
74
+ this.amountTrackerId = msg.amountTrackerId;
75
+ this.challengeTrackerId = msg.challengeTrackerId;
76
+ this.permanentlyPermittedTimes = msg.permanentlyPermittedTimes.map(x => new typeUtils_1.UintRange(x));
77
+ this.permanentlyForbiddenTimes = msg.permanentlyForbiddenTimes.map(x => new typeUtils_1.UintRange(x));
78
+ }
79
+ static required() {
80
+ return new UserOutgoingApprovalPermission({
81
+ toListId: '',
82
+ initiatedByListId: '',
83
+ transferTimes: [],
84
+ badgeIds: [],
85
+ ownershipTimes: [],
86
+ approvalId: '',
87
+ amountTrackerId: '',
88
+ challengeTrackerId: '',
89
+ permanentlyPermittedTimes: [],
90
+ permanentlyForbiddenTimes: []
91
+ });
92
+ }
93
+ convert(convertFunction) {
94
+ return new UserOutgoingApprovalPermission((0, typeUtils_1.deepCopy)({
95
+ toListId: this.toListId,
96
+ initiatedByListId: this.initiatedByListId,
97
+ transferTimes: this.transferTimes.map((x) => x.convert(convertFunction)),
98
+ badgeIds: this.badgeIds.map((x) => x.convert(convertFunction)),
99
+ ownershipTimes: this.ownershipTimes.map((x) => x.convert(convertFunction)),
100
+ approvalId: this.approvalId,
101
+ amountTrackerId: this.amountTrackerId,
102
+ challengeTrackerId: this.challengeTrackerId,
103
+ permanentlyPermittedTimes: this.permanentlyPermittedTimes.map((x) => x.convert(convertFunction)),
104
+ permanentlyForbiddenTimes: this.permanentlyForbiddenTimes.map((x) => x.convert(convertFunction))
105
+ }));
106
+ }
107
+ toProto() {
108
+ return new proto_1.badges.UserOutgoingApprovalPermission(this.convert(string_numbers_1.Stringify));
109
+ }
110
+ static fromJson(jsonValue, convertFunction, options) {
111
+ return this.convertFromProto(proto_1.badges.UserOutgoingApprovalPermission.fromJson(jsonValue, options), convertFunction);
112
+ }
113
+ static fromJsonString(jsonString, convertFunction, options) {
114
+ return this.convertFromProto(proto_1.badges.UserOutgoingApprovalPermission.fromJsonString(jsonString, options), convertFunction);
115
+ }
116
+ static convertFromProto(protoMsg, convertFunction) {
117
+ return new UserOutgoingApprovalPermission({
118
+ toListId: protoMsg.toListId,
119
+ initiatedByListId: protoMsg.initiatedByListId,
120
+ transferTimes: protoMsg.transferTimes.map(x => typeUtils_1.UintRange.convertFromProto(x, convertFunction)),
121
+ badgeIds: protoMsg.badgeIds.map(x => typeUtils_1.UintRange.convertFromProto(x, convertFunction)),
122
+ ownershipTimes: protoMsg.ownershipTimes.map(x => typeUtils_1.UintRange.convertFromProto(x, convertFunction)),
123
+ approvalId: protoMsg.approvalId,
124
+ amountTrackerId: protoMsg.amountTrackerId,
125
+ challengeTrackerId: protoMsg.challengeTrackerId,
126
+ permanentlyPermittedTimes: protoMsg.permanentlyPermittedTimes.map(x => typeUtils_1.UintRange.convertFromProto(x, convertFunction)),
127
+ permanentlyForbiddenTimes: protoMsg.permanentlyForbiddenTimes.map(x => typeUtils_1.UintRange.convertFromProto(x, convertFunction))
128
+ });
129
+ }
130
+ }
131
+ exports.UserOutgoingApprovalPermission = UserOutgoingApprovalPermission;
132
+ class UserIncomingApprovalPermission extends typeUtils_1.BaseNumberTypeClass {
133
+ fromListId;
134
+ initiatedByListId;
135
+ transferTimes;
136
+ badgeIds;
137
+ ownershipTimes;
138
+ approvalId;
139
+ amountTrackerId;
140
+ challengeTrackerId;
141
+ permanentlyPermittedTimes;
142
+ permanentlyForbiddenTimes;
143
+ constructor(msg) {
144
+ super();
145
+ this.fromListId = msg.fromListId;
146
+ this.initiatedByListId = msg.initiatedByListId;
147
+ this.approvalId = msg.approvalId;
148
+ this.amountTrackerId = msg.amountTrackerId;
149
+ this.challengeTrackerId = msg.challengeTrackerId;
150
+ this.transferTimes = msg.transferTimes.map(x => new typeUtils_1.UintRange(x));
151
+ this.badgeIds = msg.badgeIds.map(x => new typeUtils_1.UintRange(x));
152
+ this.ownershipTimes = msg.ownershipTimes.map(x => new typeUtils_1.UintRange(x));
153
+ this.approvalId = msg.approvalId;
154
+ this.amountTrackerId = msg.amountTrackerId;
155
+ this.challengeTrackerId = msg.challengeTrackerId;
156
+ this.permanentlyPermittedTimes = msg.permanentlyPermittedTimes.map(x => new typeUtils_1.UintRange(x));
157
+ this.permanentlyForbiddenTimes = msg.permanentlyForbiddenTimes.map(x => new typeUtils_1.UintRange(x));
158
+ }
159
+ static required() {
160
+ return new UserIncomingApprovalPermission({
161
+ fromListId: '',
162
+ initiatedByListId: '',
163
+ transferTimes: [],
164
+ badgeIds: [],
165
+ ownershipTimes: [],
166
+ approvalId: '',
167
+ amountTrackerId: '',
168
+ challengeTrackerId: '',
169
+ permanentlyPermittedTimes: [],
170
+ permanentlyForbiddenTimes: []
171
+ });
172
+ }
173
+ convert(convertFunction) {
174
+ return new UserIncomingApprovalPermission((0, typeUtils_1.deepCopy)({
175
+ fromListId: this.fromListId,
176
+ initiatedByListId: this.initiatedByListId,
177
+ transferTimes: this.transferTimes.map((x) => x.convert(convertFunction)),
178
+ badgeIds: this.badgeIds.map((x) => x.convert(convertFunction)),
179
+ ownershipTimes: this.ownershipTimes.map((x) => x.convert(convertFunction)),
180
+ approvalId: this.approvalId,
181
+ amountTrackerId: this.amountTrackerId,
182
+ challengeTrackerId: this.challengeTrackerId,
183
+ permanentlyPermittedTimes: this.permanentlyPermittedTimes.map((x) => x.convert(convertFunction)),
184
+ permanentlyForbiddenTimes: this.permanentlyForbiddenTimes.map((x) => x.convert(convertFunction))
185
+ }));
186
+ }
187
+ toProto() {
188
+ return new proto_1.badges.UserIncomingApprovalPermission(this.convert(string_numbers_1.Stringify));
189
+ }
190
+ static fromJson(jsonValue, convertFunction, options) {
191
+ return this.convertFromProto(proto_1.badges.UserIncomingApprovalPermission.fromJson(jsonValue, options), convertFunction);
192
+ }
193
+ static fromJsonString(jsonString, convertFunction, options) {
194
+ return this.convertFromProto(proto_1.badges.UserIncomingApprovalPermission.fromJsonString(jsonString, options), convertFunction);
195
+ }
196
+ static convertFromProto(protoMsg, convertFunction) {
197
+ return new UserIncomingApprovalPermission({
198
+ fromListId: protoMsg.fromListId,
199
+ initiatedByListId: protoMsg.initiatedByListId,
200
+ transferTimes: protoMsg.transferTimes.map(x => typeUtils_1.UintRange.convertFromProto(x, convertFunction)),
201
+ badgeIds: protoMsg.badgeIds.map(x => typeUtils_1.UintRange.convertFromProto(x, convertFunction)),
202
+ ownershipTimes: protoMsg.ownershipTimes.map(x => typeUtils_1.UintRange.convertFromProto(x, convertFunction)),
203
+ approvalId: protoMsg.approvalId,
204
+ amountTrackerId: protoMsg.amountTrackerId,
205
+ challengeTrackerId: protoMsg.challengeTrackerId,
206
+ permanentlyPermittedTimes: protoMsg.permanentlyPermittedTimes.map(x => typeUtils_1.UintRange.convertFromProto(x, convertFunction)),
207
+ permanentlyForbiddenTimes: protoMsg.permanentlyForbiddenTimes.map(x => typeUtils_1.UintRange.convertFromProto(x, convertFunction))
208
+ });
209
+ }
210
+ }
211
+ exports.UserIncomingApprovalPermission = UserIncomingApprovalPermission;
212
+ const getPermissionVariablesFromName = (permissionName) => {
213
+ let castFunction = () => { return []; };
214
+ let flags = __1.ApprovalPermissionUsedFlags;
215
+ let validateFunction = undefined;
216
+ let validatePermissionUpdateFunction = undefined;
217
+ switch (permissionName) {
218
+ case 'canArchiveCollection':
219
+ validateFunction = __1.validateIsArchivedUpdate;
220
+ break;
221
+ case 'canUpdateOffChainBalancesMetadata':
222
+ validateFunction = __1.validateOffChainBalancesMetadataUpdate;
223
+ break;
224
+ case 'canUpdateManager':
225
+ validateFunction = __1.validateManagerUpdate;
226
+ break;
227
+ case 'canUpdateCollectionMetadata':
228
+ validateFunction = __1.validateCollectionMetadataUpdate;
229
+ break;
230
+ case 'canUpdateBadgeMetadata':
231
+ validateFunction = __1.validateBadgeMetadataUpdate;
232
+ break;
233
+ case 'canUpdateCollectionApprovals':
234
+ validateFunction = __1.validateCollectionApprovalsUpdate;
235
+ break;
236
+ }
237
+ switch (permissionName) {
238
+ case 'canDeleteCollection':
239
+ case 'canUpdateAutoApproveSelfInitiatedOutgoingTransfers':
240
+ case 'canUpdateAutoApproveSelfInitiatedIncomingTransfers':
241
+ validatePermissionUpdateFunction = __1.validateActionPermissionUpdate;
242
+ break;
243
+ case 'canArchiveCollection':
244
+ case 'canUpdateOffChainBalancesMetadata':
245
+ case 'canUpdateStandards':
246
+ case 'canUpdateCustomData':
247
+ case 'canUpdateManager':
248
+ case 'canUpdateCollectionMetadata':
249
+ validatePermissionUpdateFunction = __1.validateTimedUpdatePermissionUpdate;
250
+ break;
251
+ case 'canCreateMoreBadges':
252
+ validatePermissionUpdateFunction = __1.validateBalancesActionPermissionUpdate;
253
+ break;
254
+ case 'canUpdateBadgeMetadata':
255
+ validatePermissionUpdateFunction = __1.validateTimedUpdateWithBadgeIdsPermissionUpdate;
256
+ break;
257
+ case 'canUpdateCollectionApprovals':
258
+ validatePermissionUpdateFunction = __1.validateCollectionApprovalPermissionsUpdate;
259
+ break;
260
+ }
261
+ let question = "";
262
+ switch (permissionName) {
263
+ case 'canDeleteCollection':
264
+ question = "Can delete the collection?";
265
+ break;
266
+ case 'canArchiveCollection':
267
+ question = "Can archive the collection?";
268
+ break;
269
+ case 'canUpdateOffChainBalancesMetadata':
270
+ question = "Can update the off-chain balances metadata?";
271
+ break;
272
+ case 'canUpdateStandards':
273
+ question = "Can update the standards?";
274
+ break;
275
+ case 'canUpdateCustomData':
276
+ question = "Can update the custom data?";
277
+ break;
278
+ case 'canUpdateManager':
279
+ question = "Can update the manager?";
280
+ break;
281
+ case 'canUpdateCollectionMetadata':
282
+ question = "Can update the collection metadata?";
283
+ break;
284
+ case 'canCreateMoreBadges':
285
+ question = "Can create more badges?";
286
+ break;
287
+ case 'canUpdateBadgeMetadata':
288
+ question = "Can update the badge metadata?";
289
+ break;
290
+ case 'canUpdateCollectionApprovals':
291
+ question = "Can update collection approvals?";
292
+ break;
293
+ case 'canUpdateAutoApproveSelfInitiatedOutgoingTransfers':
294
+ question = "Can update auto approve self initiated outgoing transfers?";
295
+ break;
296
+ case 'canUpdateAutoApproveSelfInitiatedIncomingTransfers':
297
+ question = "Can update auto approve self initiated incoming transfers?";
298
+ break;
299
+ }
300
+ switch (permissionName) {
301
+ case 'canDeleteCollection':
302
+ case 'canUpdateAutoApproveSelfInitiatedOutgoingTransfers':
303
+ case 'canUpdateAutoApproveSelfInitiatedIncomingTransfers':
304
+ castFunction = __1.castActionPermissionToUniversalPermission;
305
+ flags = __1.ActionPermissionUsedFlags;
306
+ break;
307
+ case 'canArchiveCollection':
308
+ case 'canUpdateOffChainBalancesMetadata':
309
+ case 'canUpdateStandards':
310
+ case 'canUpdateCustomData':
311
+ case 'canUpdateManager':
312
+ case 'canUpdateCollectionMetadata':
313
+ castFunction = __1.castTimedUpdatePermissionToUniversalPermission;
314
+ flags = __1.TimedUpdatePermissionUsedFlags;
315
+ break;
316
+ case 'canCreateMoreBadges':
317
+ castFunction = __1.castBalancesActionPermissionToUniversalPermission;
318
+ flags = __1.BalancesActionPermissionUsedFlags;
319
+ break;
320
+ case 'canUpdateBadgeMetadata':
321
+ castFunction = __1.castTimedUpdateWithBadgeIdsPermissionToUniversalPermission;
322
+ flags = __1.TimedUpdateWithBadgeIdsPermissionUsedFlags;
323
+ break;
324
+ case 'canUpdateCollectionApprovals':
325
+ castFunction = __1.castCollectionApprovalPermissionToUniversalPermission;
326
+ flags = __1.ApprovalPermissionUsedFlags;
327
+ break;
328
+ }
329
+ if (!castFunction)
330
+ throw new Error('');
331
+ return {
332
+ castFunction,
333
+ flags,
334
+ question,
335
+ validateFunction,
336
+ validatePermissionUpdateFunction
337
+ };
338
+ };
339
+ exports.getPermissionVariablesFromName = getPermissionVariablesFromName;
340
+ class CollectionPermissions extends typeUtils_1.BaseNumberTypeClass {
341
+ canDeleteCollection;
342
+ canArchiveCollection;
343
+ canUpdateOffChainBalancesMetadata;
344
+ canUpdateStandards;
345
+ canUpdateCustomData;
346
+ canUpdateManager;
347
+ canUpdateCollectionMetadata;
348
+ canCreateMoreBadges;
349
+ canUpdateBadgeMetadata;
350
+ canUpdateCollectionApprovals;
351
+ constructor(msg) {
352
+ super();
353
+ this.canDeleteCollection = msg.canDeleteCollection.map(x => new ActionPermission(x));
354
+ this.canArchiveCollection = msg.canArchiveCollection.map(x => new TimedUpdatePermission(x));
355
+ this.canUpdateOffChainBalancesMetadata = msg.canUpdateOffChainBalancesMetadata.map(x => new TimedUpdatePermission(x));
356
+ this.canUpdateStandards = msg.canUpdateStandards.map(x => new TimedUpdatePermission(x));
357
+ this.canUpdateCustomData = msg.canUpdateCustomData.map(x => new TimedUpdatePermission(x));
358
+ this.canUpdateManager = msg.canUpdateManager.map(x => new TimedUpdatePermission(x));
359
+ this.canUpdateCollectionMetadata = msg.canUpdateCollectionMetadata.map(x => new TimedUpdatePermission(x));
360
+ this.canCreateMoreBadges = msg.canCreateMoreBadges.map(x => new BalancesActionPermission(x));
361
+ this.canUpdateBadgeMetadata = msg.canUpdateBadgeMetadata.map(x => new TimedUpdateWithBadgeIdsPermission(x));
362
+ this.canUpdateCollectionApprovals = msg.canUpdateCollectionApprovals.map(x => new CollectionApprovalPermission(x));
363
+ }
364
+ static required() {
365
+ return new CollectionPermissions({
366
+ canDeleteCollection: [],
367
+ canArchiveCollection: [],
368
+ canUpdateOffChainBalancesMetadata: [],
369
+ canUpdateStandards: [],
370
+ canUpdateCustomData: [],
371
+ canUpdateManager: [],
372
+ canUpdateCollectionMetadata: [],
373
+ canCreateMoreBadges: [],
374
+ canUpdateBadgeMetadata: [],
375
+ canUpdateCollectionApprovals: []
376
+ });
377
+ }
378
+ convert(convertFunction) {
379
+ return new CollectionPermissions((0, typeUtils_1.deepCopy)({
380
+ canDeleteCollection: this.canDeleteCollection.map((x) => x.convert(convertFunction)),
381
+ canArchiveCollection: this.canArchiveCollection.map((x) => x.convert(convertFunction)),
382
+ canUpdateOffChainBalancesMetadata: this.canUpdateOffChainBalancesMetadata.map((x) => x.convert(convertFunction)),
383
+ canUpdateStandards: this.canUpdateStandards.map((x) => x.convert(convertFunction)),
384
+ canUpdateCustomData: this.canUpdateCustomData.map((x) => x.convert(convertFunction)),
385
+ canUpdateManager: this.canUpdateManager.map((x) => x.convert(convertFunction)),
386
+ canUpdateCollectionMetadata: this.canUpdateCollectionMetadata.map((x) => x.convert(convertFunction)),
387
+ canCreateMoreBadges: this.canCreateMoreBadges.map((x) => x.convert(convertFunction)),
388
+ canUpdateBadgeMetadata: this.canUpdateBadgeMetadata.map((x) => x.convert(convertFunction)),
389
+ canUpdateCollectionApprovals: this.canUpdateCollectionApprovals.map((x) => x.convert(convertFunction))
390
+ }));
391
+ }
392
+ toProto() {
393
+ return new proto_1.badges.CollectionPermissions(this.convert(string_numbers_1.Stringify));
394
+ }
395
+ static fromJson(jsonValue, convertFunction, options) {
396
+ return this.convertFromProto(proto_1.badges.CollectionPermissions.fromJson(jsonValue, options), convertFunction);
397
+ }
398
+ static fromJsonString(jsonString, convertFunction, options) {
399
+ return this.convertFromProto(proto_1.badges.CollectionPermissions.fromJsonString(jsonString, options), convertFunction);
400
+ }
401
+ static convertFromProto(protoMsg, convertFunction) {
402
+ return new CollectionPermissions({
403
+ canDeleteCollection: protoMsg.canDeleteCollection.map(x => ActionPermission.convertFromProto(x, convertFunction)),
404
+ canArchiveCollection: protoMsg.canArchiveCollection.map(x => TimedUpdatePermission.convertFromProto(x, convertFunction)),
405
+ canUpdateOffChainBalancesMetadata: protoMsg.canUpdateOffChainBalancesMetadata.map(x => TimedUpdatePermission.convertFromProto(x, convertFunction)),
406
+ canUpdateStandards: protoMsg.canUpdateStandards.map(x => TimedUpdatePermission.convertFromProto(x, convertFunction)),
407
+ canUpdateCustomData: protoMsg.canUpdateCustomData.map(x => TimedUpdatePermission.convertFromProto(x, convertFunction)),
408
+ canUpdateManager: protoMsg.canUpdateManager.map(x => TimedUpdatePermission.convertFromProto(x, convertFunction)),
409
+ canUpdateCollectionMetadata: protoMsg.canUpdateCollectionMetadata.map(x => TimedUpdatePermission.convertFromProto(x, convertFunction)),
410
+ canCreateMoreBadges: protoMsg.canCreateMoreBadges.map(x => BalancesActionPermission.convertFromProto(x, convertFunction)),
411
+ canUpdateBadgeMetadata: protoMsg.canUpdateBadgeMetadata.map(x => TimedUpdateWithBadgeIdsPermission.convertFromProto(x, convertFunction)),
412
+ canUpdateCollectionApprovals: protoMsg.canUpdateCollectionApprovals.map(x => CollectionApprovalPermission.convertFromProto(x, convertFunction))
413
+ });
414
+ }
415
+ }
416
+ exports.CollectionPermissions = CollectionPermissions;
417
+ class ActionPermission extends typeUtils_1.BaseNumberTypeClass {
418
+ permanentlyPermittedTimes;
419
+ permanentlyForbiddenTimes;
420
+ constructor(msg) {
421
+ super();
422
+ this.permanentlyPermittedTimes = msg.permanentlyPermittedTimes.map(x => new typeUtils_1.UintRange(x));
423
+ this.permanentlyForbiddenTimes = msg.permanentlyForbiddenTimes.map(x => new typeUtils_1.UintRange(x));
424
+ }
425
+ static required() {
426
+ return new ActionPermission({
427
+ permanentlyPermittedTimes: [],
428
+ permanentlyForbiddenTimes: []
429
+ });
430
+ }
431
+ convert(convertFunction) {
432
+ return new ActionPermission((0, typeUtils_1.deepCopy)({
433
+ permanentlyPermittedTimes: this.permanentlyPermittedTimes.map((x) => x.convert(convertFunction)),
434
+ permanentlyForbiddenTimes: this.permanentlyForbiddenTimes.map((x) => x.convert(convertFunction))
435
+ }));
436
+ }
437
+ toProto() {
438
+ return new proto_1.badges.ActionPermission(this.convert(string_numbers_1.Stringify));
439
+ }
440
+ static fromJson(jsonValue, convertFunction, options) {
441
+ return this.convertFromProto(proto_1.badges.ActionPermission.fromJson(jsonValue, options), convertFunction);
442
+ }
443
+ static fromJsonString(jsonString, convertFunction, options) {
444
+ return this.convertFromProto(proto_1.badges.ActionPermission.fromJsonString(jsonString, options), convertFunction);
445
+ }
446
+ static convertFromProto(protoMsg, convertFunction) {
447
+ return new ActionPermission({
448
+ permanentlyPermittedTimes: protoMsg.permanentlyPermittedTimes.map(x => typeUtils_1.UintRange.convertFromProto(x, convertFunction)),
449
+ permanentlyForbiddenTimes: protoMsg.permanentlyForbiddenTimes.map(x => typeUtils_1.UintRange.convertFromProto(x, convertFunction))
450
+ });
451
+ }
452
+ }
453
+ exports.ActionPermission = ActionPermission;
454
+ class TimedUpdatePermission extends typeUtils_1.BaseNumberTypeClass {
455
+ timelineTimes;
456
+ permanentlyPermittedTimes;
457
+ permanentlyForbiddenTimes;
458
+ constructor(msg) {
459
+ super();
460
+ this.timelineTimes = msg.timelineTimes.map(x => new typeUtils_1.UintRange(x));
461
+ this.permanentlyPermittedTimes = msg.permanentlyPermittedTimes.map(x => new typeUtils_1.UintRange(x));
462
+ this.permanentlyForbiddenTimes = msg.permanentlyForbiddenTimes.map(x => new typeUtils_1.UintRange(x));
463
+ }
464
+ static required() {
465
+ return new TimedUpdatePermission({
466
+ timelineTimes: [],
467
+ permanentlyPermittedTimes: [],
468
+ permanentlyForbiddenTimes: []
469
+ });
470
+ }
471
+ convert(convertFunction) {
472
+ return new TimedUpdatePermission((0, typeUtils_1.deepCopy)({
473
+ timelineTimes: this.timelineTimes.map((x) => x.convert(convertFunction)),
474
+ permanentlyPermittedTimes: this.permanentlyPermittedTimes.map((x) => x.convert(convertFunction)),
475
+ permanentlyForbiddenTimes: this.permanentlyForbiddenTimes.map((x) => x.convert(convertFunction))
476
+ }));
477
+ }
478
+ toProto() {
479
+ return new proto_1.badges.TimedUpdatePermission(this.convert(string_numbers_1.Stringify));
480
+ }
481
+ equals(other, normalizeNumberTypes) {
482
+ return (0, typeUtils_1.compareNumberTypeConvertibles)(this, other, normalizeNumberTypes);
483
+ }
484
+ static fromJson(jsonValue, convertFunction, options) {
485
+ return this.convertFromProto(proto_1.badges.TimedUpdatePermission.fromJson(jsonValue, options), convertFunction);
486
+ }
487
+ static fromJsonString(jsonString, convertFunction, options) {
488
+ return this.convertFromProto(proto_1.badges.TimedUpdatePermission.fromJsonString(jsonString, options), convertFunction);
489
+ }
490
+ static convertFromProto(protoMsg, convertFunction) {
491
+ return new TimedUpdatePermission({
492
+ timelineTimes: protoMsg.timelineTimes.map(x => typeUtils_1.UintRange.convertFromProto(x, convertFunction)),
493
+ permanentlyPermittedTimes: protoMsg.permanentlyPermittedTimes.map(x => typeUtils_1.UintRange.convertFromProto(x, convertFunction)),
494
+ permanentlyForbiddenTimes: protoMsg.permanentlyForbiddenTimes.map(x => typeUtils_1.UintRange.convertFromProto(x, convertFunction))
495
+ });
496
+ }
497
+ }
498
+ exports.TimedUpdatePermission = TimedUpdatePermission;
499
+ class BalancesActionPermission extends typeUtils_1.BaseNumberTypeClass {
500
+ badgeIds;
501
+ ownershipTimes;
502
+ permanentlyPermittedTimes;
503
+ permanentlyForbiddenTimes;
504
+ constructor(msg) {
505
+ super();
506
+ this.badgeIds = msg.badgeIds.map(x => new typeUtils_1.UintRange(x));
507
+ this.ownershipTimes = msg.ownershipTimes.map(x => new typeUtils_1.UintRange(x));
508
+ this.permanentlyPermittedTimes = msg.permanentlyPermittedTimes.map(x => new typeUtils_1.UintRange(x));
509
+ this.permanentlyForbiddenTimes = msg.permanentlyForbiddenTimes.map(x => new typeUtils_1.UintRange(x));
510
+ }
511
+ static required() {
512
+ return new BalancesActionPermission({
513
+ badgeIds: [],
514
+ ownershipTimes: [],
515
+ permanentlyPermittedTimes: [],
516
+ permanentlyForbiddenTimes: []
517
+ });
518
+ }
519
+ convert(convertFunction) {
520
+ return new BalancesActionPermission((0, typeUtils_1.deepCopy)({
521
+ badgeIds: this.badgeIds.map((x) => x.convert(convertFunction)),
522
+ ownershipTimes: this.ownershipTimes.map((x) => x.convert(convertFunction)),
523
+ permanentlyPermittedTimes: this.permanentlyPermittedTimes.map((x) => x.convert(convertFunction)),
524
+ permanentlyForbiddenTimes: this.permanentlyForbiddenTimes.map((x) => x.convert(convertFunction))
525
+ }));
526
+ }
527
+ toProto() {
528
+ return new proto_1.badges.BalancesActionPermission(this.convert(string_numbers_1.Stringify));
529
+ }
530
+ static fromJson(jsonValue, convertFunction, options) {
531
+ return this.convertFromProto(proto_1.badges.BalancesActionPermission.fromJson(jsonValue, options), convertFunction);
532
+ }
533
+ static fromJsonString(jsonString, convertFunction, options) {
534
+ return this.convertFromProto(proto_1.badges.BalancesActionPermission.fromJsonString(jsonString, options), convertFunction);
535
+ }
536
+ static convertFromProto(protoMsg, convertFunction) {
537
+ return new BalancesActionPermission({
538
+ badgeIds: protoMsg.badgeIds.map(x => typeUtils_1.UintRange.convertFromProto(x, convertFunction)),
539
+ ownershipTimes: protoMsg.ownershipTimes.map(x => typeUtils_1.UintRange.convertFromProto(x, convertFunction)),
540
+ permanentlyPermittedTimes: protoMsg.permanentlyPermittedTimes.map(x => typeUtils_1.UintRange.convertFromProto(x, convertFunction)),
541
+ permanentlyForbiddenTimes: protoMsg.permanentlyForbiddenTimes.map(x => typeUtils_1.UintRange.convertFromProto(x, convertFunction))
542
+ });
543
+ }
544
+ }
545
+ exports.BalancesActionPermission = BalancesActionPermission;
546
+ class TimedUpdateWithBadgeIdsPermission extends typeUtils_1.BaseNumberTypeClass {
547
+ timelineTimes;
548
+ badgeIds;
549
+ permanentlyPermittedTimes;
550
+ permanentlyForbiddenTimes;
551
+ constructor(msg) {
552
+ super();
553
+ this.timelineTimes = msg.timelineTimes.map(x => new typeUtils_1.UintRange(x));
554
+ this.badgeIds = msg.badgeIds.map(x => new typeUtils_1.UintRange(x));
555
+ this.permanentlyPermittedTimes = msg.permanentlyPermittedTimes.map(x => new typeUtils_1.UintRange(x));
556
+ this.permanentlyForbiddenTimes = msg.permanentlyForbiddenTimes.map(x => new typeUtils_1.UintRange(x));
557
+ }
558
+ static required() {
559
+ return new TimedUpdateWithBadgeIdsPermission({
560
+ timelineTimes: [],
561
+ badgeIds: [],
562
+ permanentlyPermittedTimes: [],
563
+ permanentlyForbiddenTimes: []
564
+ });
565
+ }
566
+ convert(convertFunction) {
567
+ return new TimedUpdateWithBadgeIdsPermission((0, typeUtils_1.deepCopy)({
568
+ timelineTimes: this.timelineTimes.map((x) => x.convert(convertFunction)),
569
+ badgeIds: this.badgeIds.map((x) => x.convert(convertFunction)),
570
+ permanentlyPermittedTimes: this.permanentlyPermittedTimes.map((x) => x.convert(convertFunction)),
571
+ permanentlyForbiddenTimes: this.permanentlyForbiddenTimes.map((x) => x.convert(convertFunction))
572
+ }));
573
+ }
574
+ toProto() {
575
+ return new proto_1.badges.TimedUpdateWithBadgeIdsPermission(this.convert(string_numbers_1.Stringify));
576
+ }
577
+ static fromJson(jsonValue, convertFunction, options) {
578
+ return this.convertFromProto(proto_1.badges.TimedUpdateWithBadgeIdsPermission.fromJson(jsonValue, options), convertFunction);
579
+ }
580
+ static fromJsonString(jsonString, convertFunction, options) {
581
+ return this.convertFromProto(proto_1.badges.TimedUpdateWithBadgeIdsPermission.fromJsonString(jsonString, options), convertFunction);
582
+ }
583
+ static convertFromProto(protoMsg, convertFunction) {
584
+ return new TimedUpdateWithBadgeIdsPermission({
585
+ timelineTimes: protoMsg.timelineTimes.map(x => typeUtils_1.UintRange.convertFromProto(x, convertFunction)),
586
+ badgeIds: protoMsg.badgeIds.map(x => typeUtils_1.UintRange.convertFromProto(x, convertFunction)),
587
+ permanentlyPermittedTimes: protoMsg.permanentlyPermittedTimes.map(x => typeUtils_1.UintRange.convertFromProto(x, convertFunction)),
588
+ permanentlyForbiddenTimes: protoMsg.permanentlyForbiddenTimes.map(x => typeUtils_1.UintRange.convertFromProto(x, convertFunction))
589
+ });
590
+ }
591
+ }
592
+ exports.TimedUpdateWithBadgeIdsPermission = TimedUpdateWithBadgeIdsPermission;
593
+ class CollectionApprovalPermission extends typeUtils_1.BaseNumberTypeClass {
594
+ fromListId;
595
+ toListId;
596
+ initiatedByListId;
597
+ transferTimes;
598
+ badgeIds;
599
+ ownershipTimes;
600
+ approvalId;
601
+ amountTrackerId;
602
+ challengeTrackerId;
603
+ permanentlyPermittedTimes;
604
+ permanentlyForbiddenTimes;
605
+ constructor(msg) {
606
+ super();
607
+ this.fromListId = msg.fromListId;
608
+ this.toListId = msg.toListId;
609
+ this.initiatedByListId = msg.initiatedByListId;
610
+ this.transferTimes = msg.transferTimes.map(x => new typeUtils_1.UintRange(x));
611
+ this.badgeIds = msg.badgeIds.map(x => new typeUtils_1.UintRange(x));
612
+ this.ownershipTimes = msg.ownershipTimes.map(x => new typeUtils_1.UintRange(x));
613
+ this.approvalId = msg.approvalId;
614
+ this.amountTrackerId = msg.amountTrackerId;
615
+ this.challengeTrackerId = msg.challengeTrackerId;
616
+ this.permanentlyPermittedTimes = msg.permanentlyPermittedTimes.map(x => new typeUtils_1.UintRange(x));
617
+ this.permanentlyForbiddenTimes = msg.permanentlyForbiddenTimes.map(x => new typeUtils_1.UintRange(x));
618
+ }
619
+ static required() {
620
+ return new CollectionApprovalPermission({
621
+ fromListId: '',
622
+ toListId: '',
623
+ initiatedByListId: '',
624
+ transferTimes: [],
625
+ badgeIds: [],
626
+ ownershipTimes: [],
627
+ approvalId: '',
628
+ amountTrackerId: '',
629
+ challengeTrackerId: '',
630
+ permanentlyPermittedTimes: [],
631
+ permanentlyForbiddenTimes: []
632
+ });
633
+ }
634
+ convert(convertFunction) {
635
+ return new CollectionApprovalPermission((0, typeUtils_1.deepCopy)({
636
+ fromListId: this.fromListId,
637
+ toListId: this.toListId,
638
+ initiatedByListId: this.initiatedByListId,
639
+ transferTimes: this.transferTimes.map((x) => x.convert(convertFunction)),
640
+ badgeIds: this.badgeIds.map((x) => x.convert(convertFunction)),
641
+ ownershipTimes: this.ownershipTimes.map((x) => x.convert(convertFunction)),
642
+ approvalId: this.approvalId,
643
+ amountTrackerId: this.amountTrackerId,
644
+ challengeTrackerId: this.challengeTrackerId,
645
+ permanentlyPermittedTimes: this.permanentlyPermittedTimes.map((x) => x.convert(convertFunction)),
646
+ permanentlyForbiddenTimes: this.permanentlyForbiddenTimes.map((x) => x.convert(convertFunction))
647
+ }));
648
+ }
649
+ toProto() {
650
+ return new proto_1.badges.CollectionApprovalPermission(this.convert(string_numbers_1.Stringify));
651
+ }
652
+ static fromJson(jsonValue, convertFunction, options) {
653
+ return this.convertFromProto(proto_1.badges.CollectionApprovalPermission.fromJson(jsonValue, options), convertFunction);
654
+ }
655
+ static fromJsonString(jsonString, convertFunction, options) {
656
+ return this.convertFromProto(proto_1.badges.CollectionApprovalPermission.fromJsonString(jsonString, options), convertFunction);
657
+ }
658
+ static convertFromProto(protoMsg, convertFunction) {
659
+ return new CollectionApprovalPermission({
660
+ fromListId: protoMsg.fromListId,
661
+ toListId: protoMsg.toListId,
662
+ initiatedByListId: protoMsg.initiatedByListId,
663
+ transferTimes: protoMsg.transferTimes.map(x => typeUtils_1.UintRange.convertFromProto(x, convertFunction)),
664
+ badgeIds: protoMsg.badgeIds.map(x => typeUtils_1.UintRange.convertFromProto(x, convertFunction)),
665
+ ownershipTimes: protoMsg.ownershipTimes.map(x => typeUtils_1.UintRange.convertFromProto(x, convertFunction)),
666
+ approvalId: protoMsg.approvalId,
667
+ amountTrackerId: protoMsg.amountTrackerId,
668
+ challengeTrackerId: protoMsg.challengeTrackerId,
669
+ permanentlyPermittedTimes: protoMsg.permanentlyPermittedTimes.map(x => typeUtils_1.UintRange.convertFromProto(x, convertFunction)),
670
+ permanentlyForbiddenTimes: protoMsg.permanentlyForbiddenTimes.map(x => typeUtils_1.UintRange.convertFromProto(x, convertFunction))
671
+ });
672
+ }
673
+ }
674
+ exports.CollectionApprovalPermission = CollectionApprovalPermission;
675
+ //# sourceMappingURL=permissions.js.map