carbon-js-sdk 0.2.16 → 0.2.18-dev.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 (305) hide show
  1. package/lib/CarbonSDK.d.ts +13 -1
  2. package/lib/CarbonSDK.js +31 -2
  3. package/lib/clients/CarbonQueryClient.js +2 -2
  4. package/lib/clients/ETHClient.d.ts +1 -1
  5. package/lib/clients/ETHClient.js +15 -15
  6. package/lib/clients/HydrogenClient.js +1 -1
  7. package/lib/clients/NEOClient.d.ts +1 -1
  8. package/lib/clients/NEOClient.js +7 -7
  9. package/lib/clients/TokenClient.d.ts +5 -0
  10. package/lib/clients/TokenClient.js +38 -10
  11. package/lib/clients/ZILClient.d.ts +1 -1
  12. package/lib/clients/ZILClient.js +16 -16
  13. package/lib/codec/book/genesis.d.ts +1 -1
  14. package/lib/codec/book/genesis.js +1 -1
  15. package/lib/codec/book/query.d.ts +1 -1
  16. package/lib/codec/book/query.js +1 -1
  17. package/lib/codec/broker/genesis.d.ts +1 -1
  18. package/lib/codec/broker/genesis.js +1 -1
  19. package/lib/codec/broker/query.d.ts +3 -3
  20. package/lib/codec/broker/query.js +3 -3
  21. package/lib/codec/btcx/denom_cross_chain_info.d.ts +1 -1
  22. package/lib/codec/btcx/denom_cross_chain_info.js +1 -1
  23. package/lib/codec/btcx/query.d.ts +1 -1
  24. package/lib/codec/btcx/query.js +1 -1
  25. package/lib/codec/ccm/genesis.d.ts +1 -1
  26. package/lib/codec/ccm/genesis.js +1 -1
  27. package/lib/codec/cdp/asset_params.d.ts +1 -1
  28. package/lib/codec/cdp/asset_params.js +11 -10
  29. package/lib/codec/cdp/event.d.ts +389 -22
  30. package/lib/codec/cdp/event.js +2494 -83
  31. package/lib/codec/cdp/genesis.d.ts +97 -4
  32. package/lib/codec/cdp/genesis.js +648 -23
  33. package/lib/codec/cdp/params.d.ts +8 -0
  34. package/lib/codec/cdp/params.js +52 -9
  35. package/lib/codec/cdp/query.d.ts +439 -89
  36. package/lib/codec/cdp/query.js +1995 -177
  37. package/lib/codec/cdp/reward_scheme.d.ts +1 -13
  38. package/lib/codec/cdp/reward_scheme.js +15 -92
  39. package/lib/codec/cdp/tx.d.ts +760 -96
  40. package/lib/codec/cdp/tx.js +3645 -235
  41. package/lib/codec/coin/event.d.ts +1 -1
  42. package/lib/codec/coin/event.js +1 -1
  43. package/lib/codec/coin/genesis.d.ts +2 -2
  44. package/lib/codec/coin/genesis.js +2 -2
  45. package/lib/codec/coin/proposal.d.ts +1 -1
  46. package/lib/codec/coin/proposal.js +1 -1
  47. package/lib/codec/coin/query.d.ts +2 -2
  48. package/lib/codec/coin/query.js +2 -2
  49. package/lib/codec/coin/tx.d.ts +1 -1
  50. package/lib/codec/coin/tx.js +1 -1
  51. package/lib/codec/cosmos/auth/v1beta1/genesis.d.ts +1 -1
  52. package/lib/codec/cosmos/auth/v1beta1/genesis.js +1 -1
  53. package/lib/codec/cosmos/auth/v1beta1/query.d.ts +2 -2
  54. package/lib/codec/cosmos/auth/v1beta1/query.js +2 -2
  55. package/lib/codec/cosmos/authz/v1beta1/genesis.d.ts +1 -1
  56. package/lib/codec/cosmos/authz/v1beta1/genesis.js +1 -1
  57. package/lib/codec/cosmos/authz/v1beta1/query.d.ts +2 -2
  58. package/lib/codec/cosmos/authz/v1beta1/query.js +2 -2
  59. package/lib/codec/cosmos/authz/v1beta1/tx.d.ts +1 -1
  60. package/lib/codec/cosmos/authz/v1beta1/tx.js +1 -1
  61. package/lib/codec/cosmos/bank/v1beta1/authz.d.ts +1 -1
  62. package/lib/codec/cosmos/bank/v1beta1/authz.js +1 -1
  63. package/lib/codec/cosmos/bank/v1beta1/bank.d.ts +1 -1
  64. package/lib/codec/cosmos/bank/v1beta1/bank.js +1 -1
  65. package/lib/codec/cosmos/bank/v1beta1/genesis.d.ts +2 -2
  66. package/lib/codec/cosmos/bank/v1beta1/genesis.js +2 -2
  67. package/lib/codec/cosmos/bank/v1beta1/query.d.ts +3 -3
  68. package/lib/codec/cosmos/bank/v1beta1/query.js +3 -3
  69. package/lib/codec/cosmos/bank/v1beta1/tx.d.ts +2 -2
  70. package/lib/codec/cosmos/bank/v1beta1/tx.js +2 -2
  71. package/lib/codec/cosmos/base/tendermint/v1beta1/query.d.ts +1 -1
  72. package/lib/codec/cosmos/base/tendermint/v1beta1/query.js +1 -1
  73. package/lib/codec/cosmos/capability/v1beta1/genesis.d.ts +1 -1
  74. package/lib/codec/cosmos/capability/v1beta1/genesis.js +1 -1
  75. package/lib/codec/cosmos/crisis/v1beta1/genesis.d.ts +1 -1
  76. package/lib/codec/cosmos/crisis/v1beta1/genesis.js +1 -1
  77. package/lib/codec/cosmos/distribution/v1beta1/distribution.d.ts +1 -1
  78. package/lib/codec/cosmos/distribution/v1beta1/distribution.js +1 -1
  79. package/lib/codec/cosmos/distribution/v1beta1/genesis.d.ts +2 -2
  80. package/lib/codec/cosmos/distribution/v1beta1/genesis.js +2 -2
  81. package/lib/codec/cosmos/distribution/v1beta1/query.d.ts +3 -3
  82. package/lib/codec/cosmos/distribution/v1beta1/query.js +3 -3
  83. package/lib/codec/cosmos/distribution/v1beta1/tx.d.ts +1 -1
  84. package/lib/codec/cosmos/distribution/v1beta1/tx.js +1 -1
  85. package/lib/codec/cosmos/evidence/v1beta1/query.d.ts +1 -1
  86. package/lib/codec/cosmos/evidence/v1beta1/query.js +1 -1
  87. package/lib/codec/cosmos/feegrant/v1beta1/feegrant.d.ts +1 -1
  88. package/lib/codec/cosmos/feegrant/v1beta1/feegrant.js +1 -1
  89. package/lib/codec/cosmos/feegrant/v1beta1/genesis.d.ts +1 -1
  90. package/lib/codec/cosmos/feegrant/v1beta1/genesis.js +1 -1
  91. package/lib/codec/cosmos/feegrant/v1beta1/query.d.ts +2 -2
  92. package/lib/codec/cosmos/feegrant/v1beta1/query.js +2 -2
  93. package/lib/codec/cosmos/gov/v1beta1/genesis.d.ts +1 -1
  94. package/lib/codec/cosmos/gov/v1beta1/genesis.js +1 -1
  95. package/lib/codec/cosmos/gov/v1beta1/gov.d.ts +1 -1
  96. package/lib/codec/cosmos/gov/v1beta1/gov.js +1 -1
  97. package/lib/codec/cosmos/gov/v1beta1/query.d.ts +2 -2
  98. package/lib/codec/cosmos/gov/v1beta1/query.js +4 -4
  99. package/lib/codec/cosmos/gov/v1beta1/tx.d.ts +2 -2
  100. package/lib/codec/cosmos/gov/v1beta1/tx.js +4 -4
  101. package/lib/codec/cosmos/mint/v1beta1/genesis.d.ts +1 -1
  102. package/lib/codec/cosmos/mint/v1beta1/genesis.js +1 -1
  103. package/lib/codec/cosmos/mint/v1beta1/query.d.ts +1 -1
  104. package/lib/codec/cosmos/mint/v1beta1/query.js +1 -1
  105. package/lib/codec/cosmos/params/v1beta1/query.d.ts +1 -1
  106. package/lib/codec/cosmos/params/v1beta1/query.js +1 -1
  107. package/lib/codec/cosmos/slashing/v1beta1/genesis.d.ts +1 -1
  108. package/lib/codec/cosmos/slashing/v1beta1/genesis.js +1 -1
  109. package/lib/codec/cosmos/slashing/v1beta1/query.d.ts +2 -2
  110. package/lib/codec/cosmos/slashing/v1beta1/query.js +2 -2
  111. package/lib/codec/cosmos/staking/v1beta1/authz.d.ts +1 -1
  112. package/lib/codec/cosmos/staking/v1beta1/authz.js +1 -1
  113. package/lib/codec/cosmos/staking/v1beta1/genesis.d.ts +1 -1
  114. package/lib/codec/cosmos/staking/v1beta1/genesis.js +1 -1
  115. package/lib/codec/cosmos/staking/v1beta1/query.d.ts +2 -2
  116. package/lib/codec/cosmos/staking/v1beta1/query.js +2 -2
  117. package/lib/codec/cosmos/staking/v1beta1/staking.d.ts +1 -1
  118. package/lib/codec/cosmos/staking/v1beta1/staking.js +1 -1
  119. package/lib/codec/cosmos/staking/v1beta1/tx.d.ts +2 -2
  120. package/lib/codec/cosmos/staking/v1beta1/tx.js +2 -2
  121. package/lib/codec/cosmos/tx/signing/v1beta1/signing.d.ts +1 -1
  122. package/lib/codec/cosmos/tx/signing/v1beta1/signing.js +1 -1
  123. package/lib/codec/cosmos/tx/v1beta1/service.d.ts +3 -3
  124. package/lib/codec/cosmos/tx/v1beta1/service.js +3 -3
  125. package/lib/codec/cosmos/tx/v1beta1/tx.d.ts +3 -3
  126. package/lib/codec/cosmos/tx/v1beta1/tx.js +5 -5
  127. package/lib/codec/cosmos/upgrade/v1beta1/query.d.ts +1 -1
  128. package/lib/codec/cosmos/upgrade/v1beta1/query.js +1 -1
  129. package/lib/codec/cosmos/vesting/v1beta1/tx.d.ts +1 -1
  130. package/lib/codec/cosmos/vesting/v1beta1/tx.js +1 -1
  131. package/lib/codec/cosmos/vesting/v1beta1/vesting.d.ts +2 -2
  132. package/lib/codec/cosmos/vesting/v1beta1/vesting.js +2 -2
  133. package/lib/codec/fee/genesis.d.ts +1 -1
  134. package/lib/codec/fee/genesis.js +1 -1
  135. package/lib/codec/fee/proposal.d.ts +1 -1
  136. package/lib/codec/fee/proposal.js +1 -1
  137. package/lib/codec/fee/query.d.ts +1 -1
  138. package/lib/codec/fee/query.js +1 -1
  139. package/lib/codec/fee/tx.d.ts +1 -1
  140. package/lib/codec/fee/tx.js +1 -1
  141. package/lib/codec/headersync/genesis.d.ts +1 -1
  142. package/lib/codec/headersync/genesis.js +1 -1
  143. package/lib/codec/headersync/query.d.ts +1 -1
  144. package/lib/codec/headersync/query.js +1 -1
  145. package/lib/codec/index.d.ts +89 -18
  146. package/lib/codec/index.js +463 -180
  147. package/lib/codec/inflation/genesis.d.ts +1 -1
  148. package/lib/codec/inflation/genesis.js +1 -1
  149. package/lib/codec/inflation/query.d.ts +1 -1
  150. package/lib/codec/inflation/query.js +1 -1
  151. package/lib/codec/insurance/genesis.d.ts +1 -1
  152. package/lib/codec/insurance/genesis.js +1 -1
  153. package/lib/codec/leverage/genesis.d.ts +1 -1
  154. package/lib/codec/leverage/genesis.js +1 -1
  155. package/lib/codec/leverage/query.d.ts +1 -1
  156. package/lib/codec/leverage/query.js +1 -1
  157. package/lib/codec/liquidation/genesis.d.ts +1 -1
  158. package/lib/codec/liquidation/genesis.js +1 -1
  159. package/lib/codec/liquidation/query.d.ts +1 -1
  160. package/lib/codec/liquidation/query.js +1 -1
  161. package/lib/codec/liquidation/quote_changes.d.ts +1 -1
  162. package/lib/codec/liquidation/quote_changes.js +1 -1
  163. package/lib/codec/liquiditypool/event.d.ts +2 -2
  164. package/lib/codec/liquiditypool/event.js +2 -2
  165. package/lib/codec/liquiditypool/genesis.d.ts +2 -2
  166. package/lib/codec/liquiditypool/genesis.js +2 -2
  167. package/lib/codec/liquiditypool/liquiditypool.d.ts +3 -0
  168. package/lib/codec/liquiditypool/liquiditypool.js +44 -1
  169. package/lib/codec/liquiditypool/proposal.d.ts +1 -1
  170. package/lib/codec/liquiditypool/proposal.js +1 -1
  171. package/lib/codec/liquiditypool/query.d.ts +39 -2
  172. package/lib/codec/liquiditypool/query.js +195 -3
  173. package/lib/codec/liquiditypool/tx.d.ts +3 -1
  174. package/lib/codec/liquiditypool/tx.js +35 -1
  175. package/lib/codec/lockproxy/genesis.d.ts +1 -1
  176. package/lib/codec/lockproxy/genesis.js +1 -1
  177. package/lib/codec/lockproxy/query.d.ts +1 -1
  178. package/lib/codec/lockproxy/query.js +1 -1
  179. package/lib/codec/market/event.d.ts +1 -1
  180. package/lib/codec/market/event.js +1 -1
  181. package/lib/codec/market/genesis.d.ts +1 -1
  182. package/lib/codec/market/genesis.js +1 -1
  183. package/lib/codec/market/proposal.d.ts +1 -1
  184. package/lib/codec/market/proposal.js +1 -1
  185. package/lib/codec/market/query.d.ts +1 -1
  186. package/lib/codec/market/query.js +1 -1
  187. package/lib/codec/market/tx.d.ts +1 -1
  188. package/lib/codec/market/tx.js +1 -1
  189. package/lib/codec/marketstats/genesis.d.ts +1 -1
  190. package/lib/codec/marketstats/genesis.js +1 -1
  191. package/lib/codec/marketstats/query.d.ts +2 -2
  192. package/lib/codec/marketstats/query.js +2 -2
  193. package/lib/codec/misc/message.d.ts +1 -1
  194. package/lib/codec/misc/message.js +1 -1
  195. package/lib/codec/misc/query.d.ts +3 -3
  196. package/lib/codec/misc/query.js +3 -3
  197. package/lib/codec/misc/transaction.d.ts +1 -1
  198. package/lib/codec/misc/transaction.js +1 -1
  199. package/lib/codec/oracle/event.d.ts +1 -1
  200. package/lib/codec/oracle/event.js +1 -1
  201. package/lib/codec/oracle/genesis.d.ts +4 -1
  202. package/lib/codec/oracle/genesis.js +34 -3
  203. package/lib/codec/oracle/proposal.d.ts +1 -1
  204. package/lib/codec/oracle/proposal.js +1 -1
  205. package/lib/codec/oracle/query.d.ts +2 -2
  206. package/lib/codec/oracle/query.js +2 -2
  207. package/lib/codec/order/event.d.ts +1 -1
  208. package/lib/codec/order/event.js +1 -1
  209. package/lib/codec/order/genesis.d.ts +1 -1
  210. package/lib/codec/order/genesis.js +1 -1
  211. package/lib/codec/order/query.d.ts +1 -1
  212. package/lib/codec/order/query.js +1 -1
  213. package/lib/codec/position/event.d.ts +1 -1
  214. package/lib/codec/position/event.js +1 -1
  215. package/lib/codec/position/genesis.d.ts +1 -1
  216. package/lib/codec/position/genesis.js +1 -1
  217. package/lib/codec/position/query.d.ts +1 -1
  218. package/lib/codec/position/query.js +1 -1
  219. package/lib/codec/pricing/event.d.ts +56 -1
  220. package/lib/codec/pricing/event.js +298 -2
  221. package/lib/codec/pricing/genesis.d.ts +2 -1
  222. package/lib/codec/pricing/genesis.js +20 -5
  223. package/lib/codec/pricing/legacy.d.ts +22 -0
  224. package/lib/codec/pricing/legacy.js +93 -0
  225. package/lib/codec/pricing/pricing.d.ts +14 -0
  226. package/lib/codec/pricing/pricing.js +103 -1
  227. package/lib/codec/pricing/query.d.ts +68 -1
  228. package/lib/codec/pricing/query.js +321 -2
  229. package/lib/codec/pricing/tx.d.ts +96 -0
  230. package/lib/codec/pricing/tx.js +399 -1
  231. package/lib/codec/profile/event.d.ts +1 -1
  232. package/lib/codec/profile/event.js +1 -1
  233. package/lib/codec/profile/genesis.d.ts +1 -1
  234. package/lib/codec/profile/genesis.js +1 -1
  235. package/lib/codec/profile/query.d.ts +1 -1
  236. package/lib/codec/profile/query.js +1 -1
  237. package/lib/codec/subaccount/genesis.d.ts +1 -1
  238. package/lib/codec/subaccount/genesis.js +1 -1
  239. package/lib/codec/subaccount/query.d.ts +1 -1
  240. package/lib/codec/subaccount/query.js +1 -1
  241. package/lib/codec/tendermint/abci/types.d.ts +4 -4
  242. package/lib/codec/tendermint/abci/types.js +4 -4
  243. package/lib/codec/tendermint/types/block.d.ts +2 -2
  244. package/lib/codec/tendermint/types/block.js +2 -2
  245. package/lib/codec/tendermint/types/evidence.d.ts +2 -2
  246. package/lib/codec/tendermint/types/evidence.js +2 -2
  247. package/lib/codec/tendermint/types/types.d.ts +3 -3
  248. package/lib/codec/tendermint/types/types.js +3 -3
  249. package/lib/codec/tendermint/types/validator.d.ts +1 -1
  250. package/lib/codec/tendermint/types/validator.js +1 -1
  251. package/lib/constant/generic.js +1 -1
  252. package/lib/constant/token.d.ts +4 -0
  253. package/lib/constant/token.js +5 -1
  254. package/lib/modules/admin.d.ts +114 -7
  255. package/lib/modules/admin.js +275 -53
  256. package/lib/modules/cdp.d.ts +152 -13
  257. package/lib/modules/cdp.js +800 -20
  258. package/lib/modules/gov.js +14 -14
  259. package/lib/modules/liquiditypool.d.ts +3 -0
  260. package/lib/modules/liquiditypool.js +3 -1
  261. package/lib/provider/account/EthLedgerAccount/EthLedgerAccount.js +1 -1
  262. package/lib/provider/account/NeoLedgerAccount/N3Ledger/ErrorCode.js +1 -1
  263. package/lib/provider/account/NeoLedgerAccount/N3Ledger/main.js +8 -8
  264. package/lib/provider/account/NeoLedgerAccount/NeoLedgerAccount.js +3 -3
  265. package/lib/provider/account/NeoLedgerAccount/NeonLedger.js +1 -1
  266. package/lib/provider/amino/types/admin.js +91 -26
  267. package/lib/provider/amino/types/bank.js +1 -1
  268. package/lib/provider/amino/types/broker.js +1 -1
  269. package/lib/provider/amino/types/cdp.js +135 -24
  270. package/lib/provider/amino/types/coin.js +2 -2
  271. package/lib/provider/amino/types/gov.js +4 -4
  272. package/lib/provider/amino/types/ibc.js +1 -1
  273. package/lib/provider/amino/types/leverage.js +1 -1
  274. package/lib/provider/amino/types/liquidityPool.js +9 -7
  275. package/lib/provider/amino/types/market.js +1 -1
  276. package/lib/provider/amino/types/oracle.js +1 -1
  277. package/lib/provider/amino/types/order.js +4 -4
  278. package/lib/provider/amino/types/position.js +1 -1
  279. package/lib/provider/amino/types/profile.js +1 -1
  280. package/lib/provider/amino/types/staking.js +4 -4
  281. package/lib/provider/amino/types/subaccount.js +3 -3
  282. package/lib/provider/amino/utils.js +11 -11
  283. package/lib/provider/keplr/KeplrAccount.js +5 -0
  284. package/lib/provider/keplr/KeplrStore.js +1 -1
  285. package/lib/provider/ledger/ledger.js +2 -2
  286. package/lib/provider/metamask/MetaMask.js +1 -1
  287. package/lib/provider/o3/O3Wallet.js +2 -2
  288. package/lib/util/address.d.ts +1 -0
  289. package/lib/util/address.js +21 -13
  290. package/lib/util/api.js +4 -4
  291. package/lib/util/fetch.js +1 -1
  292. package/lib/util/generic.js +3 -3
  293. package/lib/util/number.d.ts +1 -0
  294. package/lib/util/number.js +7 -6
  295. package/lib/util/tx.d.ts +75 -10
  296. package/lib/wallet/CarbonSigner.d.ts +5 -2
  297. package/lib/wallet/CarbonSigner.js +15 -2
  298. package/lib/wallet/CarbonSigningClient.js +8 -8
  299. package/lib/wallet/CarbonWallet.js +6 -7
  300. package/lib/websocket/channel.js +115 -21
  301. package/lib/websocket/connector.js +3 -3
  302. package/lib/websocket/models.d.ts +156 -0
  303. package/lib/websocket/types.d.ts +87 -3
  304. package/lib/websocket/types.js +31 -0
  305. package/package.json +1 -1
