@firmachain/firma-js 0.3.3 → 0.3.5

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 (245) hide show
  1. package/dist/index.js +5 -1
  2. package/dist/sdk/FirmaAuthzService.d.ts +8 -7
  3. package/dist/sdk/FirmaAuthzService.js +12 -22
  4. package/dist/sdk/FirmaBankService.js +2 -2
  5. package/dist/sdk/FirmaChainService.js +1 -1
  6. package/dist/sdk/FirmaContractService.d.ts +1 -1
  7. package/dist/sdk/FirmaContractService.js +6 -6
  8. package/dist/sdk/FirmaCosmWasmCw20.d.ts +2 -2
  9. package/dist/sdk/FirmaCosmWasmCw20.js +8 -8
  10. package/dist/sdk/FirmaCosmWasmCw721.d.ts +2 -2
  11. package/dist/sdk/FirmaCosmWasmCw721.js +12 -12
  12. package/dist/sdk/FirmaCosmWasmCwBridge.d.ts +1 -1
  13. package/dist/sdk/FirmaCosmWasmCwBridge.js +8 -8
  14. package/dist/sdk/FirmaCosmWasmCwMarketplace.d.ts +1 -1
  15. package/dist/sdk/FirmaCosmWasmCwMarketplace.js +5 -5
  16. package/dist/sdk/FirmaCosmWasmService.d.ts +1 -1
  17. package/dist/sdk/FirmaCosmWasmService.js +13 -13
  18. package/dist/sdk/FirmaDistributionService.d.ts +1 -1
  19. package/dist/sdk/FirmaDistributionService.js +6 -6
  20. package/dist/sdk/FirmaFeeGrantService.d.ts +7 -6
  21. package/dist/sdk/FirmaFeeGrantService.js +9 -26
  22. package/dist/sdk/FirmaGovService.d.ts +1 -1
  23. package/dist/sdk/FirmaGovService.js +14 -14
  24. package/dist/sdk/FirmaIbcService.d.ts +3 -3
  25. package/dist/sdk/FirmaIbcService.js +11 -8
  26. package/dist/sdk/FirmaIpfsService.js +1 -1
  27. package/dist/sdk/FirmaMintService.js +1 -1
  28. package/dist/sdk/FirmaNftService.d.ts +1 -1
  29. package/dist/sdk/FirmaNftService.js +6 -6
  30. package/dist/sdk/FirmaSlashingService.js +1 -1
  31. package/dist/sdk/FirmaStakingService.d.ts +3 -3
  32. package/dist/sdk/FirmaStakingService.js +6 -6
  33. package/dist/sdk/FirmaTokenService.d.ts +1 -1
  34. package/dist/sdk/FirmaTokenService.js +5 -5
  35. package/dist/sdk/FirmaUtil.d.ts +25 -24
  36. package/dist/sdk/FirmaUtil.js +200 -145
  37. package/dist/sdk/FirmaWalletService.d.ts +6 -7
  38. package/dist/sdk/FirmaWalletService.js +78 -36
  39. package/dist/sdk/firmachain/authz/AuthzQueryClient.js +4 -4
  40. package/dist/sdk/firmachain/authz/AuthzTxTypes.d.ts +8 -11
  41. package/dist/sdk/firmachain/authz/AuthzTxTypes.js +6 -10
  42. package/dist/sdk/firmachain/authz/index.js +5 -1
  43. package/dist/sdk/firmachain/bank/BankQueryClient.js +5 -5
  44. package/dist/sdk/firmachain/bank/index.js +5 -1
  45. package/dist/sdk/firmachain/common/ITxClient.d.ts +2 -4
  46. package/dist/sdk/firmachain/common/ITxClient.js +20 -92
  47. package/dist/sdk/firmachain/common/LedgerWallet.d.ts +19 -3
  48. package/dist/sdk/firmachain/common/LedgerWallet.js +138 -68
  49. package/dist/sdk/firmachain/common/TendermintQueryClient.js +1 -1
  50. package/dist/sdk/firmachain/common/TxCommon.d.ts +13 -29
  51. package/dist/sdk/firmachain/common/accounts.d.ts +1 -1
  52. package/dist/sdk/firmachain/common/accounts.js +7 -7
  53. package/dist/sdk/firmachain/{amino → common}/coins.d.ts +2 -14
  54. package/dist/sdk/firmachain/{amino → common}/coins.js +4 -25
  55. package/dist/sdk/firmachain/common/index.d.ts +0 -1
  56. package/dist/sdk/firmachain/common/index.js +5 -4
  57. package/dist/sdk/firmachain/{amino → common}/wallet.js +15 -11
  58. package/dist/sdk/firmachain/contract/ContractQueryClient.js +3 -3
  59. package/dist/sdk/firmachain/contract/ContractTxTypes.d.ts +6 -6
  60. package/dist/sdk/firmachain/contract/index.js +5 -1
  61. package/dist/sdk/firmachain/cosmwasm/CosmWasmQueryClient.js +9 -9
  62. package/dist/sdk/firmachain/cosmwasm/index.js +5 -1
  63. package/dist/sdk/firmachain/distribution/DistributionQueryClient.js +6 -6
  64. package/dist/sdk/firmachain/distribution/index.js +5 -1
  65. package/dist/sdk/firmachain/feegrant/FeeGrantQueryClient.js +3 -3
  66. package/dist/sdk/firmachain/feegrant/FeeGrantTxTypes.d.ts +4 -45
  67. package/dist/sdk/firmachain/feegrant/FeeGrantTxTypes.js +3 -82
  68. package/dist/sdk/firmachain/feegrant/index.js +5 -1
  69. package/dist/sdk/firmachain/google/protobuf/any.d.ts +3 -3
  70. package/dist/sdk/firmachain/google/protobuf/descriptor.d.ts +29 -29
  71. package/dist/sdk/firmachain/google/protobuf/duration.d.ts +3 -3
  72. package/dist/sdk/firmachain/gov/GovQueryClient.js +3 -3
  73. package/dist/sdk/firmachain/gov/index.js +5 -1
  74. package/dist/sdk/firmachain/ibc/IbcQueryClient.js +2 -2
  75. package/dist/sdk/firmachain/ibc/index.js +5 -1
  76. package/dist/sdk/firmachain/mint/MintQueryClient.js +1 -1
  77. package/dist/sdk/firmachain/mint/index.js +5 -1
  78. package/dist/sdk/firmachain/nft/NftQueryClient.js +1 -1
  79. package/dist/sdk/firmachain/nft/NftTxTypes.d.ts +8 -8
  80. package/dist/sdk/firmachain/nft/index.js +5 -1
  81. package/dist/sdk/firmachain/slashing/SlashingQueryClient.js +1 -1
  82. package/dist/sdk/firmachain/slashing/index.js +5 -1
  83. package/dist/sdk/firmachain/staking/StakingQueryClient.d.ts +2 -2
  84. package/dist/sdk/firmachain/staking/StakingQueryClient.js +10 -9
  85. package/dist/sdk/firmachain/staking/index.js +5 -1
  86. package/dist/sdk/firmachain/token/TokenQueryClient.js +1 -1
  87. package/dist/sdk/firmachain/token/TokenTxTypes.d.ts +11 -11
  88. package/dist/sdk/firmachain/token/TokenTxTypes.js +1 -1
  89. package/dist/sdk/firmachain/token/index.js +5 -1
  90. package/dist/test/00.wallet.test.js +4 -4
  91. package/dist/test/01.contract_tx.test.js +5 -5
  92. package/dist/test/02.contract_query.test.js +15 -15
  93. package/dist/test/03.contract_scenario.test.js +28 -28
  94. package/dist/test/04.bank_tx.test.js +4 -4
  95. package/dist/test/05.bank_query.test.js +9 -9
  96. package/dist/test/06.feegrant_tx.test.js +59 -35
  97. package/dist/test/07.feegrant_query.test.js +18 -15
  98. package/dist/test/08.gas_estimate.test.js +110 -70
  99. package/dist/test/09.ipfs.test.js +4 -4
  100. package/dist/test/10.nft_tx.test.js +7 -7
  101. package/dist/test/11.nft_query.test.js +9 -9
  102. package/dist/test/12.staking_tx.test.js +27 -15
  103. package/dist/test/13.staking_query.test.js +20 -20
  104. package/dist/test/14.distribution_tx.test.js +8 -8
  105. package/dist/test/15.distribution_query.test.js +15 -15
  106. package/dist/test/16.gov_tx.test.js +17 -17
  107. package/dist/test/17.gov_query.test.js +19 -19
  108. package/dist/test/18.util.test.js +105 -63
  109. package/dist/test/19.chain.test.js +38 -38
  110. package/dist/test/20.slashing_query.test.js +25 -25
  111. package/dist/test/21.token_tx.test.js +6 -6
  112. package/dist/test/22.token_query.test.js +4 -4
  113. package/dist/test/23.authz_tx.test.js +77 -47
  114. package/dist/test/24.authz_query.test.js +66 -67
  115. package/dist/test/25.cosmwasm_tx.test.js +7 -7
  116. package/dist/test/26.cosmwasm_query.test.js +127 -59
  117. package/dist/test/{27.arbitary_sign.test.js → 27.arbitrary_sign.test.js} +34 -62
  118. package/dist/test/28.ibc_tx.test.js +8 -8
  119. package/dist/test/29.mint_query.test.js +2 -2
  120. package/dist/test/30.cw20_tx.test.js +20 -20
  121. package/dist/test/31.cw20_query.test.js +24 -24
  122. package/dist/test/32.cw721_tx.test.js +19 -19
  123. package/dist/test/33.cw721_query.test.js +32 -32
  124. package/dist/test/34.cw_bridge_tx.test.js +19 -19
  125. package/dist/test/35.cw_bridge_tx_low.test.js +13 -13
  126. package/dist/test/36.cw_bridge_query.test.js +20 -20
  127. package/dist/test/37.cw_marketplace_tx.test.js +32 -32
  128. package/dist/test/38.cw_marketplace_query.test.js +2 -2
  129. package/dist/test/config_test.d.ts +1 -1
  130. package/dist/test/config_test.js +2 -2
  131. package/package.json +9 -10
  132. package/dist/sdk/firmachain/amino/addresses.d.ts +0 -5
  133. package/dist/sdk/firmachain/amino/addresses.js +0 -46
  134. package/dist/sdk/firmachain/amino/aminomsgs.d.ts +0 -291
  135. package/dist/sdk/firmachain/amino/aminomsgs.js +0 -81
  136. package/dist/sdk/firmachain/amino/aminotypes.d.ts +0 -22
  137. package/dist/sdk/firmachain/amino/aminotypes.js +0 -538
  138. package/dist/sdk/firmachain/amino/encoding.d.ts +0 -33
  139. package/dist/sdk/firmachain/amino/encoding.js +0 -252
  140. package/dist/sdk/firmachain/amino/multisig.d.ts +0 -10
  141. package/dist/sdk/firmachain/amino/multisig.js +0 -42
  142. package/dist/sdk/firmachain/amino/pubkeys.d.ts +0 -47
  143. package/dist/sdk/firmachain/amino/pubkeys.js +0 -29
  144. package/dist/sdk/firmachain/amino/signature.d.ts +0 -16
  145. package/dist/sdk/firmachain/amino/signature.js +0 -36
  146. package/dist/sdk/firmachain/amino/signdoc.d.ts +0 -44
  147. package/dist/sdk/firmachain/amino/signdoc.js +0 -68
  148. package/dist/sdk/firmachain/amino/signer.d.ts +0 -33
  149. package/dist/sdk/firmachain/amino/signer.js +0 -2
  150. package/dist/sdk/firmachain/amino/stdtx.d.ts +0 -15
  151. package/dist/sdk/firmachain/amino/stdtx.js +0 -17
  152. package/dist/sdk/firmachain/common/LedgerSigningStargateClient.d.ts +0 -22
  153. package/dist/sdk/firmachain/common/LedgerSigningStargateClient.js +0 -170
  154. package/dist/sdk/firmachain/common/aminotypes.d.ts +0 -19
  155. package/dist/sdk/firmachain/common/aminotypes.js +0 -74
  156. package/dist/sdk/firmachain/common/events.d.ts +0 -32
  157. package/dist/sdk/firmachain/common/events.js +0 -18
  158. package/dist/sdk/firmachain/common/fee.d.ts +0 -26
  159. package/dist/sdk/firmachain/common/fee.js +0 -83
  160. package/dist/sdk/firmachain/common/modules/auth/queries.d.ts +0 -15
  161. package/dist/sdk/firmachain/common/modules/auth/queries.js +0 -64
  162. package/dist/sdk/firmachain/common/modules/authz/aminomessages.d.ts +0 -2
  163. package/dist/sdk/firmachain/common/modules/authz/aminomessages.js +0 -15
  164. package/dist/sdk/firmachain/common/modules/authz/messages.d.ts +0 -2
  165. package/dist/sdk/firmachain/common/modules/authz/messages.js +0 -9
  166. package/dist/sdk/firmachain/common/modules/authz/queries.d.ts +0 -10
  167. package/dist/sdk/firmachain/common/modules/authz/queries.js +0 -88
  168. package/dist/sdk/firmachain/common/modules/bank/aminomessages.d.ts +0 -35
  169. package/dist/sdk/firmachain/common/modules/bank/aminomessages.js +0 -85
  170. package/dist/sdk/firmachain/common/modules/bank/messages.d.ts +0 -8
  171. package/dist/sdk/firmachain/common/modules/bank/messages.js +0 -12
  172. package/dist/sdk/firmachain/common/modules/bank/queries.d.ts +0 -15
  173. package/dist/sdk/firmachain/common/modules/bank/queries.js +0 -128
  174. package/dist/sdk/firmachain/common/modules/crisis/aminomessages.d.ts +0 -14
  175. package/dist/sdk/firmachain/common/modules/crisis/aminomessages.js +0 -11
  176. package/dist/sdk/firmachain/common/modules/distribution/aminomessages.d.ts +0 -44
  177. package/dist/sdk/firmachain/common/modules/distribution/aminomessages.js +0 -113
  178. package/dist/sdk/firmachain/common/modules/distribution/messages.d.ts +0 -8
  179. package/dist/sdk/firmachain/common/modules/distribution/messages.js +0 -15
  180. package/dist/sdk/firmachain/common/modules/distribution/queries.d.ts +0 -16
  181. package/dist/sdk/firmachain/common/modules/distribution/queries.js +0 -171
  182. package/dist/sdk/firmachain/common/modules/evidence/aminomessages.d.ts +0 -18
  183. package/dist/sdk/firmachain/common/modules/evidence/aminomessages.js +0 -11
  184. package/dist/sdk/firmachain/common/modules/feegrant/aminomessages.d.ts +0 -2
  185. package/dist/sdk/firmachain/common/modules/feegrant/aminomessages.js +0 -14
  186. package/dist/sdk/firmachain/common/modules/feegrant/messages.d.ts +0 -2
  187. package/dist/sdk/firmachain/common/modules/feegrant/messages.js +0 -8
  188. package/dist/sdk/firmachain/common/modules/feegrant/queries.d.ts +0 -9
  189. package/dist/sdk/firmachain/common/modules/feegrant/queries.js +0 -81
  190. package/dist/sdk/firmachain/common/modules/gov/aminomessages.d.ts +0 -79
  191. package/dist/sdk/firmachain/common/modules/gov/aminomessages.js +0 -152
  192. package/dist/sdk/firmachain/common/modules/gov/messages.d.ts +0 -29
  193. package/dist/sdk/firmachain/common/modules/gov/messages.js +0 -39
  194. package/dist/sdk/firmachain/common/modules/gov/queries.d.ts +0 -19
  195. package/dist/sdk/firmachain/common/modules/gov/queries.js +0 -160
  196. package/dist/sdk/firmachain/common/modules/group/aminomessages.d.ts +0 -2
  197. package/dist/sdk/firmachain/common/modules/group/aminomessages.js +0 -8
  198. package/dist/sdk/firmachain/common/modules/group/messages.d.ts +0 -2
  199. package/dist/sdk/firmachain/common/modules/group/messages.js +0 -28
  200. package/dist/sdk/firmachain/common/modules/ibc/aminomessages.d.ts +0 -38
  201. package/dist/sdk/firmachain/common/modules/ibc/aminomessages.js +0 -55
  202. package/dist/sdk/firmachain/common/modules/ibc/messages.d.ts +0 -8
  203. package/dist/sdk/firmachain/common/modules/ibc/messages.js +0 -32
  204. package/dist/sdk/firmachain/common/modules/ibc/queries.d.ts +0 -58
  205. package/dist/sdk/firmachain/common/modules/ibc/queries.js +0 -576
  206. package/dist/sdk/firmachain/common/modules/index.d.ts +0 -32
  207. package/dist/sdk/firmachain/common/modules/index.js +0 -101
  208. package/dist/sdk/firmachain/common/modules/mint/queries.d.ts +0 -21
  209. package/dist/sdk/firmachain/common/modules/mint/queries.js +0 -95
  210. package/dist/sdk/firmachain/common/modules/slashing/aminomessages.d.ts +0 -12
  211. package/dist/sdk/firmachain/common/modules/slashing/aminomessages.js +0 -11
  212. package/dist/sdk/firmachain/common/modules/slashing/queries.d.ts +0 -10
  213. package/dist/sdk/firmachain/common/modules/slashing/queries.js +0 -88
  214. package/dist/sdk/firmachain/common/modules/staking/aminomessages.d.ts +0 -112
  215. package/dist/sdk/firmachain/common/modules/staking/aminomessages.js +0 -234
  216. package/dist/sdk/firmachain/common/modules/staking/messages.d.ts +0 -33
  217. package/dist/sdk/firmachain/common/modules/staking/messages.js +0 -37
  218. package/dist/sdk/firmachain/common/modules/staking/queries.d.ts +0 -23
  219. package/dist/sdk/firmachain/common/modules/staking/queries.js +0 -242
  220. package/dist/sdk/firmachain/common/modules/tx/queries.d.ts +0 -11
  221. package/dist/sdk/firmachain/common/modules/tx/queries.js +0 -103
  222. package/dist/sdk/firmachain/common/modules/vesting/aminomessages.d.ts +0 -16
  223. package/dist/sdk/firmachain/common/modules/vesting/aminomessages.js +0 -56
  224. package/dist/sdk/firmachain/common/modules/vesting/messages.d.ts +0 -2
  225. package/dist/sdk/firmachain/common/modules/vesting/messages.js +0 -7
  226. package/dist/sdk/firmachain/common/queryclient/index.d.ts +0 -2
  227. package/dist/sdk/firmachain/common/queryclient/index.js +0 -10
  228. package/dist/sdk/firmachain/common/queryclient/queryclient.d.ts +0 -75
  229. package/dist/sdk/firmachain/common/queryclient/queryclient.js +0 -157
  230. package/dist/sdk/firmachain/common/queryclient/utils.d.ts +0 -33
  231. package/dist/sdk/firmachain/common/queryclient/utils.js +0 -101
  232. package/dist/sdk/firmachain/common/search.d.ts +0 -10
  233. package/dist/sdk/firmachain/common/search.js +0 -7
  234. package/dist/sdk/firmachain/common/signing.d.ts +0 -15
  235. package/dist/sdk/firmachain/common/signing.js +0 -87
  236. package/dist/sdk/firmachain/common/signingstargateclient.d.ts +0 -121
  237. package/dist/sdk/firmachain/common/signingstargateclient.js +0 -674
  238. package/dist/sdk/firmachain/common/stargateclient.d.ts +0 -210
  239. package/dist/sdk/firmachain/common/stargateclient.js +0 -527
  240. package/dist/sdk/firmachain/google/protobuf/timestamp.d.ts +0 -110
  241. package/dist/sdk/firmachain/google/protobuf/timestamp.js +0 -108
  242. /package/dist/sdk/firmachain/{amino → common}/paths.d.ts +0 -0
  243. /package/dist/sdk/firmachain/{amino → common}/paths.js +0 -0
  244. /package/dist/sdk/firmachain/{amino → common}/wallet.d.ts +0 -0
  245. /package/dist/test/{27.arbitary_sign.test.d.ts → 27.arbitrary_sign.test.d.ts} +0 -0
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
18
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
19
  if (y = 0, t) op = [op[0] & 2, t.value];
