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
@@ -48,7 +48,7 @@ class GovModule extends base_1.default {
48
48
  const value = tx_1.MsgDeposit.fromPartial({
49
49
  proposalId: new long_1.default(params.proposalId),
50
50
  depositor: wallet.bech32Address,
51
- amount: (0, amino_1.coins)(params.amount, params.denom)
51
+ amount: amino_1.coins(params.amount, params.denom)
52
52
  });
53
53
  return yield wallet.sendTx({
54
54
  typeUrl: util_1.CarbonTx.Types.MsgDeposit,
@@ -78,21 +78,21 @@ class GovModule extends base_1.default {
78
78
  const createTokenMsg = {
79
79
  title: title,
80
80
  description: description,
81
- msg: (0, admin_1.transfromCreateTokenParams)(msg, wallet.bech32Address)
81
+ msg: admin_1.transfromCreateTokenParams(msg, wallet.bech32Address)
82
82
  };
83
83
  return proposal_1.CreateTokenProposal.encode(createTokenMsg).finish();
84
84
  case "SetMsgGasCostProposal":
85
85
  const setMsgGasCostMsg = {
86
86
  title: title,
87
87
  description: description,
88
- msg: (0, admin_1.transfromSetMsgGasCostParams)(msg)
88
+ msg: admin_1.transfromSetMsgGasCostParams(msg)
89
89
  };
90
90
  return proposal_2.SetMsgGasCostProposal.encode(setMsgGasCostMsg).finish();
91
91
  case "SetMinGasPriceProposal":
92
92
  const setMinGasPriceMsg = {
93
93
  title: title,
94
94
  description: description,
95
- msg: (0, admin_1.transfromSetMinGasPriceParams)(msg)
95
+ msg: admin_1.transfromSetMinGasPriceParams(msg)
96
96
  };
97
97
  return proposal_2.SetMinGasPriceProposal.encode(setMinGasPriceMsg).finish();
98
98
  case "RemoveMsgGasCostProposal":
@@ -113,63 +113,63 @@ class GovModule extends base_1.default {
113
113
  const linkPoolMsg = {
114
114
  title: title,
115
115
  description: description,
116
- msg: (0, admin_1.transfromLinkPoolParams)(msg)
116
+ msg: admin_1.transfromLinkPoolParams(msg)
117
117
  };
118
118
  return proposal_3.LinkPoolProposal.encode(linkPoolMsg).finish();
119
119
  case "UnlinkPoolProposal":
120
120
  const unlinkPoolMsg = {
121
121
  title: title,
122
122
  description: description,
123
- msg: (0, admin_1.transfromUnlinkPoolParams)(msg)
123
+ msg: admin_1.transfromUnlinkPoolParams(msg)
124
124
  };
125
125
  return proposal_3.UnlinkPoolProposal.encode(unlinkPoolMsg).finish();
126
126
  case "SetRewardCurveProposal":
127
127
  const setRewardCurveMsg = {
128
128
  title: title,
129
129
  description: description,
130
- msg: (0, admin_1.transfromSetRewardCurveParams)(msg)
130
+ msg: admin_1.transfromSetRewardCurveParams(msg)
131
131
  };
132
132
  return proposal_3.SetRewardCurveProposal.encode(setRewardCurveMsg).finish();
133
133
  case "SetCommitmentCurveProposal":
134
134
  const setCommitmentCurveMsg = {
135
135
  title: title,
136
136
  description: description,
137
- msg: (0, admin_1.transfromSetCommitmentCurveParams)(msg)
137
+ msg: admin_1.transfromSetCommitmentCurveParams(msg)
138
138
  };
139
139
  return proposal_3.SetCommitmentCurveProposal.encode(setCommitmentCurveMsg).finish();
140
140
  case "SetRewardsWeightsProposal":
141
141
  const setRewardsWeightsMsg = {
142
142
  title: title,
143
143
  description: description,
144
- msg: (0, admin_1.transfromSetRewardsWeightsParams)(msg)
144
+ msg: admin_1.transfromSetRewardsWeightsParams(msg)
145
145
  };
146
146
  return proposal_3.SetRewardsWeightsProposal.encode(setRewardsWeightsMsg).finish();
147
147
  case "UpdatePoolProposal":
148
148
  const updatePoolProposalMsg = {
149
149
  title: title,
150
150
  description: description,
151
- msg: (0, admin_1.transfromUpdatePoolParams)(msg)
151
+ msg: admin_1.transfromUpdatePoolParams(msg)
152
152
  };
153
153
  return proposal_3.UpdatePoolProposal.encode(updatePoolProposalMsg).finish();
154
154
  case "UpdateMarketProposal":
155
155
  const updateMarketProposalMsg = {
156
156
  title: title,
157
157
  description: description,
158
- msg: (0, market_1.transfromUpdateMarketParams)(msg)
158
+ msg: market_1.transfromUpdateMarketParams(msg)
159
159
  };
160
160
  return proposal_4.UpdateMarketProposal.encode(updateMarketProposalMsg).finish();
161
161
  case "CreateOracleProposal":
162
162
  const createOracleProposalMsg = {
163
163
  title: title,
164
164
  description: description,
165
- msg: (0, admin_1.transfromCreateOracleParams)(msg, wallet.bech32Address)
165
+ msg: admin_1.transfromCreateOracleParams(msg, wallet.bech32Address)
166
166
  };
167
167
  return proposal_5.CreateOracleProposal.encode(createOracleProposalMsg).finish();
168
168
  case "SettlementPriceProposal":
169
169
  const settlementPriceProposalMsg = {
170
170
  title: title,
171
171
  description: description,
172
- msg: (0, admin_1.transformSetSettlementPriceParams)(msg),
172
+ msg: admin_1.transformSetSettlementPriceParams(msg),
173
173
  };
174
174
  return proposal_6.SettlementPriceProposal.encode(settlementPriceProposalMsg).finish();
175
175
  case "ParameterChangeProposal":
@@ -191,7 +191,7 @@ class GovModule extends base_1.default {
191
191
  title: title,
192
192
  description: description,
193
193
  recipient: proposalMsg.recipient,
194
- amount: (0, admin_1.transformCommunityPoolSpendAmount)(proposalMsg.amount),
194
+ amount: admin_1.transformCommunityPoolSpendAmount(proposalMsg.amount),
195
195
  };
196
196
  return distribution_1.CommunityPoolSpendProposal.encode(communityPoolSpendProposalMsg).finish();
197
197
  case "CancelSoftwareUpgradeProposal":
@@ -1,5 +1,6 @@
1
1
  import { CarbonTx } from "../util";
2
2
  import { BigNumber } from "bignumber.js";
3
+ import Long from "long";
3
4
  import BaseModule from "./base";
4
5
  export declare class LiquidityPoolModule extends BaseModule {
5
6
  create(params: LiquidityPoolModule.CreatePoolParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
@@ -25,6 +26,7 @@ export declare namespace LiquidityPoolModule {
25
26
  tokenAWeight: BigNumber;
26
27
  tokenBWeight: BigNumber;
27
28
  swapFee: BigNumber;
29
+ ampBps: Long;
28
30
  numQuotes: number;
29
31
  }
30
32
  interface CreatePoolWithLiquidityParams {
@@ -35,6 +37,7 @@ export declare namespace LiquidityPoolModule {
35
37
  amountA: BigNumber;
36
38
  amountB: BigNumber;
37
39
  swapFee: BigNumber;
40
+ ampBps: Long;
38
41
  numQuotes: number;
39
42
  }
40
43
  interface AddLiquidityParams {
@@ -30,6 +30,7 @@ class LiquidityPoolModule extends base_1.default {
30
30
  tokenAWeight: params.tokenAWeight.shiftedBy(18).toString(10),
31
31
  tokenBWeight: params.tokenBWeight.shiftedBy(18).toString(10),
32
32
  swapFee: params.swapFee.shiftedBy(18).toString(10),
33
+ ampBps: params.ampBps,
33
34
  numQuotes: new long_1.default(params.numQuotes),
34
35
  });
35
36
  return yield wallet.sendTx({
@@ -50,6 +51,7 @@ class LiquidityPoolModule extends base_1.default {
50
51
  amountA: params.amountA.toString(10),
51
52
  amountB: params.amountB.toString(10),
52
53
  swapFee: params.swapFee.shiftedBy(18).toString(10),
54
+ ampBps: params.ampBps,
53
55
  numQuotes: new long_1.default(params.numQuotes),
54
56
  });
55
57
  return yield wallet.sendTx({
@@ -145,7 +147,7 @@ class LiquidityPoolModule extends base_1.default {
145
147
  const SECONDS_IN_A_WEEK = new bignumber_js_1.BigNumber(604800);
146
148
  const mintDataResponse = yield this.sdkProvider.query.inflation.MintData({});
147
149
  const mintData = mintDataResponse.mintData;
148
- const nowTime = new bignumber_js_1.BigNumber((0, dayjs_1.default)().unix());
150
+ const nowTime = new bignumber_js_1.BigNumber(dayjs_1.default().unix());
149
151
  const firstBlockTime = (_a = mintData === null || mintData === void 0 ? void 0 : mintData.firstBlockTime.toNumber()) !== null && _a !== void 0 ? _a : 0;
150
152
  const difference = nowTime.minus(firstBlockTime);
151
153
  const currentWeek = difference.div(SECONDS_IN_A_WEEK).dp(0, bignumber_js_1.BigNumber.ROUND_DOWN);
@@ -85,7 +85,7 @@ class EthLedgerAccount {
85
85
  static tryConnect() {
86
86
  return __awaiter(this, void 0, void 0, function* () {
87
87
  try {
88
- const transport = yield (0, ledger_1.getLedgerTransport)();
88
+ const transport = yield ledger_1.getLedgerTransport();
89
89
  // get public key to assert that NEO app is open
90
90
  const ethApp = new hw_app_eth_1.default(transport);
91
91
  const bipString = EthLedgerAccount.getETHBIP44String();
@@ -39,7 +39,7 @@ exports.looksLikeTransportStatusError = looksLikeTransportStatusError;
39
39
  * @returns error with modified message if found.
40
40
  */
41
41
  function evalTransportError(err) {
42
- const transportErr = (0, lodash_1.cloneDeep)(err);
42
+ const transportErr = lodash_1.cloneDeep(err);
43
43
  switch (transportErr.statusCode) {
44
44
  case StatusWord.APP_CLOSED:
45
45
  transportErr.message = "Your NEO app is closed! Please login.";
@@ -49,8 +49,8 @@ function getAppName(ledger) {
49
49
  return version.substring(0, version.length - 2); // take of status word
50
50
  }
51
51
  catch (e) {
52
- if ((0, ErrorCode_1.looksLikeTransportStatusError)(e)) {
53
- throw (0, ErrorCode_1.evalTransportError)(e);
52
+ if (ErrorCode_1.looksLikeTransportStatusError(e)) {
53
+ throw ErrorCode_1.evalTransportError(e);
54
54
  }
55
55
  throw e;
56
56
  }
@@ -72,8 +72,8 @@ function getAppVersion(ledger) {
72
72
  return major.toString() + "." + minor.toString() + "." + patch.toString();
73
73
  }
74
74
  catch (e) {
75
- if ((0, ErrorCode_1.looksLikeTransportStatusError)(e)) {
76
- throw (0, ErrorCode_1.evalTransportError)(e);
75
+ if (ErrorCode_1.looksLikeTransportStatusError(e)) {
76
+ throw ErrorCode_1.evalTransportError(e);
77
77
  }
78
78
  throw e;
79
79
  }
@@ -109,8 +109,8 @@ function getPublicKey(ledger, bip44String, showAddressOnDevice = false) {
109
109
  return response.toString("hex").substring(0, 130);
110
110
  }
111
111
  catch (e) {
112
- if ((0, ErrorCode_1.looksLikeTransportStatusError)(e)) {
113
- throw (0, ErrorCode_1.evalTransportError)(e);
112
+ if (ErrorCode_1.looksLikeTransportStatusError(e)) {
113
+ throw ErrorCode_1.evalTransportError(e);
114
114
  }
115
115
  throw e;
116
116
  }
@@ -142,8 +142,8 @@ function getSignature(ledger, payload, bip44String, network) {
142
142
  return DerToHexSignature(response.toString("hex"));
143
143
  }
144
144
  catch (e) {
145
- if ((0, ErrorCode_1.looksLikeTransportStatusError)(e)) {
146
- throw (0, ErrorCode_1.evalTransportError)(e);
145
+ if (ErrorCode_1.looksLikeTransportStatusError(e)) {
146
+ throw ErrorCode_1.evalTransportError(e);
147
147
  }
148
148
  throw e;
149
149
  }
@@ -109,8 +109,8 @@ class NeoLedgerAccount {
109
109
  */
110
110
  static tryConnect(version = "neo") {
111
111
  return __awaiter(this, void 0, void 0, function* () {
112
- const bipString = (0, NeonLedger_1.getNEOBIP44String)();
113
- const ledger = yield (0, ledger_1.getLedgerTransport)();
112
+ const bipString = NeonLedger_1.getNEOBIP44String();
113
+ const ledger = yield ledger_1.getLedgerTransport();
114
114
  // get public key to assert that NEO app is open
115
115
  const ledgerAdapter = adapterForVersion(version);
116
116
  const publicKey = yield ledgerAdapter.getPublicKey(ledger, bipString);
@@ -127,7 +127,7 @@ class NeoLedgerAccount {
127
127
  }
128
128
  sign(msg, magic = neon_core_next_1.CONST.MAGIC_NUMBER.MainNet) {
129
129
  return __awaiter(this, void 0, void 0, function* () {
130
- const bipString = (0, NeonLedger_1.getNEOBIP44String)();
130
+ const bipString = NeonLedger_1.getNEOBIP44String();
131
131
  const ledger = this.useLedger();
132
132
  const ledgerAdapter = adapterForVersion(this.version);
133
133
  console.log("getsignature", ledgerAdapter, ledger, msg, bipString, magic);
@@ -41,7 +41,7 @@ function evalTransportError(err) {
41
41
  transportErr.message = "Transaction signing denied";
42
42
  break;
43
43
  default:
44
- transportErr.message = (0, hw_transport_1.getAltStatusMessage)(transportErr.statusCode);
44
+ transportErr.message = hw_transport_1.getAltStatusMessage(transportErr.statusCode);
45
45
  }
46
46
  return err;
47
47
  }
@@ -43,6 +43,17 @@ const TxTypes = {
43
43
  RemoveMinGasPrice: "fee/RemoveMinGasPrice",
44
44
  CreateValidator: "cosmos-sdk/MsgCreateValidator",
45
45
  EditValidator: "cosmos-sdk/MsgEditValidator",
46
+ AddRateStrategy: "cdp/AddRateStrategy",
47
+ UpdateRateStrategy: "cdp/UpdateRateStrategy",
48
+ RemoveRateStrategy: "cdp/RemoveRateStrategy",
49
+ AddAsset: "cdp/AddAsset",
50
+ UpdateAsset: "cdp/UpdateAsset",
51
+ SetLiquidationFee: "cdp/SetLiquidationFee",
52
+ SetInterestFee: "cdp/SetInterestFee",
53
+ SetStablecoinInterestRate: "cdp/SetStablecoinInterestRate",
54
+ SetCompleteLiquidationThreshold: "cdp/SetCompleteLiquidationThreshold",
55
+ SetMinimumCloseFactor: "cdp/SetMinimumCloseFactor",
56
+ SetSmallLiquidationSize: "cdp/SetSmallLiquidationSize",
46
57
  };
47
58
  const MsgCreateOracle = {
48
59
  aminoType: TxTypes.CreateOracle,
@@ -84,12 +95,6 @@ const MsgCreateMarket = {
84
95
  currentQuotePriceUsd: utils_1.ConvertEncType.Dec,
85
96
  },
86
97
  };
87
- const MsgCreateVaultType = {
88
- aminoType: TxTypes.CreateVaultType,
89
- valueMap: {
90
- collateralizationRatio: utils_1.ConvertEncType.Dec,
91
- },
92
- };
93
98
  const MsgLinkPool = {
94
99
  aminoType: TxTypes.LinkPool,
95
100
  valueMap: {
@@ -177,26 +182,86 @@ const MsgEditValidator = {
177
182
  commissionRate: utils_1.ConvertEncType.Dec,
178
183
  },
179
184
  };
185
+ const MsgAddRateStrategy = {
186
+ aminoType: TxTypes.AddRateStrategy,
187
+ valueMap: {},
188
+ };
189
+ const MsgUpdateRateStrategy = {
190
+ aminoType: TxTypes.UpdateRateStrategy,
191
+ valueMap: {},
192
+ };
193
+ const MsgRemoveRateStrategy = {
194
+ aminoType: TxTypes.RemoveRateStrategy,
195
+ valueMap: {},
196
+ };
197
+ const MsgAddAsset = {
198
+ aminoType: TxTypes.AddAsset,
199
+ valueMap: {},
200
+ };
201
+ const MsgUpdateAsset = {
202
+ aminoType: TxTypes.UpdateAsset,
203
+ valueMap: {},
204
+ };
205
+ const MsgSetLiquidationFee = {
206
+ aminoType: TxTypes.SetLiquidationFee,
207
+ valueMap: {},
208
+ };
209
+ const MsgSetInterestFee = {
210
+ aminoType: TxTypes.SetInterestFee,
211
+ valueMap: {},
212
+ };
213
+ const MsgSetStablecoinInterestRate = {
214
+ aminoType: TxTypes.SetStablecoinInterestRate,
215
+ valueMap: {},
216
+ };
217
+ const MsgSetCompleteLiquidationThreshold = {
218
+ aminoType: TxTypes.SetCompleteLiquidationThreshold,
219
+ valueMap: {
220
+ completeLiquidationThreshold: utils_1.ConvertEncType.Dec,
221
+ },
222
+ };
223
+ const MsgSetMinimumCloseFactor = {
224
+ aminoType: TxTypes.SetMinimumCloseFactor,
225
+ valueMap: {
226
+ minimumCloseFactor: utils_1.ConvertEncType.Dec,
227
+ },
228
+ };
229
+ const MsgSetSmallLiquidationSize = {
230
+ aminoType: TxTypes.SetSmallLiquidationSize,
231
+ valueMap: {
232
+ smallLiquidationSize: utils_1.ConvertEncType.Dec,
233
+ },
234
+ };
180
235
  const AdminAmino = {
181
- [CarbonTx.Types.MsgCreateOracle]: (0, utils_1.generateAminoType)(MsgCreateOracle),
182
- [CarbonTx.Types.MsgBindToken]: (0, utils_1.generateAminoType)(MsgBindToken),
183
- [CarbonTx.Types.MsgCreateToken]: (0, utils_1.generateAminoType)(MsgCreateToken),
184
- [CarbonTx.Types.MsgLinkToken]: (0, utils_1.generateAminoType)(MsgLinkToken),
185
- [CarbonTx.Types.MsgSyncToken]: (0, utils_1.generateAminoType)(MsgSyncToken),
186
- [CarbonTx.Types.MsgCreateMarket]: (0, utils_1.generateAminoType)(MsgCreateMarket),
187
- [CarbonTx.Types.MsgCreateVaultType]: (0, utils_1.generateAminoType)(MsgCreateVaultType),
188
- [CarbonTx.Types.MsgLinkPool]: (0, utils_1.generateAminoType)(MsgLinkPool),
189
- [CarbonTx.Types.MsgUnlinkPool]: (0, utils_1.generateAminoType)(MsgUnlinkPool),
190
- [CarbonTx.Types.MsgUpdatePool]: (0, utils_1.generateAminoType)(MsgUpdatePool),
191
- [CarbonTx.Types.MsgSetRewardsWeights]: (0, utils_1.generateAminoType)(MsgSetRewardsWeights),
192
- [CarbonTx.Types.MsgSetRewardCurve]: (0, utils_1.generateAminoType)(MsgSetRewardCurve),
193
- [CarbonTx.Types.MsgSetCommitmentCurve]: (0, utils_1.generateAminoType)(MsgSetCommitmentCurve),
194
- [CarbonTx.Types.MsgSetTradingFlag]: (0, utils_1.generateAminoType)(MsgSetTradingFlag),
195
- [CarbonTx.Types.MsgSetGasCost]: (0, utils_1.generateAminoType)(MsgSetGasCost),
196
- [CarbonTx.Types.MsgSetMinGasPrice]: (0, utils_1.generateAminoType)(MsgSetMinGasPrice),
197
- [CarbonTx.Types.MsgRemoveGasCost]: (0, utils_1.generateAminoType)(MsgRemoveGasCost),
198
- [CarbonTx.Types.MsgRemoveMinGasPrice]: (0, utils_1.generateAminoType)(MsgRemoveMinGasPrice),
199
- [CarbonTx.Types.MsgCreateValidator]: (0, utils_1.generateAminoType)(MsgCreateValidator),
200
- [CarbonTx.Types.MsgEditValidator]: (0, utils_1.generateAminoType)(MsgEditValidator),
236
+ [CarbonTx.Types.MsgCreateOracle]: utils_1.generateAminoType(MsgCreateOracle),
237
+ [CarbonTx.Types.MsgBindToken]: utils_1.generateAminoType(MsgBindToken),
238
+ [CarbonTx.Types.MsgCreateToken]: utils_1.generateAminoType(MsgCreateToken),
239
+ [CarbonTx.Types.MsgLinkToken]: utils_1.generateAminoType(MsgLinkToken),
240
+ [CarbonTx.Types.MsgSyncToken]: utils_1.generateAminoType(MsgSyncToken),
241
+ [CarbonTx.Types.MsgCreateMarket]: utils_1.generateAminoType(MsgCreateMarket),
242
+ [CarbonTx.Types.MsgLinkPool]: utils_1.generateAminoType(MsgLinkPool),
243
+ [CarbonTx.Types.MsgUnlinkPool]: utils_1.generateAminoType(MsgUnlinkPool),
244
+ [CarbonTx.Types.MsgUpdatePool]: utils_1.generateAminoType(MsgUpdatePool),
245
+ [CarbonTx.Types.MsgSetRewardsWeights]: utils_1.generateAminoType(MsgSetRewardsWeights),
246
+ [CarbonTx.Types.MsgSetRewardCurve]: utils_1.generateAminoType(MsgSetRewardCurve),
247
+ [CarbonTx.Types.MsgSetCommitmentCurve]: utils_1.generateAminoType(MsgSetCommitmentCurve),
248
+ [CarbonTx.Types.MsgSetTradingFlag]: utils_1.generateAminoType(MsgSetTradingFlag),
249
+ [CarbonTx.Types.MsgSetGasCost]: utils_1.generateAminoType(MsgSetGasCost),
250
+ [CarbonTx.Types.MsgSetMinGasPrice]: utils_1.generateAminoType(MsgSetMinGasPrice),
251
+ [CarbonTx.Types.MsgRemoveGasCost]: utils_1.generateAminoType(MsgRemoveGasCost),
252
+ [CarbonTx.Types.MsgRemoveMinGasPrice]: utils_1.generateAminoType(MsgRemoveMinGasPrice),
253
+ [CarbonTx.Types.MsgCreateValidator]: utils_1.generateAminoType(MsgCreateValidator),
254
+ [CarbonTx.Types.MsgEditValidator]: utils_1.generateAminoType(MsgEditValidator),
255
+ [CarbonTx.Types.MsgAddRateStrategy]: utils_1.generateAminoType(MsgAddRateStrategy),
256
+ [CarbonTx.Types.MsgUpdateRateStrategy]: utils_1.generateAminoType(MsgUpdateRateStrategy),
257
+ [CarbonTx.Types.MsgRemoveRateStrategy]: utils_1.generateAminoType(MsgRemoveRateStrategy),
258
+ [CarbonTx.Types.MsgAddAsset]: utils_1.generateAminoType(MsgAddAsset),
259
+ [CarbonTx.Types.MsgUpdateAsset]: utils_1.generateAminoType(MsgUpdateAsset),
260
+ [CarbonTx.Types.MsgSetLiquidationFee]: utils_1.generateAminoType(MsgSetLiquidationFee),
261
+ [CarbonTx.Types.MsgSetInterestFee]: utils_1.generateAminoType(MsgSetInterestFee),
262
+ [CarbonTx.Types.MsgSetStablecoinInterestRate]: utils_1.generateAminoType(MsgSetStablecoinInterestRate),
263
+ [CarbonTx.Types.MsgSetCompleteLiquidationThreshold]: utils_1.generateAminoType(MsgSetCompleteLiquidationThreshold),
264
+ [CarbonTx.Types.MsgSetMinimumCloseFactor]: utils_1.generateAminoType(MsgSetMinimumCloseFactor),
265
+ [CarbonTx.Types.MsgSetSmallLiquidationSize]: utils_1.generateAminoType(MsgSetSmallLiquidationSize),
201
266
  };
202
267
  exports.default = AdminAmino;
@@ -29,6 +29,6 @@ const MsgSend = {
29
29
  valueMap: {},
30
30
  };
31
31
  const BankAmino = {
32
- [CarbonTx.Types.MsgSend]: (0, utils_1.generateAminoType)(MsgSend),
32
+ [CarbonTx.Types.MsgSend]: utils_1.generateAminoType(MsgSend),
33
33
  };
34
34
  exports.default = BankAmino;
@@ -29,6 +29,6 @@ const MsgInitiateLiquidation = {
29
29
  valueMap: {},
30
30
  };
31
31
  const BrokerAmino = {
32
- [CarbonTx.Types.MsgInitiateLiquidation]: (0, utils_1.generateAminoType)(MsgInitiateLiquidation),
32
+ [CarbonTx.Types.MsgInitiateLiquidation]: utils_1.generateAminoType(MsgInitiateLiquidation),
33
33
  };
34
34
  exports.default = BrokerAmino;
@@ -22,39 +22,150 @@ Object.defineProperty(exports, "__esModule", { value: true });
22
22
  const CarbonTx = __importStar(require("../../../util/tx"));
23
23
  const utils_1 = require("../utils");
24
24
  const TxTypes = {
25
- AddCollateral: "cdp/AddCollateral",
26
- RemoveCollateral: "cdp/removeCollateral",
27
- AddDebt: "cdp/AddDebt",
28
- RemoveDebt: "cdp/RemoveDebt",
25
+ SupplyAsset: "cdp/SupplyAsset",
26
+ WithdrawAsset: "cdp/WithdrawAsset",
27
+ LockCollateral: "cdp/LockCollateral",
28
+ UnlockCollateral: "cdp/UnlockCollateral",
29
+ BorrowAsset: "cdp/BorrowAsset",
30
+ RepayAsset: "cdp/RepayAsset",
31
+ SupplyAssetAndLockCollateral: "cdp/SupplyAssetAndLockCollateral",
32
+ UnlockCollateralAndWithdrawAsset: "cdp/UnlockCollateralAndWithdrawAsset",
33
+ LiquidateCollateral: "cdp/LiquidateCollateral",
34
+ RepayAssetWithCdpTokens: "cdp/RepayAssetWithCdpTokens",
35
+ RepayAssetWithCollateral: "cdp/RepayAssetWithCollateral",
36
+ MintStablecoin: "cdp/MintStablecoin",
37
+ ReturnStablecoin: "cdp/ReturnStablecoin",
38
+ LiquidateCollateralWithCdpTokens: "cdp/LiquidateCollateralWithCdpTokens",
39
+ LiquidateCollateralWithCollateral: "cdp/LiquidateCollateralWithCollateral",
40
+ LiquidateCollateralWithStablecoin: "cdp/LiquidateCollateralWithStablecoin",
41
+ CreateRewardScheme: "cdp/CreateRewardScheme",
42
+ UpdateRewardScheme: "cdp/UpdateRewardScheme",
43
+ SetStablecoinMintCap: "cdp/SetStablecoinMintCap",
44
+ SetStalePriceGracePeriod: "cdp/SetStalePriceGracePeriod",
45
+ SetCdpPaused: "cdp/SetCdpPaused",
46
+ ClaimRewards: "cdp/ClaimRewards",
29
47
  };
30
- const MsgAddCollateral = {
31
- aminoType: TxTypes.AddCollateral,
32
- valueMap: {
33
- vaultTypeId: utils_1.ConvertEncType.Long,
34
- },
48
+ const MsgSupplyAsset = {
49
+ aminoType: TxTypes.SupplyAsset,
50
+ valueMap: {},
35
51
  };
36
- const MsgRemoveCollateral = {
37
- aminoType: TxTypes.RemoveCollateral,
38
- valueMap: {
39
- vaultTypeId: utils_1.ConvertEncType.Long,
40
- },
52
+ const MsgWithdrawAsset = {
53
+ aminoType: TxTypes.WithdrawAsset,
54
+ valueMap: {},
55
+ };
56
+ const MsgLockCollateral = {
57
+ aminoType: TxTypes.LockCollateral,
58
+ valueMap: {},
59
+ };
60
+ const MsgUnlockCollateral = {
61
+ aminoType: TxTypes.UnlockCollateral,
62
+ valueMap: {},
63
+ };
64
+ const MsgBorrowAsset = {
65
+ aminoType: TxTypes.BorrowAsset,
66
+ valueMap: {},
67
+ };
68
+ const MsgRepayAsset = {
69
+ aminoType: TxTypes.RepayAsset,
70
+ valueMap: {},
71
+ };
72
+ const MsgSupplyAssetAndLockCollateral = {
73
+ aminoType: TxTypes.SupplyAssetAndLockCollateral,
74
+ valueMap: {},
75
+ };
76
+ const MsgUnlockCollateralAndWithdrawAsset = {
77
+ aminoType: TxTypes.UnlockCollateralAndWithdrawAsset,
78
+ valueMap: {},
79
+ };
80
+ const MsgLiquidateCollateral = {
81
+ aminoType: TxTypes.LiquidateCollateral,
82
+ valueMap: {},
41
83
  };
42
- const MsgAddDebt = {
43
- aminoType: TxTypes.AddDebt,
84
+ const MsgRepayAssetWithCdpTokens = {
85
+ aminoType: TxTypes.RepayAssetWithCdpTokens,
86
+ valueMap: {},
87
+ };
88
+ const MsgRepayAssetWithCollateral = {
89
+ aminoType: TxTypes.RepayAssetWithCollateral,
90
+ valueMap: {},
91
+ };
92
+ const MsgMintStablecoin = {
93
+ aminoType: TxTypes.MintStablecoin,
94
+ valueMap: {},
95
+ };
96
+ const MsgReturnStablecoin = {
97
+ aminoType: TxTypes.ReturnStablecoin,
98
+ valueMap: {},
99
+ };
100
+ const MsgLiquidateCollateralWithCdpTokens = {
101
+ aminoType: TxTypes.LiquidateCollateralWithCdpTokens,
102
+ valueMap: {},
103
+ };
104
+ const MsgLiquidateCollateralWithCollateral = {
105
+ aminoType: TxTypes.LiquidateCollateralWithCollateral,
106
+ valueMap: {},
107
+ };
108
+ const MsgLiquidateCollateralWithStablecoin = {
109
+ aminoType: TxTypes.LiquidateCollateralWithStablecoin,
110
+ valueMap: {},
111
+ };
112
+ const MsgCreateRewardScheme = {
113
+ aminoType: TxTypes.CreateRewardScheme,
44
114
  valueMap: {
45
- vaultTypeId: utils_1.ConvertEncType.Long,
115
+ createRewardSchemeParams: {
116
+ startTime: utils_1.ConvertEncType.Date,
117
+ endTime: utils_1.ConvertEncType.Date,
118
+ },
46
119
  },
47
120
  };
48
- const MsgRemoveDebt = {
49
- aminoType: TxTypes.RemoveDebt,
121
+ const MsgUpdateRewardScheme = {
122
+ aminoType: TxTypes.UpdateRewardScheme,
50
123
  valueMap: {
51
- vaultTypeId: utils_1.ConvertEncType.Long,
124
+ updateRewardSchemeParams: {
125
+ rewardSchemeId: utils_1.ConvertEncType.Long,
126
+ startTime: utils_1.ConvertEncType.Date,
127
+ endTime: utils_1.ConvertEncType.Date,
128
+ },
52
129
  },
53
130
  };
131
+ const MsgClaimRewards = {
132
+ aminoType: TxTypes.ClaimRewards,
133
+ valueMap: {},
134
+ };
135
+ const MsgSetStablecoinMintCap = {
136
+ aminoType: TxTypes.SetStablecoinMintCap,
137
+ valueMap: {},
138
+ };
139
+ const MsgSetStalePriceGracePeriod = {
140
+ aminoType: TxTypes.SetStalePriceGracePeriod,
141
+ valueMap: {},
142
+ };
143
+ const MsgSetCdpPaused = {
144
+ aminoType: TxTypes.SetCdpPaused,
145
+ valueMap: {},
146
+ };
54
147
  const CdpAmino = {
55
- [CarbonTx.Types.MsgAddCollateral]: (0, utils_1.generateAminoType)(MsgAddCollateral),
56
- [CarbonTx.Types.MsgRemoveCollateral]: (0, utils_1.generateAminoType)(MsgRemoveCollateral),
57
- [CarbonTx.Types.MsgAddDebt]: (0, utils_1.generateAminoType)(MsgAddDebt),
58
- [CarbonTx.Types.MsgRemoveDebt]: (0, utils_1.generateAminoType)(MsgRemoveDebt),
148
+ [CarbonTx.Types.MsgSupplyAsset]: utils_1.generateAminoType(MsgSupplyAsset),
149
+ [CarbonTx.Types.MsgWithdrawAsset]: utils_1.generateAminoType(MsgWithdrawAsset),
150
+ [CarbonTx.Types.MsgLockCollateral]: utils_1.generateAminoType(MsgLockCollateral),
151
+ [CarbonTx.Types.MsgUnlockCollateral]: utils_1.generateAminoType(MsgUnlockCollateral),
152
+ [CarbonTx.Types.MsgBorrowAsset]: utils_1.generateAminoType(MsgBorrowAsset),
153
+ [CarbonTx.Types.MsgRepayAsset]: utils_1.generateAminoType(MsgRepayAsset),
154
+ [CarbonTx.Types.MsgSupplyAssetAndLockCollateral]: utils_1.generateAminoType(MsgSupplyAssetAndLockCollateral),
155
+ [CarbonTx.Types.MsgUnlockCollateralAndWithdrawAsset]: utils_1.generateAminoType(MsgUnlockCollateralAndWithdrawAsset),
156
+ [CarbonTx.Types.MsgLiquidateCollateral]: utils_1.generateAminoType(MsgLiquidateCollateral),
157
+ [CarbonTx.Types.MsgRepayAssetWithCdpTokens]: utils_1.generateAminoType(MsgRepayAssetWithCdpTokens),
158
+ [CarbonTx.Types.MsgRepayAssetWithCollateral]: utils_1.generateAminoType(MsgRepayAssetWithCollateral),
159
+ [CarbonTx.Types.MsgMintStablecoin]: utils_1.generateAminoType(MsgMintStablecoin),
160
+ [CarbonTx.Types.MsgReturnStablecoin]: utils_1.generateAminoType(MsgReturnStablecoin),
161
+ [CarbonTx.Types.MsgLiquidateCollateralWithCdpTokens]: utils_1.generateAminoType(MsgLiquidateCollateralWithCdpTokens),
162
+ [CarbonTx.Types.MsgLiquidateCollateralWithCollateral]: utils_1.generateAminoType(MsgLiquidateCollateralWithCollateral),
163
+ [CarbonTx.Types.MsgLiquidateCollateralWithStablecoin]: utils_1.generateAminoType(MsgLiquidateCollateralWithStablecoin),
164
+ [CarbonTx.Types.MsgCreateRewardScheme]: utils_1.generateAminoType(MsgCreateRewardScheme),
165
+ [CarbonTx.Types.MsgUpdateRewardScheme]: utils_1.generateAminoType(MsgUpdateRewardScheme),
166
+ [CarbonTx.Types.MsgClaimRewards]: utils_1.generateAminoType(MsgClaimRewards),
167
+ [CarbonTx.Types.MsgSetStablecoinMintCap]: utils_1.generateAminoType(MsgSetStablecoinMintCap),
168
+ [CarbonTx.Types.MsgSetStalePriceGracePeriod]: utils_1.generateAminoType(MsgSetStalePriceGracePeriod),
169
+ [CarbonTx.Types.MsgSetCdpPaused]: utils_1.generateAminoType(MsgSetCdpPaused),
59
170
  };
60
171
  exports.default = CdpAmino;
@@ -34,7 +34,7 @@ const MsgMintToken = {
34
34
  valueMap: {},
35
35
  };
36
36
  const CoinAmino = {
37
- [CarbonTx.Types.MsgWithdraw]: (0, utils_1.generateAminoType)(MsgWithdraw),
38
- [CarbonTx.Types.MsgMintToken]: (0, utils_1.generateAminoType)(MsgMintToken),
37
+ [CarbonTx.Types.MsgWithdraw]: utils_1.generateAminoType(MsgWithdraw),
38
+ [CarbonTx.Types.MsgMintToken]: utils_1.generateAminoType(MsgMintToken),
39
39
  };
40
40
  exports.default = CoinAmino;
@@ -172,7 +172,7 @@ const SettlementPrice = {
172
172
  };
173
173
  ;
174
174
  const preProcessAmino = (value, valueMap) => {
175
- return (0, utils_1.mapEachIndiv)(value, valueMap, false);
175
+ return utils_1.mapEachIndiv(value, valueMap, false);
176
176
  };
177
177
  const checkDecodeProposal = (content, amino) => {
178
178
  const decodedValue = util_1.GovUtils.decodeContent(content);
@@ -403,8 +403,8 @@ const proposalAminoProcess = {
403
403
  },
404
404
  };
405
405
  const GovAmino = {
406
- [CarbonTx.Types.MsgSubmitProposal]: (0, utils_1.generateAminoType)(SubmitProposalMsg, proposalAminoProcess),
407
- [CarbonTx.Types.MsgDeposit]: (0, utils_1.generateAminoType)(MsgDeposit),
408
- [CarbonTx.Types.MsgVote]: (0, utils_1.generateAminoType)(MsgVote),
406
+ [CarbonTx.Types.MsgSubmitProposal]: utils_1.generateAminoType(SubmitProposalMsg, proposalAminoProcess),
407
+ [CarbonTx.Types.MsgDeposit]: utils_1.generateAminoType(MsgDeposit),
408
+ [CarbonTx.Types.MsgVote]: utils_1.generateAminoType(MsgVote),
409
409
  };
410
410
  exports.default = GovAmino;
@@ -55,6 +55,6 @@ const pruneTransferProcess = {
55
55
  },
56
56
  };
57
57
  const IbcAmino = {
58
- [CarbonTx.Types.MsgTransfer]: (0, utils_1.generateAminoType)(MsgTransfer, pruneTransferProcess),
58
+ [CarbonTx.Types.MsgTransfer]: utils_1.generateAminoType(MsgTransfer, pruneTransferProcess),
59
59
  };
60
60
  exports.default = IbcAmino;
@@ -31,6 +31,6 @@ const MsgSetLeverage = {
31
31
  },
32
32
  };
33
33
  const LeverageAmino = {
34
- [CarbonTx.Types.MsgSetLeverage]: (0, utils_1.generateAminoType)(MsgSetLeverage),
34
+ [CarbonTx.Types.MsgSetLeverage]: utils_1.generateAminoType(MsgSetLeverage),
35
35
  };
36
36
  exports.default = LeverageAmino;