@@ -12,15 +12,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.transformCommunityPoolSpendAmount = exports.transformSetSettlementPriceParams = exports.transfromSetMinGasPriceParams = exports.transfromSetMsgGasCostParams = exports.transfromSetTradingFlagParams = exports.transfromUpdatePoolParams = exports.transfromSetCommitmentCurveParams = exports.transfromSetRewardCurveParams = exports.transfromSetRewardsWeightsParams = exports.transfromUnlinkPoolParams = exports.transfromLinkPoolParams = exports.transfromCreateVaultTypeParams = exports.transfromSyncTokenParams = exports.transfromCreateTokenParams = exports.transfromCreateOracleParams = exports.AdminModule = void 0;
16
- const tx_1 = require("../codec/cdp/tx");
17
- const tx_2 = require("../codec/coin/tx");
18
- const tx_3 = require("../codec/cosmos/staking/v1beta1/tx");
19
- const tx_4 = require("../codec/fee/tx");
20
- const tx_5 = require("../codec/liquiditypool/tx");
21
- const tx_6 = require("../codec/market/tx");
22
- const tx_7 = require("../codec/oracle/tx");
23
- const tx_8 = require("../codec/order/tx");
15
+ exports.transformAddRewardReserve = exports.transformUpdateRewardScheme = exports.transformCreateRewardScheme = exports.transformCommunityPoolSpendAmount = exports.transformSetSettlementPriceParams = exports.transfromSetMinGasPriceParams = exports.transfromSetMsgGasCostParams = exports.transfromSetTradingFlagParams = exports.transfromUpdatePoolParams = exports.transfromSetCommitmentCurveParams = exports.transfromSetRewardCurveParams = exports.transfromSetRewardsWeightsParams = exports.transfromUnlinkPoolParams = exports.transfromLinkPoolParams = exports.transfromSyncTokenParams = exports.transfromCreateTokenParams = exports.transfromCreateOracleParams = exports.AdminModule = void 0;
16
+ const codec_1 = require("../codec");
17
+ const tx_1 = require("../codec/coin/tx");
18
+ const tx_2 = require("../codec/cosmos/staking/v1beta1/tx");
19
+ const tx_3 = require("../codec/fee/tx");
20
+ const tx_4 = require("../codec/liquiditypool/tx");
21
+ const tx_5 = require("../codec/market/tx");
22
+ const tx_6 = require("../codec/oracle/tx");
23
+ const tx_7 = require("../codec/order/tx");
24
24
  const util_1 = require("../util");