20
20
  switch (op[0]) {
@@ -90,7 +90,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
90
90
  return [4 /*yield*/, firma.Cw721.mint(aliceWallet, cw721ContractAddress, owner, new_token_id, new_token_uri, { gas: gas, fee: fee })];
91
91
  case 2:
92
92
  result = _a.sent();
93
- chai_1.expect(result.code).to.be.equal(0);
93
+ (0, chai_1.expect)(result.code).to.be.equal(0);
94
94
  // 2. REGISTER SALE FCT
95
95
  console.log("2. REGISTER SALE FCT");
96
96
  return [4 /*yield*/, firma.CwMarketplace.getGasEstimationRegisterSaleFCT(aliceWallet, marketplaceContractAddress, cw721ContractAddress, new_token_id, fctAmount)];
@@ -101,7 +101,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
101
101
  return [4 /*yield*/, firma.CwMarketplace.registerSaleFCT(aliceWallet, marketplaceContractAddress, cw721ContractAddress, new_token_id, fctAmount, { gas: gas, fee: fee })];
102
102
  case 4:
103
103
  result = _a.sent();
104
- chai_1.expect(result.code).to.be.equal(0);
104
+ (0, chai_1.expect)(result.code).to.be.equal(0);
105
105
  // 3. GET SALE INFO
106
106
  console.log("3. GET SALE INFO");
107
107
  return [4 /*yield*/, firma.CwMarketplace.getRegisterList(marketplaceContractAddress)];
@@ -126,7 +126,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
126
126
  return [4 /*yield*/, firma.CwMarketplace.purchaseSaleFCT(aliceWallet, marketplaceContractAddress, new_token_id, fctAmount, { gas: gas, fee: fee })];
127
127
  case 9:
128
128
  result = _a.sent();
129
- chai_1.expect(result.code).to.be.equal(0);
129
+ (0, chai_1.expect)(result.code).to.be.equal(0);
130
130
  return [2 /*return*/];
131
131
  }
