carbon-js-sdk 0.3.49 → 0.3.50
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.
- package/lib/codec/broker/event.d.ts +13 -7
- package/lib/codec/broker/event.js +181 -93
- package/lib/codec/cdp/asset_params.d.ts +17 -0
- package/lib/codec/cdp/asset_params.js +148 -1
- package/lib/codec/cdp/tx.d.ts +2 -2
- package/lib/codec/cdp/tx.js +5 -5
- package/lib/codec/ibc/applications/interchain_accounts/controller/export.d.ts +1 -1
- package/lib/codec/ibc/applications/interchain_accounts/controller/export.js +3 -1
- package/lib/codec/ibc/applications/interchain_accounts/controller/v1/query.d.ts +26 -0
- package/lib/codec/ibc/applications/interchain_accounts/controller/v1/query.js +113 -1
- package/lib/codec/ibc/applications/transfer/v1/export.d.ts +1 -1
- package/lib/codec/ibc/applications/transfer/v1/export.js +3 -1
- package/lib/codec/ibc/applications/transfer/v1/query.d.ts +30 -1
- package/lib/codec/ibc/applications/transfer/v1/query.js +110 -1
- package/lib/codec/ibc/applications/transfer/v1/tx.d.ts +8 -4
- package/lib/codec/ibc/applications/transfer/v1/tx.js +35 -6
- package/lib/codec/ibc/applications/transfer/v2/packet.d.ts +2 -0
- package/lib/codec/ibc/applications/transfer/v2/packet.js +14 -1
- package/lib/codec/ibc/core/channel/v1/tx.d.ts +12 -10
- package/lib/codec/ibc/core/channel/v1/tx.js +50 -25
- package/lib/codec/ibc/core/client/v1/export.d.ts +1 -1
- package/lib/codec/ibc/core/client/v1/export.js +3 -1
- package/lib/codec/ibc/core/client/v1/query.d.ts +37 -0
- package/lib/codec/ibc/core/client/v1/query.js +137 -1
- package/lib/codec/ibc/lightclients/tendermint/v1/tendermint.d.ts +6 -4
- package/lib/codec/index.d.ts +1 -1
- package/lib/codec/index.js +13 -12
- package/lib/codec/{evmmerge/event.d.ts → liquiditypool/legacy.d.ts} +9 -11
- package/lib/codec/liquiditypool/legacy.js +64 -0
- package/lib/modules/admin.d.ts +8 -1
- package/lib/modules/admin.js +8 -8
- package/lib/websocket/models.d.ts +18 -0
- package/package.json +1 -1
- package/lib/clients/EvmIbcClient.d.ts +0 -86
- package/lib/clients/EvmIbcClient.js +0 -90
- package/lib/codec/ethermint/crypto/v1/ethsecp256k1/keys.d.ts +0 -39
- package/lib/codec/ethermint/crypto/v1/ethsecp256k1/keys.js +0 -138
- package/lib/codec/ethermint/evm/v1/evm.d.ts +0 -239
- package/lib/codec/ethermint/evm/v1/evm.js +0 -1140
- package/lib/codec/ethermint/evm/v1/genesis.d.ts +0 -43
- package/lib/codec/ethermint/evm/v1/genesis.js +0 -153
- package/lib/codec/ethermint/evm/v1/query.d.ts +0 -424
- package/lib/codec/ethermint/evm/v1/query.js +0 -1637
- package/lib/codec/ethermint/evm/v1/tx.d.ts +0 -183
- package/lib/codec/ethermint/evm/v1/tx.js +0 -836
- package/lib/codec/ethermint/feemarket/v1/feemarket.d.ts +0 -41
- package/lib/codec/ethermint/feemarket/v1/feemarket.js +0 -149
- package/lib/codec/ethermint/feemarket/v1/genesis.d.ts +0 -26
- package/lib/codec/ethermint/feemarket/v1/genesis.js +0 -79
- package/lib/codec/ethermint/feemarket/v1/query.d.ts +0 -100
- package/lib/codec/ethermint/feemarket/v1/query.js +0 -276
- package/lib/codec/ethermint/types/v1/account.d.ts +0 -26
- package/lib/codec/ethermint/types/v1/account.js +0 -78
- package/lib/codec/ethermint/types/v1/dynamic_fee.d.ts +0 -20
- package/lib/codec/ethermint/types/v1/dynamic_fee.js +0 -60
- package/lib/codec/ethermint/types/v1/indexer.d.ts +0 -41
- package/lib/codec/ethermint/types/v1/indexer.js +0 -153
- package/lib/codec/ethermint/types/v1/web3.d.ts +0 -36
- package/lib/codec/ethermint/types/v1/web3.js +0 -124
- package/lib/codec/evmbank/genesis.d.ts +0 -32
- package/lib/codec/evmbank/genesis.js +0 -152
- package/lib/codec/evmbank/query.d.ts +0 -40
- package/lib/codec/evmbank/query.js +0 -116
- package/lib/codec/evmmerge/event.js +0 -90
- package/lib/codec/evmmerge/genesis.d.ts +0 -48
- package/lib/codec/evmmerge/genesis.js +0 -216
- package/lib/codec/evmmerge/offchain.d.ts +0 -22
- package/lib/codec/evmmerge/offchain.js +0 -105
- package/lib/codec/evmmerge/query.d.ts +0 -43
- package/lib/codec/evmmerge/query.js +0 -117
- package/lib/codec/evmmerge/tx.d.ts +0 -45
- package/lib/codec/evmmerge/tx.js +0 -128
- package/lib/codec/ibc/applications/fee/v1/ack.d.ts +0 -24
- package/lib/codec/ibc/applications/fee/v1/ack.js +0 -125
- package/lib/codec/ibc/applications/fee/v1/fee.d.ts +0 -68
- package/lib/codec/ibc/applications/fee/v1/fee.js +0 -289
- package/lib/codec/ibc/applications/fee/v1/genesis.d.ts +0 -93
- package/lib/codec/ibc/applications/fee/v1/genesis.js +0 -390
- package/lib/codec/ibc/applications/fee/v1/metadata.d.ts +0 -25
- package/lib/codec/ibc/applications/fee/v1/metadata.js +0 -71
- package/lib/codec/ibc/applications/fee/v1/query.d.ts +0 -312
- package/lib/codec/ibc/applications/fee/v1/query.js +0 -1187
- package/lib/codec/ibc/applications/fee/v1/tx.d.ts +0 -171
- package/lib/codec/ibc/applications/fee/v1/tx.js +0 -524
- package/lib/codec/ibc/applications/interchain_accounts/controller/v1/tx.d.ts +0 -78
- package/lib/codec/ibc/applications/interchain_accounts/controller/v1/tx.js +0 -296
- package/lib/codec/ibc/applications/interchain_accounts/genesis/v1/genesis.d.ts +0 -80
- package/lib/codec/ibc/applications/interchain_accounts/genesis/v1/genesis.js +0 -439
- package/lib/util/ethermint/evm-ibc.d.ts +0 -97
- package/lib/util/ethermint/evm-ibc.js +0 -134
- package/lib/util/ethermint/index.d.ts +0 -3
- package/lib/util/ethermint/index.js +0 -12
- package/lib/util/ethermint/keys.d.ts +0 -39
- package/lib/util/ethermint/keys.js +0 -138
- package/lib/util/ethermint/web3.d.ts +0 -36
- package/lib/util/ethermint/web3.js +0 -124
package/lib/codec/index.js
CHANGED
|
@@ -24,18 +24,18 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
exports.QueryOrderAllocatedMarginRequest = exports.QueryOrderParamsResponse = exports.QueryOrderParamsRequest = exports.QueryAccountOpenOrdersResponse = exports.QueryAccountOpenOrdersRequest = exports.QueryAllOrderResponse = exports.QueryAllOrderRequest = exports.QueryGetOrderResponse = exports.QueryGetOrderRequest = exports.Orders = exports.OrderIDs = exports.OrderIDsForMarket = exports.OrdersForMarket = exports.DBOrder = exports.Order = exports.OrderParams = exports.MsgCancelAllResponse = exports.MsgCancelAll = exports.MsgCancelOrderResponse = exports.MsgCancelOrder = exports.MsgEditOrderResponse = exports.MsgEditOrder = exports.MsgCreateOrderResponse = exports.MsgCreateOrder = exports.MsgSetTradingFlagResponse = exports.MsgSetTradingFlag = exports.Address = exports.QueryModuleAddressResponse = exports.QueryModuleAddressRequest = exports.QueryAllModuleAddressResponse_AddressesEntry = exports.QueryAllModuleAddressResponse = exports.QueryAllModuleAddressRequest = exports.QueryAllBlockResponse = exports.QueryAllBlockRequest = exports.QueryAllTransactionResponse = exports.QueryAllTransactionRequest = exports.QueryAllMessageTypeResponse = exports.QueryAllMessageTypeRequest = exports.QuerySearchResponse = exports.QuerySearchRequest = exports.AccountTrade = exports.APITransaction = exports.Transaction = exports.MessageType = exports.Message = exports.Block = exports.TxTypes = exports.registry = exports.PolyNetwork = exports.IBC = void 0;
|
|
26
26
|
exports.MsgSetMinimumCloseFactor = exports.MsgSetCompleteLiquidationThresholdResponse = exports.MsgSetCompleteLiquidationThreshold = exports.MsgReturnStablecoinResponse = exports.MsgReturnStablecoin = exports.MsgMintStablecoinResponse = exports.MsgMintStablecoin = exports.MsgSetStablecoinMintCapResponse = exports.MsgSetStablecoinMintCap = exports.MsgSetStablecoinInterestRateResponse = exports.MsgSetStablecoinInterestRate = exports.MsgRepayAssetWithCollateralResponse = exports.MsgRepayAssetWithCollateral = exports.MsgRepayAssetWithCdpTokensResponse = exports.MsgRepayAssetWithCdpTokens = exports.MsgSetInterestFeeResponse = exports.MsgSetInterestFee = exports.MsgSetLiquidationFeeResponse = exports.MsgSetLiquidationFee = exports.MsgLiquidateCollateralResponse = exports.MsgLiquidateCollateral = exports.MsgUnlockCollateralAndWithdrawAssetResponse = exports.MsgUnlockCollateralAndWithdrawAsset = exports.MsgSupplyAssetAndLockCollateralResponse = exports.MsgSupplyAssetAndLockCollateral = exports.MsgRepayAssetResponse = exports.MsgRepayAsset = exports.MsgBorrowAssetResponse = exports.MsgBorrowAsset = exports.MsgUnlockCollateralResponse = exports.MsgUnlockCollateral = exports.MsgLockCollateralResponse = exports.MsgLockCollateral = exports.MsgWithdrawAssetResponse = exports.MsgWithdrawAsset = exports.MsgSupplyAssetResponse = exports.MsgSupplyAsset = exports.MsgUpdateAssetResponse = exports.MsgUpdateAsset = exports.MsgAddAssetResponse = exports.MsgAddAsset = exports.MsgRemoveRateStrategyResponse = exports.MsgRemoveRateStrategy = exports.MsgUpdateRateStrategyResponse = exports.MsgUpdateRateStrategy = exports.MsgAddRateStrategyResponse = exports.MsgAddRateStrategy = exports.DebtInfo = exports.OrderEvent = exports.QueryOrderAllocatedMarginResponse = void 0;
|
|
27
|
-
exports.
|
|
28
|
-
exports.
|
|
29
|
-
exports.
|
|
30
|
-
exports.
|
|
31
|
-
exports.
|
|
32
|
-
exports.
|
|
33
|
-
exports.
|
|
34
|
-
exports.
|
|
35
|
-
exports.
|
|
36
|
-
exports.
|
|
37
|
-
exports.
|
|
38
|
-
exports.MsgExecuteContract = exports.SetBackfillTimeIntervalEvent = exports.SetStaleIndexAllowanceEvent = exports.SetSmoothenBandEvent = exports.SetImpactBandEvent = exports.TokenPriceUpdateEvent = exports.PriceUpdateEvent = exports.ParamsV2130 = exports.QueryTokenPriceAllResponse = exports.QueryTokenPriceAllRequest = exports.QueryTokenPriceResponse = void 0;
|
|
27
|
+
exports.QueryAccountCollateralAllResponse = exports.QueryAccountCollateralAllRequest = exports.QueryAccountCollateralResponse = exports.QueryAccountCollateralRequest = exports.QueryAccountDataResponse = exports.QueryAccountDataRequest = exports.QueryRateStrategyAllResponse = exports.QueryRateStrategyAllRequest = exports.QueryRateStrategyResponse = exports.QueryRateStrategyRequest = exports.QueryCdpParamsResponse = exports.QueryCdpParamsRequest = exports.RewardDebt = exports.UpdateRewardSchemeParams = exports.CreateRewardSchemeParams = exports.RewardScheme = exports.StablecoinDebtInfo = exports.RateStrategyParams = exports.UpdateAssetParams = exports.AssetUtilization = exports.AssetParams = exports.MsgConvertTokenInCdpToGroupTokensResponse = exports.MsgConvertTokenInCdpToGroupTokens = exports.MsgLiquidateCollateralWithStablecoinAndInterestInCollateralResponse = exports.MsgLiquidateCollateralWithStablecoinAndInterestInCollateral = exports.MsgLiquidateCollateralWithStablecoinAndInterestInCdpTokensResponse = exports.MsgLiquidateCollateralWithStablecoinAndInterestInCdpTokens = exports.MsgReturnStablecoinWithInterestInCdpTokensResponse = exports.MsgReturnStablecoinWithInterestInCdpTokens = exports.MsgReturnStablecoinWithInterestInCollateralResponse = exports.MsgReturnStablecoinWithInterestInCollateral = exports.MsgSetCdpPausedResponse = exports.MsgSetCdpPaused = exports.MsgSetStalePriceGracePeriodResponse = exports.MsgSetStalePriceGracePeriod = exports.MsgClaimRewardsResponse = exports.MsgClaimRewards = exports.MsgUpdateRewardSchemeResponse = exports.MsgUpdateRewardScheme = exports.MsgCreateRewardSchemeResponse = exports.MsgCreateRewardScheme = exports.MsgLiquidateCollateralWithStablecoinResponse = exports.MsgLiquidateCollateralWithStablecoin = exports.MsgLiquidateCollateralWithCollateralResponse = exports.MsgLiquidateCollateralWithCollateral = exports.MsgLiquidateCollateralWithCdpTokensResponse = exports.MsgLiquidateCollateralWithCdpTokens = exports.MsgSetSmallLiquidationSizeResponse = exports.MsgSetSmallLiquidationSize = exports.MsgSetMinimumCloseFactorResponse = void 0;
|
|
28
|
+
exports.MintStablecoinEvent = exports.UpdateStablecoinDebtInfoEvent = exports.UpdateDebtInfoEvent = exports.UnlockCollateralEvent = exports.LockCollateralEvent = exports.RepayAssetEvent = exports.BorrowAssetEvent = exports.WithdrawAssetEvent = exports.SupplyAssetEvent = exports.SetCdpPausedEvent = exports.SetStalePriceGracePeriodEvent = exports.SetSmallLiquidationSizeEvent = exports.SetMinimumCloseFactorEvent = exports.SetCompleteLiquidationThresholdEvent = exports.SetStablecoinMintCapEvent = exports.SetStablecoinInterestRateEvent = exports.SetLiquidationFeeEvent = exports.SetInterestFeeEvent = exports.UpdateAssetParamsEvent = exports.NewAssetParamsEvent = exports.RemoveRateStrategyParamsEvent = exports.UpdateRateStrategyParamsEvent = exports.NewRateStrategyParamsEvent = exports.QueryRewardDebtsAllRequest = exports.QueryRewardDebtsResponse = exports.QueryRewardDebtsRequest = exports.QueryRewardSchemesAllResponse = exports.QueryRewardSchemesAllRequest = exports.QueryCdpPositionsResponse = exports.QueryCdpPositionsRequest = exports.CdpPosition = exports.CdpPositionItem = exports.QueryStablecoinDebtResponse = exports.QueryStablecoinDebtRequest = exports.QueryTokenDebtAllResponse = exports.QueryTokenDebtAllRequest = exports.QueryTokenDebtResponse = exports.QueryTokenDebtRequest = exports.QueryAssetAllResponse = exports.QueryAssetAllRequest = exports.QueryAssetResponse = exports.QueryAssetRequest = exports.QueryAccountStablecoinResponse = exports.QueryAccountStablecoinRequest = exports.Debt = exports.QueryAccountDebtAllResponse = exports.QueryAccountDebtAllRequest = exports.QueryAccountDebtResponse = exports.QueryAccountDebtRequest = exports.Collateral = void 0;
|
|
29
|
+
exports.MsgRemoveMinGasPrice = exports.MsgRemoveGasCostResponse = exports.MsgRemoveGasCost = exports.MsgSetMinGasPriceResponse = exports.MsgSetMinGasPrice = exports.MsgSetGasCostResponse = exports.MsgSetGasCost = exports.IncomingPoolSwap = exports.TradeEvent = exports.QueryTradesForPositionResponse = exports.QueryTradesForPositionRequest = exports.QueryTradesResponse = exports.QueryTradesRequest = exports.QueryCandlesticksResponse = exports.QueryCandlesticksRequest = exports.Amm = exports.Candlestick = exports.MinMaxBoundary = exports.IncomingLiquidations = exports.MsgInitiateLiquidationResponse = exports.MsgInitiateLiquidation = exports.LiquidatorPosition = exports.CompressedNonExistenceProof = exports.CompressedExistenceProof = exports.CompressedBatchEntry = exports.CompressedBatchProof = exports.BatchEntry = exports.BatchProof = exports.InnerSpec = exports.ProofSpec = exports.InnerOp = exports.LeafOp = exports.CommitmentProof = exports.NonExistenceProof = exports.ExistenceProof = exports.lengthOpToJSON = exports.lengthOpFromJSON = exports.LengthOp = exports.hashOpToJSON = exports.hashOpFromJSON = exports.HashOp = exports.CdpParams = exports.RefundReserveEvent = exports.AddReserveEvent = exports.RewardSchemeEvent = exports.RewardDebtEvent = exports.ClaimRewardEvent = exports.LiquidateCollateralWithStablecoinEvent = exports.LiquidateCollateralEvent = exports.ReturnStablecoinEvent = void 0;
|
|
30
|
+
exports.QueryGetPositionRequest = exports.PositionAllocatedMargin = exports.APIPosition = exports.Positions = exports.Position = exports.MsgSetMarginResponse = exports.MsgSetMargin = exports.Duration = exports.BytesValue = exports.StringValue = exports.BoolValue = exports.UInt32Value = exports.Int32Value = exports.UInt64Value = exports.Int64Value = exports.FloatValue = exports.DoubleValue = exports.Timestamp = exports.Any = exports.QueryLiquidationParamsResponse = exports.QueryLiquidationParamsRequest = exports.QueryAllLiquidationResponse = exports.QueryAllLiquidationRequest = exports.OutstandingPositions = exports.OutstandingPosition = exports.QuoteChanges = exports.LiquidationParams = exports.CoinSent = exports.CoinReceived = exports.CoinSpent = exports.QueryInternalTransfersResponse = exports.QueryInternalTransfersRequest = exports.InternalTransfer = exports.FeeDeductionEvent = exports.QueryAllMinGasPriceResponse = exports.QueryAllMinGasPriceRequest = exports.QueryGetMinGasPriceResponse = exports.QueryGetMinGasPriceRequest = exports.QueryAllMsgGasCostResponse = exports.QueryAllMsgGasCostRequest = exports.QueryGetMsgGasCostResponse = exports.QueryGetMsgGasCostRequest = exports.RemoveMinGasPriceProposal = exports.RemoveMsgGasCostProposal = exports.SetMinGasPriceProposal = exports.SetMsgGasCostProposal = exports.MinGasPrice = exports.MsgGasCost = exports.MsgFee = exports.MsgRemoveMinGasPriceResponse = void 0;
|
|
31
|
+
exports.QueryCrisisParamsResponse = exports.QueryCrisisParamsRequest = exports.OracleSlashEvent = exports.ResultEvent = exports.QueryOracleParamsResponse = exports.QueryOracleParamsRequest = exports.QueryOracleVotesWindowResponse = exports.QueryOracleVotesWindowRequest = exports.QueryAllOracleVotesWindowResponse = exports.QueryAllOracleVotesWindowRequest = exports.QuerySlashCounterResponse = exports.QuerySlashCounterRequest = exports.QueryAllSlashCounterResponse = exports.QueryAllSlashCounterRequest = exports.QueryVoterPowerResponse = exports.QueryVoterPowerRequest = exports.QueryAllVoteResponse = exports.QueryAllVoteRequest = exports.QueryAllResultResponse = exports.QueryAllResultRequest = exports.QueryAllOracleResponse = exports.QueryAllOracleRequest = exports.QueryOracleResponse = exports.QueryOracleRequest = exports.CreateOracleProposal = exports.SlashCounter = exports.OracleVotesWindow = exports.Mark = exports.Result = exports.Vote = exports.Oracle = exports.OracleParams = exports.MsgSetOracleSlashEnabledResponse = exports.MsgSetOracleSlashEnabled = exports.MsgRemoveOracleResponse = exports.MsgRemoveOracle = exports.MsgUpdateOracleResponse = exports.UpdateOracleParams = exports.MsgUpdateOracle = exports.MsgCreateVoteResponse = exports.MsgCreateVote = exports.MsgCreateOracleResponse = exports.CreateOracleParams = exports.MsgCreateOracle = exports.PositionEvent = exports.QueryPositionAllocatedMarginResponse = exports.QueryPositionAllocatedMarginRequest = exports.QueryAllPositionResponse = exports.QueryAllPositionRequest = exports.QueryGetPositionResponse = void 0;
|
|
32
|
+
exports.MsgUpdateGroupedTokenConfig = exports.MsgWithdrawFromGroupResponse = exports.MsgWithdrawFromGroup = exports.MsgDepositToGroupResponse = exports.MsgDepositToGroup = exports.MsgDeregisterFromGroupResponse = exports.MsgDeregisterFromGroup = exports.MsgRegisterToGroupResponse = exports.MsgRegisterToGroup = exports.MsgUpdateGroupResponse = exports.UpdateGroupParams = exports.MsgUpdateGroup = exports.MsgCreateGroupResponse = exports.MsgCreateGroup = exports.MsgRemoveBridgeAddressResponse = exports.MsgRemoveBridgeAddress = exports.MsgAddBridgeAddressResponse = exports.MsgAddBridgeAddress = exports.MsgUpdateTokenResponse = exports.UpdateTokenParams = exports.MsgUpdateToken = exports.MsgRemoveBridgeResponse = exports.MsgRemoveBridge = exports.MsgEditBridgeNameResponse = exports.MsgEditBridgeName = exports.MsgDeauthorizeBridgeResponse = exports.MsgDeauthorizeBridge = exports.MsgAuthorizeBridgeResponse = exports.MsgAuthorizeBridge = exports.MsgWithdrawResponse = exports.MsgWithdraw = exports.MsgLinkTokenResponse = exports.MsgLinkToken = exports.MsgUnbindTokenResponse = exports.MsgUnbindToken = exports.MsgBindTokenResponse = exports.MsgBindToken = exports.MsgMintTokenResponse = exports.MsgMintToken = exports.MsgSyncTokenResponse = exports.MsgSyncToken = exports.MsgCreateTokenResponse = exports.CreateTokenParams = exports.MsgCreateToken = exports.MarketStats = exports.MarketstatsParams = exports.QueryMarketStatsResponse = exports.QueryMarketStatsRequest = exports.QueryMarketstatsParamsResponse = exports.QueryMarketstatsParamsRequest = void 0;
|
|
33
|
+
exports.WithdrawFromGroupEvent = exports.DepositToGroupEvent = exports.SetGroupedTokenConfigEvent = exports.DeregisterFromGroupEvent = exports.RegisterToGroupEvent = exports.UpdateGroupEvent = exports.NewGroupEvent = exports.LinkTokenEvent = exports.UnbindTokenEvent = exports.BindTokenEvent = exports.SyncTokenEvent = exports.NewTokenEvent = exports.TokenBalance = exports.PositionPool = exports.LockedCoinsRecord = exports.LockedCoins = exports.Metadata = exports.BalanceChange = exports.Token = exports.QueryTokenGroupMappingsResponse_TokenGroupMappingsEntry = exports.QueryTokenGroupMappingsResponse = exports.QueryTokenGroupMappingsRequest = exports.QueryAllTokenGroupsResponse = exports.QueryAllTokenGroupsRequest = exports.QueryGetTokenGroupResponse = exports.QueryGetTokenGroupRequest = exports.QueryAllBridgeResponse = exports.QueryAllBridgeRequest = exports.QueryGetBridgeResponse = exports.QueryGetBridgeRequest = exports.QueryTotalBalancesResponse = exports.QueryTotalBalancesRequest = exports.QueryGetBalancesResponse = exports.QueryGetBalancesRequest = exports.QueryAllWrapperMappingsResponse_WrapperMappingsEntry = exports.QueryAllWrapperMappingsResponse = exports.QueryAllWrapperMappingsRequest = exports.QueryGetLockedCoinsResponse = exports.QueryGetLockedCoinsRequest = exports.QueryAllTokenResponse = exports.QueryAllTokenRequest = exports.QueryGetTokenResponse = exports.QueryGetTokenRequest = exports.Bridge = exports.CreateTokenProposal = exports.GroupedTokenConfig = exports.TokenGroupDetails = exports.TokenGroup = exports.MsgUpdateGroupedTokenConfigResponse = exports.UpdateGroupedTokenConfigParams = void 0;
|
|
34
|
+
exports.CreateMarketProposal = exports.MsgUpdatePerpetualsFundingIntervalResponse = exports.MsgUpdatePerpetualsFundingInterval = exports.MsgUpdateMarketResponse = exports.MsgUpdateMarket = exports.MsgCreateMarketResponse = exports.MsgCreateMarket = exports.OrderBookEvent = exports.QueryAllBookResponse = exports.QueryAllBookRequest = exports.QueryGetBookResponse = exports.QueryGetBookRequest = exports.QueryImpactPriceResponse = exports.QueryImpactPriceRequest = exports.StopBook = exports.OrderBook = exports.OrderBookLevel = exports.GenesisSubAccount = exports.SubAccount = exports.QuerySubAccountPowerResponse = exports.QuerySubAccountPowerRequest = exports.QuerySubAccountStatusResponse = exports.QuerySubAccountStatusRequest = exports.QueryAllSubAccountResponse = exports.QueryAllSubAccountRequest = exports.QueryGetSubAccountResponse = exports.QueryGetSubAccountRequest = exports.MsgRemoveSubAccountResponse = exports.MsgRemoveSubAccount = exports.MsgActivateSubAccountResponse = exports.MsgActivateSubAccount = exports.MsgCreateSubAccountResponse = exports.MsgCreateSubAccount = exports.UpdateProfileEvent = exports.QueryAllProfileResponse = exports.QueryAllProfileRequest = exports.QueryGetProfileResponse = exports.QueryGetProfileRequest = exports.Profile = exports.MsgUpdateProfileResponse = exports.MsgUpdateProfile = exports.LeverageEvent = exports.QueryAllLeverageResponse = exports.QueryAllLeverageRequest = exports.QueryGetLeverageResponse = exports.QueryGetLeverageRequest = exports.MsgSetLeverageResponse = exports.MsgSetLeverage = exports.MarketLeverageRecord = exports.MarketLeverage = void 0;
|
|
35
|
+
exports.MsgSetRewardCurve = exports.MsgClaimPoolRewardsResponse = exports.MsgClaimPoolRewards = exports.MsgUnstakePoolTokenResponse = exports.MsgUnstakePoolToken = exports.MsgStakePoolTokenResponse = exports.MsgStakePoolToken = exports.MsgSetRewardsWeightsResponse = exports.SetRewardsWeightsParams = exports.MsgSetRewardsWeights = exports.MsgUnlinkPoolResponse = exports.UnlinkPoolParams = exports.MsgUnlinkPool = exports.MsgLinkPoolResponse = exports.LinkPoolParams = exports.MsgLinkPool = exports.MsgRemoveLiquidityResponse = exports.MsgRemoveLiquidity = exports.MsgAddLiquidityResponse = exports.MsgAddLiquidity = exports.MsgCreatePoolWithLiquidityResponse = exports.MsgCreatePoolWithLiquidity = exports.MsgCreatePoolResponse = exports.MsgCreatePool = exports.PageResponse = exports.PageRequest = exports.QuerySequenceAllResponse = exports.QuerySequenceAllRequest = exports.QuerySequenceResponse = exports.QuerySequenceRequest = exports.MsgSetSequenceResponse = exports.MsgSetSequence = exports.QueryMintDataResponse = exports.QueryMintDataRequest = exports.MintData = exports.MarketEvent = exports.ParamsV280 = exports.ParamsV270 = exports.QueryMarketParamsResponse = exports.QueryMarketParamsRequest = exports.QueryAllMarketResponse = exports.QueryAllMarketRequest = exports.QueryGetMarketResponse = exports.QueryGetMarketRequest = exports.MarketParams = exports.Market = exports.ControlledParams = exports.MarketDefaultsParams = exports.UpdatePerpetualsFundingIntervalProposal = exports.UpdateMarketProposal = void 0;
|
|
36
|
+
exports.QueryLastClaimResponse = exports.QueryLastClaimRequest = exports.QueryAllCommitmentResponse = exports.QueryAllCommitmentRequest = exports.QueryCommitmentResponse = exports.QueryCommitmentRequest = exports.QueryRewardHistoryResponse = exports.ExtendedPool = exports.QueryRewardHistoryRequest = exports.QueryAllPoolResponse = exports.QueryAllPoolRequest = exports.QueryGetPoolResponse = exports.QueryGetPoolRequest = exports.UpdatePoolProposal = exports.SetRewardsWeightsProposal = exports.SetCommitmentCurveProposal = exports.SetRewardCurveProposal = exports.UnlinkPoolProposal = exports.LinkPoolProposal = exports.RemoveLiquidities = exports.RemoveLiquidity = exports.AddLiquidities = exports.AddLiquidity = exports.Pools = exports.Pool = exports.LiquiditypoolParams = exports.AllocatedRewards = exports.LastClaimRecord = exports.CommitmentExpiriesRecord = exports.CommitmentExpiries = exports.CommitmentExpiry = exports.RewardHistoryRecord = exports.RewardHistory = exports.CommitmentResponse = exports.TotalCommitmentRecord = exports.TotalCommitment = exports.CommitmentRecord = exports.Commitment = exports.RewardWeights = exports.RewardWeight = exports.CommitmentCurve = exports.RewardCurve = exports.MsgUpdatePoolResponse = exports.UpdatePoolParams = exports.MsgUpdatePool = exports.MsgSetCommitmentCurveResponse = exports.SetCommitmentCurveParams = exports.MsgSetCommitmentCurve = exports.MsgSetRewardCurveResponse = exports.SetRewardCurveParams = void 0;
|
|
37
|
+
exports.QueryPricingParamsResponse = exports.QueryPricingParamsRequest = exports.QueryRateResponse = exports.QueryRateRequest = exports.QueryAllPriceSetResponse = exports.QueryAllPriceSetRequest = exports.QueryPriceSetResponse = exports.QueryPriceSetRequest = exports.QueryPriceTokenResponse = exports.QueryPriceTokenRequest = exports.SettlementPriceParams = exports.SettlementPriceProposal = exports.TokenPrice = exports.PriceSet = exports.PricingParams = exports.MsgUpdateTokenPriceOracleResponse = exports.MsgUpdateTokenPriceOracle = exports.MsgSetStaleIndexAllowanceResponse = exports.MsgSetStaleIndexAllowance = exports.MsgSetImpactBandResponse = exports.MsgSetImpactBand = exports.MsgSetSmoothenBandResponse = exports.MsgSetSmoothenBand = exports.MsgSetBackfillTimeIntervalResponse = exports.MsgSetBackfillTimeInterval = exports.Fund = exports.FundByMarket = exports.EventDataInsuranceFundTransfer = exports.QueryCoinBalancesResponse = exports.QueryCoinBalancesRequest = exports.CommitmentEvent = exports.CommitmentCurveEvent = exports.RewardsWeightChangeEvent = exports.TotalCommitmentChangeEvent = exports.PoolEvent = exports.QueryAllPoolAddressResponse_AddressesEntry = exports.QueryAllPoolAddressResponse = exports.QueryAllPoolAddressRequest = exports.QueryLiquiditypoolParamsResponse = exports.QueryLiquiditypoolParamsRequest = exports.QueryClaimableRewardsResponse = exports.QueryClaimableRewardsRequest = exports.QueryAllTotalCommitmentResponse = exports.QueryAllTotalCommitmentRequest = exports.QueryTotalCommitmentResponse = exports.QueryTotalCommitmentRequest = exports.QueryRewardCurveResponse = exports.QueryRewardCurveRequest = exports.QueryCommitmentCurveResponse = exports.QueryCommitmentCurveRequest = void 0;
|
|
38
|
+
exports.MsgExecuteContract = exports.SetBackfillTimeIntervalEvent = exports.SetStaleIndexAllowanceEvent = exports.SetSmoothenBandEvent = exports.SetImpactBandEvent = exports.TokenPriceUpdateEvent = exports.PriceUpdateEvent = exports.ParamsV2130 = exports.QueryTokenPriceAllResponse = exports.QueryTokenPriceAllRequest = exports.QueryTokenPriceResponse = exports.QueryTokenPriceRequest = void 0;
|
|
39
39
|
// GENERATED by scripts/generate-registry.sh
|
|
40
40
|
const proto_signing_1 = require("@cosmjs/proto-signing");
|
|
41
41
|
const tx_1 = require("cosmjs-types/cosmwasm/wasm/v1/tx");
|
|
@@ -905,6 +905,7 @@ Object.defineProperty(exports, "MsgConvertTokenInCdpToGroupTokensResponse", { en
|
|
|
905
905
|
var asset_params_1 = require("./cdp/asset_params");
|
|
906
906
|
Object.defineProperty(exports, "AssetParams", { enumerable: true, get: function () { return asset_params_1.AssetParams; } });
|
|
907
907
|
Object.defineProperty(exports, "AssetUtilization", { enumerable: true, get: function () { return asset_params_1.AssetUtilization; } });
|
|
908
|
+
Object.defineProperty(exports, "UpdateAssetParams", { enumerable: true, get: function () { return asset_params_1.UpdateAssetParams; } });
|
|
908
909
|
var rate_strategy_params_1 = require("./cdp/rate_strategy_params");
|
|
909
910
|
Object.defineProperty(exports, "RateStrategyParams", { enumerable: true, get: function () { return rate_strategy_params_1.RateStrategyParams; } });
|
|
910
911
|
var stablecoin_debt_info_1 = require("./cdp/stablecoin_debt_info");
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import Long from "long";
|
|
2
2
|
import _m0 from "protobufjs/minimal";
|
|
3
|
-
export declare const protobufPackage = "Switcheo.carbon.
|
|
4
|
-
export interface
|
|
5
|
-
|
|
6
|
-
cosmosAddress: string;
|
|
7
|
-
newCosmosAccCreated: boolean;
|
|
3
|
+
export declare const protobufPackage = "Switcheo.carbon.liquiditypool";
|
|
4
|
+
export interface ParamsV2170 {
|
|
5
|
+
rewardReductionThreshold: Long;
|
|
8
6
|
}
|
|
9
|
-
export declare const
|
|
10
|
-
encode(message:
|
|
11
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined):
|
|
12
|
-
fromJSON(object: any):
|
|
13
|
-
toJSON(message:
|
|
14
|
-
fromPartial(object: DeepPartial<
|
|
7
|
+
export declare const ParamsV2170: {
|
|
8
|
+
encode(message: ParamsV2170, writer?: _m0.Writer): _m0.Writer;
|
|
9
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): ParamsV2170;
|
|
10
|
+
fromJSON(object: any): ParamsV2170;
|
|
11
|
+
toJSON(message: ParamsV2170): unknown;
|
|
12
|
+
fromPartial(object: DeepPartial<ParamsV2170>): ParamsV2170;
|
|
15
13
|
};
|
|
16
14
|
declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
17
15
|
export declare type DeepPartial<T> = T extends Builtin ? T : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ParamsV2170 = exports.protobufPackage = void 0;
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
const long_1 = __importDefault(require("long"));
|
|
9
|
+
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
10
|
+
exports.protobufPackage = "Switcheo.carbon.liquiditypool";
|
|
11
|
+
const baseParamsV2170 = { rewardReductionThreshold: long_1.default.UZERO };
|
|
12
|
+
exports.ParamsV2170 = {
|
|
13
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
14
|
+
if (!message.rewardReductionThreshold.isZero()) {
|
|
15
|
+
writer.uint32(8).uint64(message.rewardReductionThreshold);
|
|
16
|
+
}
|
|
17
|
+
return writer;
|
|
18
|
+
},
|
|
19
|
+
decode(input, length) {
|
|
20
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
21
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
22
|
+
const message = Object.assign({}, baseParamsV2170);
|
|
23
|
+
while (reader.pos < end) {
|
|
24
|
+
const tag = reader.uint32();
|
|
25
|
+
switch (tag >>> 3) {
|
|
26
|
+
case 1:
|
|
27
|
+
message.rewardReductionThreshold = reader.uint64();
|
|
28
|
+
break;
|
|
29
|
+
default:
|
|
30
|
+
reader.skipType(tag & 7);
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return message;
|
|
35
|
+
},
|
|
36
|
+
fromJSON(object) {
|
|
37
|
+
const message = Object.assign({}, baseParamsV2170);
|
|
38
|
+
message.rewardReductionThreshold =
|
|
39
|
+
object.rewardReductionThreshold !== undefined &&
|
|
40
|
+
object.rewardReductionThreshold !== null
|
|
41
|
+
? long_1.default.fromString(object.rewardReductionThreshold)
|
|
42
|
+
: long_1.default.UZERO;
|
|
43
|
+
return message;
|
|
44
|
+
},
|
|
45
|
+
toJSON(message) {
|
|
46
|
+
const obj = {};
|
|
47
|
+
message.rewardReductionThreshold !== undefined &&
|
|
48
|
+
(obj.rewardReductionThreshold = (message.rewardReductionThreshold || long_1.default.UZERO).toString());
|
|
49
|
+
return obj;
|
|
50
|
+
},
|
|
51
|
+
fromPartial(object) {
|
|
52
|
+
const message = Object.assign({}, baseParamsV2170);
|
|
53
|
+
message.rewardReductionThreshold =
|
|
54
|
+
object.rewardReductionThreshold !== undefined &&
|
|
55
|
+
object.rewardReductionThreshold !== null
|
|
56
|
+
? long_1.default.fromValue(object.rewardReductionThreshold)
|
|
57
|
+
: long_1.default.UZERO;
|
|
58
|
+
return message;
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
if (minimal_1.default.util.Long !== long_1.default) {
|
|
62
|
+
minimal_1.default.util.Long = long_1.default;
|
|
63
|
+
minimal_1.default.configure();
|
|
64
|
+
}
|
package/lib/modules/admin.d.ts
CHANGED
|
@@ -230,7 +230,14 @@ export declare namespace AdminModule {
|
|
|
230
230
|
asset: Asset;
|
|
231
231
|
}
|
|
232
232
|
interface UpdateAssetParams {
|
|
233
|
-
|
|
233
|
+
denom: string;
|
|
234
|
+
rateStrategyName?: string;
|
|
235
|
+
allowRepayStablecoinInterestDebt?: boolean;
|
|
236
|
+
loanToValue: BigNumber;
|
|
237
|
+
liquidationThreshold: BigNumber;
|
|
238
|
+
liquidationDiscount: BigNumber;
|
|
239
|
+
supplyCap: BigNumber;
|
|
240
|
+
borrowCap: BigNumber;
|
|
234
241
|
}
|
|
235
242
|
interface SetLiquidationFeeParams {
|
|
236
243
|
liquidationFee: BigNumber;
|
package/lib/modules/admin.js
CHANGED
|
@@ -469,14 +469,14 @@ class AdminModule extends base_1.default {
|
|
|
469
469
|
const value = codec_1.MsgUpdateAsset.fromPartial({
|
|
470
470
|
creator: wallet.bech32Address,
|
|
471
471
|
assetParams: {
|
|
472
|
-
denom: params.
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
loanToValue: params.
|
|
476
|
-
liquidationThreshold: params.
|
|
477
|
-
liquidationDiscount: params.
|
|
478
|
-
supplyCap: params.
|
|
479
|
-
borrowCap: params.
|
|
472
|
+
denom: params.denom,
|
|
473
|
+
rateStrategyName: params.rateStrategyName,
|
|
474
|
+
allowRepayStablecoinInterestDebt: params.allowRepayStablecoinInterestDebt,
|
|
475
|
+
loanToValue: params.loanToValue.toString(10),
|
|
476
|
+
liquidationThreshold: params.liquidationThreshold.toString(10),
|
|
477
|
+
liquidationDiscount: params.liquidationDiscount.toString(10),
|
|
478
|
+
supplyCap: params.supplyCap.toString(10),
|
|
479
|
+
borrowCap: params.borrowCap.toString(10),
|
|
480
480
|
},
|
|
481
481
|
});
|
|
482
482
|
return yield wallet.sendTx({
|
|
@@ -77,6 +77,24 @@ export interface AccountTrade {
|
|
|
77
77
|
quantity: string;
|
|
78
78
|
side: string;
|
|
79
79
|
trade_id: number;
|
|
80
|
+
id?: string;
|
|
81
|
+
liquidation?: string;
|
|
82
|
+
taker_id?: string;
|
|
83
|
+
taker_side?: string;
|
|
84
|
+
taker_address?: string;
|
|
85
|
+
taker_fee_amount?: string;
|
|
86
|
+
taker_fee_denom?: string;
|
|
87
|
+
taker_fee_kickback?: string;
|
|
88
|
+
taker_fee_commission?: string;
|
|
89
|
+
taker_fee_commission_address?: string;
|
|
90
|
+
maker_id?: string;
|
|
91
|
+
maker_side?: string;
|
|
92
|
+
maker_address?: string;
|
|
93
|
+
maker_fee_amount?: string;
|
|
94
|
+
maker_fee_denom?: string;
|
|
95
|
+
maker_fee_kickback?: string;
|
|
96
|
+
maker_fee_commission?: string;
|
|
97
|
+
maker_fee_commission_address?: string;
|
|
80
98
|
}
|
|
81
99
|
export interface Position {
|
|
82
100
|
market: string;
|
package/package.json
CHANGED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { Network } from "../constant";
|
|
2
|
-
import { StdSignDoc } from "@cosmjs/amino";
|
|
3
|
-
import { BlockchainUtils } from "../util";
|
|
4
|
-
declare type SupportedBlockchains = BlockchainUtils.Blockchain.Canto | BlockchainUtils.Blockchain.Evmos;
|
|
5
|
-
declare namespace EvmIbcClient {
|
|
6
|
-
interface TypedDomain {
|
|
7
|
-
name: string;
|
|
8
|
-
version: string;
|
|
9
|
-
chainId: number;
|
|
10
|
-
verifyingContract: string;
|
|
11
|
-
salt: string;
|
|
12
|
-
}
|
|
13
|
-
interface TypedDataV4 {
|
|
14
|
-
types: object;
|
|
15
|
-
primaryType: string;
|
|
16
|
-
message: StdSignDoc;
|
|
17
|
-
domain: TypedDomain;
|
|
18
|
-
}
|
|
19
|
-
const TYPED_DATA_REQUEST_METHOD = "eth_signTypedData_v4";
|
|
20
|
-
const DEFAULT_EIP712_TYPES: {
|
|
21
|
-
EIP712Domain: {
|
|
22
|
-
name: string;
|
|
23
|
-
type: string;
|
|
24
|
-
}[];
|
|
25
|
-
Tx: {
|
|
26
|
-
name: string;
|
|
27
|
-
type: string;
|
|
28
|
-
}[];
|
|
29
|
-
Fee: {
|
|
30
|
-
name: string;
|
|
31
|
-
type: string;
|
|
32
|
-
}[];
|
|
33
|
-
Coin: {
|
|
34
|
-
name: string;
|
|
35
|
-
type: string;
|
|
36
|
-
}[];
|
|
37
|
-
Msg: {
|
|
38
|
-
name: string;
|
|
39
|
-
type: string;
|
|
40
|
-
}[];
|
|
41
|
-
};
|
|
42
|
-
const getEvmChainId: (blockchain: SupportedBlockchains, network?: Network) => 7700 | 9001;
|
|
43
|
-
const getIbcTransferTypes: () => {
|
|
44
|
-
MsgValue: {
|
|
45
|
-
name: string;
|
|
46
|
-
type: string;
|
|
47
|
-
}[];
|
|
48
|
-
TypeToken: {
|
|
49
|
-
name: string;
|
|
50
|
-
type: string;
|
|
51
|
-
}[];
|
|
52
|
-
TypeTimeoutHeight: {
|
|
53
|
-
name: string;
|
|
54
|
-
type: string;
|
|
55
|
-
}[];
|
|
56
|
-
EIP712Domain: {
|
|
57
|
-
name: string;
|
|
58
|
-
type: string;
|
|
59
|
-
}[];
|
|
60
|
-
Tx: {
|
|
61
|
-
name: string;
|
|
62
|
-
type: string;
|
|
63
|
-
}[];
|
|
64
|
-
Fee: {
|
|
65
|
-
name: string;
|
|
66
|
-
type: string;
|
|
67
|
-
}[];
|
|
68
|
-
Coin: {
|
|
69
|
-
name: string;
|
|
70
|
-
type: string;
|
|
71
|
-
}[];
|
|
72
|
-
Msg: {
|
|
73
|
-
name: string;
|
|
74
|
-
type: string;
|
|
75
|
-
}[];
|
|
76
|
-
};
|
|
77
|
-
const getCosmosWeb3Domain: (blockchain: SupportedBlockchains) => {
|
|
78
|
-
name: string;
|
|
79
|
-
version: string;
|
|
80
|
-
chainId: number;
|
|
81
|
-
verifyingContract: string;
|
|
82
|
-
salt: string;
|
|
83
|
-
};
|
|
84
|
-
const getEIP712TypedData: (tx: StdSignDoc, blockchain: SupportedBlockchains, types?: object, domain?: EvmIbcClient.TypedDomain, primaryType?: string) => TypedDataV4;
|
|
85
|
-
}
|
|
86
|
-
export default EvmIbcClient;
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const constant_1 = require("../constant");
|
|
4
|
-
const util_1 = require("../util");
|
|
5
|
-
const _DEFAULT_EIP712_TYPES = {
|
|
6
|
-
EIP712Domain: [
|
|
7
|
-
{ name: 'name', type: 'string' },
|
|
8
|
-
{ name: 'version', type: 'string' },
|
|
9
|
-
{ name: 'chainId', type: 'uint256' },
|
|
10
|
-
{ name: 'verifyingContract', type: 'string' },
|
|
11
|
-
{ name: 'salt', type: 'string' },
|
|
12
|
-
],
|
|
13
|
-
Tx: [
|
|
14
|
-
{ name: 'account_number', type: 'string' },
|
|
15
|
-
{ name: 'chain_id', type: 'string' },
|
|
16
|
-
{ name: 'fee', type: 'Fee' },
|
|
17
|
-
{ name: 'memo', type: 'string' },
|
|
18
|
-
{ name: 'msgs', type: 'Msg[]' },
|
|
19
|
-
{ name: 'sequence', type: 'string' },
|
|
20
|
-
],
|
|
21
|
-
Fee: [
|
|
22
|
-
{ name: 'feePayer', type: 'string' },
|
|
23
|
-
{ name: 'amount', type: 'Coin[]' },
|
|
24
|
-
{ name: 'gas', type: 'string' },
|
|
25
|
-
],
|
|
26
|
-
Coin: [
|
|
27
|
-
{ name: 'denom', type: 'string' },
|
|
28
|
-
{ name: 'amount', type: 'string' },
|
|
29
|
-
],
|
|
30
|
-
Msg: [
|
|
31
|
-
{ name: 'type', type: 'string' },
|
|
32
|
-
{ name: 'value', type: 'MsgValue' },
|
|
33
|
-
],
|
|
34
|
-
};
|
|
35
|
-
var EvmIbcClient;
|
|
36
|
-
(function (EvmIbcClient) {
|
|
37
|
-
EvmIbcClient.TYPED_DATA_REQUEST_METHOD = "eth_signTypedData_v4";
|
|
38
|
-
EvmIbcClient.DEFAULT_EIP712_TYPES = _DEFAULT_EIP712_TYPES;
|
|
39
|
-
EvmIbcClient.getEvmChainId = (blockchain, network = constant_1.Network.MainNet) => {
|
|
40
|
-
switch (network) {
|
|
41
|
-
case constant_1.Network.MainNet:
|
|
42
|
-
switch (blockchain) {
|
|
43
|
-
case util_1.BlockchainUtils.Blockchain.Canto:
|
|
44
|
-
return 7700;
|
|
45
|
-
case util_1.BlockchainUtils.Blockchain.Evmos:
|
|
46
|
-
return 9001;
|
|
47
|
-
default:
|
|
48
|
-
throw new Error("network not supported");
|
|
49
|
-
}
|
|
50
|
-
default:
|
|
51
|
-
throw new Error("network not supported");
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
EvmIbcClient.getIbcTransferTypes = () => {
|
|
55
|
-
return Object.assign(Object.assign({}, EvmIbcClient.DEFAULT_EIP712_TYPES), { MsgValue: [
|
|
56
|
-
{ name: 'source_port', type: 'string' },
|
|
57
|
-
{ name: 'source_channel', type: 'string' },
|
|
58
|
-
{ name: 'token', type: 'TypeToken' },
|
|
59
|
-
{ name: 'sender', type: 'string' },
|
|
60
|
-
{ name: 'receiver', type: 'string' },
|
|
61
|
-
{ name: 'timeout_height', type: 'TypeTimeoutHeight' },
|
|
62
|
-
{ name: 'timeout_timestamp', type: 'uint64' },
|
|
63
|
-
], TypeToken: [
|
|
64
|
-
{ name: 'denom', type: 'string' },
|
|
65
|
-
{ name: 'amount', type: 'string' },
|
|
66
|
-
], TypeTimeoutHeight: [
|
|
67
|
-
{ name: 'revision_number', type: 'uint64' },
|
|
68
|
-
{ name: 'revision_height', type: 'uint64' },
|
|
69
|
-
] });
|
|
70
|
-
};
|
|
71
|
-
EvmIbcClient.getCosmosWeb3Domain = (blockchain) => {
|
|
72
|
-
return {
|
|
73
|
-
name: "Cosmos Web3",
|
|
74
|
-
version: "1.0.0",
|
|
75
|
-
chainId: EvmIbcClient.getEvmChainId(blockchain),
|
|
76
|
-
verifyingContract: "cosmos",
|
|
77
|
-
salt: "0",
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
EvmIbcClient.getEIP712TypedData = (tx, blockchain, types = EvmIbcClient.getIbcTransferTypes(), domain = EvmIbcClient.getCosmosWeb3Domain(blockchain), primaryType = "Tx") => {
|
|
81
|
-
const typedData = {
|
|
82
|
-
types,
|
|
83
|
-
primaryType,
|
|
84
|
-
domain,
|
|
85
|
-
message: tx,
|
|
86
|
-
};
|
|
87
|
-
return typedData;
|
|
88
|
-
};
|
|
89
|
-
})(EvmIbcClient || (EvmIbcClient = {}));
|
|
90
|
-
exports.default = EvmIbcClient;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import Long from "long";
|
|
2
|
-
import _m0 from "protobufjs/minimal";
|
|
3
|
-
export declare const protobufPackage = "ethermint.crypto.v1.ethsecp256k1";
|
|
4
|
-
/**
|
|
5
|
-
* PubKey defines a type alias for an ecdsa.PublicKey that implements
|
|
6
|
-
* Tendermint's PubKey interface. It represents the 33-byte compressed public
|
|
7
|
-
* key format.
|
|
8
|
-
*/
|
|
9
|
-
export interface PubKey {
|
|
10
|
-
/** key is the public key in byte form */
|
|
11
|
-
key: Uint8Array;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* PrivKey defines a type alias for an ecdsa.PrivateKey that implements
|
|
15
|
-
* Tendermint's PrivateKey interface.
|
|
16
|
-
*/
|
|
17
|
-
export interface PrivKey {
|
|
18
|
-
/** key is the private key in byte form */
|
|
19
|
-
key: Uint8Array;
|
|
20
|
-
}
|
|
21
|
-
export declare const PubKey: {
|
|
22
|
-
encode(message: PubKey, writer?: _m0.Writer): _m0.Writer;
|
|
23
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): PubKey;
|
|
24
|
-
fromJSON(object: any): PubKey;
|
|
25
|
-
toJSON(message: PubKey): unknown;
|
|
26
|
-
fromPartial(object: DeepPartial<PubKey>): PubKey;
|
|
27
|
-
};
|
|
28
|
-
export declare const PrivKey: {
|
|
29
|
-
encode(message: PrivKey, writer?: _m0.Writer): _m0.Writer;
|
|
30
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): PrivKey;
|
|
31
|
-
fromJSON(object: any): PrivKey;
|
|
32
|
-
toJSON(message: PrivKey): unknown;
|
|
33
|
-
fromPartial(object: DeepPartial<PrivKey>): PrivKey;
|
|
34
|
-
};
|
|
35
|
-
declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
36
|
-
export declare type DeepPartial<T> = T extends Builtin ? T : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
37
|
-
[K in keyof T]?: DeepPartial<T[K]>;
|
|
38
|
-
} : Partial<T>;
|
|
39
|
-
export {};
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.PrivKey = exports.PubKey = exports.protobufPackage = void 0;
|
|
7
|
-
/* eslint-disable */
|
|
8
|
-
const long_1 = __importDefault(require("long"));
|
|
9
|
-
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
10
|
-
exports.protobufPackage = "ethermint.crypto.v1.ethsecp256k1";
|
|
11
|
-
const basePubKey = {};
|
|
12
|
-
exports.PubKey = {
|
|
13
|
-
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
14
|
-
if (message.key.length !== 0) {
|
|
15
|
-
writer.uint32(10).bytes(message.key);
|
|
16
|
-
}
|
|
17
|
-
return writer;
|
|
18
|
-
},
|
|
19
|
-
decode(input, length) {
|
|
20
|
-
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
21
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
22
|
-
const message = Object.assign({}, basePubKey);
|
|
23
|
-
message.key = new Uint8Array();
|
|
24
|
-
while (reader.pos < end) {
|
|
25
|
-
const tag = reader.uint32();
|
|
26
|
-
switch (tag >>> 3) {
|
|
27
|
-
case 1:
|
|
28
|
-
message.key = reader.bytes();
|
|
29
|
-
break;
|
|
30
|
-
default:
|
|
31
|
-
reader.skipType(tag & 7);
|
|
32
|
-
break;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
return message;
|
|
36
|
-
},
|
|
37
|
-
fromJSON(object) {
|
|
38
|
-
const message = Object.assign({}, basePubKey);
|
|
39
|
-
message.key =
|
|
40
|
-
object.key !== undefined && object.key !== null
|
|
41
|
-
? bytesFromBase64(object.key)
|
|
42
|
-
: new Uint8Array();
|
|
43
|
-
return message;
|
|
44
|
-
},
|
|
45
|
-
toJSON(message) {
|
|
46
|
-
const obj = {};
|
|
47
|
-
message.key !== undefined &&
|
|
48
|
-
(obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
|
|
49
|
-
return obj;
|
|
50
|
-
},
|
|
51
|
-
fromPartial(object) {
|
|
52
|
-
var _a;
|
|
53
|
-
const message = Object.assign({}, basePubKey);
|
|
54
|
-
message.key = (_a = object.key) !== null && _a !== void 0 ? _a : new Uint8Array();
|
|
55
|
-
return message;
|
|
56
|
-
},
|
|
57
|
-
};
|
|
58
|
-
const basePrivKey = {};
|
|
59
|
-
exports.PrivKey = {
|
|
60
|
-
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
61
|
-
if (message.key.length !== 0) {
|
|
62
|
-
writer.uint32(10).bytes(message.key);
|
|
63
|
-
}
|
|
64
|
-
return writer;
|
|
65
|
-
},
|
|
66
|
-
decode(input, length) {
|
|
67
|
-
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
68
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
69
|
-
const message = Object.assign({}, basePrivKey);
|
|
70
|
-
message.key = new Uint8Array();
|
|
71
|
-
while (reader.pos < end) {
|
|
72
|
-
const tag = reader.uint32();
|
|
73
|
-
switch (tag >>> 3) {
|
|
74
|
-
case 1:
|
|
75
|
-
message.key = reader.bytes();
|
|
76
|
-
break;
|
|
77
|
-
default:
|
|
78
|
-
reader.skipType(tag & 7);
|
|
79
|
-
break;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
return message;
|
|
83
|
-
},
|
|
84
|
-
fromJSON(object) {
|
|
85
|
-
const message = Object.assign({}, basePrivKey);
|
|
86
|
-
message.key =
|
|
87
|
-
object.key !== undefined && object.key !== null
|
|
88
|
-
? bytesFromBase64(object.key)
|
|
89
|
-
: new Uint8Array();
|
|
90
|
-
return message;
|
|
91
|
-
},
|
|
92
|
-
toJSON(message) {
|
|
93
|
-
const obj = {};
|
|
94
|
-
message.key !== undefined &&
|
|
95
|
-
(obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
|
|
96
|
-
return obj;
|
|
97
|
-
},
|
|
98
|
-
fromPartial(object) {
|
|
99
|
-
var _a;
|
|
100
|
-
const message = Object.assign({}, basePrivKey);
|
|
101
|
-
message.key = (_a = object.key) !== null && _a !== void 0 ? _a : new Uint8Array();
|
|
102
|
-
return message;
|
|
103
|
-
},
|
|
104
|
-
};
|
|
105
|
-
var globalThis = (() => {
|
|
106
|
-
if (typeof globalThis !== "undefined")
|
|
107
|
-
return globalThis;
|
|
108
|
-
if (typeof self !== "undefined")
|
|
109
|
-
return self;
|
|
110
|
-
if (typeof window !== "undefined")
|
|
111
|
-
return window;
|
|
112
|
-
if (typeof global !== "undefined")
|
|
113
|
-
return global;
|
|
114
|
-
throw "Unable to locate global object";
|
|
115
|
-
})();
|
|
116
|
-
const atob = globalThis.atob ||
|
|
117
|
-
((b64) => globalThis.Buffer.from(b64, "base64").toString("binary"));
|
|
118
|
-
function bytesFromBase64(b64) {
|
|
119
|
-
const bin = atob(b64);
|
|
120
|
-
const arr = new Uint8Array(bin.length);
|
|
121
|
-
for (let i = 0; i < bin.length; ++i) {
|
|
122
|
-
arr[i] = bin.charCodeAt(i);
|
|
123
|
-
}
|
|
124
|
-
return arr;
|
|
125
|
-
}
|
|
126
|
-
const btoa = globalThis.btoa ||
|
|
127
|
-
((bin) => globalThis.Buffer.from(bin, "binary").toString("base64"));
|
|
128
|
-
function base64FromBytes(arr) {
|
|
129
|
-
const bin = [];
|
|
130
|
-
for (const byte of arr) {
|
|
131
|
-
bin.push(String.fromCharCode(byte));
|
|
132
|
-
}
|
|
133
|
-
return btoa(bin.join(""));
|
|
134
|
-
}
|
|
135
|
-
if (minimal_1.default.util.Long !== long_1.default) {
|
|
136
|
-
minimal_1.default.util.Long = long_1.default;
|
|
137
|
-
minimal_1.default.configure();
|
|
138
|
-
}
|