25
25
  const bignumber_js_1 = __importDefault(require("bignumber.js"));
26
26
  const long_1 = __importDefault(require("long"));
@@ -29,7 +29,7 @@ class AdminModule extends base_1.default {
29
29
  createOracle(params, opts) {
30
30
  return __awaiter(this, void 0, void 0, function* () {
31
31
  const wallet = this.getWallet();
32
- const value = tx_7.MsgCreateOracle.fromPartial({
32
+ const value = tx_6.MsgCreateOracle.fromPartial({
33
33
  creator: wallet.bech32Address,
34
34
  createOracleParams: transfromCreateOracleParams(params, wallet.bech32Address),
35
35
  });
@@ -42,7 +42,7 @@ class AdminModule extends base_1.default {
42
42
  createToken(params, opts) {
43
43
  return __awaiter(this, void 0, void 0, function* () {
44
44
  const wallet = this.getWallet();
45
- const value = tx_2.MsgCreateToken.fromPartial({
45
+ const value = tx_1.MsgCreateToken.fromPartial({
46
46
  creator: wallet.bech32Address,
47
47
  createTokenParams: transfromCreateTokenParams(params, wallet.bech32Address),
48
48
  });
@@ -56,7 +56,7 @@ class AdminModule extends base_1.default {
56
56
  return __awaiter(this, void 0, void 0, function* () {
57
57
  const wallet = this.getWallet();
58
58
  const msgs = params.map(param => {
59
- const value = tx_2.MsgCreateToken.fromPartial({
59
+ const value = tx_1.MsgCreateToken.fromPartial({
60
60
  creator: wallet.bech32Address,
61
61
  createTokenParams: transfromCreateTokenParams(param, wallet.bech32Address),
62
62
  });
@@ -71,7 +71,7 @@ class AdminModule extends base_1.default {
71
71
  syncToken(params, opts) {
72
72
  return __awaiter(this, void 0, void 0, function* () {
73
73
  const wallet = this.getWallet();
74
- const value = tx_2.MsgSyncToken.fromPartial(transfromSyncTokenParams(params, wallet.bech32Address));
74
+ const value = tx_1.MsgSyncToken.fromPartial(transfromSyncTokenParams(params, wallet.bech32Address));
75
75
  return yield wallet.sendTx({
76
76
  typeUrl: util_1.CarbonTx.Types.MsgSyncToken,
77
77
  value,
@@ -81,7 +81,7 @@ class AdminModule extends base_1.default {
81
81
  bindToken(params, opts) {
82
82
  return __awaiter(this, void 0, void 0, function* () {
83
83
  const wallet = this.getWallet();
84
- const value = tx_2.MsgBindToken.fromPartial({
84
+ const value = tx_1.MsgBindToken.fromPartial({
85
85
  creator: wallet.bech32Address,
86
86
  sourceDenom: params.sourceDenom,
87
87
  wrappedDenom: params.wrappedDenom,
@@ -95,7 +95,7 @@ class AdminModule extends base_1.default {
95
95
  unbindToken(params, opts) {
96
96
  return __awaiter(this, void 0, void 0, function* () {
97
97
  const wallet = this.getWallet();
98
- const value = tx_2.MsgUnbindToken.fromPartial({
98
+ const value = tx_1.MsgUnbindToken.fromPartial({
99
99
  creator: wallet.bech32Address,
100
100
  wrappedDenom: params.wrappedDenom,
101
101
  });
@@ -108,7 +108,7 @@ class AdminModule extends base_1.default {
108
108
  updateToken(params, opts) {
109
109
  return __awaiter(this, void 0, void 0, function* () {
110
110
  const wallet = this.getWallet();
111
- const value = tx_2.MsgUpdateToken.fromPartial({
111
+ const value = tx_1.MsgUpdateToken.fromPartial({
112
112
  updater: wallet.bech32Address,
113
113
  denom: params.denom,
114
114
  updateTokenParams: {
@@ -127,7 +127,7 @@ class AdminModule extends base_1.default {
127
127
  linkToken(params, opts) {
128
128
  return __awaiter(this, void 0, void 0, function* () {
129
129
  const wallet = this.getWallet();
130
- const value = tx_2.MsgLinkToken.fromPartial({
130
+ const value = tx_1.MsgLinkToken.fromPartial({
131
131
  creator: wallet.bech32Address,
132
132
  denom: params.denom,
133
133
  bridgeAddress: params.bridgeAddress,
@@ -142,7 +142,7 @@ class AdminModule extends base_1.default {
142
142
  var _a, _b;
143
143
  return __awaiter(this, void 0, void 0, function* () {
144
144
  const wallet = this.getWallet();
145
- const value = tx_6.MsgCreateMarket.fromPartial({
145
+ const value = tx_5.MsgCreateMarket.fromPartial({
146
146
  creator: wallet.bech32Address,
147
147
  marketType: params.marketType,
148
148
  base: params.base,
@@ -163,7 +163,7 @@ class AdminModule extends base_1.default {
163
163
  const wallet = this.getWallet();
164
164
  const msgs = params.map((param) => {
165
165
  var _a;
166
- const value = tx_6.MsgCreateMarket.fromPartial(Object.assign({ creator: wallet.bech32Address, marketType: param.marketType, base: param.base, quote: param.quote, currentBasePriceUsd: param.currentBasePriceUsd.toString(10), currentQuotePriceUsd: param.currentQuotePriceUsd.toString(10), indexOracleId: (_a = param.indexOracleId) !== null && _a !== void 0 ? _a : "" }, param.expiryTime && { expiryTime: param.expiryTime }));
166
+ const value = tx_5.MsgCreateMarket.fromPartial(Object.assign({ creator: wallet.bech32Address, marketType: param.marketType, base: param.base, quote: param.quote, currentBasePriceUsd: param.currentBasePriceUsd.toString(10), currentQuotePriceUsd: param.currentQuotePriceUsd.toString(10), indexOracleId: (_a = param.indexOracleId) !== null && _a !== void 0 ? _a : "" }, param.expiryTime && { expiryTime: param.expiryTime }));
167
167
  return {
168
168
  typeUrl: util_1.CarbonTx.Types.MsgCreateMarket,
169
169
  value,
@@ -172,20 +172,10 @@ class AdminModule extends base_1.default {
172
172
  return yield wallet.sendTxs(msgs, opts);
173
173
  });
174
174
  }
175
- createVaultType(params, opts) {
176
- return __awaiter(this, void 0, void 0, function* () {
177
- const wallet = this.getWallet();
178
- const value = tx_1.MsgCreateVaultType.fromPartial(transfromCreateVaultTypeParams(params, wallet.bech32Address));
179
- return yield wallet.sendTx({
180
- typeUrl: util_1.CarbonTx.Types.MsgCreateVaultType,
181
- value,
182
- }, opts);
183
- });
184
- }
185
175
  linkPool(params, opts) {
186
176
  return __awaiter(this, void 0, void 0, function* () {
187
177
  const wallet = this.getWallet();
188
- const value = tx_5.MsgLinkPool.fromPartial({
178
+ const value = tx_4.MsgLinkPool.fromPartial({
189
179
  creator: wallet.bech32Address,
190
180
  linkPoolParams: transfromLinkPoolParams(params)
191
181
  });
@@ -198,7 +188,7 @@ class AdminModule extends base_1.default {
198
188
  unlinkPool(params, opts) {
199
189
  return __awaiter(this, void 0, void 0, function* () {
200
190
  const wallet = this.getWallet();
201
- const value = tx_5.MsgUnlinkPool.fromPartial({
191
+ const value = tx_4.MsgUnlinkPool.fromPartial({
202
192
  creator: wallet.bech32Address,
203
193
  unlinkPoolParams: transfromUnlinkPoolParams(params)
204
194
  });
@@ -211,7 +201,7 @@ class AdminModule extends base_1.default {
211
201
  setRewardsWeights(params, opts) {
212
202
  return __awaiter(this, void 0, void 0, function* () {
213
203
  const wallet = this.getWallet();
214
- const value = tx_5.MsgSetRewardsWeights.fromPartial({
204
+ const value = tx_4.MsgSetRewardsWeights.fromPartial({
215
205
  creator: wallet.bech32Address,
216
206
  setRewardsWeightsParams: transfromSetRewardsWeightsParams(params)
217
207
  });
@@ -224,7 +214,7 @@ class AdminModule extends base_1.default {
224
214
  setRewardCurve(params, opts) {
225
215
  return __awaiter(this, void 0, void 0, function* () {
226
216
  const wallet = this.getWallet();
227
- const value = tx_5.MsgSetRewardCurve.fromPartial({
217
+ const value = tx_4.MsgSetRewardCurve.fromPartial({
228
218
  creator: wallet.bech32Address,
229
219
  setRewardCurveParams: transfromSetRewardCurveParams(params)
230
220
  });
@@ -237,7 +227,7 @@ class AdminModule extends base_1.default {
237
227
  setCommitmentCurve(params, opts) {
238
228
  return __awaiter(this, void 0, void 0, function* () {
239
229
  const wallet = this.getWallet();
240
- const value = tx_5.MsgSetCommitmentCurve.fromPartial({
230
+ const value = tx_4.MsgSetCommitmentCurve.fromPartial({
241
231
  creator: wallet.bech32Address,
242
232
  setCommitmentCurveParams: transfromSetCommitmentCurveParams(params)
243
233
  });
@@ -250,7 +240,7 @@ class AdminModule extends base_1.default {
250
240
  updatePool(params, opts) {
251
241
  return __awaiter(this, void 0, void 0, function* () {
252
242
  const wallet = this.getWallet();
253
- const value = tx_5.MsgUpdatePool.fromPartial({
243
+ const value = tx_4.MsgUpdatePool.fromPartial({
254
244
  creator: wallet.bech32Address,
255
245
  updatePoolParams: transfromUpdatePoolParams(params),
256
246
  });
@@ -263,7 +253,7 @@ class AdminModule extends base_1.default {
263
253
  setTradingFlag(params, opts) {
264
254
  return __awaiter(this, void 0, void 0, function* () {
265
255
  const wallet = this.getWallet();
266
- const value = tx_8.MsgSetTradingFlag.fromPartial(transfromSetTradingFlagParams(params, wallet.bech32Address));
256
+ const value = tx_7.MsgSetTradingFlag.fromPartial(transfromSetTradingFlagParams(params, wallet.bech32Address));
267
257
  return yield wallet.sendTx({
268
258
  typeUrl: util_1.CarbonTx.Types.MsgSetTradingFlag,
269
259
  value,
@@ -278,7 +268,7 @@ class AdminModule extends base_1.default {
278
268
  setMsgGasCost(params, opts) {
279
269
  return __awaiter(this, void 0, void 0, function* () {
280
270
  const wallet = this.getWallet();
281
- const value = tx_4.MsgSetGasCost.fromPartial({
271
+ const value = tx_3.MsgSetGasCost.fromPartial({
282
272
  creator: wallet.bech32Address,
283
273
  setGasCostParams: transfromSetMsgGasCostParams(params)
284
274
  });
@@ -291,7 +281,7 @@ class AdminModule extends base_1.default {
291
281
  setMinGasPrice(params, opts) {
292
282
  return __awaiter(this, void 0, void 0, function* () {
293
283
  const wallet = this.getWallet();
294
- const value = tx_4.MsgSetMinGasPrice.fromPartial({
284
+ const value = tx_3.MsgSetMinGasPrice.fromPartial({
295
285
  creator: wallet.bech32Address,
296
286
  setMinGasPriceParams: transfromSetMinGasPriceParams(params)
297
287
  });
@@ -304,7 +294,7 @@ class AdminModule extends base_1.default {
304
294
  removeMsgGasCost(params, opts) {
305
295
  return __awaiter(this, void 0, void 0, function* () {
306
296
  const wallet = this.getWallet();
307
- const value = tx_4.MsgRemoveGasCost.fromPartial({
297
+ const value = tx_3.MsgRemoveGasCost.fromPartial({
308
298
  creator: wallet.bech32Address,
309
299
  msgType: params.msgType,
310
300
  });
@@ -317,7 +307,7 @@ class AdminModule extends base_1.default {
317
307
  removeMinGasPrice(params, opts) {
318
308
  return __awaiter(this, void 0, void 0, function* () {
319
309
  const wallet = this.getWallet();
320
- const value = tx_4.MsgRemoveMinGasPrice.fromPartial({
310
+ const value = tx_3.MsgRemoveMinGasPrice.fromPartial({
321
311
  creator: wallet.bech32Address,
322
312
  denom: params.denom,
323
313
  });
@@ -330,7 +320,7 @@ class AdminModule extends base_1.default {
330
320
  createValidator(params, opts) {
331
321
  return __awaiter(this, void 0, void 0, function* () {
332
322
  const wallet = this.getWallet();
333
- const value = tx_3.MsgCreateValidator.fromPartial(Object.assign(Object.assign({ delegatorAddress: params.delegatorAddress, validatorAddress: params.validatorAddress, minSelfDelegation: params.minSelfDelegation.toString(10), description: params.description, pubkey: params.pubkey }, params.commission && {
323
+ const value = tx_2.MsgCreateValidator.fromPartial(Object.assign(Object.assign({ delegatorAddress: params.delegatorAddress, validatorAddress: params.validatorAddress, minSelfDelegation: params.minSelfDelegation.toString(10), description: params.description, pubkey: params.pubkey }, params.commission && {
334
324
  commission: {
335
325
  rate: params.commission.rate.shiftedBy(18).toString(10),
336
326
  maxRate: params.commission.maxRate.shiftedBy(18).toString(10),
@@ -351,7 +341,7 @@ class AdminModule extends base_1.default {
351
341
  editValidator(params, opts) {
352
342
  return __awaiter(this, void 0, void 0, function* () {
353
343
  const wallet = this.getWallet();
354
- const value = tx_3.MsgEditValidator.fromPartial({
344
+ const value = tx_2.MsgEditValidator.fromPartial({
355
345
  description: params.description,
356
346
  validatorAddress: params.validatorAddress,
357
347
  commissionRate: params.commissionRate.shiftedBy(18).toString(10),
@@ -366,7 +356,7 @@ class AdminModule extends base_1.default {
366
356
  authorizeBridge(params, opts) {
367
357
  return __awaiter(this, void 0, void 0, function* () {
368
358
  const wallet = this.getWallet();
369
- const value = tx_2.MsgAuthorizeBridge.fromPartial({
359
+ const value = tx_1.MsgAuthorizeBridge.fromPartial({
370
360
  creator: wallet.bech32Address,
371
361
  bridgeId: new long_1.default(params.bridgeId),
372
362
  chainId: new long_1.default(params.chainId),
@@ -381,7 +371,7 @@ class AdminModule extends base_1.default {
381
371
  deauthorizeBridge(params, opts) {
382
372
  return __awaiter(this, void 0, void 0, function* () {
383
373
  const wallet = this.getWallet();
384
- const value = tx_2.MsgDeauthorizeBridge.fromPartial({
374
+ const value = tx_1.MsgDeauthorizeBridge.fromPartial({
385
375
  initiator: wallet.bech32Address,
386
376
  bridgeId: new long_1.default(params.bridgeId),
387
377
  chainId: new long_1.default(params.chainId),
@@ -392,6 +382,213 @@ class AdminModule extends base_1.default {
392
382
  }, opts);
393
383
  });
394
384
  }
385
+ addRateStrategy(params, opts) {
386
+ return __awaiter(this, void 0, void 0, function* () {
387
+ const wallet = this.getWallet();
388
+ const value = codec_1.MsgAddRateStrategy.fromPartial({
389
+ creator: wallet.bech32Address,
390
+ rateStrategyParams: {
391
+ name: params.rateStrategy.name,
392
+ optimalUsage: params.rateStrategy.optimalUsage.toString(10),
393
+ baseVariableBorrowRate: params.rateStrategy.baseVariableBorrowRate.toString(10),
394
+ variableRateSlope1: params.rateStrategy.variableRateSlope1.toString(10),
395
+ variableRateSlope2: params.rateStrategy.variableRateSlope2.toString(10),
396
+ baseStableBorrowRate: params.rateStrategy.baseStableBorrowRate.toString(10),
397
+ stableRateSlope1: params.rateStrategy.stableRateSlope1.toString(10),
398
+ stableRateSlope2: params.rateStrategy.stableRateSlope2.toString(10),
399
+ optimalStableToTotalDebtRatio: params.rateStrategy.optimalStableToTotalDebtRatio.toString(10),
400
+ },
401
+ });
402
+ return yield wallet.sendTx({
403
+ typeUrl: util_1.CarbonTx.Types.MsgAddRateStrategy,
404
+ value
405
+ }, opts);
406
+ });
407
+ }
408
+ updateRateStrategy(params, opts) {
409
+ return __awaiter(this, void 0, void 0, function* () {
410
+ const wallet = this.getWallet();
411
+ const value = codec_1.MsgUpdateRateStrategy.fromPartial({
412
+ creator: wallet.bech32Address,
413
+ rateStrategyParams: {
414
+ name: params.rateStrategy.name,
415
+ optimalUsage: params.rateStrategy.optimalUsage.toString(10),
416
+ baseVariableBorrowRate: params.rateStrategy.baseVariableBorrowRate.toString(10),
417
+ variableRateSlope1: params.rateStrategy.variableRateSlope1.toString(10),
418
+ variableRateSlope2: params.rateStrategy.variableRateSlope2.toString(10),
419
+ baseStableBorrowRate: params.rateStrategy.baseStableBorrowRate.toString(10),
420
+ stableRateSlope1: params.rateStrategy.stableRateSlope1.toString(10),
421
+ stableRateSlope2: params.rateStrategy.stableRateSlope2.toString(10),
422
+ optimalStableToTotalDebtRatio: params.rateStrategy.optimalStableToTotalDebtRatio.toString(10),
423
+ },
424
+ });
425
+ return yield wallet.sendTx({
426
+ typeUrl: util_1.CarbonTx.Types.MsgUpdateRateStrategy,
427
+ value
428
+ }, opts);
429
+ });
430
+ }
431
+ removeRateStrategy(params, opts) {
432
+ return __awaiter(this, void 0, void 0, function* () {
433
+ const wallet = this.getWallet();
434
+ const value = codec_1.MsgRemoveRateStrategy.fromPartial({
435
+ creator: wallet.bech32Address,
436
+ name: params.name,
437
+ });
438
+ return yield wallet.sendTx({
439
+ typeUrl: util_1.CarbonTx.Types.MsgRemoveRateStrategy,
440
+ value
441
+ }, opts);
442
+ });
443
+ }
444
+ addAsset(params, opts) {
445
+ return __awaiter(this, void 0, void 0, function* () {
446
+ const wallet = this.getWallet();
447
+ const value = codec_1.MsgAddAsset.fromPartial({
448
+ creator: wallet.bech32Address,
449
+ assetParams: {
450
+ denom: params.asset.denom,
451
+ oracleId: params.asset.oracleId,
452
+ rateStrategyName: params.asset.rateStrategyName,
453
+ loanToValue: params.asset.loanToValue.toString(10),
454
+ liquidationThreshold: params.asset.liquidationThreshold.toString(10),
455
+ liquidationDiscount: params.asset.liquidationDiscount.toString(10),
456
+ supplyCap: params.asset.supplyCap.toString(10),
457
+ borrowCap: params.asset.borrowCap.toString(10),
458
+ }
459
+ });
460
+ return yield wallet.sendTx({
461
+ typeUrl: util_1.CarbonTx.Types.MsgAddAsset,
462
+ value
463
+ }, opts);
464
+ });
465
+ }
466
+ updateAsset(params, opts) {
467
+ return __awaiter(this, void 0, void 0, function* () {
468
+ const wallet = this.getWallet();
469
+ const value = codec_1.MsgUpdateAsset.fromPartial({
470
+ creator: wallet.bech32Address,
471
+ assetParams: {
472
+ denom: params.asset.denom,
473
+ oracleId: params.asset.oracleId,
474
+ rateStrategyName: params.asset.rateStrategyName,
475
+ loanToValue: params.asset.loanToValue.toString(10),
476
+ liquidationThreshold: params.asset.liquidationThreshold.toString(10),
477
+ liquidationDiscount: params.asset.liquidationDiscount.toString(10),
478
+ supplyCap: params.asset.supplyCap.toString(10),
479
+ borrowCap: params.asset.borrowCap.toString(10),
480
+ }
481
+ });
482
+ return yield wallet.sendTx({
483
+ typeUrl: util_1.CarbonTx.Types.MsgUpdateAsset,
484
+ value
485
+ }, opts);
486
+ });
487
+ }
488
+ setLiquidationFee(params, opts) {
489
+ return __awaiter(this, void 0, void 0, function* () {
490
+ const wallet = this.getWallet();
491
+ const value = codec_1.MsgSetLiquidationFee.fromPartial({
492
+ creator: wallet.bech32Address,
493
+ liquidationFee: params.liquidationFee.toString(10),
494
+ });
495
+ return yield wallet.sendTx({
496
+ typeUrl: util_1.CarbonTx.Types.MsgSetLiquidationFee,
497
+ value
498
+ }, opts);
499
+ });
500
+ }
501
+ setInterestFee(params, opts) {
502
+ return __awaiter(this, void 0, void 0, function* () {
503
+ const wallet = this.getWallet();
504
+ const value = codec_1.MsgSetInterestFee.fromPartial({
505
+ creator: wallet.bech32Address,
506
+ interestFee: params.interestFee.toString(10),
507
+ });
508
+ return yield wallet.sendTx({
509
+ typeUrl: util_1.CarbonTx.Types.MsgSetInterestFee,
510
+ value
511
+ }, opts);
512
+ });
513
+ }
514
+ setStableCoinInterestRate(params, opts) {
515
+ return __awaiter(this, void 0, void 0, function* () {
516
+ const wallet = this.getWallet();
517
+ const value = codec_1.MsgSetStablecoinInterestRate.fromPartial({
518
+ creator: wallet.bech32Address,
519
+ stablecoinInterestRate: params.stablecoinInterestRate.toString(10),
520
+ });
521
+ return yield wallet.sendTx({
522
+ typeUrl: util_1.CarbonTx.Types.MsgSetStablecoinInterestRate,
523
+ value
524
+ }, opts);
525
+ });
526
+ }
527
+ setCompleteLiquidationThreshold(params, opts) {
528
+ return __awaiter(this, void 0, void 0, function* () {
529
+ const wallet = this.getWallet();
530
+ const value = codec_1.MsgSetCompleteLiquidationThreshold.fromPartial({
531
+ creator: wallet.bech32Address,
532
+ completeLiquidationThreshold: params.completeLiquidationThreshold.shiftedBy(18).toString(10),
533
+ });
534
+ return yield wallet.sendTx({
535
+ typeUrl: util_1.CarbonTx.Types.MsgSetCompleteLiquidationThreshold,
536
+ value,
537
+ }, opts);
538
+ });
539
+ }
540
+ setMinimumCloseFactor(params, opts) {
541
+ return __awaiter(this, void 0, void 0, function* () {
542
+ const wallet = this.getWallet();
543
+ const value = codec_1.MsgSetMinimumCloseFactor.fromPartial({
544
+ creator: wallet.bech32Address,
545
+ minimumCloseFactor: params.minimumCloseFactor.shiftedBy(18).toString(10),
546
+ });
547
+ return yield wallet.sendTx({
548
+ typeUrl: util_1.CarbonTx.Types.MsgSetMinimumCloseFactor,
549
+ value,
550
+ }, opts);
551
+ });
552
+ }
553
+ setSmallLiquidationSize(params, opts) {
554
+ return __awaiter(this, void 0, void 0, function* () {
555
+ const wallet = this.getWallet();
556
+ const value = codec_1.MsgSetSmallLiquidationSize.fromPartial({
557
+ creator: wallet.bech32Address,
558
+ smallLiquidationSize: params.smallLiquidationSize.shiftedBy(18).toString(10),
559
+ });
560
+ return yield wallet.sendTx({
561
+ typeUrl: util_1.CarbonTx.Types.MsgSetSmallLiquidationSize,
562
+ value,
563
+ }, opts);
564
+ });
565
+ }
566
+ createRewardScheme(params, opts) {
567
+ return __awaiter(this, void 0, void 0, function* () {
568
+ const wallet = this.getWallet();
569
+ const value = codec_1.MsgCreateRewardScheme.fromPartial({
570
+ creator: wallet.bech32Address,
571
+ createRewardSchemeParams: transformCreateRewardScheme(params),
572
+ });
573
+ return yield wallet.sendTx({
574
+ typeUrl: util_1.CarbonTx.Types.MsgCreateRewardScheme,
575
+ value,
576
+ }, opts);
577
+ });
578
+ }
579
+ updateRewardScheme(params, opts) {
580
+ return __awaiter(this, void 0, void 0, function* () {
581
+ const wallet = this.getWallet();
582
+ const value = codec_1.MsgUpdateRewardScheme.fromPartial({
583
+ updator: wallet.bech32Address,
584
+ updateRewardSchemeParams: transformUpdateRewardScheme(params),
585
+ });
586
+ return yield wallet.sendTx({
587
+ typeUrl: util_1.CarbonTx.Types.MsgUpdateRewardScheme,
588
+ value,
589
+ }, opts);
590
+ });
591
+ }
395
592
  }
396
593
  exports.AdminModule = AdminModule;
397
594
  ;
@@ -429,15 +626,6 @@ function transfromSyncTokenParams(msg, address) {
429
626
  };
430
627
  }
431
628
  exports.transfromSyncTokenParams = transfromSyncTokenParams;
432
- function transfromCreateVaultTypeParams(msg, address) {
433
- return {
434
- creator: address,
435
- collateralDenom: msg.collateralDenom,
436
- debtDenom: msg.debtDenom,
437
- collateralizationRatio: msg.collateralizationRatio.shiftedBy(18).toString(10),
438
- };
439
- }
440
- exports.transfromCreateVaultTypeParams = transfromCreateVaultTypeParams;
441
629
  function transfromLinkPoolParams(msg) {
442
630
  return {
443
631
  poolId: new long_1.default(msg.poolId),
@@ -528,3 +716,37 @@ function transformCommunityPoolSpendAmount(amount) {
528
716
  return amounts;
529
717
  }
530
718
  exports.transformCommunityPoolSpendAmount = transformCommunityPoolSpendAmount;
719
+ function transformCreateRewardScheme(msg) {
720
+ return {
721
+ rewardDenom: msg.rewardDenom,
722
+ assetDenom: msg.assetDenom,
723
+ rewardType: msg.rewardType,
724
+ rewardAmountPerSecond: msg.rewardAmountPerSecond.toString(10),
725
+ startTime: msg.startTime,
726
+ endTime: msg.endTime,
727
+ };
728
+ }
729
+ exports.transformCreateRewardScheme = transformCreateRewardScheme;
730
+ function transformUpdateRewardScheme(msg) {
731
+ var _a;
732
+ return {
733
+ rewardSchemeId: new long_1.default(msg.rewardSchemeId),
734
+ rewardDenom: msg.rewardDenom,
735
+ assetDenom: msg.assetDenom,
736
+ rewardType: msg.rewardType,
737
+ rewardAmountPerSecond: (_a = msg.rewardAmountPerSecond) === null || _a === void 0 ? void 0 : _a.toString(10),
738
+ startTime: msg.startTime,
739
+ endTime: msg.endTime,
740
+ };
741
+ }
742
+ exports.transformUpdateRewardScheme = transformUpdateRewardScheme;
743
+ function transformAddRewardReserve(msg, wallet) {
744
+ var _a;
745
+ return {
746
+ creator: (_a = msg.creator) !== null && _a !== void 0 ? _a : wallet.bech32Address,
747
+ rewardSchemeId: new long_1.default(msg.rewardSchemeId),
748
+ amount: msg.amount.toString(10),
749
+ denom: msg.denom,
750
+ };
751
+ }
752
+ exports.transformAddRewardReserve = transformAddRewardReserve;