132
132
  });
@@ -150,7 +150,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
150
150
  return [4 /*yield*/, firma.Cw721.mint(aliceWallet, cw721ContractAddress, owner, new_token_id, new_token_uri, { gas: gas, fee: fee })];
151
151
  case 2:
152
152
  result = _a.sent();
153
- chai_1.expect(result.code).to.be.equal(0);
153
+ (0, chai_1.expect)(result.code).to.be.equal(0);
154
154
  // 2. REGISTER SALE CW20
155
155
  console.log("2. REGISTER SALE CW20");
156
156
  return [4 /*yield*/, firma.CwMarketplace.getGasEstimationRegisterSaleCw20(aliceWallet, marketplaceContractAddress, cw721ContractAddress, new_token_id, cw20ContractAddress, cw20Amount, cw20Decimal)];
@@ -161,7 +161,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
161
161
  return [4 /*yield*/, firma.CwMarketplace.registerSaleCw20(aliceWallet, marketplaceContractAddress, cw721ContractAddress, new_token_id, cw20ContractAddress, cw20Amount, cw20Decimal, { gas: gas, fee: fee })];
162
162
  case 4:
163
163
  result = _a.sent();
164
- chai_1.expect(result.code).to.be.equal(0);
164
+ (0, chai_1.expect)(result.code).to.be.equal(0);
165
165
  // 3. GET SALE INFO
