@totochain/client 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (564) hide show
  1. package/README.md +307 -2
  2. package/_cjs/accounts/index.d.cts +7 -0
  3. package/_cjs/accounts/index.js +29 -0
  4. package/_cjs/accounts/keyring.d.cts +28 -0
  5. package/_cjs/accounts/keyring.js +102 -0
  6. package/_cjs/accounts/substrateSigner.d.cts +5 -0
  7. package/_cjs/accounts/substrateSigner.js +49 -0
  8. package/_cjs/accounts/types.d.cts +6 -0
  9. package/_cjs/accounts/types.js +2 -0
  10. package/_cjs/accounts/wellKnown.d.cts +24 -0
  11. package/_cjs/accounts/wellKnown.js +322 -0
  12. package/_cjs/actions/activityTracker/calculateActivityReputationAtBlock.d.cts +9 -0
  13. package/_cjs/actions/activityTracker/calculateActivityReputationAtBlock.js +8 -0
  14. package/_cjs/actions/activityTracker/decodeReputationPage.d.cts +4 -0
  15. package/_cjs/actions/activityTracker/decodeReputationPage.js +13 -0
  16. package/_cjs/actions/activityTracker/getActivityReputation.d.cts +8 -0
  17. package/_cjs/actions/activityTracker/getActivityReputation.js +8 -0
  18. package/_cjs/actions/activityTracker/getActivityReputationInfo.d.cts +9 -0
  19. package/_cjs/actions/activityTracker/getActivityReputationInfo.js +14 -0
  20. package/_cjs/actions/activityTracker/getActivityTrackerConfig.d.cts +8 -0
  21. package/_cjs/actions/activityTracker/getActivityTrackerConfig.js +13 -0
  22. package/_cjs/actions/activityTracker/getAllActivityReputations.d.cts +8 -0
  23. package/_cjs/actions/activityTracker/getAllActivityReputations.js +9 -0
  24. package/_cjs/actions/activityTracker/getAllRawActivityReputations.d.cts +8 -0
  25. package/_cjs/actions/activityTracker/getAllRawActivityReputations.js +9 -0
  26. package/_cjs/actions/activityTracker/getMaxActivityReputation.d.cts +7 -0
  27. package/_cjs/actions/activityTracker/getMaxActivityReputation.js +8 -0
  28. package/_cjs/actions/activityTracker/getRawActivityReputation.d.cts +8 -0
  29. package/_cjs/actions/activityTracker/getRawActivityReputation.js +8 -0
  30. package/_cjs/actions/activityTracker/index.d.cts +18 -0
  31. package/_cjs/actions/activityTracker/index.js +19 -0
  32. package/_cjs/actions/activityTracker/types.d.cts +20 -0
  33. package/_cjs/actions/activityTracker/types.js +2 -0
  34. package/_cjs/actions/attestation/attest.d.cts +21 -0
  35. package/_cjs/actions/attestation/attest.js +14 -0
  36. package/_cjs/actions/attestation/index.d.cts +3 -0
  37. package/_cjs/actions/attestation/index.js +7 -0
  38. package/_cjs/actions/did/createDid.d.cts +10 -0
  39. package/_cjs/actions/did/createDid.js +10 -0
  40. package/_cjs/actions/did/index.d.cts +3 -0
  41. package/_cjs/actions/did/index.js +6 -0
  42. package/_cjs/actions/handshake/getCompletedHandshakes.d.cts +8 -0
  43. package/_cjs/actions/handshake/getCompletedHandshakes.js +8 -0
  44. package/_cjs/actions/handshake/getHandshakeCount.d.cts +8 -0
  45. package/_cjs/actions/handshake/getHandshakeCount.js +8 -0
  46. package/_cjs/actions/handshake/getHandshakeStatus.d.cts +10 -0
  47. package/_cjs/actions/handshake/getHandshakeStatus.js +8 -0
  48. package/_cjs/actions/handshake/handshakeExists.d.cts +9 -0
  49. package/_cjs/actions/handshake/handshakeExists.js +8 -0
  50. package/_cjs/actions/handshake/hasHandshakeCompleted.d.cts +9 -0
  51. package/_cjs/actions/handshake/hasHandshakeCompleted.js +8 -0
  52. package/_cjs/actions/handshake/index.d.cts +12 -0
  53. package/_cjs/actions/handshake/index.js +13 -0
  54. package/_cjs/actions/handshake/types.d.cts +2 -0
  55. package/_cjs/actions/handshake/types.js +2 -0
  56. package/_cjs/actions/index.d.cts +14 -0
  57. package/_cjs/actions/index.js +35 -0
  58. package/_cjs/actions/potential/getActiveReferralShare.d.cts +8 -0
  59. package/_cjs/actions/potential/getActiveReferralShare.js +8 -0
  60. package/_cjs/actions/potential/getCycleNumber.d.cts +7 -0
  61. package/_cjs/actions/potential/getCycleNumber.js +8 -0
  62. package/_cjs/actions/potential/getCyclePotentialMinted.d.cts +7 -0
  63. package/_cjs/actions/potential/getCyclePotentialMinted.js +8 -0
  64. package/_cjs/actions/potential/getCycleSupply.d.cts +7 -0
  65. package/_cjs/actions/potential/getCycleSupply.js +8 -0
  66. package/_cjs/actions/potential/getDefaultActiveReferralShare.d.cts +7 -0
  67. package/_cjs/actions/potential/getDefaultActiveReferralShare.js +8 -0
  68. package/_cjs/actions/potential/getMaxSupply.d.cts +7 -0
  69. package/_cjs/actions/potential/getMaxSupply.js +8 -0
  70. package/_cjs/actions/potential/getMonthNumber.d.cts +7 -0
  71. package/_cjs/actions/potential/getMonthNumber.js +8 -0
  72. package/_cjs/actions/potential/getMonthPotentialMinted.d.cts +7 -0
  73. package/_cjs/actions/potential/getMonthPotentialMinted.js +8 -0
  74. package/_cjs/actions/potential/getMonthSupply.d.cts +7 -0
  75. package/_cjs/actions/potential/getMonthSupply.js +8 -0
  76. package/_cjs/actions/potential/getPotential.d.cts +8 -0
  77. package/_cjs/actions/potential/getPotential.js +8 -0
  78. package/_cjs/actions/potential/getTotalPotentialMinted.d.cts +7 -0
  79. package/_cjs/actions/potential/getTotalPotentialMinted.js +8 -0
  80. package/_cjs/actions/potential/index.d.cts +23 -0
  81. package/_cjs/actions/potential/index.js +25 -0
  82. package/_cjs/actions/puzzlePieces/getCollectionsCount.d.cts +7 -0
  83. package/_cjs/actions/puzzlePieces/getCollectionsCount.js +8 -0
  84. package/_cjs/actions/puzzlePieces/getItemsCount.d.cts +8 -0
  85. package/_cjs/actions/puzzlePieces/getItemsCount.js +8 -0
  86. package/_cjs/actions/puzzlePieces/getOwner.d.cts +9 -0
  87. package/_cjs/actions/puzzlePieces/getOwner.js +8 -0
  88. package/_cjs/actions/puzzlePieces/getPendingWildcards.d.cts +8 -0
  89. package/_cjs/actions/puzzlePieces/getPendingWildcards.js +9 -0
  90. package/_cjs/actions/puzzlePieces/getTotalPuzzlePiecesMinted.d.cts +7 -0
  91. package/_cjs/actions/puzzlePieces/getTotalPuzzlePiecesMinted.js +8 -0
  92. package/_cjs/actions/puzzlePieces/getWildcardCollectionId.d.cts +7 -0
  93. package/_cjs/actions/puzzlePieces/getWildcardCollectionId.js +8 -0
  94. package/_cjs/actions/puzzlePieces/getWildcardDistributionMap.d.cts +8 -0
  95. package/_cjs/actions/puzzlePieces/getWildcardDistributionMap.js +9 -0
  96. package/_cjs/actions/puzzlePieces/getWildcardThreshold.d.cts +7 -0
  97. package/_cjs/actions/puzzlePieces/getWildcardThreshold.js +8 -0
  98. package/_cjs/actions/puzzlePieces/index.d.cts +18 -0
  99. package/_cjs/actions/puzzlePieces/index.js +19 -0
  100. package/_cjs/actions/puzzlePieces/types.d.cts +5 -0
  101. package/_cjs/actions/puzzlePieces/types.js +2 -0
  102. package/_cjs/actions/referral/decodePage.d.cts +4 -0
  103. package/_cjs/actions/referral/decodePage.js +13 -0
  104. package/_cjs/actions/referral/getActiveReferrals.d.cts +9 -0
  105. package/_cjs/actions/referral/getActiveReferrals.js +14 -0
  106. package/_cjs/actions/referral/getActiveReferralsCount.d.cts +8 -0
  107. package/_cjs/actions/referral/getActiveReferralsCount.js +8 -0
  108. package/_cjs/actions/referral/getBlockProducers.d.cts +7 -0
  109. package/_cjs/actions/referral/getBlockProducers.js +8 -0
  110. package/_cjs/actions/referral/getBlockProducersPage.d.cts +8 -0
  111. package/_cjs/actions/referral/getBlockProducersPage.js +9 -0
  112. package/_cjs/actions/referral/getPendingReferrals.d.cts +8 -0
  113. package/_cjs/actions/referral/getPendingReferrals.js +8 -0
  114. package/_cjs/actions/referral/getPendingReferralsPage.d.cts +9 -0
  115. package/_cjs/actions/referral/getPendingReferralsPage.js +9 -0
  116. package/_cjs/actions/referral/getReferrer.d.cts +8 -0
  117. package/_cjs/actions/referral/getReferrer.js +8 -0
  118. package/_cjs/actions/referral/index.d.cts +16 -0
  119. package/_cjs/actions/referral/index.js +17 -0
  120. package/_cjs/actions/referral/types.d.cts +6 -0
  121. package/_cjs/actions/referral/types.js +2 -0
  122. package/_cjs/actions/reputationVoting/getTally.d.cts +9 -0
  123. package/_cjs/actions/reputationVoting/getTally.js +14 -0
  124. package/_cjs/actions/reputationVoting/getVotesForAccount.d.cts +9 -0
  125. package/_cjs/actions/reputationVoting/getVotesForAccount.js +16 -0
  126. package/_cjs/actions/reputationVoting/getVotingReputation.d.cts +8 -0
  127. package/_cjs/actions/reputationVoting/getVotingReputation.js +8 -0
  128. package/_cjs/actions/reputationVoting/index.d.cts +10 -0
  129. package/_cjs/actions/reputationVoting/index.js +11 -0
  130. package/_cjs/actions/reputationVoting/isPassing.d.cts +8 -0
  131. package/_cjs/actions/reputationVoting/isPassing.js +8 -0
  132. package/_cjs/actions/reputationVoting/types.d.cts +17 -0
  133. package/_cjs/actions/reputationVoting/types.js +2 -0
  134. package/_cjs/actions/rewardPool/getRewardPoolAccount.d.cts +7 -0
  135. package/_cjs/actions/rewardPool/getRewardPoolAccount.js +8 -0
  136. package/_cjs/actions/rewardPool/getRewardPoolBalance.d.cts +7 -0
  137. package/_cjs/actions/rewardPool/getRewardPoolBalance.js +8 -0
  138. package/_cjs/actions/rewardPool/index.d.cts +5 -0
  139. package/_cjs/actions/rewardPool/index.js +7 -0
  140. package/_cjs/actions/submitAndWait.d.cts +65 -0
  141. package/_cjs/actions/submitAndWait.js +141 -0
  142. package/_cjs/actions/techCommitteeManager/getSelectedTechCommittee.d.cts +7 -0
  143. package/_cjs/actions/techCommitteeManager/getSelectedTechCommittee.js +8 -0
  144. package/_cjs/actions/techCommitteeManager/getTechCommitteeCandidates.d.cts +7 -0
  145. package/_cjs/actions/techCommitteeManager/getTechCommitteeCandidates.js +8 -0
  146. package/_cjs/actions/techCommitteeManager/index.d.cts +5 -0
  147. package/_cjs/actions/techCommitteeManager/index.js +7 -0
  148. package/_cjs/actions/validatorManager/decodePairs.d.cts +8 -0
  149. package/_cjs/actions/validatorManager/decodePairs.js +7 -0
  150. package/_cjs/actions/validatorManager/getActiveValidators.d.cts +7 -0
  151. package/_cjs/actions/validatorManager/getActiveValidators.js +8 -0
  152. package/_cjs/actions/validatorManager/getOffenceValidators.d.cts +8 -0
  153. package/_cjs/actions/validatorManager/getOffenceValidators.js +9 -0
  154. package/_cjs/actions/validatorManager/getOfflineValidators.d.cts +8 -0
  155. package/_cjs/actions/validatorManager/getOfflineValidators.js +9 -0
  156. package/_cjs/actions/validatorManager/getReputationForAccount.d.cts +8 -0
  157. package/_cjs/actions/validatorManager/getReputationForAccount.js +8 -0
  158. package/_cjs/actions/validatorManager/getReputationPenaltyFor.d.cts +8 -0
  159. package/_cjs/actions/validatorManager/getReputationPenaltyFor.js +8 -0
  160. package/_cjs/actions/validatorManager/getReputations.d.cts +9 -0
  161. package/_cjs/actions/validatorManager/getReputations.js +9 -0
  162. package/_cjs/actions/validatorManager/getSelectedValidators.d.cts +7 -0
  163. package/_cjs/actions/validatorManager/getSelectedValidators.js +8 -0
  164. package/_cjs/actions/validatorManager/getValidatorCandidates.d.cts +7 -0
  165. package/_cjs/actions/validatorManager/getValidatorCandidates.js +8 -0
  166. package/_cjs/actions/validatorManager/index.d.cts +18 -0
  167. package/_cjs/actions/validatorManager/index.js +19 -0
  168. package/_cjs/actions/validatorManager/types.d.cts +10 -0
  169. package/_cjs/actions/validatorManager/types.js +2 -0
  170. package/_cjs/chains/defineChain.d.cts +18 -0
  171. package/_cjs/chains/defineChain.js +6 -0
  172. package/_cjs/chains/definitions.d.cts +65 -0
  173. package/_cjs/chains/definitions.js +52 -0
  174. package/_cjs/chains/index.d.cts +4 -0
  175. package/_cjs/chains/index.js +10 -0
  176. package/_cjs/client/compatibility.d.cts +16 -0
  177. package/_cjs/client/compatibility.js +60 -0
  178. package/_cjs/client/createClient.d.cts +12 -0
  179. package/_cjs/client/createClient.js +36 -0
  180. package/_cjs/client/types.d.cts +7 -0
  181. package/_cjs/client/types.js +2 -0
  182. package/_cjs/crypto/ctypeHash.d.cts +16 -0
  183. package/_cjs/crypto/ctypeHash.js +24 -0
  184. package/_cjs/crypto/index.d.cts +3 -0
  185. package/_cjs/crypto/index.js +6 -0
  186. package/_cjs/ctypes/definitions.d.cts +21 -0
  187. package/_cjs/ctypes/definitions.js +210 -0
  188. package/_cjs/ctypes/index.d.cts +4 -0
  189. package/_cjs/ctypes/index.js +21 -0
  190. package/_cjs/did/didUri.d.cts +11 -0
  191. package/_cjs/did/didUri.js +14 -0
  192. package/_cjs/index.d.cts +25 -0
  193. package/_cjs/index.js +67 -0
  194. package/_cjs/package.json +1 -0
  195. package/_cjs/plugins/activityTracker.d.cts +34 -0
  196. package/_cjs/plugins/activityTracker.js +18 -0
  197. package/_cjs/plugins/handshake.d.cts +32 -0
  198. package/_cjs/plugins/handshake.js +15 -0
  199. package/_cjs/plugins/index.d.cts +19 -0
  200. package/_cjs/plugins/index.js +21 -0
  201. package/_cjs/plugins/potential.d.cts +29 -0
  202. package/_cjs/plugins/potential.js +21 -0
  203. package/_cjs/plugins/puzzlePieces.d.cts +28 -0
  204. package/_cjs/plugins/puzzlePieces.js +18 -0
  205. package/_cjs/plugins/referral.d.cts +17 -0
  206. package/_cjs/plugins/referral.js +17 -0
  207. package/_cjs/plugins/reputationVoting.d.cts +25 -0
  208. package/_cjs/plugins/reputationVoting.js +14 -0
  209. package/_cjs/plugins/rewardPool.d.cts +14 -0
  210. package/_cjs/plugins/rewardPool.js +12 -0
  211. package/_cjs/plugins/techCommitteeManager.d.cts +14 -0
  212. package/_cjs/plugins/techCommitteeManager.js +12 -0
  213. package/_cjs/plugins/validatorManager.d.cts +30 -0
  214. package/_cjs/plugins/validatorManager.js +18 -0
  215. package/_cjs/rpc/bundle.d.cts +4 -0
  216. package/_cjs/rpc/bundle.js +24 -0
  217. package/_cjs/rpc/call.d.cts +4 -0
  218. package/_cjs/rpc/call.js +28 -0
  219. package/_cjs/rpc/definitions.d.cts +3 -0
  220. package/_cjs/rpc/definitions.js +382 -0
  221. package/_cjs/rpc/index.d.cts +4 -0
  222. package/_cjs/rpc/index.js +10 -0
  223. package/_cjs/rpc/types.d.cts +3 -0
  224. package/_cjs/rpc/types.js +44 -0
  225. package/_cjs/types/index.d.cts +17 -0
  226. package/_cjs/types/index.js +5 -0
  227. package/_esm/accounts/index.js +3 -0
  228. package/_esm/accounts/keyring.js +83 -0
  229. package/_esm/accounts/substrateSigner.js +46 -0
  230. package/_esm/accounts/types.js +1 -0
  231. package/_esm/accounts/wellKnown.js +317 -0
  232. package/_esm/actions/activityTracker/calculateActivityReputationAtBlock.js +5 -0
  233. package/_esm/actions/activityTracker/decodeReputationPage.js +10 -0
  234. package/_esm/actions/activityTracker/getActivityReputation.js +5 -0
  235. package/_esm/actions/activityTracker/getActivityReputationInfo.js +11 -0
  236. package/_esm/actions/activityTracker/getActivityTrackerConfig.js +10 -0
  237. package/_esm/actions/activityTracker/getAllActivityReputations.js +6 -0
  238. package/_esm/actions/activityTracker/getAllRawActivityReputations.js +6 -0
  239. package/_esm/actions/activityTracker/getMaxActivityReputation.js +5 -0
  240. package/_esm/actions/activityTracker/getRawActivityReputation.js +5 -0
  241. package/_esm/actions/activityTracker/index.js +8 -0
  242. package/_esm/actions/activityTracker/types.js +1 -0
  243. package/_esm/actions/attestation/attest.js +9 -0
  244. package/_esm/actions/attestation/index.js +1 -0
  245. package/_esm/actions/did/createDid.js +6 -0
  246. package/_esm/actions/did/index.js +1 -0
  247. package/_esm/actions/handshake/getCompletedHandshakes.js +5 -0
  248. package/_esm/actions/handshake/getHandshakeCount.js +5 -0
  249. package/_esm/actions/handshake/getHandshakeStatus.js +5 -0
  250. package/_esm/actions/handshake/handshakeExists.js +5 -0
  251. package/_esm/actions/handshake/hasHandshakeCompleted.js +5 -0
  252. package/_esm/actions/handshake/index.js +5 -0
  253. package/_esm/actions/handshake/types.js +1 -0
  254. package/_esm/actions/index.js +12 -0
  255. package/_esm/actions/potential/getActiveReferralShare.js +5 -0
  256. package/_esm/actions/potential/getCycleNumber.js +5 -0
  257. package/_esm/actions/potential/getCyclePotentialMinted.js +5 -0
  258. package/_esm/actions/potential/getCycleSupply.js +5 -0
  259. package/_esm/actions/potential/getDefaultActiveReferralShare.js +5 -0
  260. package/_esm/actions/potential/getMaxSupply.js +5 -0
  261. package/_esm/actions/potential/getMonthNumber.js +5 -0
  262. package/_esm/actions/potential/getMonthPotentialMinted.js +5 -0
  263. package/_esm/actions/potential/getMonthSupply.js +5 -0
  264. package/_esm/actions/potential/getPotential.js +5 -0
  265. package/_esm/actions/potential/getTotalPotentialMinted.js +5 -0
  266. package/_esm/actions/potential/index.js +11 -0
  267. package/_esm/actions/puzzlePieces/getCollectionsCount.js +5 -0
  268. package/_esm/actions/puzzlePieces/getItemsCount.js +5 -0
  269. package/_esm/actions/puzzlePieces/getOwner.js +5 -0
  270. package/_esm/actions/puzzlePieces/getPendingWildcards.js +6 -0
  271. package/_esm/actions/puzzlePieces/getTotalPuzzlePiecesMinted.js +5 -0
  272. package/_esm/actions/puzzlePieces/getWildcardCollectionId.js +5 -0
  273. package/_esm/actions/puzzlePieces/getWildcardDistributionMap.js +6 -0
  274. package/_esm/actions/puzzlePieces/getWildcardThreshold.js +5 -0
  275. package/_esm/actions/puzzlePieces/index.js +8 -0
  276. package/_esm/actions/puzzlePieces/types.js +1 -0
  277. package/_esm/actions/referral/decodePage.js +10 -0
  278. package/_esm/actions/referral/getActiveReferrals.js +11 -0
  279. package/_esm/actions/referral/getActiveReferralsCount.js +5 -0
  280. package/_esm/actions/referral/getBlockProducers.js +5 -0
  281. package/_esm/actions/referral/getBlockProducersPage.js +6 -0
  282. package/_esm/actions/referral/getPendingReferrals.js +5 -0
  283. package/_esm/actions/referral/getPendingReferralsPage.js +6 -0
  284. package/_esm/actions/referral/getReferrer.js +5 -0
  285. package/_esm/actions/referral/index.js +7 -0
  286. package/_esm/actions/referral/types.js +1 -0
  287. package/_esm/actions/reputationVoting/getTally.js +11 -0
  288. package/_esm/actions/reputationVoting/getVotesForAccount.js +13 -0
  289. package/_esm/actions/reputationVoting/getVotingReputation.js +5 -0
  290. package/_esm/actions/reputationVoting/index.js +4 -0
  291. package/_esm/actions/reputationVoting/isPassing.js +5 -0
  292. package/_esm/actions/reputationVoting/types.js +1 -0
  293. package/_esm/actions/rewardPool/getRewardPoolAccount.js +5 -0
  294. package/_esm/actions/rewardPool/getRewardPoolBalance.js +5 -0
  295. package/_esm/actions/rewardPool/index.js +2 -0
  296. package/_esm/actions/submitAndWait.js +132 -0
  297. package/_esm/actions/techCommitteeManager/getSelectedTechCommittee.js +5 -0
  298. package/_esm/actions/techCommitteeManager/getTechCommitteeCandidates.js +5 -0
  299. package/_esm/actions/techCommitteeManager/index.js +2 -0
  300. package/_esm/actions/validatorManager/decodePairs.js +4 -0
  301. package/_esm/actions/validatorManager/getActiveValidators.js +5 -0
  302. package/_esm/actions/validatorManager/getOffenceValidators.js +6 -0
  303. package/_esm/actions/validatorManager/getOfflineValidators.js +6 -0
  304. package/_esm/actions/validatorManager/getReputationForAccount.js +5 -0
  305. package/_esm/actions/validatorManager/getReputationPenaltyFor.js +5 -0
  306. package/_esm/actions/validatorManager/getReputations.js +6 -0
  307. package/_esm/actions/validatorManager/getSelectedValidators.js +5 -0
  308. package/_esm/actions/validatorManager/getValidatorCandidates.js +5 -0
  309. package/_esm/actions/validatorManager/index.js +8 -0
  310. package/_esm/actions/validatorManager/types.js +1 -0
  311. package/_esm/chains/defineChain.js +3 -0
  312. package/_esm/chains/definitions.js +49 -0
  313. package/_esm/chains/index.js +2 -0
  314. package/_esm/client/compatibility.js +55 -0
  315. package/_esm/client/createClient.js +32 -0
  316. package/_esm/client/types.js +1 -0
  317. package/_esm/crypto/ctypeHash.js +20 -0
  318. package/_esm/crypto/index.js +1 -0
  319. package/_esm/ctypes/definitions.js +207 -0
  320. package/_esm/ctypes/index.js +2 -0
  321. package/_esm/did/didUri.js +11 -0
  322. package/_esm/index.js +14 -0
  323. package/_esm/package.json +1 -0
  324. package/_esm/plugins/activityTracker.js +15 -0
  325. package/_esm/plugins/handshake.js +12 -0
  326. package/_esm/plugins/index.js +9 -0
  327. package/_esm/plugins/potential.js +18 -0
  328. package/_esm/plugins/puzzlePieces.js +15 -0
  329. package/_esm/plugins/referral.js +14 -0
  330. package/_esm/plugins/reputationVoting.js +11 -0
  331. package/_esm/plugins/rewardPool.js +9 -0
  332. package/_esm/plugins/techCommitteeManager.js +9 -0
  333. package/_esm/plugins/validatorManager.js +15 -0
  334. package/_esm/rpc/bundle.js +21 -0
  335. package/_esm/rpc/call.js +25 -0
  336. package/_esm/rpc/definitions.js +379 -0
  337. package/_esm/rpc/index.js +3 -0
  338. package/_esm/rpc/types.js +41 -0
  339. package/_esm/types/index.js +2 -0
  340. package/_types/accounts/index.d.ts +7 -0
  341. package/_types/accounts/index.d.ts.map +1 -0
  342. package/_types/accounts/keyring.d.ts +28 -0
  343. package/_types/accounts/keyring.d.ts.map +1 -0
  344. package/_types/accounts/substrateSigner.d.ts +5 -0
  345. package/_types/accounts/substrateSigner.d.ts.map +1 -0
  346. package/_types/accounts/types.d.ts +6 -0
  347. package/_types/accounts/types.d.ts.map +1 -0
  348. package/_types/accounts/wellKnown.d.ts +24 -0
  349. package/_types/accounts/wellKnown.d.ts.map +1 -0
  350. package/_types/actions/activityTracker/calculateActivityReputationAtBlock.d.ts +9 -0
  351. package/_types/actions/activityTracker/calculateActivityReputationAtBlock.d.ts.map +1 -0
  352. package/_types/actions/activityTracker/decodeReputationPage.d.ts +4 -0
  353. package/_types/actions/activityTracker/decodeReputationPage.d.ts.map +1 -0
  354. package/_types/actions/activityTracker/getActivityReputation.d.ts +8 -0
  355. package/_types/actions/activityTracker/getActivityReputation.d.ts.map +1 -0
  356. package/_types/actions/activityTracker/getActivityReputationInfo.d.ts +9 -0
  357. package/_types/actions/activityTracker/getActivityReputationInfo.d.ts.map +1 -0
  358. package/_types/actions/activityTracker/getActivityTrackerConfig.d.ts +8 -0
  359. package/_types/actions/activityTracker/getActivityTrackerConfig.d.ts.map +1 -0
  360. package/_types/actions/activityTracker/getAllActivityReputations.d.ts +8 -0
  361. package/_types/actions/activityTracker/getAllActivityReputations.d.ts.map +1 -0
  362. package/_types/actions/activityTracker/getAllRawActivityReputations.d.ts +8 -0
  363. package/_types/actions/activityTracker/getAllRawActivityReputations.d.ts.map +1 -0
  364. package/_types/actions/activityTracker/getMaxActivityReputation.d.ts +7 -0
  365. package/_types/actions/activityTracker/getMaxActivityReputation.d.ts.map +1 -0
  366. package/_types/actions/activityTracker/getRawActivityReputation.d.ts +8 -0
  367. package/_types/actions/activityTracker/getRawActivityReputation.d.ts.map +1 -0
  368. package/_types/actions/activityTracker/index.d.ts +18 -0
  369. package/_types/actions/activityTracker/index.d.ts.map +1 -0
  370. package/_types/actions/activityTracker/types.d.ts +20 -0
  371. package/_types/actions/activityTracker/types.d.ts.map +1 -0
  372. package/_types/actions/attestation/attest.d.ts +21 -0
  373. package/_types/actions/attestation/attest.d.ts.map +1 -0
  374. package/_types/actions/attestation/index.d.ts +3 -0
  375. package/_types/actions/attestation/index.d.ts.map +1 -0
  376. package/_types/actions/did/createDid.d.ts +10 -0
  377. package/_types/actions/did/createDid.d.ts.map +1 -0
  378. package/_types/actions/did/index.d.ts +3 -0
  379. package/_types/actions/did/index.d.ts.map +1 -0
  380. package/_types/actions/handshake/getCompletedHandshakes.d.ts +8 -0
  381. package/_types/actions/handshake/getCompletedHandshakes.d.ts.map +1 -0
  382. package/_types/actions/handshake/getHandshakeCount.d.ts +8 -0
  383. package/_types/actions/handshake/getHandshakeCount.d.ts.map +1 -0
  384. package/_types/actions/handshake/getHandshakeStatus.d.ts +10 -0
  385. package/_types/actions/handshake/getHandshakeStatus.d.ts.map +1 -0
  386. package/_types/actions/handshake/handshakeExists.d.ts +9 -0
  387. package/_types/actions/handshake/handshakeExists.d.ts.map +1 -0
  388. package/_types/actions/handshake/hasHandshakeCompleted.d.ts +9 -0
  389. package/_types/actions/handshake/hasHandshakeCompleted.d.ts.map +1 -0
  390. package/_types/actions/handshake/index.d.ts +12 -0
  391. package/_types/actions/handshake/index.d.ts.map +1 -0
  392. package/_types/actions/handshake/types.d.ts +2 -0
  393. package/_types/actions/handshake/types.d.ts.map +1 -0
  394. package/_types/actions/index.d.ts +14 -0
  395. package/_types/actions/index.d.ts.map +1 -0
  396. package/_types/actions/potential/getActiveReferralShare.d.ts +8 -0
  397. package/_types/actions/potential/getActiveReferralShare.d.ts.map +1 -0
  398. package/_types/actions/potential/getCycleNumber.d.ts +7 -0
  399. package/_types/actions/potential/getCycleNumber.d.ts.map +1 -0
  400. package/_types/actions/potential/getCyclePotentialMinted.d.ts +7 -0
  401. package/_types/actions/potential/getCyclePotentialMinted.d.ts.map +1 -0
  402. package/_types/actions/potential/getCycleSupply.d.ts +7 -0
  403. package/_types/actions/potential/getCycleSupply.d.ts.map +1 -0
  404. package/_types/actions/potential/getDefaultActiveReferralShare.d.ts +7 -0
  405. package/_types/actions/potential/getDefaultActiveReferralShare.d.ts.map +1 -0
  406. package/_types/actions/potential/getMaxSupply.d.ts +7 -0
  407. package/_types/actions/potential/getMaxSupply.d.ts.map +1 -0
  408. package/_types/actions/potential/getMonthNumber.d.ts +7 -0
  409. package/_types/actions/potential/getMonthNumber.d.ts.map +1 -0
  410. package/_types/actions/potential/getMonthPotentialMinted.d.ts +7 -0
  411. package/_types/actions/potential/getMonthPotentialMinted.d.ts.map +1 -0
  412. package/_types/actions/potential/getMonthSupply.d.ts +7 -0
  413. package/_types/actions/potential/getMonthSupply.d.ts.map +1 -0
  414. package/_types/actions/potential/getPotential.d.ts +8 -0
  415. package/_types/actions/potential/getPotential.d.ts.map +1 -0
  416. package/_types/actions/potential/getTotalPotentialMinted.d.ts +7 -0
  417. package/_types/actions/potential/getTotalPotentialMinted.d.ts.map +1 -0
  418. package/_types/actions/potential/index.d.ts +23 -0
  419. package/_types/actions/potential/index.d.ts.map +1 -0
  420. package/_types/actions/puzzlePieces/getCollectionsCount.d.ts +7 -0
  421. package/_types/actions/puzzlePieces/getCollectionsCount.d.ts.map +1 -0
  422. package/_types/actions/puzzlePieces/getItemsCount.d.ts +8 -0
  423. package/_types/actions/puzzlePieces/getItemsCount.d.ts.map +1 -0
  424. package/_types/actions/puzzlePieces/getOwner.d.ts +9 -0
  425. package/_types/actions/puzzlePieces/getOwner.d.ts.map +1 -0
  426. package/_types/actions/puzzlePieces/getPendingWildcards.d.ts +8 -0
  427. package/_types/actions/puzzlePieces/getPendingWildcards.d.ts.map +1 -0
  428. package/_types/actions/puzzlePieces/getTotalPuzzlePiecesMinted.d.ts +7 -0
  429. package/_types/actions/puzzlePieces/getTotalPuzzlePiecesMinted.d.ts.map +1 -0
  430. package/_types/actions/puzzlePieces/getWildcardCollectionId.d.ts +7 -0
  431. package/_types/actions/puzzlePieces/getWildcardCollectionId.d.ts.map +1 -0
  432. package/_types/actions/puzzlePieces/getWildcardDistributionMap.d.ts +8 -0
  433. package/_types/actions/puzzlePieces/getWildcardDistributionMap.d.ts.map +1 -0
  434. package/_types/actions/puzzlePieces/getWildcardThreshold.d.ts +7 -0
  435. package/_types/actions/puzzlePieces/getWildcardThreshold.d.ts.map +1 -0
  436. package/_types/actions/puzzlePieces/index.d.ts +18 -0
  437. package/_types/actions/puzzlePieces/index.d.ts.map +1 -0
  438. package/_types/actions/puzzlePieces/types.d.ts +5 -0
  439. package/_types/actions/puzzlePieces/types.d.ts.map +1 -0
  440. package/_types/actions/referral/decodePage.d.ts +4 -0
  441. package/_types/actions/referral/decodePage.d.ts.map +1 -0
  442. package/_types/actions/referral/getActiveReferrals.d.ts +9 -0
  443. package/_types/actions/referral/getActiveReferrals.d.ts.map +1 -0
  444. package/_types/actions/referral/getActiveReferralsCount.d.ts +8 -0
  445. package/_types/actions/referral/getActiveReferralsCount.d.ts.map +1 -0
  446. package/_types/actions/referral/getBlockProducers.d.ts +7 -0
  447. package/_types/actions/referral/getBlockProducers.d.ts.map +1 -0
  448. package/_types/actions/referral/getBlockProducersPage.d.ts +8 -0
  449. package/_types/actions/referral/getBlockProducersPage.d.ts.map +1 -0
  450. package/_types/actions/referral/getPendingReferrals.d.ts +8 -0
  451. package/_types/actions/referral/getPendingReferrals.d.ts.map +1 -0
  452. package/_types/actions/referral/getPendingReferralsPage.d.ts +9 -0
  453. package/_types/actions/referral/getPendingReferralsPage.d.ts.map +1 -0
  454. package/_types/actions/referral/getReferrer.d.ts +8 -0
  455. package/_types/actions/referral/getReferrer.d.ts.map +1 -0
  456. package/_types/actions/referral/index.d.ts +16 -0
  457. package/_types/actions/referral/index.d.ts.map +1 -0
  458. package/_types/actions/referral/types.d.ts +6 -0
  459. package/_types/actions/referral/types.d.ts.map +1 -0
  460. package/_types/actions/reputationVoting/getTally.d.ts +9 -0
  461. package/_types/actions/reputationVoting/getTally.d.ts.map +1 -0
  462. package/_types/actions/reputationVoting/getVotesForAccount.d.ts +9 -0
  463. package/_types/actions/reputationVoting/getVotesForAccount.d.ts.map +1 -0
  464. package/_types/actions/reputationVoting/getVotingReputation.d.ts +8 -0
  465. package/_types/actions/reputationVoting/getVotingReputation.d.ts.map +1 -0
  466. package/_types/actions/reputationVoting/index.d.ts +10 -0
  467. package/_types/actions/reputationVoting/index.d.ts.map +1 -0
  468. package/_types/actions/reputationVoting/isPassing.d.ts +8 -0
  469. package/_types/actions/reputationVoting/isPassing.d.ts.map +1 -0
  470. package/_types/actions/reputationVoting/types.d.ts +17 -0
  471. package/_types/actions/reputationVoting/types.d.ts.map +1 -0
  472. package/_types/actions/rewardPool/getRewardPoolAccount.d.ts +7 -0
  473. package/_types/actions/rewardPool/getRewardPoolAccount.d.ts.map +1 -0
  474. package/_types/actions/rewardPool/getRewardPoolBalance.d.ts +7 -0
  475. package/_types/actions/rewardPool/getRewardPoolBalance.d.ts.map +1 -0
  476. package/_types/actions/rewardPool/index.d.ts +5 -0
  477. package/_types/actions/rewardPool/index.d.ts.map +1 -0
  478. package/_types/actions/submitAndWait.d.ts +65 -0
  479. package/_types/actions/submitAndWait.d.ts.map +1 -0
  480. package/_types/actions/techCommitteeManager/getSelectedTechCommittee.d.ts +7 -0
  481. package/_types/actions/techCommitteeManager/getSelectedTechCommittee.d.ts.map +1 -0
  482. package/_types/actions/techCommitteeManager/getTechCommitteeCandidates.d.ts +7 -0
  483. package/_types/actions/techCommitteeManager/getTechCommitteeCandidates.d.ts.map +1 -0
  484. package/_types/actions/techCommitteeManager/index.d.ts +5 -0
  485. package/_types/actions/techCommitteeManager/index.d.ts.map +1 -0
  486. package/_types/actions/validatorManager/decodePairs.d.ts +8 -0
  487. package/_types/actions/validatorManager/decodePairs.d.ts.map +1 -0
  488. package/_types/actions/validatorManager/getActiveValidators.d.ts +7 -0
  489. package/_types/actions/validatorManager/getActiveValidators.d.ts.map +1 -0
  490. package/_types/actions/validatorManager/getOffenceValidators.d.ts +8 -0
  491. package/_types/actions/validatorManager/getOffenceValidators.d.ts.map +1 -0
  492. package/_types/actions/validatorManager/getOfflineValidators.d.ts +8 -0
  493. package/_types/actions/validatorManager/getOfflineValidators.d.ts.map +1 -0
  494. package/_types/actions/validatorManager/getReputationForAccount.d.ts +8 -0
  495. package/_types/actions/validatorManager/getReputationForAccount.d.ts.map +1 -0
  496. package/_types/actions/validatorManager/getReputationPenaltyFor.d.ts +8 -0
  497. package/_types/actions/validatorManager/getReputationPenaltyFor.d.ts.map +1 -0
  498. package/_types/actions/validatorManager/getReputations.d.ts +9 -0
  499. package/_types/actions/validatorManager/getReputations.d.ts.map +1 -0
  500. package/_types/actions/validatorManager/getSelectedValidators.d.ts +7 -0
  501. package/_types/actions/validatorManager/getSelectedValidators.d.ts.map +1 -0
  502. package/_types/actions/validatorManager/getValidatorCandidates.d.ts +7 -0
  503. package/_types/actions/validatorManager/getValidatorCandidates.d.ts.map +1 -0
  504. package/_types/actions/validatorManager/index.d.ts +18 -0
  505. package/_types/actions/validatorManager/index.d.ts.map +1 -0
  506. package/_types/actions/validatorManager/types.d.ts +10 -0
  507. package/_types/actions/validatorManager/types.d.ts.map +1 -0
  508. package/_types/chains/defineChain.d.ts +18 -0
  509. package/_types/chains/defineChain.d.ts.map +1 -0
  510. package/_types/chains/definitions.d.ts +65 -0
  511. package/_types/chains/definitions.d.ts.map +1 -0
  512. package/_types/chains/index.d.ts +4 -0
  513. package/_types/chains/index.d.ts.map +1 -0
  514. package/_types/client/compatibility.d.ts +16 -0
  515. package/_types/client/compatibility.d.ts.map +1 -0
  516. package/_types/client/createClient.d.ts +12 -0
  517. package/_types/client/createClient.d.ts.map +1 -0
  518. package/_types/client/types.d.ts +7 -0
  519. package/_types/client/types.d.ts.map +1 -0
  520. package/_types/crypto/ctypeHash.d.ts +16 -0
  521. package/_types/crypto/ctypeHash.d.ts.map +1 -0
  522. package/_types/crypto/index.d.ts +3 -0
  523. package/_types/crypto/index.d.ts.map +1 -0
  524. package/_types/ctypes/definitions.d.ts +21 -0
  525. package/_types/ctypes/definitions.d.ts.map +1 -0
  526. package/_types/ctypes/index.d.ts +4 -0
  527. package/_types/ctypes/index.d.ts.map +1 -0
  528. package/_types/did/didUri.d.ts +11 -0
  529. package/_types/did/didUri.d.ts.map +1 -0
  530. package/_types/index.d.ts +25 -0
  531. package/_types/index.d.ts.map +1 -0
  532. package/_types/plugins/activityTracker.d.ts +34 -0
  533. package/_types/plugins/activityTracker.d.ts.map +1 -0
  534. package/_types/plugins/handshake.d.ts +32 -0
  535. package/_types/plugins/handshake.d.ts.map +1 -0
  536. package/_types/plugins/index.d.ts +19 -0
  537. package/_types/plugins/index.d.ts.map +1 -0
  538. package/_types/plugins/potential.d.ts +29 -0
  539. package/_types/plugins/potential.d.ts.map +1 -0
  540. package/_types/plugins/puzzlePieces.d.ts +28 -0
  541. package/_types/plugins/puzzlePieces.d.ts.map +1 -0
  542. package/_types/plugins/referral.d.ts +17 -0
  543. package/_types/plugins/referral.d.ts.map +1 -0
  544. package/_types/plugins/reputationVoting.d.ts +25 -0
  545. package/_types/plugins/reputationVoting.d.ts.map +1 -0
  546. package/_types/plugins/rewardPool.d.ts +14 -0
  547. package/_types/plugins/rewardPool.d.ts.map +1 -0
  548. package/_types/plugins/techCommitteeManager.d.ts +14 -0
  549. package/_types/plugins/techCommitteeManager.d.ts.map +1 -0
  550. package/_types/plugins/validatorManager.d.ts +30 -0
  551. package/_types/plugins/validatorManager.d.ts.map +1 -0
  552. package/_types/rpc/bundle.d.ts +4 -0
  553. package/_types/rpc/bundle.d.ts.map +1 -0
  554. package/_types/rpc/call.d.ts +4 -0
  555. package/_types/rpc/call.d.ts.map +1 -0
  556. package/_types/rpc/definitions.d.ts +3 -0
  557. package/_types/rpc/definitions.d.ts.map +1 -0
  558. package/_types/rpc/index.d.ts +4 -0
  559. package/_types/rpc/index.d.ts.map +1 -0
  560. package/_types/rpc/types.d.ts +3 -0
  561. package/_types/rpc/types.d.ts.map +1 -0
  562. package/_types/types/index.d.ts +17 -0
  563. package/_types/types/index.d.ts.map +1 -0
  564. package/package.json +173 -4
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getWildcardDistributionMap = getWildcardDistributionMap;
4
+ const call_js_1 = require("../../rpc/call.js");
5
+ async function getWildcardDistributionMap(client, { at } = {}) {
6
+ const result = await (0, call_js_1.callRpc)(client, 'puzzlePieces', 'wildcardDistributionMap', at);
7
+ const pairs = result.toJSON();
8
+ return pairs.map(([blockNumber, itemId]) => ({ blockNumber, itemId }));
9
+ }
@@ -0,0 +1,7 @@
1
+ import type { Client } from '../../client/types.cjs';
2
+ import type { BlockHash } from '../../types/index.cjs';
3
+ export interface GetWildcardThresholdParameters {
4
+ at?: BlockHash;
5
+ }
6
+ export declare function getWildcardThreshold(client: Client, { at }?: GetWildcardThresholdParameters): Promise<number | null>;
7
+ //# sourceMappingURL=getWildcardThreshold.d.ts.map
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getWildcardThreshold = getWildcardThreshold;
4
+ const call_js_1 = require("../../rpc/call.js");
5
+ async function getWildcardThreshold(client, { at } = {}) {
6
+ const result = await (0, call_js_1.callRpc)(client, 'puzzlePieces', 'wildcardThreshold', at);
7
+ return result.isSome ? result.unwrap().toNumber() : null;
8
+ }
@@ -0,0 +1,18 @@
1
+ export { getCollectionsCount } from './getCollectionsCount.cjs';
2
+ export { getItemsCount } from './getItemsCount.cjs';
3
+ export { getOwner } from './getOwner.cjs';
4
+ export { getPendingWildcards } from './getPendingWildcards.cjs';
5
+ export { getTotalPuzzlePiecesMinted } from './getTotalPuzzlePiecesMinted.cjs';
6
+ export { getWildcardCollectionId } from './getWildcardCollectionId.cjs';
7
+ export { getWildcardDistributionMap } from './getWildcardDistributionMap.cjs';
8
+ export { getWildcardThreshold } from './getWildcardThreshold.cjs';
9
+ export type { WildcardDistribution } from './types.cjs';
10
+ export type { GetCollectionsCountParameters } from './getCollectionsCount.cjs';
11
+ export type { GetItemsCountParameters } from './getItemsCount.cjs';
12
+ export type { GetOwnerParameters } from './getOwner.cjs';
13
+ export type { GetPendingWildcardsParameters } from './getPendingWildcards.cjs';
14
+ export type { GetTotalPuzzlePiecesMintedParameters } from './getTotalPuzzlePiecesMinted.cjs';
15
+ export type { GetWildcardCollectionIdParameters } from './getWildcardCollectionId.cjs';
16
+ export type { GetWildcardDistributionMapParameters } from './getWildcardDistributionMap.cjs';
17
+ export type { GetWildcardThresholdParameters } from './getWildcardThreshold.cjs';
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getWildcardThreshold = exports.getWildcardDistributionMap = exports.getWildcardCollectionId = exports.getTotalPuzzlePiecesMinted = exports.getPendingWildcards = exports.getOwner = exports.getItemsCount = exports.getCollectionsCount = void 0;
4
+ var getCollectionsCount_js_1 = require("./getCollectionsCount.js");
5
+ Object.defineProperty(exports, "getCollectionsCount", { enumerable: true, get: function () { return getCollectionsCount_js_1.getCollectionsCount; } });
6
+ var getItemsCount_js_1 = require("./getItemsCount.js");
7
+ Object.defineProperty(exports, "getItemsCount", { enumerable: true, get: function () { return getItemsCount_js_1.getItemsCount; } });
8
+ var getOwner_js_1 = require("./getOwner.js");
9
+ Object.defineProperty(exports, "getOwner", { enumerable: true, get: function () { return getOwner_js_1.getOwner; } });
10
+ var getPendingWildcards_js_1 = require("./getPendingWildcards.js");
11
+ Object.defineProperty(exports, "getPendingWildcards", { enumerable: true, get: function () { return getPendingWildcards_js_1.getPendingWildcards; } });
12
+ var getTotalPuzzlePiecesMinted_js_1 = require("./getTotalPuzzlePiecesMinted.js");
13
+ Object.defineProperty(exports, "getTotalPuzzlePiecesMinted", { enumerable: true, get: function () { return getTotalPuzzlePiecesMinted_js_1.getTotalPuzzlePiecesMinted; } });
14
+ var getWildcardCollectionId_js_1 = require("./getWildcardCollectionId.js");
15
+ Object.defineProperty(exports, "getWildcardCollectionId", { enumerable: true, get: function () { return getWildcardCollectionId_js_1.getWildcardCollectionId; } });
16
+ var getWildcardDistributionMap_js_1 = require("./getWildcardDistributionMap.js");
17
+ Object.defineProperty(exports, "getWildcardDistributionMap", { enumerable: true, get: function () { return getWildcardDistributionMap_js_1.getWildcardDistributionMap; } });
18
+ var getWildcardThreshold_js_1 = require("./getWildcardThreshold.js");
19
+ Object.defineProperty(exports, "getWildcardThreshold", { enumerable: true, get: function () { return getWildcardThreshold_js_1.getWildcardThreshold; } });
@@ -0,0 +1,5 @@
1
+ export interface WildcardDistribution {
2
+ blockNumber: number;
3
+ itemId: number;
4
+ }
5
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import type { Codec } from '@polkadot/types/types';
2
+ import type { Address, PaginatedResponse } from '../../types/index.cjs';
3
+ export declare function decodeAccountPage(raw: Codec): PaginatedResponse<Address>;
4
+ //# sourceMappingURL=decodePage.d.ts.map
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.decodeAccountPage = decodeAccountPage;
4
+ function decodeAccountPage(raw) {
5
+ const page = raw.toJSON();
6
+ return {
7
+ items: (page.items ?? []),
8
+ total: page.total ?? null,
9
+ page: page.page ?? 0,
10
+ pageSize: page.pageSize ?? page.page_size ?? 0,
11
+ hasMore: page.hasMore ?? page.has_more ?? false,
12
+ };
13
+ }
@@ -0,0 +1,9 @@
1
+ import type { Client } from '../../client/types.cjs';
2
+ import type { Address, BlockHash } from '../../types/index.cjs';
3
+ import type { TreeNode } from './types.cjs';
4
+ export interface GetActiveReferralsParameters {
5
+ account: Address;
6
+ at?: BlockHash;
7
+ }
8
+ export declare function getActiveReferrals(client: Client, { account, at }: GetActiveReferralsParameters): Promise<TreeNode | null>;
9
+ //# sourceMappingURL=getActiveReferrals.d.ts.map
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getActiveReferrals = getActiveReferrals;
4
+ const call_js_1 = require("../../rpc/call.js");
5
+ async function getActiveReferrals(client, { account, at }) {
6
+ const result = await (0, call_js_1.callRpc)(client, 'referral', 'activeReferrals', account, at);
7
+ if (result.isNone)
8
+ return null;
9
+ const node = result.unwrap().toJSON();
10
+ return {
11
+ parent: (node.parent ?? null),
12
+ children: (node.children ?? []),
13
+ };
14
+ }
@@ -0,0 +1,8 @@
1
+ import type { Client } from '../../client/types.cjs';
2
+ import type { Address, BlockHash } from '../../types/index.cjs';
3
+ export interface GetActiveReferralsCountParameters {
4
+ account: Address;
5
+ at?: BlockHash;
6
+ }
7
+ export declare function getActiveReferralsCount(client: Client, { account, at }: GetActiveReferralsCountParameters): Promise<number>;
8
+ //# sourceMappingURL=getActiveReferralsCount.d.ts.map
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getActiveReferralsCount = getActiveReferralsCount;
4
+ const call_js_1 = require("../../rpc/call.js");
5
+ async function getActiveReferralsCount(client, { account, at }) {
6
+ const result = await (0, call_js_1.callRpc)(client, 'referral', 'activeReferralsCount', account, at);
7
+ return result.toNumber();
8
+ }
@@ -0,0 +1,7 @@
1
+ import type { Client } from '../../client/types.cjs';
2
+ import type { Address, BlockHash } from '../../types/index.cjs';
3
+ export interface GetBlockProducersParameters {
4
+ at?: BlockHash;
5
+ }
6
+ export declare function getBlockProducers(client: Client, { at }?: GetBlockProducersParameters): Promise<Address[]>;
7
+ //# sourceMappingURL=getBlockProducers.d.ts.map
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getBlockProducers = getBlockProducers;
4
+ const call_js_1 = require("../../rpc/call.js");
5
+ async function getBlockProducers(client, { at } = {}) {
6
+ const result = await (0, call_js_1.callRpc)(client, 'referral', 'blockProducers', at);
7
+ return result.map((account) => account.toString());
8
+ }
@@ -0,0 +1,8 @@
1
+ import type { Client } from '../../client/types.cjs';
2
+ import type { Address, BlockHash, Pagination, PaginatedResponse } from '../../types/index.cjs';
3
+ export interface GetBlockProducersPageParameters {
4
+ pagination?: Pagination;
5
+ at?: BlockHash;
6
+ }
7
+ export declare function getBlockProducersPage(client: Client, { pagination, at }?: GetBlockProducersPageParameters): Promise<PaginatedResponse<Address>>;
8
+ //# sourceMappingURL=getBlockProducersPage.d.ts.map
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getBlockProducersPage = getBlockProducersPage;
4
+ const call_js_1 = require("../../rpc/call.js");
5
+ const decodePage_js_1 = require("./decodePage.js");
6
+ async function getBlockProducersPage(client, { pagination, at } = {}) {
7
+ const result = await (0, call_js_1.callRpc)(client, 'referral', 'blockProducersPage', pagination, at);
8
+ return (0, decodePage_js_1.decodeAccountPage)(result);
9
+ }
@@ -0,0 +1,8 @@
1
+ import type { Client } from '../../client/types.cjs';
2
+ import type { Address, BlockHash } from '../../types/index.cjs';
3
+ export interface GetPendingReferralsParameters {
4
+ referrer: Address;
5
+ at?: BlockHash;
6
+ }
7
+ export declare function getPendingReferrals(client: Client, { referrer, at }: GetPendingReferralsParameters): Promise<Address[]>;
8
+ //# sourceMappingURL=getPendingReferrals.d.ts.map
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getPendingReferrals = getPendingReferrals;
4
+ const call_js_1 = require("../../rpc/call.js");
5
+ async function getPendingReferrals(client, { referrer, at }) {
6
+ const result = await (0, call_js_1.callRpc)(client, 'referral', 'pendingReferrals', referrer, at);
7
+ return result.map((account) => account.toString());
8
+ }
@@ -0,0 +1,9 @@
1
+ import type { Client } from '../../client/types.cjs';
2
+ import type { Address, BlockHash, Pagination, PaginatedResponse } from '../../types/index.cjs';
3
+ export interface GetPendingReferralsPageParameters {
4
+ referrer: Address;
5
+ pagination?: Pagination;
6
+ at?: BlockHash;
7
+ }
8
+ export declare function getPendingReferralsPage(client: Client, { referrer, pagination, at }: GetPendingReferralsPageParameters): Promise<PaginatedResponse<Address>>;
9
+ //# sourceMappingURL=getPendingReferralsPage.d.ts.map
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getPendingReferralsPage = getPendingReferralsPage;
4
+ const call_js_1 = require("../../rpc/call.js");
5
+ const decodePage_js_1 = require("./decodePage.js");
6
+ async function getPendingReferralsPage(client, { referrer, pagination, at }) {
7
+ const result = await (0, call_js_1.callRpc)(client, 'referral', 'pendingReferralsPage', referrer, pagination, at);
8
+ return (0, decodePage_js_1.decodeAccountPage)(result);
9
+ }
@@ -0,0 +1,8 @@
1
+ import type { Client } from '../../client/types.cjs';
2
+ import type { Address, BlockHash } from '../../types/index.cjs';
3
+ export interface GetReferrerParameters {
4
+ account: Address;
5
+ at?: BlockHash;
6
+ }
7
+ export declare function getReferrer(client: Client, { account, at }: GetReferrerParameters): Promise<Address | null>;
8
+ //# sourceMappingURL=getReferrer.d.ts.map
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getReferrer = getReferrer;
4
+ const call_js_1 = require("../../rpc/call.js");
5
+ async function getReferrer(client, { account, at }) {
6
+ const result = await (0, call_js_1.callRpc)(client, 'referral', 'referrer', account, at);
7
+ return result.isSome ? result.unwrap().toString() : null;
8
+ }
@@ -0,0 +1,16 @@
1
+ export { getActiveReferrals } from './getActiveReferrals.cjs';
2
+ export { getActiveReferralsCount } from './getActiveReferralsCount.cjs';
3
+ export { getBlockProducers } from './getBlockProducers.cjs';
4
+ export { getBlockProducersPage } from './getBlockProducersPage.cjs';
5
+ export { getPendingReferrals } from './getPendingReferrals.cjs';
6
+ export { getPendingReferralsPage } from './getPendingReferralsPage.cjs';
7
+ export { getReferrer } from './getReferrer.cjs';
8
+ export type { TreeNode } from './types.cjs';
9
+ export type { GetActiveReferralsParameters } from './getActiveReferrals.cjs';
10
+ export type { GetActiveReferralsCountParameters } from './getActiveReferralsCount.cjs';
11
+ export type { GetBlockProducersParameters } from './getBlockProducers.cjs';
12
+ export type { GetBlockProducersPageParameters } from './getBlockProducersPage.cjs';
13
+ export type { GetPendingReferralsParameters } from './getPendingReferrals.cjs';
14
+ export type { GetPendingReferralsPageParameters } from './getPendingReferralsPage.cjs';
15
+ export type { GetReferrerParameters } from './getReferrer.cjs';
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getReferrer = exports.getPendingReferralsPage = exports.getPendingReferrals = exports.getBlockProducersPage = exports.getBlockProducers = exports.getActiveReferralsCount = exports.getActiveReferrals = void 0;
4
+ var getActiveReferrals_js_1 = require("./getActiveReferrals.js");
5
+ Object.defineProperty(exports, "getActiveReferrals", { enumerable: true, get: function () { return getActiveReferrals_js_1.getActiveReferrals; } });
6
+ var getActiveReferralsCount_js_1 = require("./getActiveReferralsCount.js");
7
+ Object.defineProperty(exports, "getActiveReferralsCount", { enumerable: true, get: function () { return getActiveReferralsCount_js_1.getActiveReferralsCount; } });
8
+ var getBlockProducers_js_1 = require("./getBlockProducers.js");
9
+ Object.defineProperty(exports, "getBlockProducers", { enumerable: true, get: function () { return getBlockProducers_js_1.getBlockProducers; } });
10
+ var getBlockProducersPage_js_1 = require("./getBlockProducersPage.js");
11
+ Object.defineProperty(exports, "getBlockProducersPage", { enumerable: true, get: function () { return getBlockProducersPage_js_1.getBlockProducersPage; } });
12
+ var getPendingReferrals_js_1 = require("./getPendingReferrals.js");
13
+ Object.defineProperty(exports, "getPendingReferrals", { enumerable: true, get: function () { return getPendingReferrals_js_1.getPendingReferrals; } });
14
+ var getPendingReferralsPage_js_1 = require("./getPendingReferralsPage.js");
15
+ Object.defineProperty(exports, "getPendingReferralsPage", { enumerable: true, get: function () { return getPendingReferralsPage_js_1.getPendingReferralsPage; } });
16
+ var getReferrer_js_1 = require("./getReferrer.js");
17
+ Object.defineProperty(exports, "getReferrer", { enumerable: true, get: function () { return getReferrer_js_1.getReferrer; } });
@@ -0,0 +1,6 @@
1
+ import type { Address } from '../../types/index.cjs';
2
+ export interface TreeNode {
3
+ parent: Address | null;
4
+ children: Address[];
5
+ }
6
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ import type { Client } from '../../client/types.cjs';
2
+ import type { BlockHash } from '../../types/index.cjs';
3
+ import type { Tally } from './types.cjs';
4
+ export interface GetTallyParameters {
5
+ pollIndex: number;
6
+ at?: BlockHash;
7
+ }
8
+ export declare function getTally(client: Client, { pollIndex, at }: GetTallyParameters): Promise<Tally>;
9
+ //# sourceMappingURL=getTally.d.ts.map
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getTally = getTally;
4
+ const call_js_1 = require("../../rpc/call.js");
5
+ async function getTally(client, { pollIndex, at }) {
6
+ const result = await (0, call_js_1.callRpc)(client, 'reputationVoting', 'getTally', pollIndex, at);
7
+ const tally = result.toJSON();
8
+ return {
9
+ ayes: BigInt(tally.ayes ?? 0),
10
+ nays: BigInt(tally.nays ?? 0),
11
+ turnout: tally.turnout ?? 0,
12
+ electorate: BigInt(tally.electorate ?? 0),
13
+ };
14
+ }
@@ -0,0 +1,9 @@
1
+ import type { Client } from '../../client/types.cjs';
2
+ import type { Address, BlockHash } from '../../types/index.cjs';
3
+ import type { AccountVote } from './types.cjs';
4
+ export interface GetVotesForAccountParameters {
5
+ account: Address;
6
+ at?: BlockHash;
7
+ }
8
+ export declare function getVotesForAccount(client: Client, { account, at }: GetVotesForAccountParameters): Promise<AccountVote[]>;
9
+ //# sourceMappingURL=getVotesForAccount.d.ts.map
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getVotesForAccount = getVotesForAccount;
4
+ const call_js_1 = require("../../rpc/call.js");
5
+ async function getVotesForAccount(client, { account, at }) {
6
+ const result = await (0, call_js_1.callRpc)(client, 'reputationVoting', 'getVotesForAccount', account, at);
7
+ const pairs = result.toJSON();
8
+ return pairs.map(([pollIndex, vote]) => ({
9
+ pollIndex,
10
+ vote: {
11
+ direction: (vote.direction ?? 'aye').toLowerCase(),
12
+ reputation: vote.reputation ?? 0,
13
+ votedAt: vote.votedAt ?? vote.voted_at ?? 0,
14
+ },
15
+ }));
16
+ }
@@ -0,0 +1,8 @@
1
+ import type { Client } from '../../client/types.cjs';
2
+ import type { Address, BlockHash } from '../../types/index.cjs';
3
+ export interface GetVotingReputationParameters {
4
+ account: Address;
5
+ at?: BlockHash;
6
+ }
7
+ export declare function getVotingReputation(client: Client, { account, at }: GetVotingReputationParameters): Promise<number>;
8
+ //# sourceMappingURL=getVotingReputation.d.ts.map
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getVotingReputation = getVotingReputation;
4
+ const call_js_1 = require("../../rpc/call.js");
5
+ async function getVotingReputation(client, { account, at }) {
6
+ const result = await (0, call_js_1.callRpc)(client, 'reputationVoting', 'getVotingReputation', account, at);
7
+ return result.toNumber();
8
+ }
@@ -0,0 +1,10 @@
1
+ export { getTally } from './getTally.cjs';
2
+ export { getVotesForAccount } from './getVotesForAccount.cjs';
3
+ export { getVotingReputation } from './getVotingReputation.cjs';
4
+ export { isPassing } from './isPassing.cjs';
5
+ export type { AccountVote, Tally, VoteDirection, VoteRecord } from './types.cjs';
6
+ export type { GetTallyParameters } from './getTally.cjs';
7
+ export type { GetVotesForAccountParameters } from './getVotesForAccount.cjs';
8
+ export type { GetVotingReputationParameters } from './getVotingReputation.cjs';
9
+ export type { IsPassingParameters } from './isPassing.cjs';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isPassing = exports.getVotingReputation = exports.getVotesForAccount = exports.getTally = void 0;
4
+ var getTally_js_1 = require("./getTally.js");
5
+ Object.defineProperty(exports, "getTally", { enumerable: true, get: function () { return getTally_js_1.getTally; } });
6
+ var getVotesForAccount_js_1 = require("./getVotesForAccount.js");
7
+ Object.defineProperty(exports, "getVotesForAccount", { enumerable: true, get: function () { return getVotesForAccount_js_1.getVotesForAccount; } });
8
+ var getVotingReputation_js_1 = require("./getVotingReputation.js");
9
+ Object.defineProperty(exports, "getVotingReputation", { enumerable: true, get: function () { return getVotingReputation_js_1.getVotingReputation; } });
10
+ var isPassing_js_1 = require("./isPassing.js");
11
+ Object.defineProperty(exports, "isPassing", { enumerable: true, get: function () { return isPassing_js_1.isPassing; } });
@@ -0,0 +1,8 @@
1
+ import type { Client } from '../../client/types.cjs';
2
+ import type { BlockHash } from '../../types/index.cjs';
3
+ export interface IsPassingParameters {
4
+ pollIndex: number;
5
+ at?: BlockHash;
6
+ }
7
+ export declare function isPassing(client: Client, { pollIndex, at }: IsPassingParameters): Promise<boolean>;
8
+ //# sourceMappingURL=isPassing.d.ts.map
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isPassing = isPassing;
4
+ const call_js_1 = require("../../rpc/call.js");
5
+ async function isPassing(client, { pollIndex, at }) {
6
+ const result = await (0, call_js_1.callRpc)(client, 'reputationVoting', 'isPassing', pollIndex, at);
7
+ return result.isTrue;
8
+ }
@@ -0,0 +1,17 @@
1
+ export type VoteDirection = 'aye' | 'nay';
2
+ export interface Tally {
3
+ ayes: bigint;
4
+ nays: bigint;
5
+ turnout: number;
6
+ electorate: bigint;
7
+ }
8
+ export interface VoteRecord {
9
+ direction: VoteDirection;
10
+ reputation: number;
11
+ votedAt: number;
12
+ }
13
+ export interface AccountVote {
14
+ pollIndex: number;
15
+ vote: VoteRecord;
16
+ }
17
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ import type { Client } from '../../client/types.cjs';
2
+ import type { Address, BlockHash } from '../../types/index.cjs';
3
+ export interface GetRewardPoolAccountParameters {
4
+ at?: BlockHash;
5
+ }
6
+ export declare function getRewardPoolAccount(client: Client, { at }?: GetRewardPoolAccountParameters): Promise<Address>;
7
+ //# sourceMappingURL=getRewardPoolAccount.d.ts.map
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRewardPoolAccount = getRewardPoolAccount;
4
+ const call_js_1 = require("../../rpc/call.js");
5
+ async function getRewardPoolAccount(client, { at } = {}) {
6
+ const result = await (0, call_js_1.callRpc)(client, 'rewardPool', 'accountId', at);
7
+ return result.toString();
8
+ }
@@ -0,0 +1,7 @@
1
+ import type { Client } from '../../client/types.cjs';
2
+ import type { BlockHash } from '../../types/index.cjs';
3
+ export interface GetRewardPoolBalanceParameters {
4
+ at?: BlockHash;
5
+ }
6
+ export declare function getRewardPoolBalance(client: Client, { at }?: GetRewardPoolBalanceParameters): Promise<bigint>;
7
+ //# sourceMappingURL=getRewardPoolBalance.d.ts.map
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRewardPoolBalance = getRewardPoolBalance;
4
+ const call_js_1 = require("../../rpc/call.js");
5
+ async function getRewardPoolBalance(client, { at } = {}) {
6
+ const result = await (0, call_js_1.callRpc)(client, 'rewardPool', 'balance', at);
7
+ return result.toBigInt();
8
+ }
@@ -0,0 +1,5 @@
1
+ export { getRewardPoolAccount } from './getRewardPoolAccount.cjs';
2
+ export { getRewardPoolBalance } from './getRewardPoolBalance.cjs';
3
+ export type { GetRewardPoolAccountParameters } from './getRewardPoolAccount.cjs';
4
+ export type { GetRewardPoolBalanceParameters } from './getRewardPoolBalance.cjs';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRewardPoolBalance = exports.getRewardPoolAccount = void 0;
4
+ var getRewardPoolAccount_js_1 = require("./getRewardPoolAccount.js");
5
+ Object.defineProperty(exports, "getRewardPoolAccount", { enumerable: true, get: function () { return getRewardPoolAccount_js_1.getRewardPoolAccount; } });
6
+ var getRewardPoolBalance_js_1 = require("./getRewardPoolBalance.js");
7
+ Object.defineProperty(exports, "getRewardPoolBalance", { enumerable: true, get: function () { return getRewardPoolBalance_js_1.getRewardPoolBalance; } });
@@ -0,0 +1,65 @@
1
+ import type { AddressOrPair, SignerOptions } from '@polkadot/api/types';
2
+ import type { Client } from '../client/types.cjs';
3
+ import type { Extrinsic } from './did/createDid.cjs';
4
+ /**
5
+ * How long to wait before resolving.
6
+ *
7
+ * `inBlock` returns as soon as the extrinsic is in a block, which is enough to read the result
8
+ * back. `finalized` waits for the block to be finalized, and is what a caller needs when it
9
+ * records the outcome somewhere a reorg must not invalidate — a database row pointing at a
10
+ * dropped block is worse than a slower write.
11
+ */
12
+ export type SubmitWaitFor = 'inBlock' | 'finalized';
13
+ export interface SubmitAndWaitParameters {
14
+ extrinsic: Extrinsic;
15
+ signer: AddressOrPair;
16
+ options?: Partial<SignerOptions>;
17
+ timeoutMs?: number;
18
+ /** Defaults to `inBlock`. */
19
+ waitFor?: SubmitWaitFor;
20
+ }
21
+ export interface SubmitResult {
22
+ blockHash: string;
23
+ txHash: string;
24
+ }
25
+ /**
26
+ * A call the runtime rejected, carrying the pallet and variant that rejected it.
27
+ *
28
+ * The names are what callers branch on — `ctype.AlreadyExists` is an idempotent no-op, while
29
+ * another error from the same call is not. Parsing that back out of a message string is the
30
+ * failure mode this type exists to prevent, so the names stay structured.
31
+ */
32
+ export declare class DispatchFailedError extends Error {
33
+ readonly section: string;
34
+ readonly method: string;
35
+ readonly docs: string[];
36
+ constructor(section: string, method: string, docs?: string[]);
37
+ }
38
+ /** Narrows an unknown error to one specific runtime rejection. */
39
+ export declare function isDispatchFailure(error: unknown, section: string, method: string): error is DispatchFailedError;
40
+ /**
41
+ * The provider abandoned the status subscription — a dropped socket, say.
42
+ *
43
+ * Distinct from the extrinsic being rejected: nothing is known about whether it executed, so a
44
+ * caller that retries has to treat the submission as possibly in flight.
45
+ */
46
+ export declare class SubscriptionFailedError extends Error {
47
+ readonly internalError: unknown;
48
+ constructor(internalError: unknown);
49
+ }
50
+ /** No terminal status arrived within the budget. The extrinsic may still be in flight. */
51
+ export declare class SubmitTimeoutError extends Error {
52
+ readonly timeoutMs: number;
53
+ constructor(timeoutMs: number);
54
+ }
55
+ /**
56
+ * The extrinsic reached a status it cannot recover from — dropped, invalid, usurped, or out of
57
+ * time for finality. It will never be included, so a caller may resubmit.
58
+ */
59
+ export declare class NotIncludedError extends Error {
60
+ readonly status: string;
61
+ readonly txHash: string;
62
+ constructor(status: string, txHash: string);
63
+ }
64
+ export declare function submitAndWait(client: Client, params: SubmitAndWaitParameters): Promise<SubmitResult>;
65
+ //# sourceMappingURL=submitAndWait.d.ts.map