166
166
  console.log("3. GET SALE INFO");
167
167
  return [4 /*yield*/, firma.CwMarketplace.getRegisterList(marketplaceContractAddress)];
@@ -185,7 +185,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
185
185
  return [4 /*yield*/, firma.CwMarketplace.purchaseSaleCw20(aliceWallet, marketplaceContractAddress, new_token_id, cw20ContractAddress, cw20Amount, cw20Decimal, { gas: gas, fee: fee })];
186
186
  case 9:
187
187
  result = _a.sent();
188
- chai_1.expect(result.code).to.be.equal(0);
188
+ (0, chai_1.expect)(result.code).to.be.equal(0);
189
189
  return [2 /*return*/];
190
190
  }
191
191
  });
@@ -208,7 +208,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
208
208
  return [4 /*yield*/, firma.Cw721.mint(aliceWallet, cw721ContractAddress, owner, new_token_id, new_token_uri, { gas: gas, fee: fee })];
209
209
  case 2:
210
210
  result = _a.sent();
211
- chai_1.expect(result.code).to.be.equal(0);
211
+ (0, chai_1.expect)(result.code).to.be.equal(0);
212
212
  // 2. REGISTER SALE CW20
213
213
  console.log("2. REGISTER SALE FCT");
214
214
  return [4 /*yield*/, firma.CwMarketplace.getGasEstimationRegisterSaleFCT(aliceWallet, marketplaceContractAddress, cw721ContractAddress, new_token_id, fctAmount)];
@@ -218,7 +218,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
218
218
  return [4 /*yield*/, firma.CwMarketplace.registerSaleFCT(aliceWallet, marketplaceContractAddress, cw721ContractAddress, new_token_id, fctAmount, { gas: gas, fee: fee })];
219
219
  case 4:
220
220
  result = _a.sent();
221
- chai_1.expect(result.code).to.be.equal(0);
221
+ (0, chai_1.expect)(result.code).to.be.equal(0);
222
222
  // 3. GET SALE INFO
223
223
  console.log("3. GET SALE INFO");
224
224
  return [4 /*yield*/, firma.CwMarketplace.getRegisterList(marketplaceContractAddress)];
@@ -238,7 +238,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
238
238
  return [4 /*yield*/, firma.CwMarketplace.cancelSale(bobWallet, marketplaceContractAddress, new_token_id, { gas: gas, fee: fee })];
239
239
  case 8:
240
240
  result = _a.sent();
241
- chai_1.expect(result.code).to.be.equal(0);
241
+ (0, chai_1.expect)(result.code).to.be.equal(0);
242
242
  return [4 /*yield*/, firma.CwMarketplace.getRegisterListByAddress(marketplaceContractAddress, aliceAddress)];
243
243
  case 9:
244
244
  registerList2 = _a.sent();
@@ -266,7 +266,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
266
266
  return [4 /*yield*/, firma.Cw721.mint(aliceWallet, cw721ContractAddress, owner, new_token_id, new_token_uri, { gas: gas, fee: fee })];
267
267
  case 2:
268
268
  result = _a.sent();
269
- chai_1.expect(result.code).to.be.equal(0);
269
+ (0, chai_1.expect)(result.code).to.be.equal(0);
270
270
  // 2. REGISTER SALE CW20
271
271
  console.log("2. REGISTER SALE CW20");
272
272
  return [4 /*yield*/, firma.CwMarketplace.getGasEstimationRegisterSaleCw20(aliceWallet, marketplaceContractAddress, cw721ContractAddress, new_token_id, cw20ContractAddress, cw20Amount, cw20Decimal)];
@@ -277,7 +277,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
277
277
  return [4 /*yield*/, firma.CwMarketplace.registerSaleCw20(aliceWallet, marketplaceContractAddress, cw721ContractAddress, new_token_id, cw20ContractAddress, cw20Amount, cw20Decimal, { gas: gas, fee: fee })];
278
278
  case 4:
279
279
  result = _a.sent();
280
- chai_1.expect(result.code).to.be.equal(0);
280
+ (0, chai_1.expect)(result.code).to.be.equal(0);
281
281
  // 3. GET SALE INFO
282
282
  console.log("3. GET SALE INFO");
283
283
  return [4 /*yield*/, firma.CwMarketplace.getRegisterList(marketplaceContractAddress)];
@@ -297,7 +297,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
297
297
  return [4 /*yield*/, firma.CwMarketplace.cancelSale(bobWallet, marketplaceContractAddress, new_token_id, { gas: gas, fee: fee })];
298
298
  case 8:
299
299
  result = _a.sent();
300
- chai_1.expect(result.code).to.be.equal(0);
300
+ (0, chai_1.expect)(result.code).to.be.equal(0);
301
301
  return [4 /*yield*/, firma.CwMarketplace.getRegisterListByAddress(marketplaceContractAddress, aliceAddress)];
302
302
  case 9:
303
303
  registerList2 = _a.sent();
@@ -325,7 +325,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
325
325
  return [4 /*yield*/, firma.Cw721.mint(aliceWallet, cw721ContractAddress, owner, new_token_id, new_token_uri, { gas: gas, fee: fee })];
326
326
  case 2:
327
327
  result = _a.sent();
328
- chai_1.expect(result.code).to.be.equal(0);
328
+ (0, chai_1.expect)(result.code).to.be.equal(0);
329
329
  // 2. REGISTER SALE CW20
330
330
  console.log("2. REGISTER SALE CW20");
331
331
  return [4 /*yield*/, firma.CwMarketplace.getGasEstimationRegisterSaleCw20(aliceWallet, marketplaceContractAddress, cw721ContractAddress, new_token_id, cw20ContractAddress, cw20Amount, cw20Decimal)];
@@ -336,7 +336,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
336
336
  return [4 /*yield*/, firma.CwMarketplace.registerSaleCw20(aliceWallet, marketplaceContractAddress, cw721ContractAddress, new_token_id, cw20ContractAddress, cw20Amount, cw20Decimal, { gas: gas, fee: fee })];
337
337
  case 4:
338
338
  result = _a.sent();
339
- chai_1.expect(result.code).to.be.equal(0);
339
+ (0, chai_1.expect)(result.code).to.be.equal(0);
340
340
  // 3. GET SALE INFO
341
341
  console.log("3. GET SALE INFO");
342
342
  return [4 /*yield*/, firma.CwMarketplace.getRegisterList(marketplaceContractAddress)];
@@ -356,7 +356,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
356
356
  return [4 /*yield*/, firma.CwMarketplace.cancelSale(aliceWallet, marketplaceContractAddress, new_token_id, { gas: gas, fee: fee })];
357
357
  case 8:
358
358
  result = _a.sent();
359
- chai_1.expect(result.code).to.be.equal(0);
359
+ (0, chai_1.expect)(result.code).to.be.equal(0);
360
360
  return [4 /*yield*/, firma.CwMarketplace.getRegisterListByAddress(marketplaceContractAddress, aliceAddress)];
361
361
  case 9:
362
362
  registerList2 = _a.sent();
@@ -384,7 +384,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
384
384
  return [4 /*yield*/, firma.Cw721.mint(aliceWallet, cw721ContractAddress, owner, new_token_id, new_token_uri, { gas: gas, fee: fee })];
385
385
  case 2:
386
386
  result = _a.sent();
387
- chai_1.expect(result.code).to.be.equal(0);
387
+ (0, chai_1.expect)(result.code).to.be.equal(0);
388
388
  // 2. REGISTER SALE CW20
389
389
  console.log("2. REGISTER SALE CW20");
390
390
  return [4 /*yield*/, firma.CwMarketplace.getGasEstimationRegisterSaleCw20(aliceWallet, marketplaceContractAddress, cw721ContractAddress, new_token_id, cw20ContractAddress, cw20Amount, cw20Decimal)];
@@ -395,7 +395,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
395
395
  return [4 /*yield*/, firma.CwMarketplace.registerSaleCw20(aliceWallet, marketplaceContractAddress, cw721ContractAddress, new_token_id, cw20ContractAddress, cw20Amount, cw20Decimal, { gas: gas, fee: fee })];
396
396
  case 4:
397
397
  result = _a.sent();
398
- chai_1.expect(result.code).to.be.equal(0);
398
+ (0, chai_1.expect)(result.code).to.be.equal(0);
399
399
  // 3. GET SALE INFO
400
400
  console.log("3. GET SALE INFO");
401
401
  return [4 /*yield*/, firma.CwMarketplace.getRegisterList(marketplaceContractAddress)];
@@ -437,7 +437,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
437
437
  return [4 /*yield*/, firma.Cw721.mint(aliceWallet, cw721ContractAddress, owner, new_token_id, new_token_uri, { gas: gas, fee: fee })];
438
438
  case 2:
439
439
  result = _a.sent();
440
- chai_1.expect(result.code).to.be.equal(0);
440
+ (0, chai_1.expect)(result.code).to.be.equal(0);
441
441
  // 2. REGISTER SALE FCT
442
442
  console.log("2. REGISTER SALE FCT");
443
443
  return [4 /*yield*/, firma.CwMarketplace.getGasEstimationRegisterSaleFCT(aliceWallet, marketplaceContractAddress, cw721ContractAddress, new_token_id, fctAmount)];
@@ -448,7 +448,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
448
448
  return [4 /*yield*/, firma.CwMarketplace.registerSaleFCT(aliceWallet, marketplaceContractAddress, cw721ContractAddress, new_token_id, fctAmount, { gas: gas, fee: fee })];
449
449
  case 4:
450
450
  result = _a.sent();
451
- chai_1.expect(result.code).to.be.equal(0);
451
+ (0, chai_1.expect)(result.code).to.be.equal(0);
452
452
  // 3. GET SALE INFO
453
453
  console.log("3. GET SALE INFO");
454
454
  return [4 /*yield*/, firma.CwMarketplace.getRegisterList(marketplaceContractAddress)];
@@ -493,7 +493,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
493
493
  return [4 /*yield*/, firma.Cw721.mint(aliceWallet, cw721ContractAddress, owner, new_token_id, new_token_uri, { gas: gas, fee: fee })];
494
494
  case 2:
495
495
  result = _a.sent();
496
- chai_1.expect(result.code).to.be.equal(0);
496
+ (0, chai_1.expect)(result.code).to.be.equal(0);
497
497
  // 2. REGISTER SALE CW20
498
498
  console.log("2. REGISTER SALE CW20");
499
499
  return [4 /*yield*/, firma.CwMarketplace.getGasEstimationRegisterSaleCw20(aliceWallet, marketplaceContractAddress, cw721ContractAddress, new_token_id, cw20ContractAddress, cw20Amount, cw20Decimal)];
@@ -504,7 +504,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
504
504
  return [4 /*yield*/, firma.CwMarketplace.registerSaleCw20(aliceWallet, marketplaceContractAddress, cw721ContractAddress, new_token_id, cw20ContractAddress, cw20Amount, cw20Decimal, { gas: gas, fee: fee })];
505
505
  case 4:
506
506
  result = _a.sent();
507
- chai_1.expect(result.code).to.be.equal(0);
507
+ (0, chai_1.expect)(result.code).to.be.equal(0);
508
508
  // 3. GET SALE INFO
509
509
  console.log("3. GET SALE INFO");
510
510
  return [4 /*yield*/, firma.CwMarketplace.getRegisterList(marketplaceContractAddress)];
@@ -528,7 +528,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
528
528
  return [4 /*yield*/, firma.CwMarketplace.purchaseSaleCw20(bobWallet, marketplaceContractAddress, new_token_id, cw20ContractAddress, cw20Amount, cw20Decimal, { gas: gas, fee: fee })];
529
529
  case 9:
530
530
  result = _a.sent();
531
- chai_1.expect(result.code).to.be.equal(0);
531
+ (0, chai_1.expect)(result.code).to.be.equal(0);
532
532
  // 5. NFT OWNER CHECK
533
533
  console.log("5. NFT OWNER CHECK");
534
534
  return [4 /*yield*/, firma.Cw721.getNFTIdListOfOwner(cw721ContractAddress, bobAddress)];
@@ -563,7 +563,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
563
563
  return [4 /*yield*/, firma.Cw721.mint(aliceWallet, cw721ContractAddress, owner, new_token_id, new_token_uri, { gas: gas, fee: fee })];
564
564
  case 2:
565
565
  result = _a.sent();
566
- chai_1.expect(result.code).to.be.equal(0);
566
+ (0, chai_1.expect)(result.code).to.be.equal(0);
567
567
  // 2. REGISTER SALE FCT
568
568
  console.log("2. REGISTER SALE FCT");
569
569
  return [4 /*yield*/, firma.CwMarketplace.getGasEstimationRegisterSaleFCT(aliceWallet, marketplaceContractAddress, cw721ContractAddress, new_token_id, fctAmount)];
@@ -574,7 +574,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
574
574
  return [4 /*yield*/, firma.CwMarketplace.registerSaleFCT(aliceWallet, marketplaceContractAddress, cw721ContractAddress, new_token_id, fctAmount, { gas: gas, fee: fee })];
575
575
  case 4:
576
576
  result = _a.sent();
577
- chai_1.expect(result.code).to.be.equal(0);
577
+ (0, chai_1.expect)(result.code).to.be.equal(0);
578
578
  // 3. GET SALE INFO
579
579
  console.log("3. GET SALE INFO");
580
580
  return [4 /*yield*/, firma.CwMarketplace.getRegisterList(marketplaceContractAddress)];
@@ -599,7 +599,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
599
599
  return [4 /*yield*/, firma.CwMarketplace.purchaseSaleFCT(bobWallet, marketplaceContractAddress, new_token_id, fctAmount, { gas: gas, fee: fee })];
600
600
  case 9:
601
601
  result = _a.sent();
602
- chai_1.expect(result.code).to.be.equal(0);
602
+ (0, chai_1.expect)(result.code).to.be.equal(0);
603
603
  // 5. NFT OWNER CHECK
604
604
  console.log("5. NFT OWNER CHECK");
605
605
  return [4 /*yield*/, firma.Cw721.getNFTIdListOfOwner(cw721ContractAddress, bobAddress)];
@@ -631,7 +631,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
631
631
  return [4 /*yield*/, firma.Cw721.mint(aliceWallet, cw721ContractAddress, owner, new_token_id, new_token_uri, { gas: gas, fee: fee })];
632
632
  case 2:
633
633
  result = _a.sent();
634
- chai_1.expect(result.code).to.be.equal(0);
634
+ (0, chai_1.expect)(result.code).to.be.equal(0);
635
635
  return [2 /*return*/];
636
636
  }
637
637
  });
@@ -675,7 +675,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
675
675
  return [4 /*yield*/, firma.CwMarketplace.registerSaleFCT(aliceWallet, marketplaceContractAddress, cw721ContractAddress, token_id, fctAmount, { gas: gas, fee: fee })];
676
676
  case 2:
677
677
  result = _a.sent();
678
- chai_1.expect(result.code).to.be.equal(0);
678
+ (0, chai_1.expect)(result.code).to.be.equal(0);
679
679
  return [4 /*yield*/, firma.Cw721.getNFTIdListOfOwner(cw721ContractAddress, marketplaceContractAddress)];
680
680
  case 3:
681
681
  contractFCTBalance = _a.sent();
@@ -700,7 +700,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
700
700
  return [4 /*yield*/, firma.CwMarketplace.registerSaleCw20(aliceWallet, marketplaceContractAddress, cw721ContractAddress, token_id, cw20ContractAddress, cw20Amount, cw20Decimal, { gas: gas, fee: fee })];
701
701
  case 2:
702
702
  result = _a.sent();
703
- chai_1.expect(result.code).to.be.equal(0);
703
+ (0, chai_1.expect)(result.code).to.be.equal(0);
704
704
  return [4 /*yield*/, firma.Cw721.getNFTIdListOfOwner(cw721ContractAddress, marketplaceContractAddress)];
705
705
  case 3:
706
706
  contractNFTBalance = _a.sent();
@@ -727,7 +727,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
727
727
  return [4 /*yield*/, firma.CwMarketplace.purchaseSaleFCT(aliceWallet, marketplaceContractAddress, token_id, fctAmount, { gas: gas, fee: fee })];
728
728
  case 3:
729
729
  result = _a.sent();
730
- chai_1.expect(result.code).to.be.equal(0);
730
+ (0, chai_1.expect)(result.code).to.be.equal(0);
731
731
  return [4 /*yield*/, firma.Cw721.getNFTIdListOfOwner(cw721ContractAddress, marketplaceContractAddress)];
732
732
  case 4:
733
733
  nftBalance = _a.sent();
@@ -760,7 +760,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
760
760
  return [4 /*yield*/, firma.CwMarketplace.purchaseSaleCw20(aliceWallet, marketplaceContractAddress, token_id, cw20ContractAddress, cw20Amount, cw20Decimal, { gas: gas, fee: fee })];
761
761
  case 3:
762
762
  result = _a.sent();
763
- chai_1.expect(result.code).to.be.equal(0);
763
+ (0, chai_1.expect)(result.code).to.be.equal(0);
764
764
  return [4 /*yield*/, firma.Cw20.getBalance(cw20ContractAddress, marketplaceContractAddress)];
765
765
  case 4:
766
766
  contractCw20Balance = _a.sent();
@@ -782,7 +782,7 @@ describe.skip('[37. Marketplace tx Test]', function () {
782
782
  return [4 /*yield*/, firma.CwMarketplace.changeOwner(bobWallet, marketplaceContractAddress, new_owner, { gas: gas, fee: fee })];
783
783
  case 2:
784
784
  result = _a.sent();
785
- chai_1.expect(result.code).to.be.equal(0);
785
+ (0, chai_1.expect)(result.code).to.be.equal(0);
786
786
  return [4 /*yield*/, firma.CwMarketplace.getOwner(marketplaceContractAddress)];
787
787
  case 3:
788
788
  data = _a.sent();
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
18
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
19
  if (y = 0, t) op = [op[0] & 2, t.value];
20
20
  switch (op[0]) {
@@ -39,7 +39,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
39
39
  var FirmaSDK_1 = require("../sdk/FirmaSDK");
40
40
  var FirmaConfig_1 = require("../sdk/FirmaConfig");
41
41
  var config_test_1 = require("./config_test");
42
- describe.skip('[37. Marketplace tx Test]', function () {
42
+ describe.skip('[38. Marketplace query Test]', function () {
43
43
  var firma;
44
44
  var aliceWallet;
45
45
  var bobWallet;
@@ -1,7 +1,7 @@
1
1
  import { FirmaConfig } from '../sdk/FirmaConfig';
2
2
  export declare let TestChainConfig: FirmaConfig;
3
3
  export declare const validatorMnemonic = "angry water bunker where iron absurd cruise deliver clutch unique creek pyramid arch express flush pill lens concert absent enemy boring mom nuclear rose";
4
- export declare const aliceMnemonic = "angry water bunker where iron absurd cruise deliver clutch unique creek pyramid arch express flush pill lens concert absent enemy boring mom nuclear rose";
4
+ export declare const aliceMnemonic = "immune flavor record sphere foam planet faint grid disorder flag minute eternal beef sea camp surge extra scorpion pistol plastic happy siren juice found";
5
5
  export declare const bobMnemonic = "innocent enforce visit tilt job kitten actual glory flash feed wonder license rubber outer drum sun fuel relax roof universe enrich pulse fine grid";
6
6
  export declare const feeMnemonic = "long shallow crumble clown truth book oval render seed canal buffalo assist sadness elbow afraid catalog brother trade food subject must luggage bread neither";
7
7
  export declare const firmaFeeMnemonic = "arrest dynamic typical lunch original glare truth narrow stairs clip canyon space alley chat drive sudden music bubble time mesh color office minor draft";
@@ -18,7 +18,7 @@ exports.TestChainConfig = {
18
18
  };
19
19
  exports.validatorMnemonic = "angry water bunker where iron absurd cruise deliver clutch unique creek pyramid arch express flush pill lens concert absent enemy boring mom nuclear rose";
20
20
  // DEVNET
21
- // export const aliceMnemonic = "immune flavor record sphere foam planet faint grid disorder flag minute eternal beef sea camp surge extra scorpion pistol plastic happy siren juice found";
21
+ exports.aliceMnemonic = "immune flavor record sphere foam planet faint grid disorder flag minute eternal beef sea camp surge extra scorpion pistol plastic happy siren juice found";
22
22
  // TESTNET
23
23
  // export const aliceMnemonic = "harvest galaxy sniff include record undo width oven tired sad month text museum curious firm mountain flash assault oval sand ribbon blouse consider lens";
24
24
  // VALIDATOR
@@ -28,7 +28,7 @@ exports.validatorMnemonic = "angry water bunker where iron absurd cruise deliver
28
28
  // voting test
29
29
  // export const aliceMnemonic = "long shallow crumble clown truth book oval render seed canal buffalo assist sadness elbow afraid catalog brother trade food subject must luggage bread neither";
30
30
  // export const aliceMnemonic = "clump erupt type lucky mask pig soup runway wrestle suspect element involve stamp civil auction resource blame same journey start unaware crush ten draw";
31
- exports.aliceMnemonic = "angry water bunker where iron absurd cruise deliver clutch unique creek pyramid arch express flush pill lens concert absent enemy boring mom nuclear rose";
31
+ // export const aliceMnemonic = "angry water bunker where iron absurd cruise deliver clutch unique creek pyramid arch express flush pill lens concert absent enemy boring mom nuclear rose";
32
32
  // export const aliceMnemonic = "stadium lonely midnight okay meat rib awesome wealth phone leisure turn prosper notable label fruit define little also father silver half drill bargain antique";
33
33
  // export const aliceMnemonic = "uncle banana theme relax oak prosper volcano glad industry bicycle tower thrive jelly curious luggage frame that defy reason jewel figure begin nice moon";
34
34
  // export const aliceMnemonic = "rebel engine situate catalog blood strong satisfy aerobic cupboard again vivid twice flag work taxi heart fruit island ribbon hungry cheap ordinary horse foam";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firmachain/firma-js",
3
- "version": "0.3.3",
3
+ "version": "0.3.5",
4
4
  "description": "The Official FirmaChain Javascript SDK written in Typescript",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -12,7 +12,8 @@
12
12
  "lint": "eslint src test --ext .ts,.tsx",
13
13
  "nodemon": "nodemon",
14
14
  "dev": "ts-node ./test/test_index.ts",
15
- "build": "tsc --module commonjs"
15
+ "clean": "rm -rf dist",
16
+ "build": "npm run clean && tsc --module commonjs"
16
17
  },
17
18
  "repository": {
18
19
  "type": "git",
@@ -31,16 +32,15 @@
31
32
  },
32
33
  "homepage": "https://firmachain.org",
33
34
  "dependencies": {
34
- "@cosmjs/amino": "0.33.1",
35
- "@cosmjs/math": "0.33.1",
36
- "@cosmjs/proto-signing": "0.33.1",
37
- "@cosmjs/stargate": "0.33.1",
38
- "@cosmjs/tendermint-rpc": "0.33.1",
35
+ "@cosmjs/amino": "0.34.0",
36
+ "@cosmjs/math": "0.34.0",
37
+ "@cosmjs/proto-signing": "0.34.0",
38
+ "@cosmjs/stargate": "0.34.0",
39
+ "@cosmjs/tendermint-rpc": "0.34.0",
39
40
  "@kintsugi-tech/cosmjs-types": "^0.10.0",
40
41
  "@tharsis/address-converter": "0.1.8",
41
42
  "@types/pako": "2.0.0",
42
43
  "axios": "0.27.2",
43
- "big-number": "2.0.0",
44
44
  "bignumber.js": "^9.3.0",
45
45
  "cosmjs-types": "0.9.0",
46
46
  "crypto-js": "4.1.1",
@@ -51,7 +51,6 @@
51
51
  "readline-sync": "1.4.10"
52
52
  },
53
53
  "devDependencies": {
54
- "@types/bignumber.js": "^4.0.0",
55
54
  "@types/chai": "4.2.21",
56
55
  "@types/mocha": "9.0.0",
57
56
  "@types/node": "16.4.3",
@@ -59,6 +58,6 @@
59
58
  "mocha": "9.1.1",
60
59
  "nodemon": "2.0.12",
61
60
  "ts-node": "10.2.1",
62
- "typescript": "4.3.5"
61
+ "typescript": "^4.9.5"
63
62
  }
64
63
  }
@@ -1,5 +0,0 @@
1
- import { Pubkey } from "./pubkeys";
2
- export declare function rawEd25519PubkeyToRawAddress(pubkeyData: Uint8Array): Uint8Array;
3
- export declare function rawSecp256k1PubkeyToRawAddress(pubkeyData: Uint8Array): Uint8Array;
4
- export declare function pubkeyToRawAddress(pubkey: Pubkey): Uint8Array;
5
- export declare function pubkeyToAddress(pubkey: Pubkey, prefix: string): string;
@@ -1,46 +0,0 @@
1
- "use strict";
2
- // See https://github.com/tendermint/tendermint/blob/f2ada0a604b4c0763bda2f64fac53d506d3beca7/docs/spec/blockchain/encoding.md#public-key-cryptography
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.pubkeyToAddress = exports.pubkeyToRawAddress = exports.rawSecp256k1PubkeyToRawAddress = exports.rawEd25519PubkeyToRawAddress = void 0;
5
- var crypto_1 = require("@cosmjs/crypto");
6
- var encoding_1 = require("@cosmjs/encoding");
7
- var encoding_2 = require("./encoding");
8
- var pubkeys_1 = require("./pubkeys");
9
- function rawEd25519PubkeyToRawAddress(pubkeyData) {
10
- if (pubkeyData.length !== 32) {
11
- throw new Error("Invalid Ed25519 pubkey length: " + pubkeyData.length);
12
- }
13
- return crypto_1.sha256(pubkeyData).slice(0, 20);
14
- }
15
- exports.rawEd25519PubkeyToRawAddress = rawEd25519PubkeyToRawAddress;
16
- function rawSecp256k1PubkeyToRawAddress(pubkeyData) {
17
- if (pubkeyData.length !== 33) {
18
- throw new Error("Invalid Secp256k1 pubkey length (compressed): " + pubkeyData.length);
19
- }
20
- return crypto_1.ripemd160(crypto_1.sha256(pubkeyData));
21
- }
22
- exports.rawSecp256k1PubkeyToRawAddress = rawSecp256k1PubkeyToRawAddress;
23
- // For secp256k1 this assumes we already have a compressed pubkey.
24
- function pubkeyToRawAddress(pubkey) {
25
- if (pubkeys_1.isSecp256k1Pubkey(pubkey)) {
26
- var pubkeyData = encoding_1.fromBase64(pubkey.value);
27
- return rawSecp256k1PubkeyToRawAddress(pubkeyData);
28
- }
29
- else if (pubkeys_1.isEd25519Pubkey(pubkey)) {
30
- var pubkeyData = encoding_1.fromBase64(pubkey.value);
31
- return rawEd25519PubkeyToRawAddress(pubkeyData);
32
- }
33
- else if (pubkeys_1.isMultisigThresholdPubkey(pubkey)) {
34
- // https://github.com/tendermint/tendermint/blob/38b401657e4ad7a7eeb3c30a3cbf512037df3740/crypto/multisig/threshold_pubkey.go#L71-L74
35
- var pubkeyData = encoding_2.encodeAminoPubkey(pubkey);
36
- return crypto_1.sha256(pubkeyData).slice(0, 20);
37
- }
38
- else {
39
- throw new Error("Unsupported public key type");
40
- }
41
- }
42
- exports.pubkeyToRawAddress = pubkeyToRawAddress;
43
- function pubkeyToAddress(pubkey, prefix) {
44
- return encoding_1.toBech32(prefix, pubkeyToRawAddress(pubkey));
45
- }
46
- exports.pubkeyToAddress = pubkeyToAddress;