From e3ad8793e98f00c4c49541f1ad1a58beb165af4e Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Sun, 26 May 2024 10:19:09 -0500 Subject: [PATCH 01/35] Fix duplicate redeem bug --- x/market/keeper/msg_server_redeem_drop.go | 4 ++++ x/market/keeper/msg_server_redeem_drop_test.go | 4 ++++ x/market/types/errors.go | 2 ++ 3 files changed, 10 insertions(+) diff --git a/x/market/keeper/msg_server_redeem_drop.go b/x/market/keeper/msg_server_redeem_drop.go index 361cd1ab..8848070b 100644 --- a/x/market/keeper/msg_server_redeem_drop.go +++ b/x/market/keeper/msg_server_redeem_drop.go @@ -21,6 +21,10 @@ func (k msgServer) RedeemDrop(goCtx context.Context, msg *types.MsgRedeemDrop) ( return nil, sdkerrors.Wrapf(types.ErrDropNotFound, "%s", msg.Uid) } + if !drop.Active { + return nil, sdkerrors.Wrapf(types.ErrDropNotActive, "%s", msg.Uid) + } + if drop.Owner != msg.Creator { return nil, sdkerrors.Wrapf(types.ErrNotDrops, "%s", msg.Uid) } diff --git a/x/market/keeper/msg_server_redeem_drop_test.go b/x/market/keeper/msg_server_redeem_drop_test.go index 10d99286..c91b7e1a 100644 --- a/x/market/keeper/msg_server_redeem_drop_test.go +++ b/x/market/keeper/msg_server_redeem_drop_test.go @@ -161,6 +161,10 @@ func TestRedeemDrop(t *testing.T) { require.NoError(t, redeemdropErr2) require.Contains(t, rd2.GetCreator(), createRedeemDropResponse2.String()) + // Validate RedeemDrop Duplicate Error + _, redeemdropErr3 := keeper.NewMsgServerImpl(*testInput.MarketKeeper).RedeemDrop(sdk.WrapSDKContext(testInput.Context), &rd2) + require.Error(t, redeemdropErr3) + // Validate GetPool After Redeem Drop rst, found = testInput.MarketKeeper.GetPool(testInput.Context, pair) require.True(t, found) diff --git a/x/market/types/errors.go b/x/market/types/errors.go index 0ab33889..89e75696 100644 --- a/x/market/types/errors.go +++ b/x/market/types/errors.go @@ -52,4 +52,6 @@ var ( ErrProductInvalid = sdkerrors.Register(ModuleName, 21, "product less than beg") // nolint: gomnd // ErrDenomExists - denom already exists ErrDenomExists = sdkerrors.Register(ModuleName, 22, "denom already exists") // nolint: gomnd + // DropNotActive - drop is no longer active + ErrDropNotActive = sdkerrors.Register(ModuleName, 23, "drop not active") // nolint: gomnd ) From ffa5d54cec69145caa34e26f7accafc4d508b534 Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Sun, 26 May 2024 17:53:06 -0500 Subject: [PATCH 02/35] Add in Canceled Order check --- x/market/keeper/msg_server_cancel_order.go | 4 ++++ x/market/keeper/msg_server_cancel_order_test.go | 2 ++ x/market/types/errors.go | 2 ++ 3 files changed, 8 insertions(+) diff --git a/x/market/keeper/msg_server_cancel_order.go b/x/market/keeper/msg_server_cancel_order.go index f9e1bec8..74777c4d 100644 --- a/x/market/keeper/msg_server_cancel_order.go +++ b/x/market/keeper/msg_server_cancel_order.go @@ -19,6 +19,10 @@ func (k msgServer) CancelOrder(goCtx context.Context, msg *types.MsgCancelOrder) return nil, sdkerrors.Wrapf(types.ErrOrderNotFound, "%s", msg.Uid) } + if order.Status == "canceled" { + return nil, sdkerrors.Wrapf(types.ErrOrderCanceled, "%s", msg.Uid) + } + if order.Owner != msg.Creator { return nil, sdkerrors.Wrapf(types.ErrNotOrderOwner, "%s", msg.Uid) } diff --git a/x/market/keeper/msg_server_cancel_order_test.go b/x/market/keeper/msg_server_cancel_order_test.go index a20d368a..02751e63 100644 --- a/x/market/keeper/msg_server_cancel_order_test.go +++ b/x/market/keeper/msg_server_cancel_order_test.go @@ -69,6 +69,8 @@ func TestCancelOrder_case1_stop(t *testing.T) { var co = types.MsgCancelOrder{Creator: addr, Uid: Uid} _, err = keeper.NewMsgServerImpl(*testInput.MarketKeeper).CancelOrder(sdk.WrapSDKContext(testInput.Context), &co) require.NoError(t, err) + _, err = keeper.NewMsgServerImpl(*testInput.MarketKeeper).CancelOrder(sdk.WrapSDKContext(testInput.Context), &co) + require.Error(t, err) // Validate GetMember memberA, memberfound = testInput.MarketKeeper.GetMember(testInput.Context, orders.DenomBid, orders.DenomAsk) diff --git a/x/market/types/errors.go b/x/market/types/errors.go index 89e75696..20457aaf 100644 --- a/x/market/types/errors.go +++ b/x/market/types/errors.go @@ -54,4 +54,6 @@ var ( ErrDenomExists = sdkerrors.Register(ModuleName, 22, "denom already exists") // nolint: gomnd // DropNotActive - drop is no longer active ErrDropNotActive = sdkerrors.Register(ModuleName, 23, "drop not active") // nolint: gomnd + // ErrOrderCanceled - order is already canceled + ErrOrderCanceled = sdkerrors.Register(ModuleName, 24, "order already canceled") // nolint: gomnd ) From 8b379cc780d0ff4d0559874bd8d98b0a068cb651 Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Wed, 5 Jun 2024 23:02:46 -0500 Subject: [PATCH 03/35] Pool initialization fix --- x/market/keeper/msg_server_create_pool.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/x/market/keeper/msg_server_create_pool.go b/x/market/keeper/msg_server_create_pool.go index c69f1e13..d8ab39f5 100644 --- a/x/market/keeper/msg_server_create_pool.go +++ b/x/market/keeper/msg_server_create_pool.go @@ -2,6 +2,7 @@ package keeper import ( "context" + "math/big" "strings" sdk "github.com/cosmos/cosmos-sdk/types" @@ -62,7 +63,13 @@ func (k msgServer) CreatePool(goCtx context.Context, msg *types.MsgCreatePool) ( } // Drops define proportional ownership to the liquidity in the pool - drops := coinPair.AmountOf(denom1).Mul(coinPair.AmountOf(denom2)) + // Constant Product Model + // f(x, y) = value of liquidity + // We will define f(x, y) = sqrt(xy) + // InitDrops = Sqrt(denom1.Amount * denom2.Amount) + tmp := big.NewInt(0) + tmp.Sqrt((coinPair.AmountOf(denom1).Mul(coinPair.AmountOf(denom2))).BigInt()) + drops := sdk.NewIntFromBigInt(tmp) leader := types.Leader{ Address: msg.Creator, From 26cc06a99a871269156bebf7ced30cbf3bb903d7 Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Thu, 6 Jun 2024 09:24:08 -0500 Subject: [PATCH 04/35] Add safe round up to division --- x/market/keeper/drop.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x/market/keeper/drop.go b/x/market/keeper/drop.go index c2eb82f0..1da418e2 100644 --- a/x/market/keeper/drop.go +++ b/x/market/keeper/drop.go @@ -398,7 +398,7 @@ func dropAmounts(drops sdk.Int, pool types.Pool, member1 types.Member, member2 t tmp := big.NewInt(0) tmp.Mul(drops.BigInt(), member1.Balance.BigInt()) tmp.Quo(tmp, pool.Drops.BigInt()) - dropAmtMember1 := sdk.NewIntFromBigInt(tmp) + dropAmtMember1 := sdk.NewIntFromBigInt(tmp).Add(sdk.NewIntFromUint64(1)) tmp = big.NewInt(0) if dropAmtMember1.LTE(sdk.ZeroInt()) { @@ -408,7 +408,7 @@ func dropAmounts(drops sdk.Int, pool types.Pool, member1 types.Member, member2 t // `dropAmtMember2 = (drops * member2.Balance) / pool.Drops` tmp.Mul(drops.BigInt(), member2.Balance.BigInt()) tmp.Quo(tmp, pool.Drops.BigInt()) - dropAmtMember2 := sdk.NewIntFromBigInt(tmp) + dropAmtMember2 := sdk.NewIntFromBigInt(tmp).Add(sdk.NewIntFromUint64(1)) //tmp = big.NewInt(0) if dropAmtMember2.LTE(sdk.ZeroInt()) { From 25f9e217fbca2e895b043a7b8df1140ee31f088e Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Thu, 6 Jun 2024 09:30:39 -0500 Subject: [PATCH 05/35] Firm up AMM safety check --- x/market/keeper/msg_server_create_order.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/x/market/keeper/msg_server_create_order.go b/x/market/keeper/msg_server_create_order.go index e05c9236..2dae28ca 100644 --- a/x/market/keeper/msg_server_create_order.go +++ b/x/market/keeper/msg_server_create_order.go @@ -356,7 +356,12 @@ func (k msgServer) CreateOrder(goCtx context.Context, msg *types.MsgCreateOrder) return nil, err } - if memberAsk.Balance.Mul(memberBid.Balance).LT(productBeg) { + productEnd := memberAsk.Balance.Mul(memberBid.Balance) + + // Check to make sure that invariant k = XY is held + // AMM should always profit k(end) > k(beg) or break-even k(end) = k(beg) + // Therefore k(end) should never be less than k(beg) + if productEnd.LT(productBeg) { return nil, sdkerrors.Wrapf(types.ErrProductInvalid, "Pool product lower after Payout %s", memberAsk.Pair) } From 4e60551ddf4e89c1813670ec43263eb72933d395 Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Thu, 6 Jun 2024 09:47:27 -0500 Subject: [PATCH 06/35] Add AMM safety check to ensure no leakage --- x/market/keeper/msg_server_create_drop.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/x/market/keeper/msg_server_create_drop.go b/x/market/keeper/msg_server_create_drop.go index c488f177..123d83b5 100644 --- a/x/market/keeper/msg_server_create_drop.go +++ b/x/market/keeper/msg_server_create_drop.go @@ -2,6 +2,8 @@ package keeper import ( "context" + "fmt" + "math/big" "sort" "strings" @@ -60,6 +62,21 @@ func (k msgServer) CreateDrop(goCtx context.Context, msg *types.MsgCreateDrop) ( dropProduct := dropAmtMember1.Mul(dropAmtMember2) + tmp := big.NewInt(0) + tmp.Sqrt(dropProduct.BigInt()) + sqrtDropProduct := sdk.NewIntFromBigInt(tmp) + + // Drops basis is sqrt(XY) + // Change in XY should always be positive + // As XY total increases then in order to get proportional + // share (drop) then should pay the same per drop or more + // than Pool Creator. Pool creator drops = sqrt(XY). + if sqrtDropProduct.LT(drops) { + fmt.Printf("Sqrt Product: %s", sqrtDropProduct) + fmt.Printf("Drops: %s", drops) + return nil, sdkerrors.Wrapf(types.ErrProductLessThanDrops, "Sqrt of Product not greater than or equal to drops.") + } + coin1 := sdk.NewCoin(denom1, dropAmtMember1) coin2 := sdk.NewCoin(denom2, dropAmtMember2) From 3425ac70119bb1f8445ad1548c2fa6c35ca058f4 Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Thu, 6 Jun 2024 16:14:31 -0500 Subject: [PATCH 07/35] Update profit to delta Sqrt(Product) vs Product --- x/market/keeper/profit.go | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/x/market/keeper/profit.go b/x/market/keeper/profit.go index 4796bbde..1652bc2f 100644 --- a/x/market/keeper/profit.go +++ b/x/market/keeper/profit.go @@ -10,18 +10,25 @@ import ( ) func (k Keeper) Profit(productBeg sdk.Int, memberA types.Member, memberB types.Member) (profitA sdk.Int, profitB sdk.Int) { + // Constant Product Model + // f(x, y) = value of liquidity + // We will define f(x, y) = sqrt(xy) or Sqrt(Product) + // Profit = Member.Balance * (Sqrt(ProductEnd)-Sqrt(ProductBeg))/Sqrt(ProductEnd) + // Profit = Member.Balance * SqrtDelta/Sqrt(ProductEnd) + sqrtProdDelta := big.NewInt(0) + sqrtProdDelta.Sqrt(productBeg.BigInt()) - principalA := big.NewInt(0) - principalA.Mul(productBeg.BigInt(), memberA.Balance.BigInt()) - principalA.Quo(principalA, memberB.Balance.BigInt()) - principalA.Sqrt(principalA) - profitA = memberA.Balance.Sub(sdk.NewIntFromBigInt(principalA)) - - principalB := big.NewInt(0) - principalB.Mul(productBeg.BigInt(), memberB.Balance.BigInt()) - principalB.Quo(principalB, memberA.Balance.BigInt()) - principalB.Sqrt(principalB) - profitB = memberB.Balance.Sub(sdk.NewIntFromBigInt(principalB)) + sqrtProdEnd := big.NewInt(0) + sqrtProdEnd.Mul(memberA.Balance.BigInt(), memberB.Balance.BigInt()) + sqrtProdEnd.Sqrt(sqrtProdEnd) + + sqrtProdDelta.Sub(sqrtProdEnd, sqrtProdDelta) + + profitABig := big.NewInt(0) + profitA = sdk.NewIntFromBigInt(profitABig.Quo(profitABig.Mul(memberA.Balance.BigInt(), sqrtProdDelta), sqrtProdEnd)) + + profitBBig := big.NewInt(0) + profitB = sdk.NewIntFromBigInt(profitBBig.Quo(profitABig.Mul(memberB.Balance.BigInt(), sqrtProdDelta), sqrtProdEnd)) return } From 2112b85ffdeb1c91e74ad9e81a11378059725aa8 Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Thu, 6 Jun 2024 16:39:19 -0500 Subject: [PATCH 08/35] Update pool test to include sqrt(Product) method --- .../keeper/msg_server_create_pool_test.go | 84 +++++++++++-------- 1 file changed, 49 insertions(+), 35 deletions(-) diff --git a/x/market/keeper/msg_server_create_pool_test.go b/x/market/keeper/msg_server_create_pool_test.go index 5831d9a4..c9c6a4a7 100644 --- a/x/market/keeper/msg_server_create_pool_test.go +++ b/x/market/keeper/msg_server_create_pool_test.go @@ -1,6 +1,7 @@ package keeper_test import ( + "math/big" "strings" "testing" @@ -24,52 +25,65 @@ var addr string = sample.AccAddress() var addr2 string = sample.AccAddress() var addr3 string = sample.AccAddress() +var testdata = testData{coinAStr: "30CoinA", coinBStr: "40CoinB", RateAstrArray: []string{"60", "70"}, RateBstrArray: []string{"80", "90"}} +var coinPair, _ = sample.SampleCoins("10000CoinA", "10000CoinB") +var denomA, denomB = sample.SampleDenoms(coinPair) +var pair = strings.Join([]string{denomA, denomB}, ",") + func TestCreatePool(t *testing.T) { testInput := keepertest.CreateTestEnvironment(t) - //TestData - testdata := testData{coinAStr: "20CoinA", coinBStr: "20CoinB", RateAstrArray: []string{"10", "20"}, RateBstrArray: []string{"20", "30"}} - coinPair, _ := sample.SampleCoins(testdata.coinAStr, testdata.coinBStr) - denomA, denomB := sample.SampleDenoms(coinPair) - pair := strings.Join([]string{denomA, denomB}, ",") - //MintCoins + // MintCoins require.NoError(t, testInput.BankKeeper.MintCoins(testInput.Context, types.ModuleName, coinPair)) - //SendCoinsFromModuleToAccount + + // SendCoinsFromModuleToAccount requestAddress, err := sdk.AccAddressFromBech32(addr) require.NoError(t, err) require.NoError(t, testInput.BankKeeper.SendCoinsFromModuleToAccount(testInput.Context, types.ModuleName, requestAddress, coinPair)) + // GetUidCount before CreatePool beforecount := testInput.MarketKeeper.GetUidCount(testInput.Context) - //Create Pool - var p = types.MsgCreatePool{CoinA: testdata.coinAStr, CoinB: testdata.coinBStr, Creator: addr} - response, err := keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreatePool(sdk.WrapSDKContext(testInput.Context), &p) - //validate CreatePool + + // Create Pool + var MsgCreatePool = types.MsgCreatePool{CoinA: testdata.coinAStr, CoinB: testdata.coinBStr, Creator: addr} + response, err := keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreatePool(sdk.WrapSDKContext(testInput.Context), &MsgCreatePool) + + // Validate CreatePool require.NoError(t, err) - require.Contains(t, p.GetCreator(), response.String()) - require.Contains(t, p.GetCoinA(), response.String()) - require.Contains(t, p.GetCoinB(), response.String()) - //validate SetUidCount function. + require.Contains(t, MsgCreatePool.GetCreator(), response.String()) + require.Contains(t, MsgCreatePool.GetCoinA(), response.String()) + require.Contains(t, MsgCreatePool.GetCoinB(), response.String()) + + // Validate SetUidCount function. aftercount := testInput.MarketKeeper.GetUidCount(testInput.Context) require.Equal(t, beforecount+1, aftercount) - //validate GetPool - rst, found := testInput.MarketKeeper.GetPool(testInput.Context, pair) + // Validate GetPool + pool, found := testInput.MarketKeeper.GetPool(testInput.Context, pair) require.True(t, found) - require.Equal(t, rst.Pair, pair) - //validate GetMember - members, memberfound := testInput.MarketKeeper.GetMember(testInput.Context, denomB, denomA) - members1, memberfound1 := testInput.MarketKeeper.GetMember(testInput.Context, denomA, denomB) - require.True(t, memberfound) - require.Equal(t, members.DenomA, denomB) - require.Equal(t, members.DenomB, denomA) - require.True(t, memberfound1) - require.Equal(t, members1.DenomA, denomA) - require.Equal(t, members1.DenomB, denomB) - //validate GetDrop - drops, dropFound := testInput.MarketKeeper.GetDrop(testInput.Context, beforecount) + require.Equal(t, pool.Pair, pair) + coinA, _ := sdk.ParseCoinNormalized(testdata.coinAStr) + coinB, _ := sdk.ParseCoinNormalized(testdata.coinBStr) + sqrt := big.NewInt(0) + + // Verify pool drops = Sqrt(Product) + require.True(t, (pool.Drops.Equal(sdk.NewIntFromBigInt(sqrt.Sqrt((coinA.Amount.Mul(coinB.Amount)).BigInt()))))) + + // Validate GetMember + memberA, memberfoundA := testInput.MarketKeeper.GetMember(testInput.Context, denomB, denomA) + memberB, memberfoundB := testInput.MarketKeeper.GetMember(testInput.Context, denomA, denomB) + require.True(t, memberfoundA) + require.Equal(t, memberA.DenomA, denomB) + require.Equal(t, memberA.DenomB, denomA) + require.True(t, memberfoundB) + require.Equal(t, memberB.DenomA, denomA) + require.Equal(t, memberB.DenomB, denomB) + + // Validate GetDrop + drop, dropFound := testInput.MarketKeeper.GetDrop(testInput.Context, beforecount) require.True(t, dropFound) - require.Equal(t, drops.Pair, pair) - + require.Equal(t, drop.Pair, pair) + require.True(t, pool.Drops.Equal(drop.Drops)) } func TestCreatePool_PoolAlreadyExist(t *testing.T) { @@ -183,9 +197,9 @@ func TestCreatePool_With_Empty_Rates(t *testing.T) { //validate SetUidCount function. aftercount := testInput.MarketKeeper.GetUidCount(testInput.Context) require.Equal(t, beforecount+1, aftercount) - rst, found := testInput.MarketKeeper.GetPool(testInput.Context, pair) + pool, found := testInput.MarketKeeper.GetPool(testInput.Context, pair) require.True(t, found) - require.Equal(t, rst.Pair, pair) + require.Equal(t, pool.Pair, pair) //validate GetMember members, memberfound := testInput.MarketKeeper.GetMember(testInput.Context, denomB, denomA) members1, memberfound1 := testInput.MarketKeeper.GetMember(testInput.Context, denomA, denomB) @@ -222,9 +236,9 @@ func TestCreatePool_With_Swap_Coins(t *testing.T) { //validate SetUidCount function. aftercount := testInput.MarketKeeper.GetUidCount(testInput.Context) require.Equal(t, beforecount+1, aftercount) - rst, found := testInput.MarketKeeper.GetPool(testInput.Context, pair) + pool, found := testInput.MarketKeeper.GetPool(testInput.Context, pair) require.True(t, found) - require.Equal(t, rst.Pair, pair) + require.Equal(t, pool.Pair, pair) //validate GetMember members, memberfound := testInput.MarketKeeper.GetMember(testInput.Context, denomB, denomA) members1, memberfound1 := testInput.MarketKeeper.GetMember(testInput.Context, denomA, denomB) From 795f83718adf5e499a83ac1950de993803a446f0 Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Thu, 6 Jun 2024 17:22:32 -0500 Subject: [PATCH 09/35] Firm up AMM Product safety checks --- x/market/keeper/msg_server_create_order.go | 28 +++++++++++++--------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/x/market/keeper/msg_server_create_order.go b/x/market/keeper/msg_server_create_order.go index 2dae28ca..b9697463 100644 --- a/x/market/keeper/msg_server_create_order.go +++ b/x/market/keeper/msg_server_create_order.go @@ -331,12 +331,19 @@ func (k msgServer) CreateOrder(goCtx context.Context, msg *types.MsgCreateOrder) return nil, sdkerrors.Wrapf(types.ErrMemberNotFound, "Member %s", msg.DenomBid) } - if memberAsk.Balance.Mul(memberBid.Balance).Equal(productBeg) { - return &types.MsgCreateOrderResponse{Uid: order.Uid}, nil + productEnd := memberAsk.Balance.Mul(memberBid.Balance) + + // Check to make sure that invariant k = XY is held + // AMM should always profit k(end) > k(beg) or break-even k(end) = k(beg) + // Therefore k(end) should never be less than k(beg) + if productEnd.LT(productBeg) { + return nil, sdkerrors.Wrapf(types.ErrProductInvalid, "Pool product lower after Trades than Beginning %s", memberAsk.Pair) } - if memberAsk.Balance.Mul(memberBid.Balance).LT(productBeg) { - return nil, sdkerrors.Wrapf(types.ErrProductInvalid, "Pool product lower after Trade %s", memberAsk.Pair) + // If productEnd equal to productBeg there is no profit + // All further code deals with profit + if productEnd.Equal(productBeg) { + return &types.MsgCreateOrderResponse{Uid: order.Uid}, nil } profitAsk, profitBid := k.Profit(productBeg, memberAsk, memberBid) @@ -356,13 +363,10 @@ func (k msgServer) CreateOrder(goCtx context.Context, msg *types.MsgCreateOrder) return nil, err } - productEnd := memberAsk.Balance.Mul(memberBid.Balance) + productEnd = memberAsk.Balance.Mul(memberBid.Balance) - // Check to make sure that invariant k = XY is held - // AMM should always profit k(end) > k(beg) or break-even k(end) = k(beg) - // Therefore k(end) should never be less than k(beg) if productEnd.LT(productBeg) { - return nil, sdkerrors.Wrapf(types.ErrProductInvalid, "Pool product lower after Payout %s", memberAsk.Pair) + return nil, sdkerrors.Wrapf(types.ErrProductInvalid, "Pool product lower after Payout than Beginning %s", memberAsk.Pair) } memberAsk, err = k.Burn(ctx, profitAsk, memberAsk) @@ -375,8 +379,10 @@ func (k msgServer) CreateOrder(goCtx context.Context, msg *types.MsgCreateOrder) return nil, err } - if memberAsk.Balance.Mul(memberBid.Balance).LT(productBeg) { - return nil, sdkerrors.Wrapf(types.ErrProductInvalid, "Pool product lower after Burn %s", memberAsk.Pair) + // AMM Product End must be greater than or equal to AMM Product Beginning + productEnd = memberAsk.Balance.Mul(memberBid.Balance) + if productEnd.LT(productBeg) { + return nil, sdkerrors.Wrapf(types.ErrProductInvalid, "Pool product lower after Burn than Beginning %s", memberAsk.Pair) } k.SetMember(ctx, memberAsk) From 608f98864d72f6c571847782cee29da97c3e6823 Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Fri, 7 Jun 2024 14:58:10 -0500 Subject: [PATCH 10/35] Update tests for sqrt(XY) pool basis --- .../keeper/msg_server_create_order_test.go | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/x/market/keeper/msg_server_create_order_test.go b/x/market/keeper/msg_server_create_order_test.go index 9981c06e..a8b99460 100644 --- a/x/market/keeper/msg_server_create_order_test.go +++ b/x/market/keeper/msg_server_create_order_test.go @@ -24,7 +24,7 @@ func common(t *testing.T, testInput keepertest.TestInput) ( // TestData testdata = testData{coinAStr: "30CoinA", coinBStr: "40CoinB", RateAstrArray: []string{"60", "70"}, RateBstrArray: []string{"80", "90"}} - coinPair, _ = sample.SampleCoins("140CoinA", "140CoinB") + coinPair, _ = sample.SampleCoins("10000CoinA", "10000CoinB") denomA, denomB = sample.SampleDenoms(coinPair) pair = strings.Join([]string{denomA, denomB}, ",") @@ -56,6 +56,14 @@ func TestCreateOrder(t *testing.T) { beforecount := testInput.MarketKeeper.GetUidCount(testInput.Context) + // Calculate Product Before + memberAsk, memberAskFound := testInput.MarketKeeper.GetMember(testInput.Context, denomB, denomA) + require.True(t, memberAskFound) + memberBid, memberBidFound := testInput.MarketKeeper.GetMember(testInput.Context, denomA, denomB) + require.True(t, memberBidFound) + + productBefore := memberAsk.Balance.Mul(memberBid.Balance) + //Create Order var o = types.MsgCreateOrder{Creator: addr, DenomAsk: denomA, DenomBid: denomB, Rate: testdata.RateAstrArray, OrderType: "stop", Amount: "0", Prev: "0", Next: "0"} rate, _ := types.RateStringToInt(o.Rate) @@ -65,6 +73,15 @@ func TestCreateOrder(t *testing.T) { _, err := keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreateOrder(sdk.WrapSDKContext(testInput.Context), &o) require.NoError(t, err) + // Calculate Product After + memberAsk, memberAskFound = testInput.MarketKeeper.GetMember(testInput.Context, denomB, denomA) + require.True(t, memberAskFound) + memberBid, memberBidFound = testInput.MarketKeeper.GetMember(testInput.Context, denomA, denomB) + require.True(t, memberBidFound) + + productAfter := memberAsk.Balance.Mul(memberBid.Balance) + require.True(t, productAfter.GTE(productBefore)) + aftercount := testInput.MarketKeeper.GetUidCount(testInput.Context) require.Equal(t, beforecount+1, aftercount) @@ -82,7 +99,7 @@ func TestCreateOrder(t *testing.T) { require.True(t, memberAskfound) require.Equal(t, memberAsk.DenomA, denomB) require.Equal(t, memberAsk.DenomB, denomA) - require.Equal(t, "33", memberAsk.Balance.String()) + require.Equal(t, "136", memberAsk.Balance.String()) require.Equal(t, memberAsk.Stop, uint64(0)) } From 2112eb0baa91151a86e44cae242b703d53e5ed46 Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Fri, 7 Jun 2024 17:24:45 -0500 Subject: [PATCH 11/35] Fix 0coin pool creation --- x/market/keeper/msg_server_create_pool.go | 10 ++++++++-- x/market/keeper/msg_server_create_pool_test.go | 1 + x/market/types/message_create_pool.go | 6 ++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/x/market/keeper/msg_server_create_pool.go b/x/market/keeper/msg_server_create_pool.go index d8ab39f5..cda8952e 100644 --- a/x/market/keeper/msg_server_create_pool.go +++ b/x/market/keeper/msg_server_create_pool.go @@ -16,12 +16,18 @@ func (k msgServer) CreatePool(goCtx context.Context, msg *types.MsgCreatePool) ( // CoinAmsg and CoinBmsg pre-sort from raw msg coinA, err := sdk.ParseCoinNormalized(msg.CoinA) if err != nil { - panic(err) + return nil, err + } + if coinA.Amount.LTE(sdk.NewIntFromUint64(0)) { + return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "amount is not greaer than zero") } coinB, err := sdk.ParseCoinNormalized(msg.CoinB) if err != nil { - panic(err) + return nil, err + } + if coinB.Amount.LTE(sdk.NewIntFromUint64(0)) { + return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "amount is not greaer than zero") } coinPair := sdk.NewCoins(coinA, coinB) diff --git a/x/market/keeper/msg_server_create_pool_test.go b/x/market/keeper/msg_server_create_pool_test.go index c9c6a4a7..11525205 100644 --- a/x/market/keeper/msg_server_create_pool_test.go +++ b/x/market/keeper/msg_server_create_pool_test.go @@ -266,6 +266,7 @@ func TestCreatePool_Invalid_Coins(t *testing.T) { }{ {coinAStr: "20Coin", coinBStr: "20CoinB", RateAstrArray: []string{"10", "20"}, RateBstrArray: []string{"20", "30"}}, {coinAStr: "20CoinA", coinBStr: "20Coin", RateAstrArray: []string{"10", "20"}, RateBstrArray: []string{"20", "30"}}, + {coinAStr: "0CoinA", coinBStr: "20CoinB", RateAstrArray: []string{"10", "20"}, RateBstrArray: []string{"20", "30"}}, //{coinAStr: "20CoinA", coinBStr: "20", RateAstrArray: []string{"10", "20"}, RateBstrArray: []string{"20", "30"}}, } for _, s := range scenarios { diff --git a/x/market/types/message_create_pool.go b/x/market/types/message_create_pool.go index 6e488633..77a70450 100644 --- a/x/market/types/message_create_pool.go +++ b/x/market/types/message_create_pool.go @@ -48,11 +48,17 @@ func (msg *MsgCreatePool) ValidateBasic() error { if !coinA.IsValid() { return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "amount is not a valid Coin object") } + if coinA.Amount.LTE(sdk.NewIntFromUint64(0)) { + return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "amount is not greaer than zero") + } coinB, _ := sdk.ParseCoinNormalized(msg.CoinB) if !coinB.IsValid() { return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "amount is not a valid Coin object") } + if coinB.Amount.LTE(sdk.NewIntFromUint64(0)) { + return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "amount is not greaer than zero") + } if coinA.Denom == coinB.Denom { return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "CoinA equal to CoinB") From b548ba9ecec016776f73257659953d472a9ba278 Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Fri, 7 Jun 2024 18:41:40 -0500 Subject: [PATCH 12/35] Update test to reflect Sqrt(XY) changes --- .../keeper/msg_server_create_drop_test.go | 113 ++++++++---------- 1 file changed, 52 insertions(+), 61 deletions(-) diff --git a/x/market/keeper/msg_server_create_drop_test.go b/x/market/keeper/msg_server_create_drop_test.go index 9045f531..0a846b62 100644 --- a/x/market/keeper/msg_server_create_drop_test.go +++ b/x/market/keeper/msg_server_create_drop_test.go @@ -17,12 +17,6 @@ import ( func TestCreateDrop(t *testing.T) { testInput := keepertest.CreateTestEnvironment(t) - // TestData - testdata := testData{coinAStr: "30CoinA", coinBStr: "40CoinB", RateAstrArray: []string{"60", "70"}, RateBstrArray: []string{"80", "90"}} - coinPair, _ := sample.SampleCoins("70CoinA", "70CoinB") - denomA, denomB := sample.SampleDenoms(coinPair) - pair := strings.Join([]string{denomA, denomB}, ",") - // MintCoins require.NoError(t, testInput.BankKeeper.MintCoins(testInput.Context, types.ModuleName, coinPair)) @@ -71,20 +65,20 @@ func TestCreateDrop(t *testing.T) { owner, ok := testInput.MarketKeeper.GetDropsOwnerPair(testInput.Context, addr, pair) require.True(t, ok) - require.Truef(t, owner.Sum.Equal(sdk.NewInt(1200)), owner.Sum.String()) + require.Truef(t, owner.Sum.Equal(sdk.NewInt(34)), owner.Sum.String()) // Validate GetPool rst1, found := testInput.MarketKeeper.GetPool(testInput.Context, pair) require.True(t, found) require.Equal(t, rst1.Pair, pair) - require.Equal(t, "1200", rst1.Drops.String()) + require.Equal(t, "34", rst1.Drops.String()) require.Equal(t, 1, len(rst1.Leaders)) - require.Equal(t, "1200", rst1.Leaders[0].Drops.String()) + require.Equal(t, "34", rst1.Leaders[0].Drops.String()) beforecount = aftercount // Validate CreateDrop - var d = types.MsgCreateDrop{Creator: addr2, Pair: pair, Drops: "120"} + var d = types.MsgCreateDrop{Creator: addr2, Pair: pair, Drops: "12"} createDropResponse, err := keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreateDrop(sdk.WrapSDKContext(testInput.Context), &d) require.NoError(t, err) @@ -100,27 +94,27 @@ func TestCreateDrop(t *testing.T) { rst, found := testInput.MarketKeeper.GetPool(testInput.Context, pair) require.True(t, found) require.Equal(t, rst.Pair, pair) - require.Equal(t, "1320", rst.Drops.String()) + require.Equal(t, "46", rst.Drops.String()) require.Equalf(t, addr, rst.Leaders[0].Address, rst.Leaders[0].Address) require.Equalf(t, 2, len(rst.Leaders), rst.Leaders[1].Address) - require.Equal(t, "1200", rst.Leaders[0].Drops.String()) + require.Equal(t, "34", rst.Leaders[0].Drops.String()) // Validate GetMember - members, memberfound := testInput.MarketKeeper.GetMember(testInput.Context, denomB, denomA) - members1, memberfound1 := testInput.MarketKeeper.GetMember(testInput.Context, denomA, denomB) + memberA, memberfound := testInput.MarketKeeper.GetMember(testInput.Context, denomB, denomA) + memberB, memberfound1 := testInput.MarketKeeper.GetMember(testInput.Context, denomA, denomB) require.True(t, memberfound) - require.Equal(t, members.DenomA, denomB) - require.Equal(t, members.DenomB, denomA) - require.Equal(t, "33", members.Balance.String()) + require.Equal(t, memberA.DenomA, denomB) + require.Equal(t, memberA.DenomB, denomA) + require.Equal(t, "41", memberA.Balance.String()) require.True(t, memberfound1) - require.Equal(t, members1.DenomA, denomA) - require.Equal(t, members1.DenomB, denomB) - require.Equal(t, "44", members1.Balance.String()) + require.Equal(t, memberB.DenomA, denomA) + require.Equal(t, memberB.DenomB, denomB) + require.Equal(t, "55", memberB.Balance.String()) owner, ok = testInput.MarketKeeper.GetDropsOwnerPair(testInput.Context, addr, pair) require.True(t, ok) - require.Truef(t, owner.Sum.Equal(sdk.NewInt(1200)), owner.Sum.String()) + require.Truef(t, owner.Sum.Equal(sdk.NewInt(34)), owner.Sum.String()) // Validate GetDrop drops, dropFound = testInput.MarketKeeper.GetDrop(testInput.Context, beforecount) @@ -148,12 +142,11 @@ func TestCreateDrop(t *testing.T) { rst2, found := testInput.MarketKeeper.GetPool(testInput.Context, pair) require.True(t, found) require.Equal(t, rst2.Pair, pair) - require.Equal(t, "1440", rst2.Drops.String()) - require.Equal(t, "1320", rst2.Leaders[0].Drops.String()) + require.Equal(t, "166", rst2.Drops.String()) + require.Equal(t, "154", rst2.Leaders[0].Drops.String()) require.Equal(t, rst2.Leaders[0].Address, addr) require.Equal(t, rst2.Leaders[1].Address, addr2) require.Equal(t, 2, len(rst2.Leaders)) - require.Equal(t, "1320", rst2.Leaders[0].Drops.String()) // Validate GetDrop drops, dropFound = testInput.MarketKeeper.GetDrop(testInput.Context, beforecount) @@ -181,9 +174,9 @@ func TestCreateDrop(t *testing.T) { rst, found = testInput.MarketKeeper.GetPool(testInput.Context, pair) require.True(t, found) require.Equal(t, rst.Pair, pair) - require.Equal(t, "2440", rst.Drops.String()) + require.Equal(t, "1166", rst.Drops.String()) require.Equal(t, 3, len(rst.Leaders)) - require.Equal(t, "1320", rst.Leaders[0].Drops.String()) + require.Equal(t, "1000", rst.Leaders[0].Drops.String()) // Validate GetDrop drops, dropFound = testInput.MarketKeeper.GetDrop(testInput.Context, beforecount) @@ -207,11 +200,11 @@ func TestCreateDrop(t *testing.T) { rst, found = testInput.MarketKeeper.GetPool(testInput.Context, pair) require.True(t, found) require.Equal(t, rst.Pair, pair) - require.Equal(t, "2840", rst.Drops.String()) + require.Equal(t, "1566", rst.Drops.String()) require.Equal(t, 3, len(rst.Leaders)) require.Equal(t, "1400", rst.Leaders[0].Drops.String()) - require.Equal(t, "1320", rst.Leaders[1].Drops.String()) - require.Equal(t, "120", rst.Leaders[2].Drops.String()) + require.Equal(t, "154", rst.Leaders[1].Drops.String()) + require.Equal(t, "12", rst.Leaders[2].Drops.String()) require.Equalf(t, addr3, rst.Leaders[0].Address, rst.Leaders[0].Address) require.Equalf(t, addr, rst.Leaders[1].Address, addr3) require.Equalf(t, addr2, rst.Leaders[2].Address, rst.Leaders[2].Address) @@ -223,17 +216,19 @@ func TestCreateDrop(t *testing.T) { require.Equal(t, drops.Drops.String(), g.Drops) require.Contains(t, d.GetCreator(), createDropResponse.String()) + // Calculate Product After + memberAsk, memberAskFound := testInput.MarketKeeper.GetMember(testInput.Context, denomB, denomA) + require.True(t, memberAskFound) + memberBid, memberBidFound := testInput.MarketKeeper.GetMember(testInput.Context, denomA, denomB) + require.True(t, memberBidFound) + + productAfter := memberAsk.Balance.Mul(memberBid.Balance) + require.True(t, productAfter.GTE(rst.Drops)) } func TestCreateDrop_Pool_Not_Found(t *testing.T) { testInput := keepertest.CreateTestEnvironment(t) - // TestData - testdata := testData{coinAStr: "30CoinA", coinBStr: "40CoinB", RateAstrArray: []string{"60", "70"}, RateBstrArray: []string{"80", "90"}} - coinPair, _ := sample.SampleCoins("70CoinA", "70CoinB") - denomA, denomB := sample.SampleDenoms(coinPair) - pair := strings.Join([]string{denomA, denomB}, ",") - // MintCoins require.NoError(t, testInput.BankKeeper.MintCoins(testInput.Context, types.ModuleName, coinPair)) @@ -289,11 +284,6 @@ func TestCreateDrop_Pool_Not_Found(t *testing.T) { func TestCreateDrop_Pool_Not_Active(t *testing.T) { testInput := keepertest.CreateTestEnvironment(t) - //TestData - testdata := testData{coinAStr: "30CoinA", coinBStr: "40CoinB", RateAstrArray: []string{"60", "70"}, RateBstrArray: []string{"80", "90"}} - coinPair, _ := sample.SampleCoins("70CoinA", "70CoinB") - denomA, denomB := sample.SampleDenoms(coinPair) - pair := strings.Join([]string{denomA, denomB}, ",") //MintCoins require.NoError(t, testInput.BankKeeper.MintCoins(testInput.Context, types.ModuleName, coinPair)) @@ -386,11 +376,6 @@ func TestCreateDrop_Pool_Not_Active(t *testing.T) { func TestCreateDrop_Negative(t *testing.T) { testInput := keepertest.CreateTestEnvironment(t) - //TestData - testdata := testData{coinAStr: "30CoinA", coinBStr: "40CoinB"} - coinPair, _ := sample.SampleCoins("140CoinA", "140CoinB") - denomA, denomB := sample.SampleDenoms(coinPair) - pair := strings.Join([]string{denomA, denomB}, ",") //MintCoins require.NoError(t, testInput.BankKeeper.MintCoins(testInput.Context, types.ModuleName, coinPair)) @@ -417,30 +402,34 @@ func TestCreateDrop_Negative(t *testing.T) { require.True(t, dropFound) require.Equal(t, drops.Pair, pair) //validate CreateDrop - var d = types.MsgCreateDrop{Creator: addr, Pair: pair, Drops: "120"} - createDropResponse, err := keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreateDrop(sdk.WrapSDKContext(testInput.Context), &d) - require.NoError(t, err) - require.Contains(t, d.GetCreator(), createDropResponse.String()) + var d = types.MsgCreateDrop{Creator: addr, Pair: pair, Drops: "-120"} + _, err = keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreateDrop(sdk.WrapSDKContext(testInput.Context), &d) + require.Error(t, err) + + //validate CreateDrop + d = types.MsgCreateDrop{Creator: addr, Pair: pair, Drops: "0"} + _, err = keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreateDrop(sdk.WrapSDKContext(testInput.Context), &d) + require.Error(t, err) //validate GetMember - members, memberfound := testInput.MarketKeeper.GetMember(testInput.Context, denomB, denomA) - members1, memberfound1 := testInput.MarketKeeper.GetMember(testInput.Context, denomA, denomB) + memberA, memberfound := testInput.MarketKeeper.GetMember(testInput.Context, denomB, denomA) + memberB, memberfound1 := testInput.MarketKeeper.GetMember(testInput.Context, denomA, denomB) require.True(t, memberfound) - require.Equal(t, members.DenomA, denomB) - require.Equal(t, members.DenomB, denomA) - require.Equal(t, "33", members.Balance.String()) + require.Equal(t, memberA.DenomA, denomB) + require.Equal(t, memberA.DenomB, denomA) + require.Equal(t, "30", memberA.Balance.String()) require.True(t, memberfound1) - require.Equal(t, members1.DenomA, denomA) - require.Equal(t, members1.DenomB, denomB) - require.Equal(t, "44", members1.Balance.String()) + require.Equal(t, memberB.DenomA, denomA) + require.Equal(t, memberB.DenomB, denomB) + require.Equal(t, "40", memberB.Balance.String()) } func TestCreateDrop_ValidateSenderBalance(t *testing.T) { testInput := keepertest.CreateTestEnvironment(t) //TestData - testdata := testData{coinAStr: "30CoinA", coinBStr: "40CoinB", RateAstrArray: []string{"30", "40"}, RateBstrArray: []string{"50", "60"}} + testdata := testData{coinAStr: "30CoinA", coinBStr: "40CoinB", RateAstrArray: []string{"30", "34"}, RateBstrArray: []string{"50", "60"}} coinPair, _ := sample.SampleCoins("35CoinA", "45CoinB") denomA, denomB := sample.SampleDenoms(coinPair) pair := strings.Join([]string{denomA, denomB}, ",") @@ -534,12 +523,14 @@ func TestZeroAmtPaid(t *testing.T) { rst1, found := testInput.MarketKeeper.GetPool(testInput.Context, pair) require.True(t, found) require.Equal(t, rst1.Pair, pair) - require.Equal(t, "4000", rst1.Drops.String()) + require.Equal(t, "63", rst1.Drops.String()) require.Equal(t, 1, len(rst1.Leaders)) - require.Equal(t, "4000", rst1.Leaders[0].Drops.String()) + require.Equal(t, "63", rst1.Leaders[0].Drops.String()) // Validate CreateDrop + // There should not be a situation where zero amt is paid for either member + // There is a round up (+1) to all dropAmounts var d = types.MsgCreateDrop{Creator: addr, Pair: pair, Drops: "1"} _, err = keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreateDrop(sdk.WrapSDKContext(testInput.Context), &d) - require.Error(t, err) + require.NoError(t, err) } From 9a23f7a16b4dff9a4e124dccc3de8d89bac982ba Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Fri, 7 Jun 2024 18:48:36 -0500 Subject: [PATCH 13/35] Update test for Sqrt(XY) pool basis --- x/market/keeper/msg_server_create_order_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/market/keeper/msg_server_create_order_test.go b/x/market/keeper/msg_server_create_order_test.go index a8b99460..d6c24448 100644 --- a/x/market/keeper/msg_server_create_order_test.go +++ b/x/market/keeper/msg_server_create_order_test.go @@ -201,7 +201,7 @@ func TestBookEnds(t *testing.T) { require.True(t, memberAskfound) require.Equal(t, memberAsk.DenomA, denomB) require.Equal(t, memberAsk.DenomB, denomA) - require.Equal(t, "33", memberAsk.Balance.String()) + require.Equal(t, "136", memberAsk.Balance.String()) require.Equal(t, memberAsk.Stop, uint64(0)) // Create Order Msg Type From 2b70a426f5e1c73fc0ca585429f25fd2d04a0fd8 Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Fri, 7 Jun 2024 19:43:41 -0500 Subject: [PATCH 14/35] Update tests to Sqrt(XY) pool basis --- .../keeper/msg_server_cancel_order_test.go | 53 ++++++++++--------- 1 file changed, 28 insertions(+), 25 deletions(-) diff --git a/x/market/keeper/msg_server_cancel_order_test.go b/x/market/keeper/msg_server_cancel_order_test.go index 02751e63..c13ee816 100644 --- a/x/market/keeper/msg_server_cancel_order_test.go +++ b/x/market/keeper/msg_server_cancel_order_test.go @@ -2,12 +2,10 @@ package keeper_test import ( "strconv" - "strings" "testing" sdk "github.com/cosmos/cosmos-sdk/types" keepertest "github.com/pendulum-labs/market/testutil/keeper" - "github.com/pendulum-labs/market/testutil/sample" "github.com/pendulum-labs/market/x/market/keeper" "github.com/pendulum-labs/market/x/market/types" "github.com/stretchr/testify/require" @@ -15,11 +13,6 @@ import ( func TestCancelOrder_case1_stop(t *testing.T) { testInput := keepertest.CreateTestEnvironment(t) - // TestData - testdata := testData{coinAStr: "30CoinA", coinBStr: "40CoinB", RateAstrArray: []string{"60", "70"}, RateBstrArray: []string{"80", "90"}} - coinPair, _ := sample.SampleCoins("70CoinA", "70CoinB") - denomA, denomB := sample.SampleDenoms(coinPair) - pair := strings.Join([]string{denomA, denomB}, ",") // MintCoins require.NoError(t, testInput.BankKeeper.MintCoins(testInput.Context, types.ModuleName, coinPair)) @@ -61,7 +54,7 @@ func TestCancelOrder_case1_stop(t *testing.T) { require.True(t, memberfound) require.Equal(t, memberA.DenomA, denomB) require.Equal(t, memberA.DenomB, denomA) - require.Equal(t, "33", memberA.Balance.String()) + require.Equal(t, "136", memberA.Balance.String()) require.Equal(t, memberA.Stop, uint64(0)) // Cancel Order @@ -77,7 +70,7 @@ func TestCancelOrder_case1_stop(t *testing.T) { require.True(t, memberfound) require.Equal(t, memberA.DenomA, denomB) require.Equal(t, memberA.DenomB, denomA) - require.Equal(t, "33", memberA.Balance.String()) + require.Equal(t, "136", memberA.Balance.String()) require.Equal(t, memberA.Stop, uint64(0)) //Validate Order @@ -94,11 +87,6 @@ func TestCancelOrder_case1_stop(t *testing.T) { func TestCancelOrder_case1_limit(t *testing.T) { testInput := keepertest.CreateTestEnvironment(t) - // TestData - testdata := testData{coinAStr: "30CoinA", coinBStr: "40CoinB", RateAstrArray: []string{"60", "70"}, RateBstrArray: []string{"80", "90"}} - coinPair, _ := sample.SampleCoins("70CoinA", "70CoinB") - denomA, denomB := sample.SampleDenoms(coinPair) - pair := strings.Join([]string{denomA, denomB}, ",") // MintCoins require.NoError(t, testInput.BankKeeper.MintCoins(testInput.Context, types.ModuleName, coinPair)) @@ -122,6 +110,14 @@ func TestCancelOrder_case1_limit(t *testing.T) { balanceBefore := testInput.BankKeeper.GetBalance(testInput.Context, sdk.AccAddress(addr), denomB) + //Validate GetMember + memberBid, memberfoundBid := testInput.MarketKeeper.GetMember(testInput.Context, denomA, denomB) + require.True(t, memberfoundBid) + require.Equal(t, memberBid.DenomA, denomA) + require.Equal(t, memberBid.DenomB, denomB) + require.Equal(t, "182", memberBid.Balance.String()) + require.Equal(t, memberBid.Stop, uint64(0)) + // Create Order var o = types.MsgCreateOrder{Creator: addr, DenomAsk: denomA, DenomBid: denomB, Rate: testdata.RateAstrArray, OrderType: "limit", Amount: "0", Prev: "0", Next: "0"} _, err = keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreateOrder(sdk.WrapSDKContext(testInput.Context), &o) @@ -138,11 +134,11 @@ func TestCancelOrder_case1_limit(t *testing.T) { require.Equal(t, orders.Amount.String(), o.Amount) //Validate GetMember - memberBid, memberfoundBid := testInput.MarketKeeper.GetMember(testInput.Context, orders.DenomAsk, orders.DenomBid) + memberBid, memberfoundBid = testInput.MarketKeeper.GetMember(testInput.Context, orders.DenomAsk, orders.DenomBid) require.True(t, memberfoundBid) require.Equal(t, memberBid.DenomA, denomA) require.Equal(t, memberBid.DenomB, denomB) - require.Equal(t, "44", memberBid.Balance.String()) + require.Equal(t, "182", memberBid.Balance.String()) require.Equal(t, memberBid.Stop, uint64(0)) memberBid.Stop = orders.Uid @@ -161,7 +157,7 @@ func TestCancelOrder_case1_limit(t *testing.T) { require.True(t, memberfoundBid) require.Equal(t, memberBid.DenomA, denomA) require.Equal(t, memberBid.DenomB, denomB) - require.Equal(t, "44", memberBid.Balance.String()) + require.Equal(t, "182", memberBid.Balance.String()) require.Equal(t, memberBid.Stop, uint64(orders.Uid)) //Validate Order @@ -173,16 +169,23 @@ func TestCancelOrder_case1_limit(t *testing.T) { require.Equal(t, orders.Amount.String(), o.Amount) require.Equal(t, orders.OrderType, "limit") + // Validate GetPool + rst, found := testInput.MarketKeeper.GetPool(testInput.Context, pair) + require.True(t, found) + + // Calculate Product After + memberAsk, memberAskFound := testInput.MarketKeeper.GetMember(testInput.Context, denomB, denomA) + require.True(t, memberAskFound) + memberBid, memberBidFound := testInput.MarketKeeper.GetMember(testInput.Context, denomA, denomB) + require.True(t, memberBidFound) + + productAfter := memberAsk.Balance.Mul(memberBid.Balance) + require.True(t, productAfter.GTE(rst.Drops)) } func TestCancelOrder_case2_stop(t *testing.T) { testInput := keepertest.CreateTestEnvironment(t) - // TestData - testdata := testData{coinAStr: "30CoinA", coinBStr: "40CoinB", RateAstrArray: []string{"60", "70"}, RateBstrArray: []string{"80", "90"}} - coinPair, _ := sample.SampleCoins("70CoinA", "70CoinB") - denomA, denomB := sample.SampleDenoms(coinPair) - pair := strings.Join([]string{denomA, denomB}, ",") // MintCoins require.NoError(t, testInput.BankKeeper.MintCoins(testInput.Context, types.ModuleName, coinPair)) @@ -226,7 +229,7 @@ func TestCancelOrder_case2_stop(t *testing.T) { require.True(t, memberAskfound) require.Equal(t, memberAsk.DenomA, denomB) require.Equal(t, memberAsk.DenomB, denomA) - require.Equal(t, "33", memberAsk.Balance.String()) + require.Equal(t, "136", memberAsk.Balance.String()) require.Equal(t, memberAsk.Stop, uint64(0)) o.Next = strconv.FormatUint(beforecount, 10) @@ -251,7 +254,7 @@ func TestCancelOrder_case2_stop(t *testing.T) { require.True(t, memberBidfound) require.Equal(t, memberBid.DenomA, denomA) require.Equal(t, memberBid.DenomB, denomB) - require.Equal(t, "44", memberBid.Balance.String()) + require.Equal(t, "182", memberBid.Balance.String()) require.Equal(t, memberBid.Stop, beforecount) // Validate Order @@ -299,7 +302,7 @@ func TestCancelOrderEmptyPool(t *testing.T) { require.True(t, memberAskfound) require.Equal(t, memberAsk.DenomA, denomB) require.Equal(t, memberAsk.DenomB, denomA) - require.Equal(t, "33", memberAsk.Balance.String()) + require.Equal(t, "136", memberAsk.Balance.String()) require.Equal(t, memberAsk.Stop, uint64(0)) // Validate RedeemDrop From 2e551eb752096934f077f37a9af72a53db0b0159 Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Fri, 7 Jun 2024 19:47:17 -0500 Subject: [PATCH 15/35] Add integer checks on # of drops input --- x/market/keeper/msg_server_create_drop.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/x/market/keeper/msg_server_create_drop.go b/x/market/keeper/msg_server_create_drop.go index 123d83b5..1042f263 100644 --- a/x/market/keeper/msg_server_create_drop.go +++ b/x/market/keeper/msg_server_create_drop.go @@ -53,7 +53,14 @@ func (k msgServer) CreateDrop(goCtx context.Context, msg *types.MsgCreateDrop) ( // Create the uid uid := k.GetUidCount(ctx) - drops, _ := sdk.NewIntFromString(msg.Drops) + drops, ok := sdk.NewIntFromString(msg.Drops) + if !ok { + return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "drops not a valid integer") + } + + if !drops.GT(sdk.ZeroInt()) { + return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "drops not >0") + } dropAmtMember1, dropAmtMember2, error := dropAmounts(drops, pool, member1, member2) if error != nil { From 6d912ff3179383b1881846417e8987a92f93ea98 Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Fri, 7 Jun 2024 19:49:47 -0500 Subject: [PATCH 16/35] Update test amounts for Sqrt(XY) pool basis --- .../keeper/msg_server_market_order_test.go | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/x/market/keeper/msg_server_market_order_test.go b/x/market/keeper/msg_server_market_order_test.go index 28b1b2d1..d34c55b3 100644 --- a/x/market/keeper/msg_server_market_order_test.go +++ b/x/market/keeper/msg_server_market_order_test.go @@ -32,6 +32,14 @@ func TestMarketOrder(t *testing.T) { require.NoError(t, error) + // Validate GetMember + memberAsk, memberAskFound := testInput.MarketKeeper.GetMember(testInput.Context, denomB, denomA) + require.True(t, memberAskFound) + memberBid, memberBidFound := testInput.MarketKeeper.GetMember(testInput.Context, denomA, denomB) + require.True(t, memberBidFound) + + productBefore := memberAsk.Balance.Mul(memberBid.Balance) + _, err := keeper.NewMsgServerImpl(*testInput.MarketKeeper).MarketOrder(wctx, &o) require.NoError(t, err) @@ -48,13 +56,20 @@ func TestMarketOrder(t *testing.T) { */ - // Validate GetMember - memberAsk, memberAskfound := testInput.MarketKeeper.GetMember(testInput.Context, denomB, denomA) + // Calculate Product After + memberAsk, memberAskFound = testInput.MarketKeeper.GetMember(testInput.Context, denomB, denomA) + require.True(t, memberAskFound) + memberBid, memberBidFound = testInput.MarketKeeper.GetMember(testInput.Context, denomA, denomB) + require.True(t, memberBidFound) + + productAfter := memberAsk.Balance.Mul(memberBid.Balance) + + require.True(t, productAfter.GT(productBefore)) - require.True(t, memberAskfound) + require.True(t, memberAskFound) require.Equal(t, memberAsk.DenomA, denomB) require.Equal(t, memberAsk.DenomB, denomA) - require.Equal(t, "18", memberAsk.Balance.String()) + require.Equal(t, "121", memberAsk.Balance.String()) require.Equal(t, memberAsk.Stop, uint64(0)) // Validate order estimation From 3b276c7317c329d2e67444df3e34d0ae0b969561 Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Sat, 8 Jun 2024 18:45:56 -0500 Subject: [PATCH 17/35] Save v1 pool type in migrations --- x/market/migrations/v1/types/pool.pb.go | 1066 +++++++++++++++++++++++ 1 file changed, 1066 insertions(+) create mode 100644 x/market/migrations/v1/types/pool.pb.go diff --git a/x/market/migrations/v1/types/pool.pb.go b/x/market/migrations/v1/types/pool.pb.go new file mode 100644 index 00000000..9155701a --- /dev/null +++ b/x/market/migrations/v1/types/pool.pb.go @@ -0,0 +1,1066 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: market/pool.proto + +package types + +import ( + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type Pool struct { + Pair string `protobuf:"bytes,1,opt,name=pair,proto3" json:"pair,omitempty"` + Denom1 string `protobuf:"bytes,2,opt,name=denom1,proto3" json:"denom1,omitempty"` + Denom2 string `protobuf:"bytes,3,opt,name=denom2,proto3" json:"denom2,omitempty"` + Volume1 *Volume `protobuf:"bytes,4,opt,name=volume1,proto3" json:"volume1,omitempty"` + Volume2 *Volume `protobuf:"bytes,5,opt,name=volume2,proto3" json:"volume2,omitempty"` + Leaders []*Leader `protobuf:"bytes,6,rep,name=leaders,proto3" json:"leaders,omitempty"` + Drops github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,7,opt,name=drops,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"drops"` + History uint64 `protobuf:"varint,8,opt,name=history,proto3" json:"history,omitempty"` +} + +func (m *Pool) Reset() { *m = Pool{} } +func (m *Pool) String() string { return proto.CompactTextString(m) } +func (*Pool) ProtoMessage() {} +func (*Pool) Descriptor() ([]byte, []int) { + return fileDescriptor_adb392bd01694df9, []int{0} +} +func (m *Pool) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Pool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Pool.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Pool) XXX_Merge(src proto.Message) { + xxx_messageInfo_Pool.Merge(m, src) +} +func (m *Pool) XXX_Size() int { + return m.Size() +} +func (m *Pool) XXX_DiscardUnknown() { + xxx_messageInfo_Pool.DiscardUnknown(m) +} + +var xxx_messageInfo_Pool proto.InternalMessageInfo + +type Leader struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Drops github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=drops,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"drops"` +} + +func (m *Leader) Reset() { *m = Leader{} } +func (m *Leader) String() string { return proto.CompactTextString(m) } +func (*Leader) ProtoMessage() {} +func (*Leader) Descriptor() ([]byte, []int) { + return fileDescriptor_adb392bd01694df9, []int{1} +} +func (m *Leader) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Leader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Leader.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Leader) XXX_Merge(src proto.Message) { + xxx_messageInfo_Leader.Merge(m, src) +} +func (m *Leader) XXX_Size() int { + return m.Size() +} +func (m *Leader) XXX_DiscardUnknown() { + xxx_messageInfo_Leader.DiscardUnknown(m) +} + +var xxx_messageInfo_Leader proto.InternalMessageInfo + +type Volume struct { + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"` +} + +func (m *Volume) Reset() { *m = Volume{} } +func (m *Volume) String() string { return proto.CompactTextString(m) } +func (*Volume) ProtoMessage() {} +func (*Volume) Descriptor() ([]byte, []int) { + return fileDescriptor_adb392bd01694df9, []int{2} +} +func (m *Volume) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Volume) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Volume.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Volume) XXX_Merge(src proto.Message) { + xxx_messageInfo_Volume.Merge(m, src) +} +func (m *Volume) XXX_Size() int { + return m.Size() +} +func (m *Volume) XXX_DiscardUnknown() { + xxx_messageInfo_Volume.DiscardUnknown(m) +} + +var xxx_messageInfo_Volume proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Pool)(nil), "pendulumlabs.market.market.Pool") + proto.RegisterType((*Leader)(nil), "pendulumlabs.market.market.Leader") + proto.RegisterType((*Volume)(nil), "pendulumlabs.market.market.Volume") +} + +func init() { proto.RegisterFile("market/pool.proto", fileDescriptor_adb392bd01694df9) } + +var fileDescriptor_adb392bd01694df9 = []byte{ + // 366 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x92, 0x31, 0x4f, 0xc2, 0x40, + 0x14, 0xc7, 0x7b, 0x50, 0x8a, 0x9e, 0x93, 0x17, 0x62, 0x2e, 0x0c, 0x47, 0xd3, 0xc1, 0xb0, 0x70, + 0x0d, 0x75, 0x75, 0x22, 0xc6, 0xc4, 0xc4, 0x81, 0x74, 0x70, 0x70, 0x2b, 0xf4, 0x04, 0x42, 0xdb, + 0xd7, 0xf4, 0x5a, 0x23, 0xdf, 0xc2, 0x8f, 0xc5, 0xc8, 0x48, 0x1c, 0x88, 0x80, 0x1f, 0xc4, 0xf4, + 0xda, 0x0a, 0x8b, 0x31, 0xea, 0x74, 0xef, 0xbd, 0xfe, 0x7f, 0xf7, 0x7f, 0xbd, 0xf7, 0xf0, 0x79, + 0xe8, 0x25, 0x73, 0x91, 0xda, 0x31, 0x40, 0xc0, 0xe3, 0x04, 0x52, 0x20, 0xed, 0x58, 0x44, 0x7e, + 0x16, 0x64, 0x61, 0xe0, 0x8d, 0x24, 0x2f, 0xbe, 0x97, 0x47, 0xbb, 0x35, 0x81, 0x09, 0x28, 0x99, + 0x9d, 0x47, 0x05, 0x61, 0x7d, 0xd4, 0xb0, 0x3e, 0x04, 0x08, 0x08, 0xc1, 0x7a, 0xec, 0xcd, 0x12, + 0x8a, 0x4c, 0xd4, 0x3d, 0x75, 0x55, 0x4c, 0x2e, 0xb0, 0xe1, 0x8b, 0x08, 0xc2, 0x3e, 0xad, 0xa9, + 0x6a, 0x99, 0x7d, 0xd5, 0x1d, 0x5a, 0x3f, 0xaa, 0x3b, 0xe4, 0x1a, 0x37, 0x9f, 0x21, 0xc8, 0x42, + 0xd1, 0xa7, 0xba, 0x89, 0xba, 0x67, 0x8e, 0xc5, 0xbf, 0x6f, 0x88, 0x3f, 0x28, 0xa9, 0x5b, 0x21, + 0x07, 0xda, 0xa1, 0x8d, 0xdf, 0xd2, 0xca, 0x3b, 0x10, 0x9e, 0x2f, 0x12, 0x49, 0x0d, 0xb3, 0xfe, + 0x13, 0x7d, 0xaf, 0xa4, 0x6e, 0x85, 0x90, 0x1b, 0xdc, 0xf0, 0x13, 0x88, 0x25, 0x6d, 0xe6, 0x3f, + 0x34, 0xe0, 0xcb, 0x4d, 0x47, 0x7b, 0xdb, 0x74, 0x2e, 0x27, 0xb3, 0x74, 0x9a, 0x8d, 0xf8, 0x18, + 0x42, 0x7b, 0x0c, 0x32, 0x04, 0x59, 0x1e, 0x3d, 0xe9, 0xcf, 0xed, 0x74, 0x11, 0x0b, 0xc9, 0xef, + 0xa2, 0xd4, 0x2d, 0x60, 0x42, 0x71, 0x73, 0x3a, 0x93, 0x29, 0x24, 0x0b, 0x7a, 0x62, 0xa2, 0xae, + 0xee, 0x56, 0xa9, 0x35, 0xc5, 0x46, 0x61, 0x99, 0x6b, 0x3c, 0xdf, 0x4f, 0x84, 0x94, 0xe5, 0x53, + 0x57, 0xe9, 0xa1, 0x87, 0xda, 0x3f, 0x7a, 0xb0, 0x9e, 0xb0, 0x51, 0x3c, 0x0d, 0x69, 0xe1, 0x86, + 0x9a, 0x4b, 0xe9, 0x53, 0x24, 0xe4, 0x16, 0x1b, 0x5e, 0x08, 0x59, 0x94, 0xfe, 0xd1, 0xa6, 0xa4, + 0x07, 0xc3, 0xe5, 0x96, 0x69, 0xeb, 0x2d, 0x43, 0xcb, 0x1d, 0x43, 0xab, 0x1d, 0x43, 0xef, 0x3b, + 0x86, 0x5e, 0xf7, 0x4c, 0x5b, 0xed, 0x99, 0xb6, 0xde, 0x33, 0xed, 0x91, 0x1f, 0xdd, 0x58, 0x8d, + 0xa2, 0x97, 0xcf, 0xc2, 0x2e, 0x17, 0xf7, 0xa5, 0x0a, 0xd4, 0xed, 0x23, 0x43, 0x6d, 0xe4, 0xd5, + 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9b, 0xf2, 0x98, 0x47, 0xd8, 0x02, 0x00, 0x00, +} + +func (m *Pool) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Pool) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Pool) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.History != 0 { + i = encodeVarintPool(dAtA, i, uint64(m.History)) + i-- + dAtA[i] = 0x40 + } + { + size := m.Drops.Size() + i -= size + if _, err := m.Drops.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintPool(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + if len(m.Leaders) > 0 { + for iNdEx := len(m.Leaders) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Leaders[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPool(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + } + if m.Volume2 != nil { + { + size, err := m.Volume2.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPool(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if m.Volume1 != nil { + { + size, err := m.Volume1.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPool(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if len(m.Denom2) > 0 { + i -= len(m.Denom2) + copy(dAtA[i:], m.Denom2) + i = encodeVarintPool(dAtA, i, uint64(len(m.Denom2))) + i-- + dAtA[i] = 0x1a + } + if len(m.Denom1) > 0 { + i -= len(m.Denom1) + copy(dAtA[i:], m.Denom1) + i = encodeVarintPool(dAtA, i, uint64(len(m.Denom1))) + i-- + dAtA[i] = 0x12 + } + if len(m.Pair) > 0 { + i -= len(m.Pair) + copy(dAtA[i:], m.Pair) + i = encodeVarintPool(dAtA, i, uint64(len(m.Pair))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Leader) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Leader) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Leader) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Drops.Size() + i -= size + if _, err := m.Drops.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintPool(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintPool(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Volume) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Volume) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Volume) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Amount.Size() + i -= size + if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintPool(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintPool(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintPool(dAtA []byte, offset int, v uint64) int { + offset -= sovPool(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Pool) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Pair) + if l > 0 { + n += 1 + l + sovPool(uint64(l)) + } + l = len(m.Denom1) + if l > 0 { + n += 1 + l + sovPool(uint64(l)) + } + l = len(m.Denom2) + if l > 0 { + n += 1 + l + sovPool(uint64(l)) + } + if m.Volume1 != nil { + l = m.Volume1.Size() + n += 1 + l + sovPool(uint64(l)) + } + if m.Volume2 != nil { + l = m.Volume2.Size() + n += 1 + l + sovPool(uint64(l)) + } + if len(m.Leaders) > 0 { + for _, e := range m.Leaders { + l = e.Size() + n += 1 + l + sovPool(uint64(l)) + } + } + l = m.Drops.Size() + n += 1 + l + sovPool(uint64(l)) + if m.History != 0 { + n += 1 + sovPool(uint64(m.History)) + } + return n +} + +func (m *Leader) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovPool(uint64(l)) + } + l = m.Drops.Size() + n += 1 + l + sovPool(uint64(l)) + return n +} + +func (m *Volume) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovPool(uint64(l)) + } + l = m.Amount.Size() + n += 1 + l + sovPool(uint64(l)) + return n +} + +func sovPool(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozPool(x uint64) (n int) { + return sovPool(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Pool) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Pool: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Pool: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pair", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPool + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Pair = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom1", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPool + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom1 = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom2", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPool + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom2 = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Volume1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPool + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Volume1 == nil { + m.Volume1 = &Volume{} + } + if err := m.Volume1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Volume2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPool + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Volume2 == nil { + m.Volume2 = &Volume{} + } + if err := m.Volume2.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Leaders", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPool + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Leaders = append(m.Leaders, &Leader{}) + if err := m.Leaders[len(m.Leaders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Drops", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPool + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Drops.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field History", wireType) + } + m.History = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.History |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipPool(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPool + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Leader) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Leader: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Leader: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPool + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Drops", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPool + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Drops.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPool(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPool + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Volume) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Volume: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Volume: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPool + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPool + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPool(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPool + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipPool(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowPool + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowPool + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowPool + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthPool + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupPool + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthPool + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthPool = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowPool = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupPool = fmt.Errorf("proto: unexpected end of group") +) From 64021e273374b3096b81b2a7f6b1a43b382edbff Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Sat, 8 Jun 2024 19:12:54 -0500 Subject: [PATCH 18/35] Add LastDrop to Pool.proto --- docs/static/openapi.yml | 41590 +++++++++++----- go.mod | 18 +- go.sum | 32 +- proto/market/pool.proto | 1 + .../pendulumlabs.market.market/index.ts | 48 +- .../module/index.ts | 12 +- .../pendulumlabs.market.market/module/rest.ts | 3 + .../module/types/market/pool.ts | 19 + x/market/types/pool.pb.go | 94 +- 9 files changed, 28401 insertions(+), 13416 deletions(-) diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index 33014020..2d231c73 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -18222,194 +18222,33 @@ paths: format: int64 tags: - Query - '/pendulum-labs/market/market/book/{denomA}/{denomB}/{orderType}': + /ibc/apps/interchain_accounts/host/v1/params: get: - summary: Queries a list of Book items. - operationId: PendulumlabsMarketMarketBook + summary: Params queries all parameters of the ICA host submodule. + operationId: IbcApplicationsInterchainAccountsHostV1Params responses: '200': description: A successful response. schema: type: object properties: - book: - type: array - items: - type: object - properties: - uid: - type: string - format: uint64 - owner: - type: string - status: - type: string - orderType: - type: string - denomAsk: - type: string - denomBid: - type: string - amount: - type: string - rate: - type: array - items: - type: string - prev: - type: string - format: uint64 - next: - type: string - format: uint64 - beg_time: - type: string - format: int64 - upd_time: - type: string - format: int64 - pagination: + params: + description: params defines the parameters of the module. type: object properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: >- - PageResponse is to be embedded in gRPC response messages where - the - - corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': + host_enabled: + type: boolean + description: host_enabled enables or disables the host submodule. + allow_messages: + type: array + items: type: string - additionalProperties: {} - parameters: - - name: denomA - in: path - required: true - type: string - - name: denomB - in: path - required: true - type: string - - name: orderType - in: path - required: true - type: string - - name: pagination.key - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - in: query - required: false - type: string - format: byte - - name: pagination.offset - description: >- - offset is a numeric offset that can be used when key is unavailable. - - It is less efficient than using key. Only one of offset or key - should - - be set. - in: query - required: false - type: string - format: uint64 - - name: pagination.limit - description: >- - limit is the total number of results to be returned in the result - page. - - If left empty it will default to a value to be set by each app. - in: query - required: false - type: string - format: uint64 - - name: pagination.count_total - description: >- - count_total is set to true to indicate that the result set should - include - - a count of the total number of items available for pagination in - UIs. - - count_total is only respected when offset is used. It is ignored - when key - - is set. - in: query - required: false - type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean - tags: - - Query - '/pendulum-labs/market/market/bookends/{coinA}/{coinB}/{orderType}/{rate}': - get: - summary: Queries a list of Bookends items. - operationId: PendulumlabsMarketMarketBookends - responses: - '200': - description: A successful response. - schema: - type: object - properties: - coinA: - type: string - coinB: - type: string - orderType: - type: string - rate: - type: array - items: - type: string - prev: - type: string - format: uint64 - next: - type: string - format: uint64 + description: >- + allow_messages defines a list of sdk message typeURLs + allowed to be executed on a host chain. + description: >- + QueryParamsResponse is the response type for the Query/Params RPC + method. default: description: An unexpected error response. schema: @@ -18428,43 +18267,26 @@ paths: '@type': type: string additionalProperties: {} - parameters: - - name: coinA - in: path - required: true - type: string - - name: coinB - in: path - required: true - type: string - - name: orderType - in: path - required: true - type: string - - name: rate - in: path - required: true - type: array - items: - type: string - collectionFormat: csv - minItems: 1 tags: - Query - /pendulum-labs/market/market/burned: + '/ibc/apps/transfer/v1/channels/{channel_id}/ports/{port_id}/escrow_address': get: - summary: Queries total burned. - operationId: PendulumlabsMarketMarketBurned + summary: >- + EscrowAddress returns the escrow address for a particular port and + channel id. + operationId: IbcApplicationsTransferV1EscrowAddress responses: '200': description: A successful response. schema: type: object properties: - denom: - type: string - amount: + escrow_address: type: string + title: the escrow account address + description: >- + QueryEscrowAddressResponse is the response type of the + EscrowAddress RPC method. default: description: An unexpected error response. schema: @@ -18482,149 +18304,205 @@ paths: properties: '@type': type: string - additionalProperties: {} - tags: - - Query - /pendulum-labs/market/market/burnings: - get: - summary: Queries a list of Burnings items. - operationId: PendulumlabsMarketMarketBurningsAll - responses: - '200': - description: A successful response. - schema: - type: object - properties: - burnings: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - pagination: - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - was set, its value is undefined otherwise - description: >- - PageResponse is to be embedded in gRPC response messages where - the + protocol buffer message. This string must contain at + least - corresponding request message has used PageRequest. + one "/" character. The last segment of the URL's path + must represent - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. additionalProperties: {} - parameters: - - name: pagination.key - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - in: query - required: false - type: string - format: byte - - name: pagination.offset - description: >- - offset is a numeric offset that can be used when key is unavailable. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a - It is less efficient than using key. Only one of offset or key - should + URL that describes the type of the serialized message. - be set. - in: query - required: false - type: string - format: uint64 - - name: pagination.limit - description: >- - limit is the total number of results to be returned in the result - page. - If left empty it will default to a value to be set by each app. - in: query - required: false - type: string - format: uint64 - - name: pagination.count_total - description: >- - count_total is set to true to indicate that the result set should - include + Protobuf library provides support to pack/unpack Any values + in the form - a count of the total number of items available for pagination in - UIs. + of utility functions or additional generated methods of the + Any type. - count_total is only respected when offset is used. It is ignored - when key - is set. - in: query - required: false - type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + Example 2: Pack and unpack a message in Java. - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: channel_id + description: unique channel identifier + in: path + required: true + type: string + - name: port_id + description: unique port identifier + in: path + required: true + type: string tags: - Query - '/pendulum-labs/market/market/burnings/{denom}': + '/ibc/apps/transfer/v1/denom_hashes/{trace}': get: - summary: Queries a Burnings by index. - operationId: PendulumlabsMarketMarketBurnings + summary: DenomHash queries a denomination hash information. + operationId: IbcApplicationsTransferV1DenomHash responses: '200': description: A successful response. schema: type: object properties: - burnings: - type: object - properties: - denom: - type: string - amount: - type: string + hash: + type: string + description: hash (in hex format) of the denomination trace information. + description: >- + QueryDenomHashResponse is the response type for the + Query/DenomHash RPC + + method. default: description: An unexpected error response. schema: @@ -18642,43 +18520,215 @@ paths: properties: '@type': type: string - additionalProperties: {} - parameters: - - name: denom - in: path - required: true - type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: trace + description: 'The denomination trace ([port_id]/[channel_id])+/[denom]' + in: path + required: true + type: string tags: - Query - /pendulum-labs/market/market/drop: + /ibc/apps/transfer/v1/denom_traces: get: - summary: Queries a list of Drop items. - operationId: PendulumlabsMarketMarketDropAll + summary: DenomTraces queries all denomination traces. + operationId: IbcApplicationsTransferV1DenomTraces responses: '200': description: A successful response. schema: type: object properties: - drops: + denom_traces: type: array items: type: object properties: - uid: - type: string - format: uint64 - owner: - type: string - pair: - type: string - drops: + path: type: string - product: + description: >- + path defines the chain of port/channel identifiers used + for tracing the + + source of the fungible token. + base_denom: type: string - active: - type: boolean + description: base denomination of the relayed fungible token. + description: >- + DenomTrace contains the base denomination for ICS20 fungible + tokens and the + + source tracing information path. + description: denom_traces returns all denominations trace information. pagination: + description: pagination defines the pagination in the response. type: object properties: next_key: @@ -18695,16 +18745,11 @@ paths: PageRequest.count_total was set, its value is undefined otherwise - description: >- - PageResponse is to be embedded in gRPC response messages where - the - - corresponding request message has used PageRequest. + description: >- + QueryConnectionsResponse is the response type for the + Query/DenomTraces RPC - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } + method. default: description: An unexpected error response. schema: @@ -18722,175 +18767,254 @@ paths: properties: '@type': type: string - additionalProperties: {} - parameters: - - name: pagination.key - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - in: query - required: false - type: string - format: byte - - name: pagination.offset - description: >- - offset is a numeric offset that can be used when key is unavailable. + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - It is less efficient than using key. Only one of offset or key - should + protocol buffer message. This string must contain at + least - be set. - in: query - required: false - type: string - format: uint64 - - name: pagination.limit - description: >- - limit is the total number of results to be returned in the result - page. + one "/" character. The last segment of the URL's path + must represent - If left empty it will default to a value to be set by each app. - in: query - required: false - type: string - format: uint64 - - name: pagination.count_total - description: >- - count_total is set to true to indicate that the result set should - include + the fully qualified name of the type (as in - a count of the total number of items available for pagination in - UIs. + `path/google.protobuf.Duration`). The name should be in + a canonical form - count_total is only respected when offset is used. It is ignored - when key + (e.g., leading "." is not accepted). - is set. - in: query - required: false - type: boolean - - name: pagination.reverse + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset description: >- - reverse is set to true if results are to be returned in the - descending order. + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key + should - Since: cosmos-sdk 0.43 + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. in: query required: false - type: boolean - tags: - - Query - '/pendulum-labs/market/market/drop/amounts/{uid}': - get: - summary: Queries a Drop by index. - operationId: PendulumlabsMarketMarketDropAmounts - responses: - '200': - description: A successful response. - schema: - type: object - properties: - denom1: - type: string - denom2: - type: string - amount1: - type: string - amount2: - type: string - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - additionalProperties: {} - parameters: - - name: uid - in: path - required: true type: string format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean tags: - Query - '/pendulum-labs/market/market/drop/coin/{denomA}/{denomB}/{amountA}': + '/ibc/apps/transfer/v1/denom_traces/{hash}': get: - summary: Queries a Drop by index. - operationId: PendulumlabsMarketMarketDropCoin + summary: DenomTrace queries a denomination trace information. + operationId: IbcApplicationsTransferV1DenomTrace responses: '200': description: A successful response. schema: type: object properties: - drops: - type: string - amountB: - type: string - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - additionalProperties: {} - parameters: - - name: denomA - in: path - required: true - type: string - - name: denomB - in: path - required: true - type: string - - name: amountA - in: path - required: true - type: string - tags: - - Query - '/pendulum-labs/market/market/drop/coins/{denom1}/{denom2}/{drops}': - get: - summary: Converts drops to coin amounts - operationId: PendulumlabsMarketMarketDropsToCoins - responses: - '200': - description: A successful response. - schema: - type: object - properties: - denom1: - type: string - amount1: - type: string - denom2: - type: string - amount2: - type: string + denom_trace: + description: >- + denom_trace returns the requested denomination trace + information. + type: object + properties: + path: + type: string + description: >- + path defines the chain of port/channel identifiers used + for tracing the + + source of the fungible token. + base_denom: + type: string + description: base denomination of the relayed fungible token. + description: >- + QueryDenomTraceResponse is the response type for the + Query/DenomTrace RPC + + method. default: description: An unexpected error response. schema: @@ -18908,36 +19032,215 @@ paths: properties: '@type': type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } parameters: - - name: denom1 - in: path - required: true - type: string - - name: denom2 - in: path - required: true - type: string - - name: drops + - name: hash + description: >- + hash (in hex format) or denom (full denom with ibc prefix) of the + denomination trace information. in: path required: true type: string tags: - Query - '/pendulum-labs/market/market/drop/pairs/{address}': + /ibc/apps/transfer/v1/params: get: - summary: Queries a Drop by index. - operationId: PendulumlabsMarketMarketDropPairs + summary: Params queries all parameters of the ibc-transfer module. + operationId: IbcApplicationsTransferV1Params responses: '200': description: A successful response. schema: type: object properties: - pairs: - type: array - items: - type: string + params: + description: params defines the parameters of the module. + type: object + properties: + send_enabled: + type: boolean + description: >- + send_enabled enables or disables all cross-chain token + transfers from this + + chain. + receive_enabled: + type: boolean + description: >- + receive_enabled enables or disables all cross-chain token + transfers to this + + chain. + description: >- + QueryParamsResponse is the response type for the Query/Params RPC + method. default: description: An unexpected error response. schema: @@ -18955,43 +19258,268 @@ paths: properties: '@type': type: string - additionalProperties: {} - parameters: - - name: address - in: path - required: true - type: string - tags: + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + tags: - Query - '/pendulum-labs/market/market/drop/{address}/{pair}': + /ibc/core/channel/v1/channels: get: - summary: Queries a Drop by index. - operationId: PendulumlabsMarketMarketDropOwnerPair + summary: Channels queries all the IBC channels of a chain. + operationId: IbcCoreChannelV1Channels responses: '200': description: A successful response. schema: type: object properties: - drops: + channels: type: array items: type: object properties: - uid: + state: + title: current state of the channel end type: string - format: uint64 - owner: + enum: + - STATE_UNINITIALIZED_UNSPECIFIED + - STATE_INIT + - STATE_TRYOPEN + - STATE_OPEN + - STATE_CLOSED + default: STATE_UNINITIALIZED_UNSPECIFIED + description: >- + State defines if a channel is in one of the following + states: + + CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. + + - STATE_UNINITIALIZED_UNSPECIFIED: Default State + - STATE_INIT: A channel has just started the opening handshake. + - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. + - STATE_OPEN: A channel has completed the handshake. Open channels are + ready to send and receive packets. + - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive + packets. + ordering: + title: whether the channel is ordered or unordered type: string - pair: + enum: + - ORDER_NONE_UNSPECIFIED + - ORDER_UNORDERED + - ORDER_ORDERED + default: ORDER_NONE_UNSPECIFIED + description: >- + - ORDER_NONE_UNSPECIFIED: zero-value for channel + ordering + - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in + which they were sent. + - ORDER_ORDERED: packets are delivered exactly in the order which they were sent + counterparty: + title: counterparty channel end + type: object + properties: + port_id: + type: string + description: >- + port on the counterparty chain which owns the other + end of the channel. + channel_id: + type: string + title: channel end on the counterparty chain + connection_hops: + type: array + items: + type: string + title: >- + list of connection identifiers, in order, along which + packets sent on + + this channel will travel + version: type: string - drops: + title: >- + opaque channel version, which is agreed upon during the + handshake + port_id: type: string - product: + title: port identifier + channel_id: type: string - active: - type: boolean + title: channel identifier + description: >- + IdentifiedChannel defines a channel with additional port and + channel + + identifier fields. + description: list of stored channels of the chain. pagination: + title: pagination response type: object properties: next_key: @@ -19018,6 +19546,38 @@ paths: repeated Bar results = 1; PageResponse page = 2; } + height: + title: query block height + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + description: >- + QueryChannelsResponse is the response type for the Query/Channels + RPC method. default: description: An unexpected error response. schema: @@ -19035,41 +19595,200 @@ paths: properties: '@type': type: string - additionalProperties: {} - parameters: - - name: address - in: path - required: true - type: string - - name: pair - in: path - required: true - type: string - - name: pagination.key - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - in: query - required: false - type: string - format: byte - - name: pagination.offset - description: >- - offset is a numeric offset that can be used when key is unavailable. + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - It is less efficient than using key. Only one of offset or key - should + protocol buffer message. This string must contain at + least - be set. - in: query - required: false - type: string - format: uint64 - - name: pagination.limit - description: >- - limit is the total number of results to be returned in the result - page. + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. If left empty it will default to a value to be set by each app. in: query @@ -19091,44 +19810,133 @@ paths: in: query required: false type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean tags: - Query - '/pendulum-labs/market/market/drop/{uid}': + '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}': get: - summary: Queries a Drop by index. - operationId: PendulumlabsMarketMarketDrop + summary: Channel queries an IBC Channel. + operationId: IbcCoreChannelV1Channel responses: '200': description: A successful response. schema: type: object properties: - drop: + channel: + title: channel associated with the request identifiers type: object properties: - uid: + state: + title: current state of the channel end type: string - format: uint64 - owner: + enum: + - STATE_UNINITIALIZED_UNSPECIFIED + - STATE_INIT + - STATE_TRYOPEN + - STATE_OPEN + - STATE_CLOSED + default: STATE_UNINITIALIZED_UNSPECIFIED + description: >- + State defines if a channel is in one of the following + states: + + CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. + + - STATE_UNINITIALIZED_UNSPECIFIED: Default State + - STATE_INIT: A channel has just started the opening handshake. + - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. + - STATE_OPEN: A channel has completed the handshake. Open channels are + ready to send and receive packets. + - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive + packets. + ordering: + title: whether the channel is ordered or unordered type: string - pair: + enum: + - ORDER_NONE_UNSPECIFIED + - ORDER_UNORDERED + - ORDER_ORDERED + default: ORDER_NONE_UNSPECIFIED + description: |- + - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering + - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in + which they were sent. + - ORDER_ORDERED: packets are delivered exactly in the order which they were sent + counterparty: + title: counterparty channel end + type: object + properties: + port_id: + type: string + description: >- + port on the counterparty chain which owns the other + end of the channel. + channel_id: + type: string + title: channel end on the counterparty chain + connection_hops: + type: array + items: + type: string + title: >- + list of connection identifiers, in order, along which + packets sent on + + this channel will travel + version: type: string - drops: + title: >- + opaque channel version, which is agreed upon during the + handshake + description: >- + Channel defines pipeline for exactly-once packet delivery + between specific + + modules on separate blockchains, which has at least one end + capable of + + sending packets and one end capable of receiving packets. + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: type: string - product: + format: uint64 + title: the revision that the client is currently on + revision_height: type: string - active: - type: boolean + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + description: >- + QueryChannelResponse is the response type for the Query/Channel + RPC method. + + Besides the Channel end, it includes a proof and the height from + which the + + proof was retrieved. default: description: An unexpected error response. schema: @@ -19146,439 +19954,423 @@ paths: properties: '@type': type: string - additionalProperties: {} - parameters: - - name: uid - in: path - required: true - type: string - format: uint64 - tags: - - Query - '/pendulum-labs/market/market/history/{pair}': - get: - summary: Queries pool trade history. - operationId: PendulumlabsMarketMarketHistory - responses: - '200': - description: A successful response. - schema: - type: object - properties: - history: - type: array - items: - type: object - properties: - uid: - type: string - format: uint64 - owner: - type: string - status: - type: string - orderType: - type: string - denomAsk: - type: string - denomBid: - type: string - amount: - type: string - rate: - type: array - items: - type: string - prev: - type: string - format: uint64 - next: - type: string - format: uint64 - beg_time: - type: string - format: int64 - upd_time: - type: string - format: int64 - pagination: - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - was set, its value is undefined otherwise - description: >- - PageResponse is to be embedded in gRPC response messages where - the + protocol buffer message. This string must contain at + least - corresponding request message has used PageRequest. + one "/" character. The last segment of the URL's path + must represent - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - additionalProperties: {} - parameters: - - name: pair - in: path - required: true - type: string - - name: length - in: query - required: false - type: string - - name: pagination.key - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - in: query - required: false - type: string - format: byte - - name: pagination.offset - description: >- - offset is a numeric offset that can be used when key is unavailable. + the fully qualified name of the type (as in - It is less efficient than using key. Only one of offset or key - should + `path/google.protobuf.Duration`). The name should be in + a canonical form - be set. - in: query - required: false - type: string - format: uint64 - - name: pagination.limit - description: >- - limit is the total number of results to be returned in the result - page. + (e.g., leading "." is not accepted). - If left empty it will default to a value to be set by each app. - in: query - required: false - type: string - format: uint64 - - name: pagination.count_total - description: >- - count_total is set to true to indicate that the result set should - include - a count of the total number of items available for pagination in - UIs. + In practice, teams usually precompile into the binary + all types that they - count_total is only respected when offset is used. It is ignored - when key + expect it to use in the context of Any. However, for + URLs which use the - is set. - in: query - required: false - type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. + scheme `http`, `https`, or no scheme, one can optionally + set up a type + server that maps type URLs to message definitions as + follows: - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean - tags: - - Query - /pendulum-labs/market/market/member: - get: - summary: Queries a list of Member items. - operationId: PendulumlabsMarketMarketMemberAll - responses: - '200': - description: A successful response. - schema: - type: object - properties: - member: - type: array - items: - type: object - properties: - pair: - type: string - denomA: - type: string - denomB: - type: string - balance: - type: string - previous: - type: string - limit: - type: string - format: uint64 - stop: - type: string - format: uint64 - pagination: - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - was set, its value is undefined otherwise - description: >- - PageResponse is to be embedded in gRPC response messages where - the + * If no scheme is provided, `https` is assumed. - corresponding request message has used PageRequest. + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - additionalProperties: {} - parameters: - - name: pagination.key - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - in: query - required: false - type: string - format: byte - - name: pagination.offset - description: >- - offset is a numeric offset that can be used when key is unavailable. + Note: this functionality is not currently available in + the official - It is less efficient than using key. Only one of offset or key - should + protobuf release, and it is not used for type URLs + beginning with - be set. - in: query - required: false - type: string - format: uint64 - - name: pagination.limit - description: >- - limit is the total number of results to be returned in the result - page. + type.googleapis.com. - If left empty it will default to a value to be set by each app. - in: query - required: false - type: string - format: uint64 - - name: pagination.count_total - description: >- - count_total is set to true to indicate that the result set should - include - a count of the total number of items available for pagination in - UIs. + Schemes other than `http`, `https` (or the empty scheme) + might be - count_total is only respected when offset is used. It is ignored - when key + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a - is set. - in: query - required: false - type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. + URL that describes the type of the serialized message. - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean - tags: - - Query - '/pendulum-labs/market/market/member/{denomA}/{denomB}': - get: - summary: Queries a Member by index. - operationId: PendulumlabsMarketMarketMember - responses: - '200': - description: A successful response. - schema: - type: object - properties: - member: - type: object - properties: - pair: - type: string - denomA: - type: string - denomB: - type: string - balance: - type: string - previous: - type: string - limit: - type: string - format: uint64 - stop: - type: string - format: uint64 - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - additionalProperties: {} + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } parameters: - - name: denomA + - name: channel_id + description: channel unique identifier in: path required: true type: string - - name: denomB + - name: port_id + description: port unique identifier in: path required: true type: string tags: - Query - /pendulum-labs/market/market/order: + '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/client_state': get: - summary: Queries a list of Order items. - operationId: PendulumlabsMarketMarketOrderAll + summary: >- + ChannelClientState queries for the client state for the channel + associated + + with the provided channel identifiers. + operationId: IbcCoreChannelV1ChannelClientState responses: '200': description: A successful response. schema: type: object properties: - orders: - type: array - items: - type: object - properties: - uid: - type: string - format: uint64 - owner: - type: string - status: - type: string - orderType: - type: string - denomAsk: - type: string - denomBid: - type: string - amount: - type: string - rate: - type: array - items: - type: string - prev: - type: string - format: uint64 - next: - type: string - format: uint64 - beg_time: - type: string - format: int64 - upd_time: - type: string - format: int64 - pagination: + identified_client_state: + title: client state associated with the channel type: object properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: + client_id: type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + title: client identifier + client_state: + title: client state + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type + of the serialized - was set, its value is undefined otherwise + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty + scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any + values in the form + + of utility functions or additional generated methods of + the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } description: >- - PageResponse is to be embedded in gRPC response messages where - the + IdentifiedClientState defines a client state with an + additional client - corresponding request message has used PageRequest. + identifier field. + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryChannelClientStateResponse is the Response type for the + Query/QueryChannelClientState RPC method default: description: An unexpected error response. schema: @@ -19596,265 +20388,408 @@ paths: properties: '@type': type: string - additionalProperties: {} - parameters: - - name: pagination.key - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - in: query - required: false - type: string - format: byte - - name: pagination.offset - description: >- - offset is a numeric offset that can be used when key is unavailable. + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - It is less efficient than using key. Only one of offset or key - should + protocol buffer message. This string must contain at + least - be set. - in: query - required: false - type: string - format: uint64 - - name: pagination.limit - description: >- - limit is the total number of results to be returned in the result - page. + one "/" character. The last segment of the URL's path + must represent - If left empty it will default to a value to be set by each app. - in: query - required: false - type: string - format: uint64 - - name: pagination.count_total - description: >- - count_total is set to true to indicate that the result set should - include + the fully qualified name of the type (as in - a count of the total number of items available for pagination in - UIs. + `path/google.protobuf.Duration`). The name should be in + a canonical form - count_total is only respected when offset is used. It is ignored - when key + (e.g., leading "." is not accepted). - is set. - in: query - required: false - type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. + In practice, teams usually precompile into the binary + all types that they - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: port_id + description: port unique identifier + in: path + required: true + type: string tags: - Query - '/pendulum-labs/market/market/order/uids/{address}': + '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/consensus_state/revision/{revision_number}/height/{revision_height}': get: - summary: Queries a list of Order items. - operationId: PendulumlabsMarketMarketOrderOwnerUids + summary: |- + ChannelConsensusState queries for the consensus state for the channel + associated with the provided channel identifiers. + operationId: IbcCoreChannelV1ChannelConsensusState responses: '200': description: A successful response. schema: type: object properties: - orders: - type: object - properties: - uids: - type: array - items: - type: string - format: uint64 - pagination: + consensus_state: + title: consensus state associated with the channel type: object properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: + '@type': type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - was set, its value is undefined otherwise - description: >- - PageResponse is to be embedded in gRPC response messages where - the + protocol buffer message. This string must contain at least - corresponding request message has used PageRequest. + one "/" character. The last segment of the URL's path must + represent - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - additionalProperties: {} - parameters: - - name: address - in: path - required: true - type: string - - name: pagination.key - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - in: query - required: false - type: string - format: byte - - name: pagination.offset - description: >- - offset is a numeric offset that can be used when key is unavailable. + the fully qualified name of the type (as in - It is less efficient than using key. Only one of offset or key - should + `path/google.protobuf.Duration`). The name should be in a + canonical form - be set. - in: query - required: false - type: string - format: uint64 - - name: pagination.limit - description: >- - limit is the total number of results to be returned in the result - page. + (e.g., leading "." is not accepted). - If left empty it will default to a value to be set by each app. - in: query - required: false - type: string - format: uint64 - - name: pagination.count_total - description: >- - count_total is set to true to indicate that the result set should - include - a count of the total number of items available for pagination in - UIs. + In practice, teams usually precompile into the binary all + types that they - count_total is only respected when offset is used. It is ignored - when key + expect it to use in the context of Any. However, for URLs + which use the - is set. - in: query - required: false - type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. + scheme `http`, `https`, or no scheme, one can optionally + set up a type + server that maps type URLs to message definitions as + follows: - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean - tags: - - Query - '/pendulum-labs/market/market/order/{address}': - get: - summary: Queries a list of Order items. - operationId: PendulumlabsMarketMarketOrderOwner - responses: - '200': - description: A successful response. - schema: - type: object - properties: - orders: - type: array - items: - type: object - properties: - uid: - type: string - format: uint64 - owner: - type: string - status: - type: string - orderType: - type: string - denomAsk: - type: string - denomBid: - type: string - amount: - type: string - rate: - type: array - items: - type: string - prev: - type: string - format: uint64 - next: - type: string - format: uint64 - beg_time: - type: string - format: int64 - upd_time: - type: string - format: int64 - pagination: + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + client_id: + type: string + title: client ID associated with the consensus state + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved type: object properties: - next_key: + revision_number: type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: + format: uint64 + title: the revision that the client is currently on + revision_height: type: string format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise + title: the height within the given revision description: >- - PageResponse is to be embedded in gRPC response messages where - the + Normally the RevisionHeight is incremented at each height + while keeping - corresponding request message has used PageRequest. + RevisionNumber the same. However some consensus algorithms may + choose to - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryChannelClientStateResponse is the Response type for the + Query/QueryChannelClientState RPC method default: description: An unexpected error response. schema: @@ -19872,114 +20807,251 @@ paths: properties: '@type': type: string - additionalProperties: {} - parameters: - - name: address - in: path - required: true - type: string - - name: pagination.key - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - in: query - required: false - type: string - format: byte - - name: pagination.offset - description: >- - offset is a numeric offset that can be used when key is unavailable. + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - It is less efficient than using key. Only one of offset or key - should + protocol buffer message. This string must contain at + least - be set. - in: query - required: false - type: string - format: uint64 - - name: pagination.limit - description: >- - limit is the total number of results to be returned in the result - page. + one "/" character. The last segment of the URL's path + must represent - If left empty it will default to a value to be set by each app. - in: query - required: false - type: string - format: uint64 - - name: pagination.count_total - description: >- - count_total is set to true to indicate that the result set should - include + the fully qualified name of the type (as in - a count of the total number of items available for pagination in - UIs. + `path/google.protobuf.Duration`). The name should be in + a canonical form - count_total is only respected when offset is used. It is ignored - when key + (e.g., leading "." is not accepted). - is set. - in: query - required: false - type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. + In practice, teams usually precompile into the binary + all types that they - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: port_id + description: port unique identifier + in: path + required: true + type: string + - name: revision_number + description: revision number of the consensus state + in: path + required: true + type: string + format: uint64 + - name: revision_height + description: revision height of the consensus state + in: path + required: true + type: string + format: uint64 tags: - Query - '/pendulum-labs/market/market/order/{uid}': + '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/next_sequence': get: - summary: Queries a Order by index. - operationId: PendulumlabsMarketMarketOrder + summary: >- + NextSequenceReceive returns the next receive sequence for a given + channel. + operationId: IbcCoreChannelV1NextSequenceReceive responses: '200': description: A successful response. schema: type: object properties: - order: + next_sequence_receive: + type: string + format: uint64 + title: next sequence receive number + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved type: object properties: - uid: - type: string - format: uint64 - owner: - type: string - status: - type: string - orderType: - type: string - denomAsk: - type: string - denomBid: - type: string - amount: - type: string - rate: - type: array - items: - type: string - prev: + revision_number: type: string format: uint64 - next: + title: the revision that the client is currently on + revision_height: type: string format: uint64 - beg_time: - type: string - format: int64 - upd_time: - type: string - format: int64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QuerySequenceResponse is the request type for the + Query/QueryNextSequenceReceiveResponse RPC method default: description: An unexpected error response. schema: @@ -19997,48 +21069,290 @@ paths: properties: '@type': type: string - additionalProperties: {} - parameters: - - name: uid - in: path - required: true + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: port_id + description: port unique identifier + in: path + required: true type: string - format: uint64 tags: - Query - /pendulum-labs/market/market/params: + '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_acknowledgements': get: - summary: Parameters queries the parameters of the module. - operationId: PendulumlabsMarketMarketParams + summary: >- + PacketAcknowledgements returns all the packet acknowledgements + associated + + with a channel. + operationId: IbcCoreChannelV1PacketAcknowledgements responses: '200': description: A successful response. schema: type: object properties: - params: - description: params holds all the parameters of this module. + acknowledgements: + type: array + items: + type: object + properties: + port_id: + type: string + description: channel port identifier. + channel_id: + type: string + description: channel unique identifier. + sequence: + type: string + format: uint64 + description: packet sequence. + data: + type: string + format: byte + description: embedded data that represents packet state. + description: >- + PacketState defines the generic type necessary to retrieve + and store + + packet commitments, acknowledgements, and receipts. + + Caller is responsible for knowing the context necessary to + interpret this + + state as a commitment, acknowledgement, or a receipt. + pagination: + title: pagination response type: object properties: - earn_rates: + next_key: type: string + format: byte title: |- - leader earnings rates - 1,2,3 Comma separated, no space - burn_rate: + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: type: string - title: pool burning rate - burn_coin: + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + PageResponse is to be embedded in gRPC response messages where + the + + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + height: + title: query block height + type: object + properties: + revision_number: type: string - title: burn coin - market_fee: + format: uint64 + title: the revision that the client is currently on + revision_height: type: string - title: >- - market_fee (parameter / 10000), 9999 representing as - 99.99% - description: >- - QueryParamsResponse is response type for the Query/Params RPC - method. + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryPacketAcknowledgemetsResponse is the request type for the + Query/QueryPacketAcknowledgements RPC method default: description: An unexpected error response. schema: @@ -20056,104 +21370,185 @@ paths: properties: '@type': type: string - additionalProperties: {} - tags: - - Query - /pendulum-labs/market/market/pool: - get: - summary: Queries a list of Pool items. - operationId: PendulumlabsMarketMarketPoolAll - responses: - '200': - description: A successful response. - schema: - type: object - properties: - pool: - type: array - items: - type: object - properties: - pair: - type: string - denom1: - type: string - denom2: - type: string - volume1: - type: object - properties: - denom: - type: string - amount: - type: string - volume2: - type: object - properties: - denom: - type: string - amount: - type: string - leaders: - type: array - items: - type: object - properties: - address: - type: string - drops: - type: string - drops: - type: string - history: - type: string - format: uint64 - pagination: - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - was set, its value is undefined otherwise - description: >- - PageResponse is to be embedded in gRPC response messages where - the + protocol buffer message. This string must contain at + least - corresponding request message has used PageRequest. + one "/" character. The last segment of the URL's path + must represent - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } parameters: + - name: channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: port_id + description: port unique identifier + in: path + required: true + type: string - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin @@ -20200,65 +21595,71 @@ paths: in: query required: false type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 + - name: packet_commitment_sequences + description: list of packet sequences in: query required: false - type: boolean + type: array + items: + type: string + format: uint64 + collectionFormat: multi tags: - Query - '/pendulum-labs/market/market/pool/{pair}': + '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_acks/{sequence}': get: - summary: Queries a Pool by index. - operationId: PendulumlabsMarketMarketPool + summary: PacketAcknowledgement queries a stored packet acknowledgement hash. + operationId: IbcCoreChannelV1PacketAcknowledgement responses: '200': description: A successful response. schema: type: object properties: - pool: + acknowledgement: + type: string + format: byte + title: packet associated with the request fields + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved type: object properties: - pair: - type: string - denom1: - type: string - denom2: - type: string - volume1: - type: object - properties: - denom: - type: string - amount: - type: string - volume2: - type: object - properties: - denom: - type: string - amount: - type: string - leaders: - type: array - items: - type: object - properties: - address: - type: string - drops: - type: string - drops: + revision_number: type: string - history: + format: uint64 + title: the revision that the client is currently on + revision_height: type: string format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: >- + QueryPacketAcknowledgementResponse defines the client query + response for a + + packet which also includes a proof and the height from which the + + proof was retrieved default: description: An unexpected error response. schema: @@ -20276,85 +21677,236 @@ paths: properties: '@type': type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } parameters: - - name: pair + - name: channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: port_id + description: port unique identifier in: path required: true type: string + - name: sequence + description: packet sequence + in: path + required: true + type: string + format: uint64 tags: - Query - '/pendulum-labs/market/market/quote/{denomBid}/{denomAsk}/{denomAmount}/{amount}': + '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments': get: - summary: Queries pool trade history. - operationId: PendulumlabsMarketMarketQuote + summary: |- + PacketCommitments returns all the packet commitments hashes associated + with a channel. + operationId: IbcCoreChannelV1PacketCommitments responses: '200': description: A successful response. schema: type: object properties: - denom: - type: string - amount: - type: string - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: + commitments: type: array items: type: object properties: - '@type': + port_id: type: string - additionalProperties: {} - parameters: - - name: denomBid - in: path - required: true - type: string - - name: denomAsk - in: path - required: true - type: string - - name: denomAmount - in: path - required: true - type: string - - name: amount - in: path - required: true - type: string - tags: - - Query - /pendulum-labs/market/market/volume: - get: - summary: Queries all Volumes. - operationId: PendulumlabsMarketMarketVolumeAll - responses: - '200': - description: A successful response. - schema: - type: object - properties: - volumes: - type: array - items: - type: object - properties: - denom: + description: channel port identifier. + channel_id: type: string - amount: + description: channel unique identifier. + sequence: + type: string + format: uint64 + description: packet sequence. + data: type: string + format: byte + description: embedded data that represents packet state. + description: >- + PacketState defines the generic type necessary to retrieve + and store + + packet commitments, acknowledgements, and receipts. + + Caller is responsible for knowing the context necessary to + interpret this + + state as a commitment, acknowledgement, or a receipt. pagination: + title: pagination response type: object properties: next_key: @@ -20381,6 +21933,38 @@ paths: repeated Bar results = 1; PageResponse page = 2; } + height: + title: query block height + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryPacketCommitmentsResponse is the request type for the + Query/QueryPacketCommitments RPC method default: description: An unexpected error response. schema: @@ -20398,8 +21982,185 @@ paths: properties: '@type': type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } parameters: + - name: channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: port_id + description: port unique identifier + in: path + required: true + type: string - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin @@ -20446,1753 +22207,11009 @@ paths: in: query required: false type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean tags: - Query - '/pendulum-labs/market/market/volume/{denom}': + '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_ack_sequences}/unreceived_acks': get: - summary: Queries a Volume by index. - operationId: PendulumlabsMarketMarketVolume + summary: >- + UnreceivedAcks returns all the unreceived IBC acknowledgements + associated + + with a channel and sequences. + operationId: IbcCoreChannelV1UnreceivedAcks responses: '200': description: A successful response. schema: type: object properties: - amount: - type: string - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: + sequences: type: array items: - type: object + type: string + format: uint64 + title: list of unreceived acknowledgement sequences + height: + title: query block height + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryUnreceivedAcksResponse is the response type for the + Query/UnreceivedAcks RPC method + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object properties: '@type': type: string - additionalProperties: {} - parameters: - - name: denom - in: path - required: true - type: string - tags: - - Query -definitions: - cosmos.auth.v1beta1.Params: - type: object - properties: - max_memo_characters: - type: string - format: uint64 - tx_sig_limit: - type: string - format: uint64 - tx_size_cost_per_byte: - type: string - format: uint64 - sig_verify_cost_ed25519: - type: string - format: uint64 - sig_verify_cost_secp256k1: - type: string - format: uint64 - description: Params defines the parameters for the auth module. - cosmos.auth.v1beta1.QueryAccountResponse: - type: object - properties: - account: - description: account defines the account of the corresponding address. - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - protocol buffer message. This string must contain at least + protocol buffer message. This string must contain at + least - one "/" character. The last segment of the URL's path must - represent + one "/" character. The last segment of the URL's path + must represent - the fully qualified name of the type (as in + the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be in a - canonical form + `path/google.protobuf.Duration`). The name should be in + a canonical form - (e.g., leading "." is not accepted). + (e.g., leading "." is not accepted). - In practice, teams usually precompile into the binary all types - that they + In practice, teams usually precompile into the binary + all types that they - expect it to use in the context of Any. However, for URLs which - use the + expect it to use in the context of Any. However, for + URLs which use the - scheme `http`, `https`, or no scheme, one can optionally set up a - type + scheme `http`, `https`, or no scheme, one can optionally + set up a type - server that maps type URLs to message definitions as follows: + server that maps type URLs to message definitions as + follows: - * If no scheme is provided, `https` is assumed. + * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - Note: this functionality is not currently available in the - official + Note: this functionality is not currently available in + the official - protobuf release, and it is not used for type URLs beginning with + protobuf release, and it is not used for type URLs + beginning with - type.googleapis.com. + type.googleapis.com. - Schemes other than `http`, `https` (or the empty scheme) might be + Schemes other than `http`, `https` (or the empty scheme) + might be - used with implementation specific semantics. - additionalProperties: {} - description: >- - QueryAccountResponse is the response type for the Query/Account RPC - method. - cosmos.auth.v1beta1.QueryAccountsResponse: - type: object - properties: - accounts: - type: array - items: - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a - protocol buffer message. This string must contain at least + URL that describes the type of the serialized message. - one "/" character. The last segment of the URL's path must - represent - the fully qualified name of the type (as in + Protobuf library provides support to pack/unpack Any values + in the form - `path/google.protobuf.Duration`). The name should be in a - canonical form + of utility functions or additional generated methods of the + Any type. - (e.g., leading "." is not accepted). + Example 1: Pack and unpack a message in C++. - In practice, teams usually precompile into the binary all types - that they + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - expect it to use in the context of Any. However, for URLs which - use the + Example 2: Pack and unpack a message in Java. - scheme `http`, `https`, or no scheme, one can optionally set up - a type + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - server that maps type URLs to message definitions as follows: + Example 3: Pack and unpack a message in Python. + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - * If no scheme is provided, `https` is assumed. + Example 4: Pack and unpack a message in Go - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - Note: this functionality is not currently available in the - official + The pack methods provided by protobuf library will by + default use - protobuf release, and it is not used for type URLs beginning - with + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - type.googleapis.com. + methods only use the fully qualified type name after the + last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield + type - Schemes other than `http`, `https` (or the empty scheme) might - be + name "y.z". - used with implementation specific semantics. - additionalProperties: {} - description: >- - `Any` contains an arbitrary serialized protocol buffer message along - with a - URL that describes the type of the serialized message. + JSON - Protobuf library provides support to pack/unpack Any values in the - form + ==== - of utility functions or additional generated methods of the Any - type. + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with + an - Example 1: Pack and unpack a message in C++. + additional field `@type` which contains the type URL. + Example: - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - Example 4: Pack and unpack a message in Go + If the embedded message type is well-known and has a custom + JSON - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } + representation, that representation will be embedded adding + a field - The pack methods provided by protobuf library will by default use + `value` which holds the custom JSON in addition to the + `@type` - 'type.googleapis.com/full.type.name' as the type URL and the unpack + field. Example (for message [google.protobuf.Duration][]): - methods only use the fully qualified type name after the last '/' + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: port_id + description: port unique identifier + in: path + required: true + type: string + - name: packet_ack_sequences + description: list of acknowledgement sequences + in: path + required: true + type: array + items: + type: string + format: uint64 + collectionFormat: csv + minItems: 1 + tags: + - Query + '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_commitment_sequences}/unreceived_packets': + get: + summary: >- + UnreceivedPackets returns all the unreceived IBC packets associated with + a - in the type URL, for example "foo.bar.com/x/y.z" will yield type + channel and sequences. + operationId: IbcCoreChannelV1UnreceivedPackets + responses: + '200': + description: A successful response. + schema: + type: object + properties: + sequences: + type: array + items: + type: string + format: uint64 + title: list of unreceived packet sequences + height: + title: query block height + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping - name "y.z". + RevisionNumber the same. However some consensus algorithms may + choose to + reset the height in certain conditions e.g. hard forks, + state-machine + breaking changes In these cases, the RevisionNumber is + incremented so that - JSON + height continues to be monitonically increasing even as the + RevisionHeight - ==== + gets reset + title: |- + QueryUnreceivedPacketsResponse is the response type for the + Query/UnreceivedPacketCommitments RPC method + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - The JSON representation of an `Any` value uses the regular + protocol buffer message. This string must contain at + least - representation of the deserialized, embedded message, with an + one "/" character. The last segment of the URL's path + must represent - additional field `@type` which contains the type URL. Example: + the fully qualified name of the type (as in - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + `path/google.protobuf.Duration`). The name should be in + a canonical form - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + (e.g., leading "." is not accepted). - If the embedded message type is well-known and has a custom JSON - representation, that representation will be embedded adding a field + In practice, teams usually precompile into the binary + all types that they - `value` which holds the custom JSON in addition to the `@type` + expect it to use in the context of Any. However, for + URLs which use the - field. Example (for message [google.protobuf.Duration][]): + scheme `http`, `https`, or no scheme, one can optionally + set up a type - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - title: accounts are the existing accounts - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + server that maps type URLs to message definitions as + follows: - was set, its value is undefined otherwise - description: >- - QueryAccountsResponse is the response type for the Query/Accounts RPC - method. + * If no scheme is provided, `https` is assumed. - Since: cosmos-sdk 0.43 - cosmos.auth.v1beta1.QueryModuleAccountByNameResponse: - type: object - properties: - account: - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - protocol buffer message. This string must contain at least + Note: this functionality is not currently available in + the official - one "/" character. The last segment of the URL's path must - represent + protobuf release, and it is not used for type URLs + beginning with - the fully qualified name of the type (as in + type.googleapis.com. - `path/google.protobuf.Duration`). The name should be in a - canonical form - (e.g., leading "." is not accepted). + Schemes other than `http`, `https` (or the empty scheme) + might be + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a - In practice, teams usually precompile into the binary all types - that they + URL that describes the type of the serialized message. - expect it to use in the context of Any. However, for URLs which - use the - scheme `http`, `https`, or no scheme, one can optionally set up a - type + Protobuf library provides support to pack/unpack Any values + in the form - server that maps type URLs to message definitions as follows: + of utility functions or additional generated methods of the + Any type. - * If no scheme is provided, `https` is assumed. + Example 1: Pack and unpack a message in C++. - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - Note: this functionality is not currently available in the - official + Example 2: Pack and unpack a message in Java. - protobuf release, and it is not used for type URLs beginning with + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - type.googleapis.com. + Example 3: Pack and unpack a message in Python. + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - Schemes other than `http`, `https` (or the empty scheme) might be + Example 4: Pack and unpack a message in Go - used with implementation specific semantics. - additionalProperties: {} - description: >- - `Any` contains an arbitrary serialized protocol buffer message along - with a + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - URL that describes the type of the serialized message. + The pack methods provided by protobuf library will by + default use + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - Protobuf library provides support to pack/unpack Any values in the - form + methods only use the fully qualified type name after the + last '/' - of utility functions or additional generated methods of the Any type. + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + name "y.z". - Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - Example 2: Pack and unpack a message in Java. + JSON - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + ==== - Example 3: Pack and unpack a message in Python. + The JSON representation of an `Any` value uses the regular - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + representation of the deserialized, embedded message, with + an - Example 4: Pack and unpack a message in Go + additional field `@type` which contains the type URL. + Example: - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - The pack methods provided by protobuf library will by default use + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - 'type.googleapis.com/full.type.name' as the type URL and the unpack + If the embedded message type is well-known and has a custom + JSON - methods only use the fully qualified type name after the last '/' + representation, that representation will be embedded adding + a field - in the type URL, for example "foo.bar.com/x/y.z" will yield type + `value` which holds the custom JSON in addition to the + `@type` - name "y.z". + field. Example (for message [google.protobuf.Duration][]): + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: port_id + description: port unique identifier + in: path + required: true + type: string + - name: packet_commitment_sequences + description: list of packet sequences + in: path + required: true + type: array + items: + type: string + format: uint64 + collectionFormat: csv + minItems: 1 + tags: + - Query + '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{sequence}': + get: + summary: PacketCommitment queries a stored packet commitment hash. + operationId: IbcCoreChannelV1PacketCommitment + responses: + '200': + description: A successful response. + schema: + type: object + properties: + commitment: + type: string + format: byte + title: packet associated with the request fields + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + RevisionNumber the same. However some consensus algorithms may + choose to - JSON + reset the height in certain conditions e.g. hard forks, + state-machine - ==== + breaking changes In these cases, the RevisionNumber is + incremented so that - The JSON representation of an `Any` value uses the regular + height continues to be monitonically increasing even as the + RevisionHeight - representation of the deserialized, embedded message, with an + gets reset + title: >- + QueryPacketCommitmentResponse defines the client query response + for a packet - additional field `@type` which contains the type URL. Example: + which also includes a proof and the height from which the proof + was - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + retrieved + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + protocol buffer message. This string must contain at + least - If the embedded message type is well-known and has a custom JSON + one "/" character. The last segment of the URL's path + must represent - representation, that representation will be embedded adding a field + the fully qualified name of the type (as in - `value` which holds the custom JSON in addition to the `@type` + `path/google.protobuf.Duration`). The name should be in + a canonical form - field. Example (for message [google.protobuf.Duration][]): + (e.g., leading "." is not accepted). - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - description: >- - QueryModuleAccountByNameResponse is the response type for the - Query/ModuleAccountByName RPC method. - cosmos.auth.v1beta1.QueryParamsResponse: - type: object - properties: - params: - description: params defines the parameters of the module. - type: object - properties: - max_memo_characters: - type: string - format: uint64 - tx_sig_limit: - type: string - format: uint64 - tx_size_cost_per_byte: - type: string - format: uint64 - sig_verify_cost_ed25519: - type: string - format: uint64 - sig_verify_cost_secp256k1: - type: string - format: uint64 - description: QueryParamsResponse is the response type for the Query/Params RPC method. - cosmos.base.query.v1beta1.PageRequest: - type: object - properties: - key: - type: string - format: byte - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - offset: - type: string - format: uint64 - description: |- - offset is a numeric offset that can be used when key is unavailable. - It is less efficient than using key. Only one of offset or key should - be set. - limit: - type: string - format: uint64 - description: >- - limit is the total number of results to be returned in the result - page. - If left empty it will default to a value to be set by each app. - count_total: - type: boolean - description: >- - count_total is set to true to indicate that the result set should - include + In practice, teams usually precompile into the binary + all types that they - a count of the total number of items available for pagination in UIs. + expect it to use in the context of Any. However, for + URLs which use the - count_total is only respected when offset is used. It is ignored when - key + scheme `http`, `https`, or no scheme, one can optionally + set up a type - is set. - reverse: - type: boolean - description: >- - reverse is set to true if results are to be returned in the descending - order. + server that maps type URLs to message definitions as + follows: - Since: cosmos-sdk 0.43 - description: |- - message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } - title: |- - PageRequest is to be embedded in gRPC request messages for efficient - pagination. Ex: - cosmos.base.query.v1beta1.PageResponse: - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: |- - total is total number of results available if PageRequest.count_total - was set, its value is undefined otherwise - description: |- - PageResponse is to be embedded in gRPC response messages where the - corresponding request message has used PageRequest. + * If no scheme is provided, `https` is assumed. - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } - google.protobuf.Any: - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - protocol buffer message. This string must contain at least + Note: this functionality is not currently available in + the official - one "/" character. The last segment of the URL's path must represent + protobuf release, and it is not used for type URLs + beginning with - the fully qualified name of the type (as in + type.googleapis.com. - `path/google.protobuf.Duration`). The name should be in a canonical - form - (e.g., leading "." is not accepted). + Schemes other than `http`, `https` (or the empty scheme) + might be + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a - In practice, teams usually precompile into the binary all types that - they + URL that describes the type of the serialized message. - expect it to use in the context of Any. However, for URLs which use - the - scheme `http`, `https`, or no scheme, one can optionally set up a type + Protobuf library provides support to pack/unpack Any values + in the form - server that maps type URLs to message definitions as follows: + of utility functions or additional generated methods of the + Any type. - * If no scheme is provided, `https` is assumed. + Example 1: Pack and unpack a message in C++. - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - Note: this functionality is not currently available in the official + Example 2: Pack and unpack a message in Java. - protobuf release, and it is not used for type URLs beginning with + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - type.googleapis.com. + Example 3: Pack and unpack a message in Python. + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - Schemes other than `http`, `https` (or the empty scheme) might be + Example 4: Pack and unpack a message in Go - used with implementation specific semantics. - additionalProperties: {} - description: >- - `Any` contains an arbitrary serialized protocol buffer message along with - a + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - URL that describes the type of the serialized message. + The pack methods provided by protobuf library will by + default use + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - Protobuf library provides support to pack/unpack Any values in the form + methods only use the fully qualified type name after the + last '/' - of utility functions or additional generated methods of the Any type. + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + name "y.z". - Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - Example 2: Pack and unpack a message in Java. + JSON - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + ==== - Example 3: Pack and unpack a message in Python. + The JSON representation of an `Any` value uses the regular - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + representation of the deserialized, embedded message, with + an - Example 4: Pack and unpack a message in Go + additional field `@type` which contains the type URL. + Example: - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - The pack methods provided by protobuf library will by default use + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - 'type.googleapis.com/full.type.name' as the type URL and the unpack + If the embedded message type is well-known and has a custom + JSON - methods only use the fully qualified type name after the last '/' + representation, that representation will be embedded adding + a field - in the type URL, for example "foo.bar.com/x/y.z" will yield type + `value` which holds the custom JSON in addition to the + `@type` - name "y.z". + field. Example (for message [google.protobuf.Duration][]): + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: port_id + description: port unique identifier + in: path + required: true + type: string + - name: sequence + description: packet sequence + in: path + required: true + type: string + format: uint64 + tags: + - Query + '/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_receipts/{sequence}': + get: + summary: >- + PacketReceipt queries if a given packet sequence has been received on + the + queried chain + operationId: IbcCoreChannelV1PacketReceipt + responses: + '200': + description: A successful response. + schema: + type: object + properties: + received: + type: boolean + title: success flag for if receipt exists + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping - JSON + RevisionNumber the same. However some consensus algorithms may + choose to - ==== + reset the height in certain conditions e.g. hard forks, + state-machine - The JSON representation of an `Any` value uses the regular + breaking changes In these cases, the RevisionNumber is + incremented so that - representation of the deserialized, embedded message, with an + height continues to be monitonically increasing even as the + RevisionHeight - additional field `@type` which contains the type URL. Example: + gets reset + title: >- + QueryPacketReceiptResponse defines the client query response for a + packet - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + receipt which also includes a proof, and the height from which the + proof was - If the embedded message type is well-known and has a custom JSON + retrieved + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - representation, that representation will be embedded adding a field + protocol buffer message. This string must contain at + least - `value` which holds the custom JSON in addition to the `@type` + one "/" character. The last segment of the URL's path + must represent - field. Example (for message [google.protobuf.Duration][]): + the fully qualified name of the type (as in - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - google.rpc.Status: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + `path/google.protobuf.Duration`). The name should be in + a canonical form - protocol buffer message. This string must contain at least + (e.g., leading "." is not accepted). - one "/" character. The last segment of the URL's path must - represent - the fully qualified name of the type (as in + In practice, teams usually precompile into the binary + all types that they - `path/google.protobuf.Duration`). The name should be in a - canonical form + expect it to use in the context of Any. However, for + URLs which use the - (e.g., leading "." is not accepted). + scheme `http`, `https`, or no scheme, one can optionally + set up a type + server that maps type URLs to message definitions as + follows: - In practice, teams usually precompile into the binary all types - that they - expect it to use in the context of Any. However, for URLs which - use the + * If no scheme is provided, `https` is assumed. - scheme `http`, `https`, or no scheme, one can optionally set up - a type + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - server that maps type URLs to message definitions as follows: + Note: this functionality is not currently available in + the official + protobuf release, and it is not used for type URLs + beginning with - * If no scheme is provided, `https` is assumed. + type.googleapis.com. - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - Note: this functionality is not currently available in the - official + Schemes other than `http`, `https` (or the empty scheme) + might be - protobuf release, and it is not used for type URLs beginning - with + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a - type.googleapis.com. + URL that describes the type of the serialized message. - Schemes other than `http`, `https` (or the empty scheme) might - be + Protobuf library provides support to pack/unpack Any values + in the form - used with implementation specific semantics. - additionalProperties: {} - description: >- - `Any` contains an arbitrary serialized protocol buffer message along - with a + of utility functions or additional generated methods of the + Any type. - URL that describes the type of the serialized message. + Example 1: Pack and unpack a message in C++. - Protobuf library provides support to pack/unpack Any values in the - form + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - of utility functions or additional generated methods of the Any - type. + Example 2: Pack and unpack a message in Java. + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - Example 1: Pack and unpack a message in C++. + Example 3: Pack and unpack a message in Python. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - Example 2: Pack and unpack a message in Java. + Example 4: Pack and unpack a message in Go - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - Example 3: Pack and unpack a message in Python. + The pack methods provided by protobuf library will by + default use - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - Example 4: Pack and unpack a message in Go + methods only use the fully qualified type name after the + last '/' - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } + in the type URL, for example "foo.bar.com/x/y.z" will yield + type - The pack methods provided by protobuf library will by default use + name "y.z". - 'type.googleapis.com/full.type.name' as the type URL and the unpack - methods only use the fully qualified type name after the last '/' - in the type URL, for example "foo.bar.com/x/y.z" will yield type + JSON - name "y.z". + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with + an - JSON + additional field `@type` which contains the type URL. + Example: - ==== + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - The JSON representation of an `Any` value uses the regular + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - representation of the deserialized, embedded message, with an + If the embedded message type is well-known and has a custom + JSON - additional field `@type` which contains the type URL. Example: + representation, that representation will be embedded adding + a field - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + `value` which holds the custom JSON in addition to the + `@type` - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + field. Example (for message [google.protobuf.Duration][]): - If the embedded message type is well-known and has a custom JSON - - representation, that representation will be embedded adding a field + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: port_id + description: port unique identifier + in: path + required: true + type: string + - name: sequence + description: packet sequence + in: path + required: true + type: string + format: uint64 + tags: + - Query + '/ibc/core/channel/v1/connections/{connection}/channels': + get: + summary: |- + ConnectionChannels queries all the channels associated with a connection + end. + operationId: IbcCoreChannelV1ConnectionChannels + responses: + '200': + description: A successful response. + schema: + type: object + properties: + channels: + type: array + items: + type: object + properties: + state: + title: current state of the channel end + type: string + enum: + - STATE_UNINITIALIZED_UNSPECIFIED + - STATE_INIT + - STATE_TRYOPEN + - STATE_OPEN + - STATE_CLOSED + default: STATE_UNINITIALIZED_UNSPECIFIED + description: >- + State defines if a channel is in one of the following + states: - `value` which holds the custom JSON in addition to the `@type` + CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. - field. Example (for message [google.protobuf.Duration][]): + - STATE_UNINITIALIZED_UNSPECIFIED: Default State + - STATE_INIT: A channel has just started the opening handshake. + - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. + - STATE_OPEN: A channel has completed the handshake. Open channels are + ready to send and receive packets. + - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive + packets. + ordering: + title: whether the channel is ordered or unordered + type: string + enum: + - ORDER_NONE_UNSPECIFIED + - ORDER_UNORDERED + - ORDER_ORDERED + default: ORDER_NONE_UNSPECIFIED + description: >- + - ORDER_NONE_UNSPECIFIED: zero-value for channel + ordering + - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in + which they were sent. + - ORDER_ORDERED: packets are delivered exactly in the order which they were sent + counterparty: + title: counterparty channel end + type: object + properties: + port_id: + type: string + description: >- + port on the counterparty chain which owns the other + end of the channel. + channel_id: + type: string + title: channel end on the counterparty chain + connection_hops: + type: array + items: + type: string + title: >- + list of connection identifiers, in order, along which + packets sent on - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - cosmos.bank.v1beta1.DenomUnit: - type: object - properties: - denom: - type: string - description: denom represents the string name of the given denom unit (e.g uatom). - exponent: - type: integer - format: int64 - description: >- - exponent represents power of 10 exponent that one must + this channel will travel + version: + type: string + title: >- + opaque channel version, which is agreed upon during the + handshake + port_id: + type: string + title: port identifier + channel_id: + type: string + title: channel identifier + description: >- + IdentifiedChannel defines a channel with additional port and + channel - raise the base_denom to in order to equal the given DenomUnit's denom + identifier fields. + description: list of channels associated with a connection. + pagination: + title: pagination response + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - 1 denom = 1^exponent base_denom + was set, its value is undefined otherwise + description: >- + PageResponse is to be embedded in gRPC response messages where + the - (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' - with + corresponding request message has used PageRequest. - exponent = 6, thus: 1 atom = 10^6 uatom). - aliases: - type: array - items: - type: string - title: aliases is a list of string aliases for the given denom - description: |- - DenomUnit represents a struct that describes a given - denomination unit of the basic token. - cosmos.bank.v1beta1.Input: - type: object - properties: - address: - type: string - coins: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + height: + title: query block height + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - description: Input models transaction input. - cosmos.bank.v1beta1.Metadata: - type: object - properties: - description: - type: string - denom_units: - type: array - items: - type: object - properties: - denom: - type: string - description: >- - denom represents the string name of the given denom unit (e.g - uatom). - exponent: - type: integer - format: int64 - description: >- - exponent represents power of 10 exponent that one must + RevisionNumber the same. However some consensus algorithms may + choose to - raise the base_denom to in order to equal the given DenomUnit's - denom + reset the height in certain conditions e.g. hard forks, + state-machine - 1 denom = 1^exponent base_denom + breaking changes In these cases, the RevisionNumber is + incremented so that - (e.g. with a base_denom of uatom, one can create a DenomUnit of - 'atom' with + height continues to be monitonically increasing even as the + RevisionHeight - exponent = 6, thus: 1 atom = 10^6 uatom). - aliases: - type: array - items: + gets reset + title: |- + QueryConnectionChannelsResponse is the Response type for the + Query/QueryConnectionChannels RPC method + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: type: string - title: aliases is a list of string aliases for the given denom - description: |- - DenomUnit represents a struct that describes a given - denomination unit of the basic token. - title: denom_units represents the list of DenomUnit's for a given coin - base: - type: string - description: >- - base represents the base denom (should be the DenomUnit with exponent - = 0). - display: - type: string - description: |- - display indicates the suggested denom that should be - displayed in clients. - name: - type: string - description: 'Since: cosmos-sdk 0.43' - title: 'name defines the name of the token (eg: Cosmos Atom)' - symbol: - type: string - description: >- - symbol is the token symbol usually shown on exchanges (eg: ATOM). This - can + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - be the same as the display. + protocol buffer message. This string must contain at + least + one "/" character. The last segment of the URL's path + must represent - Since: cosmos-sdk 0.43 - description: |- - Metadata represents a struct that describes - a basic token. - cosmos.bank.v1beta1.MsgMultiSendResponse: - type: object - description: MsgMultiSendResponse defines the Msg/MultiSend response type. - cosmos.bank.v1beta1.MsgSendResponse: - type: object - description: MsgSendResponse defines the Msg/Send response type. - cosmos.bank.v1beta1.Output: - type: object - properties: - address: - type: string - coins: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. + the fully qualified name of the type (as in - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - description: Output models transaction outputs. - cosmos.bank.v1beta1.Params: - type: object - properties: - send_enabled: - type: array - items: - type: object - properties: - denom: - type: string - enabled: - type: boolean - description: >- - SendEnabled maps coin denom to a send_enabled status (whether a - denom is + `path/google.protobuf.Duration`). The name should be in + a canonical form - sendable). - default_send_enabled: - type: boolean - description: Params defines the parameters for the bank module. - cosmos.bank.v1beta1.QueryAllBalancesResponse: - type: object - properties: - balances: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. + (e.g., leading "." is not accepted). - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - description: balances is the balances of all the coins. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - was set, its value is undefined otherwise - description: >- - QueryAllBalancesResponse is the response type for the Query/AllBalances - RPC + In practice, teams usually precompile into the binary + all types that they - method. - cosmos.bank.v1beta1.QueryBalanceResponse: - type: object - properties: - balance: - description: balance is the balance of the coin. - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - QueryBalanceResponse is the response type for the Query/Balance RPC - method. - cosmos.bank.v1beta1.QueryDenomMetadataResponse: - type: object - properties: - metadata: - description: >- - metadata describes and provides all the client information for the - requested token. - type: object - properties: - description: - type: string - denom_units: - type: array - items: - type: object - properties: - denom: - type: string - description: >- - denom represents the string name of the given denom unit - (e.g uatom). - exponent: - type: integer - format: int64 - description: >- - exponent represents power of 10 exponent that one must + expect it to use in the context of Any. However, for + URLs which use the - raise the base_denom to in order to equal the given - DenomUnit's denom + scheme `http`, `https`, or no scheme, one can optionally + set up a type - 1 denom = 1^exponent base_denom + server that maps type URLs to message definitions as + follows: - (e.g. with a base_denom of uatom, one can create a DenomUnit - of 'atom' with - exponent = 6, thus: 1 atom = 10^6 uatom). - aliases: - type: array - items: - type: string - title: aliases is a list of string aliases for the given denom - description: |- - DenomUnit represents a struct that describes a given - denomination unit of the basic token. - title: denom_units represents the list of DenomUnit's for a given coin - base: - type: string - description: >- - base represents the base denom (should be the DenomUnit with - exponent = 0). - display: - type: string - description: |- - display indicates the suggested denom that should be - displayed in clients. - name: - type: string - description: 'Since: cosmos-sdk 0.43' - title: 'name defines the name of the token (eg: Cosmos Atom)' - symbol: - type: string - description: >- - symbol is the token symbol usually shown on exchanges (eg: ATOM). - This can + * If no scheme is provided, `https` is assumed. - be the same as the display. + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + Note: this functionality is not currently available in + the official - Since: cosmos-sdk 0.43 - description: >- - QueryDenomMetadataResponse is the response type for the - Query/DenomMetadata RPC + protobuf release, and it is not used for type URLs + beginning with - method. - cosmos.bank.v1beta1.QueryDenomsMetadataResponse: - type: object - properties: - metadatas: - type: array - items: - type: object - properties: - description: - type: string - denom_units: - type: array - items: - type: object - properties: - denom: - type: string - description: >- - denom represents the string name of the given denom unit - (e.g uatom). - exponent: - type: integer - format: int64 - description: >- - exponent represents power of 10 exponent that one must + type.googleapis.com. - raise the base_denom to in order to equal the given - DenomUnit's denom - 1 denom = 1^exponent base_denom + Schemes other than `http`, `https` (or the empty scheme) + might be - (e.g. with a base_denom of uatom, one can create a - DenomUnit of 'atom' with + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a - exponent = 6, thus: 1 atom = 10^6 uatom). - aliases: - type: array - items: - type: string - title: aliases is a list of string aliases for the given denom - description: |- - DenomUnit represents a struct that describes a given - denomination unit of the basic token. - title: denom_units represents the list of DenomUnit's for a given coin - base: - type: string - description: >- - base represents the base denom (should be the DenomUnit with - exponent = 0). - display: - type: string - description: |- - display indicates the suggested denom that should be - displayed in clients. - name: - type: string - description: 'Since: cosmos-sdk 0.43' - title: 'name defines the name of the token (eg: Cosmos Atom)' - symbol: - type: string - description: >- - symbol is the token symbol usually shown on exchanges (eg: - ATOM). This can + URL that describes the type of the serialized message. - be the same as the display. + Protobuf library provides support to pack/unpack Any values + in the form - Since: cosmos-sdk 0.43 - description: |- - Metadata represents a struct that describes - a basic token. - description: >- - metadata provides the client information for all the registered - tokens. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + of utility functions or additional generated methods of the + Any type. - was set, its value is undefined otherwise - description: >- - QueryDenomsMetadataResponse is the response type for the - Query/DenomsMetadata RPC - method. - cosmos.bank.v1beta1.QueryParamsResponse: - type: object - properties: - params: - type: object - properties: - send_enabled: - type: array - items: - type: object - properties: - denom: - type: string - enabled: - type: boolean - description: >- - SendEnabled maps coin denom to a send_enabled status (whether a - denom is + Example 1: Pack and unpack a message in C++. - sendable). - default_send_enabled: - type: boolean - description: Params defines the parameters for the bank module. - description: >- - QueryParamsResponse defines the response type for querying x/bank - parameters. - cosmos.bank.v1beta1.QuerySpendableBalancesResponse: - type: object - properties: - balances: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - description: balances is the spendable balances of all the coins. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + Example 2: Pack and unpack a message in Java. - was set, its value is undefined otherwise - description: >- - QuerySpendableBalancesResponse defines the gRPC response structure for - querying + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - an account's spendable balances. - cosmos.bank.v1beta1.QuerySupplyOfResponse: - type: object - properties: - amount: - description: amount is the supply of the coin. - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC - method. - cosmos.bank.v1beta1.QueryTotalSupplyResponse: - type: object - properties: - supply: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. + Example 3: Pack and unpack a message in Python. - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - title: supply is the supply of the coins - pagination: - description: |- - pagination defines the pagination in the response. + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - Since: cosmos-sdk 0.43 - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + Example 4: Pack and unpack a message in Go - was set, its value is undefined otherwise - title: >- - QueryTotalSupplyResponse is the response type for the Query/TotalSupply - RPC + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - method - cosmos.bank.v1beta1.SendEnabled: - type: object - properties: - denom: - type: string - enabled: - type: boolean - description: |- - SendEnabled maps coin denom to a send_enabled status (whether a denom is - sendable). - cosmos.base.v1beta1.Coin: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. + The pack methods provided by protobuf library will by + default use - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse: - type: object - properties: - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - block: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules for processing a block - in the blockchain, + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - including all blockchain data structures and the rules of the - application's + methods only use the fully qualified type name after the + last '/' - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - description: commit from validators from the last block - title: hashes of block data - data_hash: - type: string - format: byte - title: transactions - validators_hash: - type: string - format: byte - description: validators for the current block - title: hashes from the app output from the prev block - next_validators_hash: - type: string - format: byte - title: validators for the next block - consensus_hash: - type: string - format: byte - title: consensus params for current block - app_hash: - type: string - format: byte - title: state after txs from the previous block - last_results_hash: - type: string - format: byte - title: root hash of all results from the txs from the previous block - evidence_hash: - type: string - format: byte - description: evidence included in the block - title: consensus info - proposer_address: - type: string - format: byte - title: original proposer of the block - description: Header defines the structure of a block header. - data: + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: connection + description: connection unique identifier + in: path + required: true + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + tags: + - Query + /ibc/client/v1/params: + get: + summary: ClientParams queries all parameters of the ibc client. + operationId: IbcCoreClientV1ClientParams + responses: + '200': + description: A successful response. + schema: type: object properties: - txs: - type: array - items: - type: string - format: byte - description: >- - Txs that will be applied by state @ block.Height+1. - - NOTE: not all txs here are valid. We're just agreeing on the - order first. + params: + description: params defines the parameters of the module. + type: object + properties: + allowed_clients: + type: array + items: + type: string + description: >- + allowed_clients defines the list of allowed client state + types. + description: >- + QueryClientParamsResponse is the response type for the + Query/ClientParams RPC - This means that block.AppHash does not include these txs. - title: Data contains the set of transactions included in the block - evidence: + method. + default: + description: An unexpected error response. + schema: type: object properties: - evidence: + code: + type: integer + format: int32 + message: + type: string + details: type: array items: type: object properties: - duplicate_vote_evidence: - type: object - properties: - vote_a: - type: object - properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: >- - SignedMsgType is a type of signed message in the - consensus. + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - description: zero if vote is nil. - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or commit vote - from validators for + protocol buffer message. This string must contain at + least - consensus. - vote_b: - type: object - properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: >- - SignedMsgType is a type of signed message in the - consensus. + one "/" character. The last segment of the URL's path + must represent - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - description: zero if vote is nil. - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or commit vote - from validators for + the fully qualified name of the type (as in - consensus. - total_voting_power: - type: string - format: int64 - validator_power: - type: string - format: int64 - timestamp: - type: string - format: date-time - description: >- - DuplicateVoteEvidence contains evidence of a validator - signed two conflicting votes. - light_client_attack_evidence: + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + tags: + - Query + /ibc/core/client/v1/client_states: + get: + summary: ClientStates queries all the IBC light clients of a chain. + operationId: IbcCoreClientV1ClientStates + responses: + '200': + description: A successful response. + schema: + type: object + properties: + client_states: + type: array + items: + type: object + properties: + client_id: + type: string + title: client identifier + client_state: + title: client state type: object properties: - conflicting_block: - type: object - properties: - signed_header: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules - for processing a block in the - blockchain, + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the + type of the serialized - including all blockchain data structures - and the rules of the application's + protocol buffer message. This string must contain at + least - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: + one "/" character. The last segment of the URL's + path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the + binary all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available + in the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty + scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any + values in the form + + of utility functions or additional generated methods of + the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the + regular + + representation of the deserialized, embedded message, + with an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message + [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: >- + IdentifiedClientState defines a client state with an + additional client + + identifier field. + description: list of stored ClientStates of the chain. + pagination: + title: pagination response + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + PageResponse is to be embedded in gRPC response messages where + the + + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + description: >- + QueryClientStatesResponse is the response type for the + Query/ClientStates RPC + + method. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + tags: + - Query + '/ibc/core/client/v1/client_states/{client_id}': + get: + summary: ClientState queries an IBC light client. + operationId: IbcCoreClientV1ClientState + responses: + '200': + description: A successful response. + schema: + type: object + properties: + client_state: + title: client state associated with the request identifier + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + description: >- + QueryClientStateResponse is the response type for the + Query/ClientState RPC + + method. Besides the client state, it includes a proof and the + height from + + which the proof was retrieved. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: client_id + description: client state unique identifier + in: path + required: true + type: string + tags: + - Query + '/ibc/core/client/v1/client_status/{client_id}': + get: + summary: Status queries the status of an IBC client. + operationId: IbcCoreClientV1ClientStatus + responses: + '200': + description: A successful response. + schema: + type: object + properties: + status: + type: string + description: >- + QueryClientStatusResponse is the response type for the + Query/ClientStatus RPC + + method. It returns the current status of the IBC client. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: client_id + description: client unique identifier + in: path + required: true + type: string + tags: + - Query + '/ibc/core/client/v1/consensus_states/{client_id}': + get: + summary: |- + ConsensusStates queries all the consensus state associated with a given + client. + operationId: IbcCoreClientV1ConsensusStates + responses: + '200': + description: A successful response. + schema: + type: object + properties: + consensus_states: + type: array + items: + type: object + properties: + height: + title: consensus state height + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each + height while keeping + + RevisionNumber the same. However some consensus + algorithms may choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as + the RevisionHeight + + gets reset + consensus_state: + title: consensus state + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the + type of the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's + path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the + binary all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available + in the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty + scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any + values in the form + + of utility functions or additional generated methods of + the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the + regular + + representation of the deserialized, embedded message, + with an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message + [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: >- + ConsensusStateWithHeight defines a consensus state with an + additional height + + field. + title: consensus states associated with the identifier + pagination: + title: pagination response + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + PageResponse is to be embedded in gRPC response messages where + the + + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + title: |- + QueryConsensusStatesResponse is the response type for the + Query/ConsensusStates RPC method + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: client_id + description: client identifier + in: path + required: true + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + tags: + - Query + '/ibc/core/client/v1/consensus_states/{client_id}/heights': + get: + summary: >- + ConsensusStateHeights queries the height of every consensus states + associated with a given client. + operationId: IbcCoreClientV1ConsensusStateHeights + responses: + '200': + description: A successful response. + schema: + type: object + properties: + consensus_state_heights: + type: array + items: + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms + may choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: >- + Height is a monotonically increasing data type + + that can be compared against another Height for the purposes + of updating and + + freezing clients + title: consensus state heights + pagination: + title: pagination response + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + PageResponse is to be embedded in gRPC response messages where + the + + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + title: |- + QueryConsensusStateHeightsResponse is the response type for the + Query/ConsensusStateHeights RPC method + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: client_id + description: client identifier + in: path + required: true + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + tags: + - Query + '/ibc/core/client/v1/consensus_states/{client_id}/revision/{revision_number}/height/{revision_height}': + get: + summary: >- + ConsensusState queries a consensus state associated with a client state + at + + a given height. + operationId: IbcCoreClientV1ConsensusState + responses: + '200': + description: A successful response. + schema: + type: object + properties: + consensus_state: + title: >- + consensus state associated with the client identifier at the + given height + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: >- + QueryConsensusStateResponse is the response type for the + Query/ConsensusState + + RPC method + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: client_id + description: client identifier + in: path + required: true + type: string + - name: revision_number + description: consensus state revision number + in: path + required: true + type: string + format: uint64 + - name: revision_height + description: consensus state revision height + in: path + required: true + type: string + format: uint64 + - name: latest_height + description: >- + latest_height overrrides the height field and queries the latest + stored + + ConsensusState + in: query + required: false + type: boolean + tags: + - Query + /ibc/core/client/v1/upgraded_client_states: + get: + summary: UpgradedClientState queries an Upgraded IBC light client. + operationId: IbcCoreClientV1UpgradedClientState + responses: + '200': + description: A successful response. + schema: + type: object + properties: + upgraded_client_state: + title: client state associated with the request identifier + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: |- + QueryUpgradedClientStateResponse is the response type for the + Query/UpgradedClientState RPC method. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + tags: + - Query + /ibc/core/client/v1/upgraded_consensus_states: + get: + summary: UpgradedConsensusState queries an Upgraded IBC consensus state. + operationId: IbcCoreClientV1UpgradedConsensusState + responses: + '200': + description: A successful response. + schema: + type: object + properties: + upgraded_consensus_state: + title: Consensus state associated with the request identifier + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: |- + QueryUpgradedConsensusStateResponse is the response type for the + Query/UpgradedConsensusState RPC method. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + tags: + - Query + '/ibc/core/connection/v1/client_connections/{client_id}': + get: + summary: |- + ClientConnections queries the connection paths associated with a client + state. + operationId: IbcCoreConnectionV1ClientConnections + responses: + '200': + description: A successful response. + schema: + type: object + properties: + connection_paths: + type: array + items: + type: string + description: slice of all the connection paths associated with a client. + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was generated + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryClientConnectionsResponse is the response type for the + Query/ClientConnections RPC method + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: client_id + description: client identifier associated with a connection + in: path + required: true + type: string + tags: + - Query + /ibc/core/connection/v1/connections: + get: + summary: Connections queries all the IBC connections of a chain. + operationId: IbcCoreConnectionV1Connections + responses: + '200': + description: A successful response. + schema: + type: object + properties: + connections: + type: array + items: + type: object + properties: + id: + type: string + description: connection identifier. + client_id: + type: string + description: client associated with this connection. + versions: + type: array + items: + type: object + properties: + identifier: + type: string + title: unique version identifier + features: + type: array + items: + type: string + title: >- + list of features compatible with the specified + identifier + description: >- + Version defines the versioning scheme used to + negotiate the IBC verison in + + the connection handshake. + title: >- + IBC version which can be utilised to determine encodings + or protocols for + + channels or packets utilising this connection + state: + description: current state of the connection end. + type: string + enum: + - STATE_UNINITIALIZED_UNSPECIFIED + - STATE_INIT + - STATE_TRYOPEN + - STATE_OPEN + default: STATE_UNINITIALIZED_UNSPECIFIED + counterparty: + description: counterparty chain associated with this connection. + type: object + properties: + client_id: + type: string + description: >- + identifies the client on the counterparty chain + associated with a given + + connection. + connection_id: + type: string + description: >- + identifies the connection end on the counterparty + chain associated with a + + given connection. + prefix: + description: commitment merkle prefix of the counterparty chain. + type: object + properties: + key_prefix: + type: string + format: byte + title: >- + MerklePrefix is merkle path prefixed to the key. + + The constructed key from the Path and the key will + be append(Path.KeyPath, + + append(Path.KeyPrefix, key...)) + delay_period: + type: string + format: uint64 + description: delay period associated with this connection. + description: >- + IdentifiedConnection defines a connection with additional + connection + + identifier field. + description: list of stored connections of the chain. + pagination: + title: pagination response + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + PageResponse is to be embedded in gRPC response messages where + the + + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + height: + title: query block height + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + description: >- + QueryConnectionsResponse is the response type for the + Query/Connections RPC + + method. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + tags: + - Query + '/ibc/core/connection/v1/connections/{connection_id}': + get: + summary: Connection queries an IBC connection end. + operationId: IbcCoreConnectionV1Connection + responses: + '200': + description: A successful response. + schema: + type: object + properties: + connection: + title: connection associated with the request identifier + type: object + properties: + client_id: + type: string + description: client associated with this connection. + versions: + type: array + items: + type: object + properties: + identifier: + type: string + title: unique version identifier + features: + type: array + items: + type: string + title: >- + list of features compatible with the specified + identifier + description: >- + Version defines the versioning scheme used to negotiate + the IBC verison in + + the connection handshake. + description: >- + IBC version which can be utilised to determine encodings + or protocols for + + channels or packets utilising this connection. + state: + description: current state of the connection end. + type: string + enum: + - STATE_UNINITIALIZED_UNSPECIFIED + - STATE_INIT + - STATE_TRYOPEN + - STATE_OPEN + default: STATE_UNINITIALIZED_UNSPECIFIED + counterparty: + description: counterparty chain associated with this connection. + type: object + properties: + client_id: + type: string + description: >- + identifies the client on the counterparty chain + associated with a given + + connection. + connection_id: + type: string + description: >- + identifies the connection end on the counterparty + chain associated with a + + given connection. + prefix: + description: commitment merkle prefix of the counterparty chain. + type: object + properties: + key_prefix: + type: string + format: byte + title: >- + MerklePrefix is merkle path prefixed to the key. + + The constructed key from the Path and the key will be + append(Path.KeyPath, + + append(Path.KeyPrefix, key...)) + delay_period: + type: string + format: uint64 + description: >- + delay period that must pass before a consensus state can + be used for + + packet-verification NOTE: delay period logic is only + implemented by some + + clients. + description: >- + ConnectionEnd defines a stateful object on a chain connected + to another + + separate one. + + NOTE: there must only be 2 defined ConnectionEnds to establish + + a connection between two chains. + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + description: >- + QueryConnectionResponse is the response type for the + Query/Connection RPC + + method. Besides the connection end, it includes a proof and the + height from + + which the proof was retrieved. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: connection_id + description: connection unique identifier + in: path + required: true + type: string + tags: + - Query + '/ibc/core/connection/v1/connections/{connection_id}/client_state': + get: + summary: |- + ConnectionClientState queries the client state associated with the + connection. + operationId: IbcCoreConnectionV1ConnectionClientState + responses: + '200': + description: A successful response. + schema: + type: object + properties: + identified_client_state: + title: client state associated with the channel + type: object + properties: + client_id: + type: string + title: client identifier + client_state: + title: client state + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type + of the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty + scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any + values in the form + + of utility functions or additional generated methods of + the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: >- + IdentifiedClientState defines a client state with an + additional client + + identifier field. + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryConnectionClientStateResponse is the response type for the + Query/ConnectionClientState RPC method + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: connection_id + description: connection identifier + in: path + required: true + type: string + tags: + - Query + '/ibc/core/connection/v1/connections/{connection_id}/consensus_state/revision/{revision_number}/height/{revision_height}': + get: + summary: |- + ConnectionConsensusState queries the consensus state associated with the + connection. + operationId: IbcCoreConnectionV1ConnectionConsensusState + responses: + '200': + description: A successful response. + schema: + type: object + properties: + consensus_state: + title: consensus state associated with the channel + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + client_id: + type: string + title: client ID associated with the consensus state + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryConnectionConsensusStateResponse is the response type for the + Query/ConnectionConsensusState RPC method + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: connection_id + description: connection identifier + in: path + required: true + type: string + - name: revision_number + in: path + required: true + type: string + format: uint64 + - name: revision_height + in: path + required: true + type: string + format: uint64 + tags: + - Query + '/pendulum-labs/market/market/book/{denomA}/{denomB}/{orderType}': + get: + summary: Queries a list of Book items. + operationId: PendulumlabsMarketMarketBook + responses: + '200': + description: A successful response. + schema: + type: object + properties: + book: + type: array + items: + type: object + properties: + uid: + type: string + format: uint64 + owner: + type: string + status: + type: string + orderType: + type: string + denomAsk: + type: string + denomBid: + type: string + amount: + type: string + rate: + type: array + items: + type: string + prev: + type: string + format: uint64 + next: + type: string + format: uint64 + beg_time: + type: string + format: int64 + upd_time: + type: string + format: int64 + pagination: + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + PageResponse is to be embedded in gRPC response messages where + the + + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: denomA + in: path + required: true + type: string + - name: denomB + in: path + required: true + type: string + - name: orderType + in: path + required: true + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + tags: + - Query + '/pendulum-labs/market/market/bookends/{coinA}/{coinB}/{orderType}/{rate}': + get: + summary: Queries a list of Bookends items. + operationId: PendulumlabsMarketMarketBookends + responses: + '200': + description: A successful response. + schema: + type: object + properties: + coinA: + type: string + coinB: + type: string + orderType: + type: string + rate: + type: array + items: + type: string + prev: + type: string + format: uint64 + next: + type: string + format: uint64 + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: coinA + in: path + required: true + type: string + - name: coinB + in: path + required: true + type: string + - name: orderType + in: path + required: true + type: string + - name: rate + in: path + required: true + type: array + items: + type: string + collectionFormat: csv + minItems: 1 + tags: + - Query + /pendulum-labs/market/market/burned: + get: + summary: Queries total burned. + operationId: PendulumlabsMarketMarketBurned + responses: + '200': + description: A successful response. + schema: + type: object + properties: + denom: + type: string + amount: + type: string + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - Query + /pendulum-labs/market/market/burnings: + get: + summary: Queries a list of Burnings items. + operationId: PendulumlabsMarketMarketBurningsAll + responses: + '200': + description: A successful response. + schema: + type: object + properties: + burnings: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + pagination: + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + PageResponse is to be embedded in gRPC response messages where + the + + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + tags: + - Query + '/pendulum-labs/market/market/burnings/{denom}': + get: + summary: Queries a Burnings by index. + operationId: PendulumlabsMarketMarketBurnings + responses: + '200': + description: A successful response. + schema: + type: object + properties: + burnings: + type: object + properties: + denom: + type: string + amount: + type: string + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: denom + in: path + required: true + type: string + tags: + - Query + /pendulum-labs/market/market/drop: + get: + summary: Queries a list of Drop items. + operationId: PendulumlabsMarketMarketDropAll + responses: + '200': + description: A successful response. + schema: + type: object + properties: + drops: + type: array + items: + type: object + properties: + uid: + type: string + format: uint64 + owner: + type: string + pair: + type: string + drops: + type: string + product: + type: string + active: + type: boolean + pagination: + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + PageResponse is to be embedded in gRPC response messages where + the + + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + tags: + - Query + '/pendulum-labs/market/market/drop/amounts/{uid}': + get: + summary: Queries a Drop by index. + operationId: PendulumlabsMarketMarketDropAmounts + responses: + '200': + description: A successful response. + schema: + type: object + properties: + denom1: + type: string + denom2: + type: string + amount1: + type: string + amount2: + type: string + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: uid + in: path + required: true + type: string + format: uint64 + tags: + - Query + '/pendulum-labs/market/market/drop/coin/{denomA}/{denomB}/{amountA}': + get: + summary: Queries a Drop by index. + operationId: PendulumlabsMarketMarketDropCoin + responses: + '200': + description: A successful response. + schema: + type: object + properties: + drops: + type: string + amountB: + type: string + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: denomA + in: path + required: true + type: string + - name: denomB + in: path + required: true + type: string + - name: amountA + in: path + required: true + type: string + tags: + - Query + '/pendulum-labs/market/market/drop/coins/{denom1}/{denom2}/{drops}': + get: + summary: Converts drops to coin amounts + operationId: PendulumlabsMarketMarketDropsToCoins + responses: + '200': + description: A successful response. + schema: + type: object + properties: + denom1: + type: string + amount1: + type: string + denom2: + type: string + amount2: + type: string + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: denom1 + in: path + required: true + type: string + - name: denom2 + in: path + required: true + type: string + - name: drops + in: path + required: true + type: string + tags: + - Query + '/pendulum-labs/market/market/drop/pairs/{address}': + get: + summary: Queries a Drop by index. + operationId: PendulumlabsMarketMarketDropPairs + responses: + '200': + description: A successful response. + schema: + type: object + properties: + pairs: + type: array + items: + type: string + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: address + in: path + required: true + type: string + tags: + - Query + '/pendulum-labs/market/market/drop/{address}/{pair}': + get: + summary: Queries a Drop by index. + operationId: PendulumlabsMarketMarketDropOwnerPair + responses: + '200': + description: A successful response. + schema: + type: object + properties: + drops: + type: array + items: + type: object + properties: + uid: + type: string + format: uint64 + owner: + type: string + pair: + type: string + drops: + type: string + product: + type: string + active: + type: boolean + pagination: + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + PageResponse is to be embedded in gRPC response messages where + the + + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: address + in: path + required: true + type: string + - name: pair + in: path + required: true + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + tags: + - Query + '/pendulum-labs/market/market/drop/{uid}': + get: + summary: Queries a Drop by index. + operationId: PendulumlabsMarketMarketDrop + responses: + '200': + description: A successful response. + schema: + type: object + properties: + drop: + type: object + properties: + uid: + type: string + format: uint64 + owner: + type: string + pair: + type: string + drops: + type: string + product: + type: string + active: + type: boolean + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: uid + in: path + required: true + type: string + format: uint64 + tags: + - Query + '/pendulum-labs/market/market/history/{pair}': + get: + summary: Queries pool trade history. + operationId: PendulumlabsMarketMarketHistory + responses: + '200': + description: A successful response. + schema: + type: object + properties: + history: + type: array + items: + type: object + properties: + uid: + type: string + format: uint64 + owner: + type: string + status: + type: string + orderType: + type: string + denomAsk: + type: string + denomBid: + type: string + amount: + type: string + rate: + type: array + items: + type: string + prev: + type: string + format: uint64 + next: + type: string + format: uint64 + beg_time: + type: string + format: int64 + upd_time: + type: string + format: int64 + pagination: + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + PageResponse is to be embedded in gRPC response messages where + the + + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: pair + in: path + required: true + type: string + - name: length + in: query + required: false + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + tags: + - Query + /pendulum-labs/market/market/member: + get: + summary: Queries a list of Member items. + operationId: PendulumlabsMarketMarketMemberAll + responses: + '200': + description: A successful response. + schema: + type: object + properties: + member: + type: array + items: + type: object + properties: + pair: + type: string + denomA: + type: string + denomB: + type: string + balance: + type: string + previous: + type: string + limit: + type: string + format: uint64 + stop: + type: string + format: uint64 + pagination: + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + PageResponse is to be embedded in gRPC response messages where + the + + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + tags: + - Query + '/pendulum-labs/market/market/member/{denomA}/{denomB}': + get: + summary: Queries a Member by index. + operationId: PendulumlabsMarketMarketMember + responses: + '200': + description: A successful response. + schema: + type: object + properties: + member: + type: object + properties: + pair: + type: string + denomA: + type: string + denomB: + type: string + balance: + type: string + previous: + type: string + limit: + type: string + format: uint64 + stop: + type: string + format: uint64 + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: denomA + in: path + required: true + type: string + - name: denomB + in: path + required: true + type: string + tags: + - Query + /pendulum-labs/market/market/order: + get: + summary: Queries a list of Order items. + operationId: PendulumlabsMarketMarketOrderAll + responses: + '200': + description: A successful response. + schema: + type: object + properties: + orders: + type: array + items: + type: object + properties: + uid: + type: string + format: uint64 + owner: + type: string + status: + type: string + orderType: + type: string + denomAsk: + type: string + denomBid: + type: string + amount: + type: string + rate: + type: array + items: + type: string + prev: + type: string + format: uint64 + next: + type: string + format: uint64 + beg_time: + type: string + format: int64 + upd_time: + type: string + format: int64 + pagination: + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + PageResponse is to be embedded in gRPC response messages where + the + + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + tags: + - Query + '/pendulum-labs/market/market/order/uids/{address}': + get: + summary: Queries a list of Order items. + operationId: PendulumlabsMarketMarketOrderOwnerUids + responses: + '200': + description: A successful response. + schema: + type: object + properties: + orders: + type: object + properties: + uids: + type: array + items: + type: string + format: uint64 + pagination: + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + PageResponse is to be embedded in gRPC response messages where + the + + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: address + in: path + required: true + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + tags: + - Query + '/pendulum-labs/market/market/order/{address}': + get: + summary: Queries a list of Order items. + operationId: PendulumlabsMarketMarketOrderOwner + responses: + '200': + description: A successful response. + schema: + type: object + properties: + orders: + type: array + items: + type: object + properties: + uid: + type: string + format: uint64 + owner: + type: string + status: + type: string + orderType: + type: string + denomAsk: + type: string + denomBid: + type: string + amount: + type: string + rate: + type: array + items: + type: string + prev: + type: string + format: uint64 + next: + type: string + format: uint64 + beg_time: + type: string + format: int64 + upd_time: + type: string + format: int64 + pagination: + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + PageResponse is to be embedded in gRPC response messages where + the + + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: address + in: path + required: true + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + tags: + - Query + '/pendulum-labs/market/market/order/{uid}': + get: + summary: Queries a Order by index. + operationId: PendulumlabsMarketMarketOrder + responses: + '200': + description: A successful response. + schema: + type: object + properties: + order: + type: object + properties: + uid: + type: string + format: uint64 + owner: + type: string + status: + type: string + orderType: + type: string + denomAsk: + type: string + denomBid: + type: string + amount: + type: string + rate: + type: array + items: + type: string + prev: + type: string + format: uint64 + next: + type: string + format: uint64 + beg_time: + type: string + format: int64 + upd_time: + type: string + format: int64 + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: uid + in: path + required: true + type: string + format: uint64 + tags: + - Query + /pendulum-labs/market/market/params: + get: + summary: Parameters queries the parameters of the module. + operationId: PendulumlabsMarketMarketParams + responses: + '200': + description: A successful response. + schema: + type: object + properties: + params: + description: params holds all the parameters of this module. + type: object + properties: + earn_rates: + type: string + title: |- + leader earnings rates + 1,2,3 Comma separated, no space + burn_rate: + type: string + title: pool burning rate + burn_coin: + type: string + title: burn coin + market_fee: + type: string + title: >- + market_fee (parameter / 10000), 9999 representing as + 99.99% + description: >- + QueryParamsResponse is response type for the Query/Params RPC + method. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - Query + /pendulum-labs/market/market/pool: + get: + summary: Queries a list of Pool items. + operationId: PendulumlabsMarketMarketPoolAll + responses: + '200': + description: A successful response. + schema: + type: object + properties: + pool: + type: array + items: + type: object + properties: + pair: + type: string + denom1: + type: string + denom2: + type: string + volume1: + type: object + properties: + denom: + type: string + amount: + type: string + volume2: + type: object + properties: + denom: + type: string + amount: + type: string + leaders: + type: array + items: + type: object + properties: + address: + type: string + drops: + type: string + drops: + type: string + history: + type: string + format: uint64 + last_drop: + type: string + format: uint64 + pagination: + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + PageResponse is to be embedded in gRPC response messages where + the + + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + tags: + - Query + '/pendulum-labs/market/market/pool/{pair}': + get: + summary: Queries a Pool by index. + operationId: PendulumlabsMarketMarketPool + responses: + '200': + description: A successful response. + schema: + type: object + properties: + pool: + type: object + properties: + pair: + type: string + denom1: + type: string + denom2: + type: string + volume1: + type: object + properties: + denom: + type: string + amount: + type: string + volume2: + type: object + properties: + denom: + type: string + amount: + type: string + leaders: + type: array + items: + type: object + properties: + address: + type: string + drops: + type: string + drops: + type: string + history: + type: string + format: uint64 + last_drop: + type: string + format: uint64 + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: pair + in: path + required: true + type: string + tags: + - Query + '/pendulum-labs/market/market/quote/{denomBid}/{denomAsk}/{denomAmount}/{amount}': + get: + summary: Queries pool trade history. + operationId: PendulumlabsMarketMarketQuote + responses: + '200': + description: A successful response. + schema: + type: object + properties: + denom: + type: string + amount: + type: string + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: denomBid + in: path + required: true + type: string + - name: denomAsk + in: path + required: true + type: string + - name: denomAmount + in: path + required: true + type: string + - name: amount + in: path + required: true + type: string + tags: + - Query + /pendulum-labs/market/market/volume: + get: + summary: Queries all Volumes. + operationId: PendulumlabsMarketMarketVolumeAll + responses: + '200': + description: A successful response. + schema: + type: object + properties: + volumes: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + pagination: + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + PageResponse is to be embedded in gRPC response messages where + the + + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + tags: + - Query + '/pendulum-labs/market/market/volume/{denom}': + get: + summary: Queries a Volume by index. + operationId: PendulumlabsMarketMarketVolume + responses: + '200': + description: A successful response. + schema: + type: object + properties: + amount: + type: string + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: denom + in: path + required: true + type: string + tags: + - Query +definitions: + cosmos.auth.v1beta1.Params: + type: object + properties: + max_memo_characters: + type: string + format: uint64 + tx_sig_limit: + type: string + format: uint64 + tx_size_cost_per_byte: + type: string + format: uint64 + sig_verify_cost_ed25519: + type: string + format: uint64 + sig_verify_cost_secp256k1: + type: string + format: uint64 + description: Params defines the parameters for the auth module. + cosmos.auth.v1beta1.QueryAccountResponse: + type: object + properties: + account: + description: account defines the account of the corresponding address. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + QueryAccountResponse is the response type for the Query/Account RPC + method. + cosmos.auth.v1beta1.QueryAccountsResponse: + type: object + properties: + accounts: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up + a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: accounts are the existing accounts + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryAccountsResponse is the response type for the Query/Accounts RPC + method. + + + Since: cosmos-sdk 0.43 + cosmos.auth.v1beta1.QueryModuleAccountByNameResponse: + type: object + properties: + account: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: >- + QueryModuleAccountByNameResponse is the response type for the + Query/ModuleAccountByName RPC method. + cosmos.auth.v1beta1.QueryParamsResponse: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + max_memo_characters: + type: string + format: uint64 + tx_sig_limit: + type: string + format: uint64 + tx_size_cost_per_byte: + type: string + format: uint64 + sig_verify_cost_ed25519: + type: string + format: uint64 + sig_verify_cost_secp256k1: + type: string + format: uint64 + description: QueryParamsResponse is the response type for the Query/Params RPC method. + cosmos.base.query.v1beta1.PageRequest: + type: object + properties: + key: + type: string + format: byte + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + offset: + type: string + format: uint64 + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + limit: + type: string + format: uint64 + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + count_total: + type: boolean + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in UIs. + + count_total is only respected when offset is used. It is ignored when + key + + is set. + reverse: + type: boolean + description: >- + reverse is set to true if results are to be returned in the descending + order. + + + Since: cosmos-sdk 0.43 + description: |- + message SomeRequest { + Foo some_parameter = 1; + PageRequest pagination = 2; + } + title: |- + PageRequest is to be embedded in gRPC request messages for efficient + pagination. Ex: + cosmos.base.query.v1beta1.PageResponse: + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + google.protobuf.Any: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message along with + a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + google.rpc.Status: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up + a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + cosmos.bank.v1beta1.DenomUnit: + type: object + properties: + denom: + type: string + description: denom represents the string name of the given denom unit (e.g uatom). + exponent: + type: integer + format: int64 + description: >- + exponent represents power of 10 exponent that one must + + raise the base_denom to in order to equal the given DenomUnit's denom + + 1 denom = 1^exponent base_denom + + (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' + with + + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: aliases is a list of string aliases for the given denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + cosmos.bank.v1beta1.Input: + type: object + properties: + address: + type: string + coins: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: Input models transaction input. + cosmos.bank.v1beta1.Metadata: + type: object + properties: + description: + type: string + denom_units: + type: array + items: + type: object + properties: + denom: + type: string + description: >- + denom represents the string name of the given denom unit (e.g + uatom). + exponent: + type: integer + format: int64 + description: >- + exponent represents power of 10 exponent that one must + + raise the base_denom to in order to equal the given DenomUnit's + denom + + 1 denom = 1^exponent base_denom + + (e.g. with a base_denom of uatom, one can create a DenomUnit of + 'atom' with + + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: aliases is a list of string aliases for the given denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + title: denom_units represents the list of DenomUnit's for a given coin + base: + type: string + description: >- + base represents the base denom (should be the DenomUnit with exponent + = 0). + display: + type: string + description: |- + display indicates the suggested denom that should be + displayed in clients. + name: + type: string + description: 'Since: cosmos-sdk 0.43' + title: 'name defines the name of the token (eg: Cosmos Atom)' + symbol: + type: string + description: >- + symbol is the token symbol usually shown on exchanges (eg: ATOM). This + can + + be the same as the display. + + + Since: cosmos-sdk 0.43 + description: |- + Metadata represents a struct that describes + a basic token. + cosmos.bank.v1beta1.MsgMultiSendResponse: + type: object + description: MsgMultiSendResponse defines the Msg/MultiSend response type. + cosmos.bank.v1beta1.MsgSendResponse: + type: object + description: MsgSendResponse defines the Msg/Send response type. + cosmos.bank.v1beta1.Output: + type: object + properties: + address: + type: string + coins: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: Output models transaction outputs. + cosmos.bank.v1beta1.Params: + type: object + properties: + send_enabled: + type: array + items: + type: object + properties: + denom: + type: string + enabled: + type: boolean + description: >- + SendEnabled maps coin denom to a send_enabled status (whether a + denom is + + sendable). + default_send_enabled: + type: boolean + description: Params defines the parameters for the bank module. + cosmos.bank.v1beta1.QueryAllBalancesResponse: + type: object + properties: + balances: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: balances is the balances of all the coins. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryAllBalancesResponse is the response type for the Query/AllBalances + RPC + + method. + cosmos.bank.v1beta1.QueryBalanceResponse: + type: object + properties: + balance: + description: balance is the balance of the coin. + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + QueryBalanceResponse is the response type for the Query/Balance RPC + method. + cosmos.bank.v1beta1.QueryDenomMetadataResponse: + type: object + properties: + metadata: + description: >- + metadata describes and provides all the client information for the + requested token. + type: object + properties: + description: + type: string + denom_units: + type: array + items: + type: object + properties: + denom: + type: string + description: >- + denom represents the string name of the given denom unit + (e.g uatom). + exponent: + type: integer + format: int64 + description: >- + exponent represents power of 10 exponent that one must + + raise the base_denom to in order to equal the given + DenomUnit's denom + + 1 denom = 1^exponent base_denom + + (e.g. with a base_denom of uatom, one can create a DenomUnit + of 'atom' with + + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: aliases is a list of string aliases for the given denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + title: denom_units represents the list of DenomUnit's for a given coin + base: + type: string + description: >- + base represents the base denom (should be the DenomUnit with + exponent = 0). + display: + type: string + description: |- + display indicates the suggested denom that should be + displayed in clients. + name: + type: string + description: 'Since: cosmos-sdk 0.43' + title: 'name defines the name of the token (eg: Cosmos Atom)' + symbol: + type: string + description: >- + symbol is the token symbol usually shown on exchanges (eg: ATOM). + This can + + be the same as the display. + + + Since: cosmos-sdk 0.43 + description: >- + QueryDenomMetadataResponse is the response type for the + Query/DenomMetadata RPC + + method. + cosmos.bank.v1beta1.QueryDenomsMetadataResponse: + type: object + properties: + metadatas: + type: array + items: + type: object + properties: + description: + type: string + denom_units: + type: array + items: + type: object + properties: + denom: + type: string + description: >- + denom represents the string name of the given denom unit + (e.g uatom). + exponent: + type: integer + format: int64 + description: >- + exponent represents power of 10 exponent that one must + + raise the base_denom to in order to equal the given + DenomUnit's denom + + 1 denom = 1^exponent base_denom + + (e.g. with a base_denom of uatom, one can create a + DenomUnit of 'atom' with + + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: aliases is a list of string aliases for the given denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + title: denom_units represents the list of DenomUnit's for a given coin + base: + type: string + description: >- + base represents the base denom (should be the DenomUnit with + exponent = 0). + display: + type: string + description: |- + display indicates the suggested denom that should be + displayed in clients. + name: + type: string + description: 'Since: cosmos-sdk 0.43' + title: 'name defines the name of the token (eg: Cosmos Atom)' + symbol: + type: string + description: >- + symbol is the token symbol usually shown on exchanges (eg: + ATOM). This can + + be the same as the display. + + + Since: cosmos-sdk 0.43 + description: |- + Metadata represents a struct that describes + a basic token. + description: >- + metadata provides the client information for all the registered + tokens. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryDenomsMetadataResponse is the response type for the + Query/DenomsMetadata RPC + + method. + cosmos.bank.v1beta1.QueryParamsResponse: + type: object + properties: + params: + type: object + properties: + send_enabled: + type: array + items: + type: object + properties: + denom: + type: string + enabled: + type: boolean + description: >- + SendEnabled maps coin denom to a send_enabled status (whether a + denom is + + sendable). + default_send_enabled: + type: boolean + description: Params defines the parameters for the bank module. + description: >- + QueryParamsResponse defines the response type for querying x/bank + parameters. + cosmos.bank.v1beta1.QuerySpendableBalancesResponse: + type: object + properties: + balances: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: balances is the spendable balances of all the coins. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QuerySpendableBalancesResponse defines the gRPC response structure for + querying + + an account's spendable balances. + cosmos.bank.v1beta1.QuerySupplyOfResponse: + type: object + properties: + amount: + description: amount is the supply of the coin. + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC + method. + cosmos.bank.v1beta1.QueryTotalSupplyResponse: + type: object + properties: + supply: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + title: supply is the supply of the coins + pagination: + description: |- + pagination defines the pagination in the response. + + Since: cosmos-sdk 0.43 + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + title: >- + QueryTotalSupplyResponse is the response type for the Query/TotalSupply + RPC + + method + cosmos.bank.v1beta1.SendEnabled: + type: object + properties: + denom: + type: string + enabled: + type: boolean + description: |- + SendEnabled maps coin denom to a send_enabled status (whether a denom is + sendable). + cosmos.base.v1beta1.Coin: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse: + type: object + properties: + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + block: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block + in the blockchain, + + including all blockchain data structures and the rules of the + application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + data: + type: object + properties: + txs: + type: array + items: + type: string + format: byte + description: >- + Txs that will be applied by state @ block.Height+1. + + NOTE: not all txs here are valid. We're just agreeing on the + order first. + + This means that block.AppHash does not include these txs. + title: Data contains the set of transactions included in the block + evidence: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + duplicate_vote_evidence: + type: object + properties: + vote_a: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: >- + SignedMsgType is a type of signed message in the + consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote represents a prevote, precommit, or commit vote + from validators for + + consensus. + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: >- + SignedMsgType is a type of signed message in the + consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote represents a prevote, precommit, or commit vote + from validators for + + consensus. + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + DuplicateVoteEvidence contains evidence of a validator + signed two conflicting votes. + light_client_attack_evidence: + type: object + properties: + conflicting_block: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules + for processing a block in the + blockchain, + + including all blockchain data structures + and the rules of the application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: >- + commit from validators from the last + block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: >- + hashes from the app output from the prev + block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: >- + root hash of all results from the txs + from the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: >- + Header defines the structure of a block + header. + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + title: >- + BlockIdFlag indicates which BlcokID the + signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: >- + CommitSig is a part of the Vote included + in a Commit. + description: >- + Commit contains the evidence that a block + was committed by a set of validators. + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for + use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for + use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + common_height: + type: string + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use + with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + LightClientAttackEvidence contains evidence of a set of + validators attempting to mislead a light client. + last_commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + title: BlockIdFlag indicates which BlcokID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: >- + Commit contains the evidence that a block was committed by a set + of validators. + description: >- + GetBlockByHeightResponse is the response type for the + Query/GetBlockByHeight RPC method. + cosmos.base.tendermint.v1beta1.GetLatestBlockResponse: + type: object + properties: + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + block: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block + in the blockchain, + + including all blockchain data structures and the rules of the + application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + data: + type: object + properties: + txs: + type: array + items: + type: string + format: byte + description: >- + Txs that will be applied by state @ block.Height+1. + + NOTE: not all txs here are valid. We're just agreeing on the + order first. + + This means that block.AppHash does not include these txs. + title: Data contains the set of transactions included in the block + evidence: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + duplicate_vote_evidence: + type: object + properties: + vote_a: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: >- + SignedMsgType is a type of signed message in the + consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote represents a prevote, precommit, or commit vote + from validators for + + consensus. + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: >- + SignedMsgType is a type of signed message in the + consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote represents a prevote, precommit, or commit vote + from validators for + + consensus. + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + DuplicateVoteEvidence contains evidence of a validator + signed two conflicting votes. + light_client_attack_evidence: + type: object + properties: + conflicting_block: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules + for processing a block in the + blockchain, + + including all blockchain data structures + and the rules of the application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: type: string format: byte part_set_header: @@ -22240,387 +33257,2355 @@ definitions: type: string format: byte title: >- - root hash of all results from the txs - from the previous block - evidence_hash: + root hash of all results from the txs + from the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: >- + Header defines the structure of a block + header. + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + title: >- + BlockIdFlag indicates which BlcokID the + signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: >- + CommitSig is a part of the Vote included + in a Commit. + description: >- + Commit contains the evidence that a block + was committed by a set of validators. + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for + use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for + use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + common_height: + type: string + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use + with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + LightClientAttackEvidence contains evidence of a set of + validators attempting to mislead a light client. + last_commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + title: BlockIdFlag indicates which BlcokID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: >- + Commit contains the evidence that a block was committed by a set + of validators. + description: >- + GetLatestBlockResponse is the response type for the Query/GetLatestBlock + RPC method. + cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse: + type: object + properties: + block_height: + type: string + format: int64 + validators: + type: array + items: + type: object + properties: + address: + type: string + pub_key: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + description: Validator is the type for the validator-set. + pagination: + description: pagination defines an pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + GetLatestValidatorSetResponse is the response type for the + Query/GetValidatorSetByHeight RPC method. + cosmos.base.tendermint.v1beta1.GetNodeInfoResponse: + type: object + properties: + default_node_info: + type: object + properties: + protocol_version: + type: object + properties: + p2p: + type: string + format: uint64 + block: + type: string + format: uint64 + app: + type: string + format: uint64 + default_node_id: + type: string + listen_addr: + type: string + network: + type: string + version: + type: string + channels: + type: string + format: byte + moniker: + type: string + other: + type: object + properties: + tx_index: + type: string + rpc_address: + type: string + application_version: + type: object + properties: + name: + type: string + app_name: + type: string + version: + type: string + git_commit: + type: string + build_tags: + type: string + go_version: + type: string + build_deps: + type: array + items: + type: object + properties: + path: + type: string + title: module path + version: + type: string + title: module version + sum: + type: string + title: checksum + title: Module is the type for VersionInfo + cosmos_sdk_version: + type: string + title: 'Since: cosmos-sdk 0.43' + description: VersionInfo is the type for the GetNodeInfoResponse message. + description: >- + GetNodeInfoResponse is the request type for the Query/GetNodeInfo RPC + method. + cosmos.base.tendermint.v1beta1.GetSyncingResponse: + type: object + properties: + syncing: + type: boolean + description: >- + GetSyncingResponse is the response type for the Query/GetSyncing RPC + method. + cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse: + type: object + properties: + block_height: + type: string + format: int64 + validators: + type: array + items: + type: object + properties: + address: + type: string + pub_key: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + description: Validator is the type for the validator-set. + pagination: + description: pagination defines an pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + GetValidatorSetByHeightResponse is the response type for the + Query/GetValidatorSetByHeight RPC method. + cosmos.base.tendermint.v1beta1.Module: + type: object + properties: + path: + type: string + title: module path + version: + type: string + title: module version + sum: + type: string + title: checksum + title: Module is the type for VersionInfo + cosmos.base.tendermint.v1beta1.Validator: + type: object + properties: + address: + type: string + pub_key: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + description: Validator is the type for the validator-set. + cosmos.base.tendermint.v1beta1.VersionInfo: + type: object + properties: + name: + type: string + app_name: + type: string + version: + type: string + git_commit: + type: string + build_tags: + type: string + go_version: + type: string + build_deps: + type: array + items: + type: object + properties: + path: + type: string + title: module path + version: + type: string + title: module version + sum: + type: string + title: checksum + title: Module is the type for VersionInfo + cosmos_sdk_version: + type: string + title: 'Since: cosmos-sdk 0.43' + description: VersionInfo is the type for the GetNodeInfoResponse message. + tendermint.crypto.PublicKey: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + tendermint.p2p.DefaultNodeInfo: + type: object + properties: + protocol_version: + type: object + properties: + p2p: + type: string + format: uint64 + block: + type: string + format: uint64 + app: + type: string + format: uint64 + default_node_id: + type: string + listen_addr: + type: string + network: + type: string + version: + type: string + channels: + type: string + format: byte + moniker: + type: string + other: + type: object + properties: + tx_index: + type: string + rpc_address: + type: string + tendermint.p2p.DefaultNodeInfoOther: + type: object + properties: + tx_index: + type: string + rpc_address: + type: string + tendermint.p2p.ProtocolVersion: + type: object + properties: + p2p: + type: string + format: uint64 + block: + type: string + format: uint64 + app: + type: string + format: uint64 + tendermint.types.Block: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block in + the blockchain, + + including all blockchain data structures and the rules of the + application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + data: + type: object + properties: + txs: + type: array + items: + type: string + format: byte + description: >- + Txs that will be applied by state @ block.Height+1. + + NOTE: not all txs here are valid. We're just agreeing on the + order first. + + This means that block.AppHash does not include these txs. + title: Data contains the set of transactions included in the block + evidence: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + duplicate_vote_evidence: + type: object + properties: + vote_a: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: >- + SignedMsgType is a type of signed message in the + consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote represents a prevote, precommit, or commit vote + from validators for + + consensus. + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: >- + SignedMsgType is a type of signed message in the + consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote represents a prevote, precommit, or commit vote + from validators for + + consensus. + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + DuplicateVoteEvidence contains evidence of a validator + signed two conflicting votes. + light_client_attack_evidence: + type: object + properties: + conflicting_block: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: type: string - format: byte - description: evidence included in the block - title: consensus info - proposer_address: + format: uint64 + app: type: string - format: byte - title: original proposer of the block + format: uint64 description: >- - Header defines the structure of a block - header. - commit: + Consensus captures the consensus rules for + processing a block in the blockchain, + + including all blockchain data structures and + the rules of the application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: type: object properties: - height: + hash: type: string - format: int64 - round: - type: integer - format: int32 - block_id: + format: byte + part_set_header: type: object properties: + total: + type: integer + format: int64 hash: type: string format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: >- - BlockIdFlag indicates which BlcokID the - signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: >- - CommitSig is a part of the Vote included - in a Commit. - description: >- - Commit contains the evidence that a block - was committed by a set of validators. - validator_set: + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: >- + hashes from the app output from the prev + block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: >- + root hash of all results from the txs from + the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + commit: type: object properties: - validators: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: type: array items: type: object properties: - address: + block_id_flag: type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN title: >- - PublicKey defines the keys available for - use with Validators - voting_power: + BlockIdFlag indicates which BlcokID the + signature is for + validator_address: type: string - format: int64 - proposer_priority: + format: byte + timestamp: type: string - format: int64 - proposer: + format: date-time + signature: + type: string + format: byte + description: >- + CommitSig is a part of the Vote included + in a Commit. + description: >- + Commit contains the evidence that a block was + committed by a set of validators. + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for + use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: type: object properties: - address: + ed25519: type: string format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for - use with Validators - voting_power: - type: string - format: int64 - proposer_priority: + secp256k1: type: string - format: int64 - total_voting_power: + format: byte + title: >- + PublicKey defines the keys available for use + with Validators + voting_power: type: string format: int64 - common_height: + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + common_height: + type: string + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with + Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + LightClientAttackEvidence contains evidence of a set of + validators attempting to mislead a light client. + last_commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + title: BlockIdFlag indicates which BlcokID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: >- + Commit contains the evidence that a block was committed by a set of + validators. + tendermint.types.BlockID: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + tendermint.types.BlockIDFlag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + title: BlockIdFlag indicates which BlcokID the signature is for + tendermint.types.Commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + title: BlockIdFlag indicates which BlcokID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: >- + Commit contains the evidence that a block was committed by a set of + validators. + tendermint.types.CommitSig: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + title: BlockIdFlag indicates which BlcokID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + tendermint.types.Data: + type: object + properties: + txs: + type: array + items: + type: string + format: byte + description: >- + Txs that will be applied by state @ block.Height+1. + + NOTE: not all txs here are valid. We're just agreeing on the order + first. + + This means that block.AppHash does not include these txs. + title: Data contains the set of transactions included in the block + tendermint.types.DuplicateVoteEvidence: + type: object + properties: + vote_a: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote represents a prevote, precommit, or commit vote from validators + for + + consensus. + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote represents a prevote, precommit, or commit vote from validators + for + + consensus. + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + DuplicateVoteEvidence contains evidence of a validator signed two + conflicting votes. + tendermint.types.Evidence: + type: object + properties: + duplicate_vote_evidence: + type: object + properties: + vote_a: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote represents a prevote, precommit, or commit vote from + validators for + + consensus. + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote represents a prevote, precommit, or commit vote from + validators for + + consensus. + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + DuplicateVoteEvidence contains evidence of a validator signed two + conflicting votes. + light_client_attack_evidence: + type: object + properties: + conflicting_block: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing + a block in the blockchain, + + including all blockchain data structures and the rules + of the application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: >- + root hash of all results from the txs from the + previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + title: >- + BlockIdFlag indicates which BlcokID the + signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: >- + CommitSig is a part of the Vote included in a + Commit. + description: >- + Commit contains the evidence that a block was committed by + a set of validators. + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: type: string - format: int64 - byzantine_validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use - with Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with + Validators + voting_power: type: string format: int64 - timestamp: + proposer_priority: type: string - format: date-time - description: >- - LightClientAttackEvidence contains evidence of a set of - validators attempting to mislead a light client. - last_commit: - type: object - properties: - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: + format: int64 + proposer: type: object properties: - total: - type: integer - format: int64 - hash: + address: type: string format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with + Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + common_height: + type: string + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: type: object properties: - block_id_flag: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + LightClientAttackEvidence contains evidence of a set of validators + attempting to mislead a light client. + tendermint.types.EvidenceList: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + duplicate_vote_evidence: + type: object + properties: + vote_a: + type: object + properties: + type: type: string enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: BlockIdFlag indicates which BlcokID the signature is for + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: >- + SignedMsgType is a type of signed message in the + consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time validator_address: type: string format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote represents a prevote, precommit, or commit vote from + validators for + + consensus. + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: >- + SignedMsgType is a type of signed message in the + consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. timestamp: type: string format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 signature: type: string format: byte - description: CommitSig is a part of the Vote included in a Commit. - description: >- - Commit contains the evidence that a block was committed by a set - of validators. - description: >- - GetBlockByHeightResponse is the response type for the - Query/GetBlockByHeight RPC method. - cosmos.base.tendermint.v1beta1.GetLatestBlockResponse: - type: object - properties: - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - block: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules for processing a block - in the blockchain, - - including all blockchain data structures and the rules of the - application's + description: >- + Vote represents a prevote, precommit, or commit vote from + validators for - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - description: commit from validators from the last block - title: hashes of block data - data_hash: - type: string - format: byte - title: transactions - validators_hash: - type: string - format: byte - description: validators for the current block - title: hashes from the app output from the prev block - next_validators_hash: - type: string - format: byte - title: validators for the next block - consensus_hash: - type: string - format: byte - title: consensus params for current block - app_hash: - type: string - format: byte - title: state after txs from the previous block - last_results_hash: - type: string - format: byte - title: root hash of all results from the txs from the previous block - evidence_hash: - type: string - format: byte - description: evidence included in the block - title: consensus info - proposer_address: - type: string - format: byte - title: original proposer of the block - description: Header defines the structure of a block header. - data: - type: object - properties: - txs: - type: array - items: + consensus. + total_voting_power: type: string - format: byte - description: >- - Txs that will be applied by state @ block.Height+1. - - NOTE: not all txs here are valid. We're just agreeing on the - order first. - - This means that block.AppHash does not include these txs. - title: Data contains the set of transactions included in the block - evidence: - type: object - properties: - evidence: - type: array - items: + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + DuplicateVoteEvidence contains evidence of a validator signed + two conflicting votes. + light_client_attack_evidence: + type: object + properties: + conflicting_block: type: object properties: - duplicate_vote_evidence: + signed_header: type: object properties: - vote_a: + header: type: object properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 description: >- - SignedMsgType is a type of signed message in the - consensus. + Consensus captures the consensus rules for + processing a block in the blockchain, - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals + including all blockchain data structures and the + rules of the application's + + state transition machine. + chain_id: + type: string height: type: string format: int64 - round: - type: integer - format: int32 - block_id: + time: + type: string + format: date-time + last_block_id: type: object properties: hash: @@ -22637,41 +35622,51 @@ definitions: format: byte title: PartsetHeader title: BlockID - description: zero if vote is nil. - timestamp: + last_commit_hash: type: string - format: date-time - validator_address: + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: type: string format: byte - validator_index: - type: integer - format: int32 - signature: + title: transactions + validators_hash: type: string format: byte - description: >- - Vote represents a prevote, precommit, or commit vote - from validators for - - consensus. - vote_b: - type: object - properties: - type: + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: >- - SignedMsgType is a type of signed message in the - consensus. - - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: >- + root hash of all results from the txs from the + previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + commit: + type: object + properties: height: type: string format: int64 @@ -22695,536 +35690,1249 @@ definitions: format: byte title: PartsetHeader title: BlockID - description: zero if vote is nil. - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + title: >- + BlockIdFlag indicates which BlcokID the + signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: >- + CommitSig is a part of the Vote included in a + Commit. description: >- - Vote represents a prevote, precommit, or commit vote - from validators for - - consensus. - total_voting_power: - type: string - format: int64 - validator_power: - type: string - format: int64 - timestamp: - type: string - format: date-time - description: >- - DuplicateVoteEvidence contains evidence of a validator - signed two conflicting votes. - light_client_attack_evidence: + Commit contains the evidence that a block was + committed by a set of validators. + validator_set: type: object properties: - conflicting_block: - type: object - properties: - signed_header: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules - for processing a block in the - blockchain, - - including all blockchain data structures - and the rules of the application's - - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - description: >- - commit from validators from the last - block - title: hashes of block data - data_hash: - type: string - format: byte - title: transactions - validators_hash: - type: string - format: byte - description: validators for the current block - title: >- - hashes from the app output from the prev - block - next_validators_hash: - type: string - format: byte - title: validators for the next block - consensus_hash: - type: string - format: byte - title: consensus params for current block - app_hash: - type: string - format: byte - title: state after txs from the previous block - last_results_hash: - type: string - format: byte - title: >- - root hash of all results from the txs - from the previous block - evidence_hash: - type: string - format: byte - description: evidence included in the block - title: consensus info - proposer_address: - type: string - format: byte - title: original proposer of the block - description: >- - Header defines the structure of a block - header. - commit: - type: object - properties: - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: >- - BlockIdFlag indicates which BlcokID the - signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: >- - CommitSig is a part of the Vote included - in a Commit. - description: >- - Commit contains the evidence that a block - was committed by a set of validators. - validator_set: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use + with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: type: object properties: - validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for - use with Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - proposer: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for - use with Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: + ed25519: type: string - format: int64 - common_height: + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use + with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + common_height: + type: string + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with + Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + LightClientAttackEvidence contains evidence of a set of + validators attempting to mislead a light client. + tendermint.types.Header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block in the + blockchain, + + including all blockchain data structures and the rules of the + application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + tendermint.types.LightBlock: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block + in the blockchain, + + including all blockchain data structures and the rules of the + application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + title: BlockIdFlag indicates which BlcokID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: >- + Commit contains the evidence that a block was committed by a set + of validators. + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + tendermint.types.LightClientAttackEvidence: + type: object + properties: + conflicting_block: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a + block in the blockchain, + + including all blockchain data structures and the rules of + the application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: >- + root hash of all results from the txs from the previous + block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: type: string - format: int64 - byzantine_validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use - with Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + title: >- + BlockIdFlag indicates which BlcokID the signature is + for + validator_address: type: string - format: int64 + format: byte timestamp: type: string format: date-time - description: >- - LightClientAttackEvidence contains evidence of a set of - validators attempting to mislead a light client. - last_commit: + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: >- + Commit contains the evidence that a block was committed by a + set of validators. + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with + Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with + Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + common_height: + type: string + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + LightClientAttackEvidence contains evidence of a set of validators + attempting to mislead a light client. + tendermint.types.PartSetHeader: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + tendermint.types.SignedHeader: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block in + the blockchain, + + including all blockchain data structures and the rules of the + application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: type: object properties: - height: + hash: type: string - format: int64 - round: - type: integer - format: int32 - block_id: + format: byte + part_set_header: type: object properties: + total: + type: integer + format: int64 hash: type: string format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: BlockIdFlag indicates which BlcokID the signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: CommitSig is a part of the Vote included in a Commit. - description: >- - Commit contains the evidence that a block was committed by a set - of validators. + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + title: BlockIdFlag indicates which BlcokID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: >- + Commit contains the evidence that a block was committed by a set of + validators. + tendermint.types.SignedMsgType: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + tendermint.types.Validator: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + tendermint.types.ValidatorSet: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + tendermint.types.Vote: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: |- + Vote represents a prevote, precommit, or commit vote from validators for + consensus. + tendermint.version.Consensus: + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 description: >- - GetLatestBlockResponse is the response type for the Query/GetLatestBlock - RPC method. - cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse: + Consensus captures the consensus rules for processing a block in the + blockchain, + + including all blockchain data structures and the rules of the + application's + + state transition machine. + cosmos.crisis.v1beta1.MsgVerifyInvariantResponse: + type: object + description: MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type. + cosmos.base.v1beta1.DecCoin: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is an Dec which implements the custom method + signatures required by gogoproto. + cosmos.distribution.v1beta1.DelegationDelegatorReward: type: object properties: - block_height: + validator_address: type: string - format: int64 - validators: + reward: type: array items: type: object properties: - address: + denom: type: string - pub_key: - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all - types that they - - expect it to use in the context of Any. However, for URLs - which use the - - scheme `http`, `https`, or no scheme, one can optionally set - up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the - official - - protobuf release, and it is not used for type URLs beginning - with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - additionalProperties: {} - description: >- - `Any` contains an arbitrary serialized protocol buffer message - along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values in - the form - - of utility functions or additional generated methods of the Any - type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by default - use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the last - '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield type + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. - name "y.z". + NOTE: The amount field is an Dec which implements the custom method + signatures required by gogoproto. + description: |- + DelegationDelegatorReward represents the properties + of a delegator's delegation reward. + cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse: + type: object + description: >- + MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response + type. + cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse: + type: object + description: >- + MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response + type. + cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse: + type: object + description: >- + MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward + response type. + cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse: + type: object + description: >- + MsgWithdrawValidatorCommissionResponse defines the + Msg/WithdrawValidatorCommission response type. + cosmos.distribution.v1beta1.Params: + type: object + properties: + community_tax: + type: string + base_proposer_reward: + type: string + bonus_proposer_reward: + type: string + withdraw_addr_enabled: + type: boolean + description: Params defines the set of params for the distribution module. + cosmos.distribution.v1beta1.QueryCommunityPoolResponse: + type: object + properties: + pool: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + NOTE: The amount field is an Dec which implements the custom method + signatures required by gogoproto. + description: pool defines community pool's coins. + description: >- + QueryCommunityPoolResponse is the response type for the + Query/CommunityPool + RPC method. + cosmos.distribution.v1beta1.QueryDelegationRewardsResponse: + type: object + properties: + rewards: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. - JSON + NOTE: The amount field is an Dec which implements the custom method + signatures required by gogoproto. + description: rewards defines the rewards accrued by a delegation. + description: |- + QueryDelegationRewardsResponse is the response type for the + Query/DelegationRewards RPC method. + cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse: + type: object + properties: + rewards: + type: array + items: + type: object + properties: + validator_address: + type: string + reward: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + DecCoin defines a token with a denomination and a decimal + amount. - ==== - The JSON representation of an `Any` value uses the regular + NOTE: The amount field is an Dec which implements the custom + method - representation of the deserialized, embedded message, with an + signatures required by gogoproto. + description: |- + DelegationDelegatorReward represents the properties + of a delegator's delegation reward. + description: rewards defines all the rewards accrued by a delegator. + total: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. - additional field `@type` which contains the type URL. Example: + NOTE: The amount field is an Dec which implements the custom method + signatures required by gogoproto. + description: total defines the sum of all the rewards. + description: |- + QueryDelegationTotalRewardsResponse is the response type for the + Query/DelegationTotalRewards RPC method. + cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse: + type: object + properties: + validators: + type: array + items: + type: string + description: validators defines the validators a delegator is delegating for. + description: |- + QueryDelegatorValidatorsResponse is the response type for the + Query/DelegatorValidators RPC method. + cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse: + type: object + properties: + withdraw_address: + type: string + description: withdraw_address defines the delegator address to query for. + description: |- + QueryDelegatorWithdrawAddressResponse is the response type for the + Query/DelegatorWithdrawAddress RPC method. + cosmos.distribution.v1beta1.QueryParamsResponse: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + community_tax: + type: string + base_proposer_reward: + type: string + bonus_proposer_reward: + type: string + withdraw_addr_enabled: + type: boolean + description: QueryParamsResponse is the response type for the Query/Params RPC method. + cosmos.distribution.v1beta1.QueryValidatorCommissionResponse: + type: object + properties: + commission: + description: commission defines the commision the validator received. + type: object + properties: + commission: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + DecCoin defines a token with a denomination and a decimal + amount. - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + NOTE: The amount field is an Dec which implements the custom + method - If the embedded message type is well-known and has a custom JSON + signatures required by gogoproto. + title: |- + QueryValidatorCommissionResponse is the response type for the + Query/ValidatorCommission RPC method + cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse: + type: object + properties: + rewards: + type: object + properties: + rewards: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + DecCoin defines a token with a denomination and a decimal + amount. - representation, that representation will be embedded adding a - field - `value` which holds the custom JSON in addition to the `@type` + NOTE: The amount field is an Dec which implements the custom + method - field. Example (for message [google.protobuf.Duration][]): + signatures required by gogoproto. + description: >- + ValidatorOutstandingRewards represents outstanding (un-withdrawn) + rewards - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - voting_power: + for a validator inexpensive to track, allows simple sanity checks. + description: |- + QueryValidatorOutstandingRewardsResponse is the response type for the + Query/ValidatorOutstandingRewards RPC method. + cosmos.distribution.v1beta1.QueryValidatorSlashesResponse: + type: object + properties: + slashes: + type: array + items: + type: object + properties: + validator_period: type: string - format: int64 - proposer_priority: + format: uint64 + fraction: type: string - format: int64 - description: Validator is the type for the validator-set. + description: |- + ValidatorSlashEvent represents a validator slash event. + Height is implicit within the store key. + This is needed to calculate appropriate amount of staking tokens + for delegations which are withdrawn after a slash has occurred. + description: slashes defines the slashes the validator received. pagination: - description: pagination defines an pagination for the response. + description: pagination defines the pagination in the response. type: object properties: next_key: @@ -23241,281 +36949,238 @@ definitions: PageRequest.count_total was set, its value is undefined otherwise - description: >- - GetLatestValidatorSetResponse is the response type for the - Query/GetValidatorSetByHeight RPC method. - cosmos.base.tendermint.v1beta1.GetNodeInfoResponse: + description: |- + QueryValidatorSlashesResponse is the response type for the + Query/ValidatorSlashes RPC method. + cosmos.distribution.v1beta1.ValidatorAccumulatedCommission: type: object properties: - default_node_info: - type: object - properties: - protocol_version: - type: object - properties: - p2p: - type: string - format: uint64 - block: - type: string - format: uint64 - app: - type: string - format: uint64 - default_node_id: - type: string - listen_addr: - type: string - network: - type: string - version: - type: string - channels: - type: string - format: byte - moniker: - type: string - other: - type: object - properties: - tx_index: - type: string - rpc_address: - type: string - application_version: - type: object - properties: - name: - type: string - app_name: - type: string - version: - type: string - git_commit: - type: string - build_tags: - type: string - go_version: - type: string - build_deps: - type: array - items: - type: object - properties: - path: - type: string - title: module path - version: - type: string - title: module version - sum: - type: string - title: checksum - title: Module is the type for VersionInfo - cosmos_sdk_version: - type: string - title: 'Since: cosmos-sdk 0.43' - description: VersionInfo is the type for the GetNodeInfoResponse message. - description: >- - GetNodeInfoResponse is the request type for the Query/GetNodeInfo RPC - method. - cosmos.base.tendermint.v1beta1.GetSyncingResponse: + commission: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is an Dec which implements the custom method + signatures required by gogoproto. + description: |- + ValidatorAccumulatedCommission represents accumulated commission + for a validator kept as a running counter, can be withdrawn at any time. + cosmos.distribution.v1beta1.ValidatorOutstandingRewards: + type: object + properties: + rewards: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is an Dec which implements the custom method + signatures required by gogoproto. + description: |- + ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards + for a validator inexpensive to track, allows simple sanity checks. + cosmos.distribution.v1beta1.ValidatorSlashEvent: type: object properties: - syncing: - type: boolean - description: >- - GetSyncingResponse is the response type for the Query/GetSyncing RPC - method. - cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse: + validator_period: + type: string + format: uint64 + fraction: + type: string + description: |- + ValidatorSlashEvent represents a validator slash event. + Height is implicit within the store key. + This is needed to calculate appropriate amount of staking tokens + for delegations which are withdrawn after a slash has occurred. + cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse: type: object properties: - block_height: + hash: type: string - format: int64 - validators: + format: byte + description: hash defines the hash of the evidence. + description: MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type. + cosmos.evidence.v1beta1.QueryAllEvidenceResponse: + type: object + properties: + evidence: type: array items: type: object properties: - address: + '@type': type: string - pub_key: - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + description: >- + A URL/resource name that uniquely identifies the type of the + serialized - protocol buffer message. This string must contain at least + protocol buffer message. This string must contain at least - one "/" character. The last segment of the URL's path must - represent + one "/" character. The last segment of the URL's path must + represent - the fully qualified name of the type (as in + the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be in a - canonical form + `path/google.protobuf.Duration`). The name should be in a + canonical form - (e.g., leading "." is not accepted). + (e.g., leading "." is not accepted). - In practice, teams usually precompile into the binary all - types that they + In practice, teams usually precompile into the binary all types + that they - expect it to use in the context of Any. However, for URLs - which use the + expect it to use in the context of Any. However, for URLs which + use the - scheme `http`, `https`, or no scheme, one can optionally set - up a type + scheme `http`, `https`, or no scheme, one can optionally set up + a type - server that maps type URLs to message definitions as - follows: + server that maps type URLs to message definitions as follows: - * If no scheme is provided, `https` is assumed. + * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - Note: this functionality is not currently available in the - official + Note: this functionality is not currently available in the + official - protobuf release, and it is not used for type URLs beginning - with + protobuf release, and it is not used for type URLs beginning + with - type.googleapis.com. + type.googleapis.com. - Schemes other than `http`, `https` (or the empty scheme) - might be + Schemes other than `http`, `https` (or the empty scheme) might + be - used with implementation specific semantics. - additionalProperties: {} - description: >- - `Any` contains an arbitrary serialized protocol buffer message - along with a + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a - URL that describes the type of the serialized message. + URL that describes the type of the serialized message. - Protobuf library provides support to pack/unpack Any values in - the form + Protobuf library provides support to pack/unpack Any values in the + form - of utility functions or additional generated methods of the Any - type. + of utility functions or additional generated methods of the Any + type. - Example 1: Pack and unpack a message in C++. + Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - Example 2: Pack and unpack a message in Java. + Example 2: Pack and unpack a message in Java. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - The pack methods provided by protobuf library will by default - use + The pack methods provided by protobuf library will by default use - 'type.googleapis.com/full.type.name' as the type URL and the - unpack + 'type.googleapis.com/full.type.name' as the type URL and the unpack - methods only use the fully qualified type name after the last - '/' + methods only use the fully qualified type name after the last '/' - in the type URL, for example "foo.bar.com/x/y.z" will yield type + in the type URL, for example "foo.bar.com/x/y.z" will yield type - name "y.z". + name "y.z". - JSON + JSON - ==== + ==== - The JSON representation of an `Any` value uses the regular + The JSON representation of an `Any` value uses the regular - representation of the deserialized, embedded message, with an + representation of the deserialized, embedded message, with an - additional field `@type` which contains the type URL. Example: + additional field `@type` which contains the type URL. Example: - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - If the embedded message type is well-known and has a custom JSON + If the embedded message type is well-known and has a custom JSON - representation, that representation will be embedded adding a - field + representation, that representation will be embedded adding a field - `value` which holds the custom JSON in addition to the `@type` + `value` which holds the custom JSON in addition to the `@type` - field. Example (for message [google.protobuf.Duration][]): + field. Example (for message [google.protobuf.Duration][]): - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - description: Validator is the type for the validator-set. + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: evidence returns all evidences. pagination: - description: pagination defines an pagination for the response. + description: pagination defines the pagination in the response. type: object properties: next_key: @@ -23533,27 +37198,15 @@ definitions: was set, its value is undefined otherwise description: >- - GetValidatorSetByHeightResponse is the response type for the - Query/GetValidatorSetByHeight RPC method. - cosmos.base.tendermint.v1beta1.Module: - type: object - properties: - path: - type: string - title: module path - version: - type: string - title: module version - sum: - type: string - title: checksum - title: Module is the type for VersionInfo - cosmos.base.tendermint.v1beta1.Validator: + QueryAllEvidenceResponse is the response type for the Query/AllEvidence + RPC + + method. + cosmos.evidence.v1beta1.QueryEvidenceResponse: type: object properties: - address: - type: string - pub_key: + evidence: + description: evidence returns the requested evidence. type: object properties: '@type': @@ -23609,2308 +37262,2118 @@ definitions: used with implementation specific semantics. additionalProperties: {} + description: >- + QueryEvidenceResponse is the response type for the Query/Evidence RPC + method. + cosmos.feegrant.v1beta1.Grant: + type: object + properties: + granter: + type: string description: >- - `Any` contains an arbitrary serialized protocol buffer message along - with a + granter is the address of the user granting an allowance of their + funds. + grantee: + type: string + description: >- + grantee is the address of the user being granted an allowance of + another user's funds. + allowance: + description: allowance can be any of basic and filtered fee allowance. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized - URL that describes the type of the serialized message. + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must + represent - Protobuf library provides support to pack/unpack Any values in the - form + the fully qualified name of the type (as in - of utility functions or additional generated methods of the Any type. + `path/google.protobuf.Duration`). The name should be in a + canonical form + (e.g., leading "." is not accepted). - Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + In practice, teams usually precompile into the binary all types + that they - Example 2: Pack and unpack a message in Java. + expect it to use in the context of Any. However, for URLs which + use the - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + scheme `http`, `https`, or no scheme, one can optionally set up a + type - Example 3: Pack and unpack a message in Python. + server that maps type URLs to message definitions as follows: - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - Example 4: Pack and unpack a message in Go + * If no scheme is provided, `https` is assumed. - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - The pack methods provided by protobuf library will by default use + Note: this functionality is not currently available in the + official - 'type.googleapis.com/full.type.name' as the type URL and the unpack + protobuf release, and it is not used for type URLs beginning with - methods only use the fully qualified type name after the last '/' + type.googleapis.com. - in the type URL, for example "foo.bar.com/x/y.z" will yield type - name "y.z". + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + title: Grant is stored in the KVStore to record a grant with full context + cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse: + type: object + description: >- + MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response + type. + cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse: + type: object + description: >- + MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse + response type. + cosmos.feegrant.v1beta1.QueryAllowanceResponse: + type: object + properties: + allowance: + description: allowance is a allowance granted for grantee by granter. + type: object + properties: + granter: + type: string + description: >- + granter is the address of the user granting an allowance of their + funds. + grantee: + type: string + description: >- + grantee is the address of the user being granted an allowance of + another user's funds. + allowance: + description: allowance can be any of basic and filtered fee allowance. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a + canonical form - JSON + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + additionalProperties: {} + title: Grant is stored in the KVStore to record a grant with full context + description: >- + QueryAllowanceResponse is the response type for the Query/Allowance RPC + method. + cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse: + type: object + properties: + allowances: + type: array + items: + type: object + properties: + granter: + type: string + description: >- + granter is the address of the user granting an allowance of + their funds. + grantee: + type: string + description: >- + grantee is the address of the user being granted an allowance of + another user's funds. + allowance: + description: allowance can be any of basic and filtered fee allowance. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized - ==== + protocol buffer message. This string must contain at least - The JSON representation of an `Any` value uses the regular + one "/" character. The last segment of the URL's path must + represent - representation of the deserialized, embedded message, with an + the fully qualified name of the type (as in - additional field `@type` which contains the type URL. Example: + `path/google.protobuf.Duration`). The name should be in a + canonical form - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + (e.g., leading "." is not accepted). - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - If the embedded message type is well-known and has a custom JSON + In practice, teams usually precompile into the binary all + types that they - representation, that representation will be embedded adding a field + expect it to use in the context of Any. However, for URLs + which use the - `value` which holds the custom JSON in addition to the `@type` + scheme `http`, `https`, or no scheme, one can optionally set + up a type - field. Example (for message [google.protobuf.Duration][]): + server that maps type URLs to message definitions as + follows: - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - description: Validator is the type for the validator-set. - cosmos.base.tendermint.v1beta1.VersionInfo: - type: object - properties: - name: - type: string - app_name: - type: string - version: - type: string - git_commit: - type: string - build_tags: - type: string - go_version: - type: string - build_deps: - type: array - items: - type: object - properties: - path: - type: string - title: module path - version: - type: string - title: module version - sum: - type: string - title: checksum - title: Module is the type for VersionInfo - cosmos_sdk_version: - type: string - title: 'Since: cosmos-sdk 0.43' - description: VersionInfo is the type for the GetNodeInfoResponse message. - tendermint.crypto.PublicKey: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: PublicKey defines the keys available for use with Validators - tendermint.p2p.DefaultNodeInfo: - type: object - properties: - protocol_version: - type: object - properties: - p2p: - type: string - format: uint64 - block: - type: string - format: uint64 - app: - type: string - format: uint64 - default_node_id: - type: string - listen_addr: - type: string - network: - type: string - version: - type: string - channels: - type: string - format: byte - moniker: - type: string - other: - type: object - properties: - tx_index: - type: string - rpc_address: - type: string - tendermint.p2p.DefaultNodeInfoOther: - type: object - properties: - tx_index: - type: string - rpc_address: - type: string - tendermint.p2p.ProtocolVersion: - type: object - properties: - p2p: - type: string - format: uint64 - block: - type: string - format: uint64 - app: - type: string - format: uint64 - tendermint.types.Block: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules for processing a block in - the blockchain, - including all blockchain data structures and the rules of the - application's + * If no scheme is provided, `https` is assumed. - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - description: commit from validators from the last block - title: hashes of block data - data_hash: - type: string - format: byte - title: transactions - validators_hash: - type: string - format: byte - description: validators for the current block - title: hashes from the app output from the prev block - next_validators_hash: - type: string - format: byte - title: validators for the next block - consensus_hash: - type: string - format: byte - title: consensus params for current block - app_hash: - type: string - format: byte - title: state after txs from the previous block - last_results_hash: - type: string - format: byte - title: root hash of all results from the txs from the previous block - evidence_hash: - type: string - format: byte - description: evidence included in the block - title: consensus info - proposer_address: - type: string - format: byte - title: original proposer of the block - description: Header defines the structure of a block header. - data: - type: object - properties: - txs: - type: array - items: - type: string - format: byte - description: >- - Txs that will be applied by state @ block.Height+1. + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - NOTE: not all txs here are valid. We're just agreeing on the - order first. + Note: this functionality is not currently available in the + official - This means that block.AppHash does not include these txs. - title: Data contains the set of transactions included in the block - evidence: + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + title: Grant is stored in the KVStore to record a grant with full context + description: allowances that have been issued by the granter. + pagination: + description: pagination defines an pagination for the response. type: object properties: - evidence: - type: array - items: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryAllowancesByGranterResponse is the response type for the + Query/AllowancesByGranter RPC method. + cosmos.feegrant.v1beta1.QueryAllowancesResponse: + type: object + properties: + allowances: + type: array + items: + type: object + properties: + granter: + type: string + description: >- + granter is the address of the user granting an allowance of + their funds. + grantee: + type: string + description: >- + grantee is the address of the user being granted an allowance of + another user's funds. + allowance: + description: allowance can be any of basic and filtered fee allowance. type: object properties: - duplicate_vote_evidence: - type: object - properties: - vote_a: - type: object - properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: >- - SignedMsgType is a type of signed message in the - consensus. + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - description: zero if vote is nil. - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or commit vote - from validators for + protocol buffer message. This string must contain at least - consensus. - vote_b: - type: object - properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: >- - SignedMsgType is a type of signed message in the - consensus. + one "/" character. The last segment of the URL's path must + represent - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - description: zero if vote is nil. - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or commit vote - from validators for + the fully qualified name of the type (as in - consensus. - total_voting_power: - type: string - format: int64 - validator_power: - type: string - format: int64 - timestamp: - type: string - format: date-time - description: >- - DuplicateVoteEvidence contains evidence of a validator - signed two conflicting votes. - light_client_attack_evidence: - type: object - properties: - conflicting_block: - type: object - properties: - signed_header: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules for - processing a block in the blockchain, + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official - including all blockchain data structures and - the rules of the application's + protobuf release, and it is not used for type URLs beginning + with - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - description: commit from validators from the last block - title: hashes of block data - data_hash: - type: string - format: byte - title: transactions - validators_hash: - type: string - format: byte - description: validators for the current block - title: >- - hashes from the app output from the prev - block - next_validators_hash: - type: string - format: byte - title: validators for the next block - consensus_hash: - type: string - format: byte - title: consensus params for current block - app_hash: - type: string - format: byte - title: state after txs from the previous block - last_results_hash: - type: string - format: byte - title: >- - root hash of all results from the txs from - the previous block - evidence_hash: - type: string - format: byte - description: evidence included in the block - title: consensus info - proposer_address: - type: string - format: byte - title: original proposer of the block - description: Header defines the structure of a block header. - commit: - type: object - properties: - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: >- - BlockIdFlag indicates which BlcokID the - signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: >- - CommitSig is a part of the Vote included - in a Commit. - description: >- - Commit contains the evidence that a block was - committed by a set of validators. - validator_set: - type: object - properties: - validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for - use with Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - proposer: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use - with Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - common_height: - type: string - format: int64 - byzantine_validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use with - Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - timestamp: - type: string - format: date-time - description: >- - LightClientAttackEvidence contains evidence of a set of - validators attempting to mislead a light client. - last_commit: + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + title: Grant is stored in the KVStore to record a grant with full context + description: allowances are allowance's granted for grantee by granter. + pagination: + description: pagination defines an pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryAllowancesResponse is the response type for the Query/Allowances RPC + method. + cosmos.gov.v1beta1.Deposit: + type: object + properties: + proposal_id: + type: string + format: uint64 + depositor: + type: string + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: |- + Deposit defines an amount deposited by an account address to an active + proposal. + cosmos.gov.v1beta1.DepositParams: + type: object + properties: + min_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: Minimum deposit for a proposal to enter voting period. + max_deposit_period: + type: string + description: >- + Maximum period for Atom holders to deposit on a proposal. Initial + value: 2 + months. + description: DepositParams defines the params for deposits on governance proposals. + cosmos.gov.v1beta1.MsgDepositResponse: + type: object + description: MsgDepositResponse defines the Msg/Deposit response type. + cosmos.gov.v1beta1.MsgSubmitProposalResponse: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. + cosmos.gov.v1beta1.MsgVoteResponse: + type: object + description: MsgVoteResponse defines the Msg/Vote response type. + cosmos.gov.v1beta1.MsgVoteWeightedResponse: + type: object + description: |- + MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. + + Since: cosmos-sdk 0.43 + cosmos.gov.v1beta1.Proposal: + type: object + properties: + proposal_id: + type: string + format: uint64 + content: type: object properties: - height: + '@type': type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: BlockIdFlag indicates which BlcokID the signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: CommitSig is a part of the Vote included in a Commit. + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} description: >- - Commit contains the evidence that a block was committed by a set of - validators. - tendermint.types.BlockID: - type: object - properties: - hash: + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + status: type: string - format: byte - part_set_header: + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + description: |- + ProposalStatus enumerates the valid statuses of a proposal. + + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. + - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit + period. + - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting + period. + - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has + passed. + - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has + been rejected. + - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has + failed. + final_tally_result: type: object properties: - total: - type: integer - format: int64 - hash: + 'yes': type: string - format: byte - title: PartsetHeader - title: BlockID - tendermint.types.BlockIDFlag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: BlockIdFlag indicates which BlcokID the signature is for - tendermint.types.Commit: - type: object - properties: - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: + abstain: type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: + 'no': + type: string + no_with_veto: + type: string + description: TallyResult defines a standard tally for a governance proposal. + submit_time: + type: string + format: date-time + deposit_end_time: + type: string + format: date-time + total_deposit: type: array items: type: object properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: BlockIdFlag indicates which BlcokID the signature is for - validator_address: - type: string - format: byte - timestamp: + denom: type: string - format: date-time - signature: + amount: type: string - format: byte - description: CommitSig is a part of the Vote included in a Commit. - description: >- - Commit contains the evidence that a block was committed by a set of - validators. - tendermint.types.CommitSig: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: BlockIdFlag indicates which BlcokID the signature is for - validator_address: - type: string - format: byte - timestamp: + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + voting_start_time: type: string format: date-time - signature: + voting_end_time: type: string - format: byte - description: CommitSig is a part of the Vote included in a Commit. - tendermint.types.Data: - type: object - properties: - txs: - type: array - items: - type: string - format: byte - description: >- - Txs that will be applied by state @ block.Height+1. - - NOTE: not all txs here are valid. We're just agreeing on the order - first. + format: date-time + description: Proposal defines the core field members of a governance proposal. + cosmos.gov.v1beta1.ProposalStatus: + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + description: |- + ProposalStatus enumerates the valid statuses of a proposal. - This means that block.AppHash does not include these txs. - title: Data contains the set of transactions included in the block - tendermint.types.DuplicateVoteEvidence: + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. + - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit + period. + - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting + period. + - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has + passed. + - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has + been rejected. + - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has + failed. + cosmos.gov.v1beta1.QueryDepositResponse: type: object properties: - vote_a: + deposit: + description: deposit defines the requested deposit. type: object properties: - type: + proposal_id: type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: |- - SignedMsgType is a type of signed message in the consensus. - - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: + format: uint64 + depositor: type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + description: >- + QueryDepositResponse is the response type for the Query/Deposit RPC + method. + cosmos.gov.v1beta1.QueryDepositsResponse: + type: object + properties: + deposits: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + depositor: + type: string + amount: + type: array + items: type: object properties: - total: - type: integer - format: int64 - hash: + denom: type: string - format: byte - title: PartsetHeader - title: BlockID - description: zero if vote is nil. - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or commit vote from validators - for + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. - consensus. - vote_b: + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + description: >- + Deposit defines an amount deposited by an account address to an + active + + proposal. + pagination: + description: pagination defines the pagination in the response. type: object properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: |- - SignedMsgType is a type of signed message in the consensus. - - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - description: zero if vote is nil. - timestamp: - type: string - format: date-time - validator_address: + next_key: type: string format: byte - validator_index: - type: integer - format: int32 - signature: + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: type: string - format: byte - description: >- - Vote represents a prevote, precommit, or commit vote from validators - for + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - consensus. - total_voting_power: - type: string - format: int64 - validator_power: - type: string - format: int64 - timestamp: - type: string - format: date-time + was set, its value is undefined otherwise description: >- - DuplicateVoteEvidence contains evidence of a validator signed two - conflicting votes. - tendermint.types.Evidence: + QueryDepositsResponse is the response type for the Query/Deposits RPC + method. + cosmos.gov.v1beta1.QueryParamsResponse: type: object properties: - duplicate_vote_evidence: + voting_params: + description: voting_params defines the parameters related to voting. type: object properties: - vote_a: - type: object - properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: |- - SignedMsgType is a type of signed message in the consensus. - - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - description: zero if vote is nil. - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or commit vote from - validators for - - consensus. - vote_b: - type: object - properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: |- - SignedMsgType is a type of signed message in the consensus. + voting_period: + type: string + description: Length of the voting period. + deposit_params: + description: deposit_params defines the parameters related to deposit. + type: object + properties: + min_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - description: zero if vote is nil. - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or commit vote from - validators for - consensus. - total_voting_power: + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + description: Minimum deposit for a proposal to enter voting period. + max_deposit_period: type: string - format: int64 - validator_power: + description: >- + Maximum period for Atom holders to deposit on a proposal. Initial + value: 2 + months. + tally_params: + description: tally_params defines the parameters related to tally. + type: object + properties: + quorum: type: string - format: int64 - timestamp: + format: byte + description: >- + Minimum percentage of total stake needed to vote for a result to + be + considered valid. + threshold: type: string - format: date-time - description: >- - DuplicateVoteEvidence contains evidence of a validator signed two - conflicting votes. - light_client_attack_evidence: + format: byte + description: >- + Minimum proportion of Yes votes for proposal to pass. Default + value: 0.5. + veto_threshold: + type: string + format: byte + description: >- + Minimum value of Veto votes to Total votes ratio for proposal to + be + vetoed. Default value: 1/3. + description: QueryParamsResponse is the response type for the Query/Params RPC method. + cosmos.gov.v1beta1.QueryProposalResponse: + type: object + properties: + proposal: type: object properties: - conflicting_block: - type: object - properties: - signed_header: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules for processing - a block in the blockchain, - - including all blockchain data structures and the rules - of the application's - - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - description: commit from validators from the last block - title: hashes of block data - data_hash: - type: string - format: byte - title: transactions - validators_hash: - type: string - format: byte - description: validators for the current block - title: hashes from the app output from the prev block - next_validators_hash: - type: string - format: byte - title: validators for the next block - consensus_hash: - type: string - format: byte - title: consensus params for current block - app_hash: - type: string - format: byte - title: state after txs from the previous block - last_results_hash: - type: string - format: byte - title: >- - root hash of all results from the txs from the - previous block - evidence_hash: - type: string - format: byte - description: evidence included in the block - title: consensus info - proposer_address: - type: string - format: byte - title: original proposer of the block - description: Header defines the structure of a block header. - commit: - type: object - properties: - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: >- - BlockIdFlag indicates which BlcokID the - signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: >- - CommitSig is a part of the Vote included in a - Commit. - description: >- - Commit contains the evidence that a block was committed by - a set of validators. - validator_set: - type: object - properties: - validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use with - Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - proposer: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use with - Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - common_height: + proposal_id: type: string - format: int64 - byzantine_validators: + format: uint64 + content: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + status: + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + description: |- + ProposalStatus enumerates the valid statuses of a proposal. + + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. + - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit + period. + - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting + period. + - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has + passed. + - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has + been rejected. + - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has + failed. + final_tally_result: + type: object + properties: + 'yes': + type: string + abstain: + type: string + 'no': + type: string + no_with_veto: + type: string + description: TallyResult defines a standard tally for a governance proposal. + submit_time: + type: string + format: date-time + deposit_end_time: + type: string + format: date-time + total_deposit: type: array items: type: object properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: PublicKey defines the keys available for use with Validators - voting_power: + denom: type: string - format: int64 - proposer_priority: + amount: type: string - format: int64 - total_voting_power: + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + voting_start_time: type: string - format: int64 - timestamp: + format: date-time + voting_end_time: type: string format: date-time - description: >- - LightClientAttackEvidence contains evidence of a set of validators - attempting to mislead a light client. - tendermint.types.EvidenceList: + description: Proposal defines the core field members of a governance proposal. + description: >- + QueryProposalResponse is the response type for the Query/Proposal RPC + method. + cosmos.gov.v1beta1.QueryProposalsResponse: type: object properties: - evidence: + proposals: type: array items: type: object properties: - duplicate_vote_evidence: + proposal_id: + type: string + format: uint64 + content: type: object properties: - vote_a: - type: object - properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: >- - SignedMsgType is a type of signed message in the - consensus. - - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - description: zero if vote is nil. - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte + '@type': + type: string description: >- - Vote represents a prevote, precommit, or commit vote from - validators for + A URL/resource name that uniquely identifies the type of the + serialized - consensus. - vote_b: - type: object - properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: >- - SignedMsgType is a type of signed message in the - consensus. + protocol buffer message. This string must contain at least - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - description: zero if vote is nil. - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or commit vote from - validators for + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - consensus. - total_voting_power: - type: string - format: int64 - validator_power: - type: string - format: int64 - timestamp: - type: string - format: date-time - description: >- - DuplicateVoteEvidence contains evidence of a validator signed - two conflicting votes. - light_client_attack_evidence: - type: object - properties: - conflicting_block: - type: object - properties: - signed_header: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules for - processing a block in the blockchain, + If the embedded message type is well-known and has a custom JSON - including all blockchain data structures and the - rules of the application's + representation, that representation will be embedded adding a + field - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - description: commit from validators from the last block - title: hashes of block data - data_hash: - type: string - format: byte - title: transactions - validators_hash: - type: string - format: byte - description: validators for the current block - title: hashes from the app output from the prev block - next_validators_hash: - type: string - format: byte - title: validators for the next block - consensus_hash: - type: string - format: byte - title: consensus params for current block - app_hash: - type: string - format: byte - title: state after txs from the previous block - last_results_hash: - type: string - format: byte - title: >- - root hash of all results from the txs from the - previous block - evidence_hash: - type: string - format: byte - description: evidence included in the block - title: consensus info - proposer_address: - type: string - format: byte - title: original proposer of the block - description: Header defines the structure of a block header. - commit: - type: object - properties: - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: >- - BlockIdFlag indicates which BlcokID the - signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: >- - CommitSig is a part of the Vote included in a - Commit. - description: >- - Commit contains the evidence that a block was - committed by a set of validators. - validator_set: - type: object - properties: - validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use - with Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - proposer: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use - with Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - common_height: + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + status: + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + description: |- + ProposalStatus enumerates the valid statuses of a proposal. + + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. + - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit + period. + - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting + period. + - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has + passed. + - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has + been rejected. + - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has + failed. + final_tally_result: + type: object + properties: + 'yes': type: string - format: int64 - byzantine_validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use with - Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: + abstain: type: string - format: int64 - timestamp: + 'no': type: string - format: date-time + no_with_veto: + type: string + description: TallyResult defines a standard tally for a governance proposal. + submit_time: + type: string + format: date-time + deposit_end_time: + type: string + format: date-time + total_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + voting_start_time: + type: string + format: date-time + voting_end_time: + type: string + format: date-time + description: Proposal defines the core field members of a governance proposal. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + QueryProposalsResponse is the response type for the Query/Proposals RPC + method. + cosmos.gov.v1beta1.QueryTallyResultResponse: + type: object + properties: + tally: + type: object + properties: + 'yes': + type: string + abstain: + type: string + 'no': + type: string + no_with_veto: + type: string + description: TallyResult defines a standard tally for a governance proposal. + description: >- + QueryTallyResultResponse is the response type for the Query/Tally RPC + method. + cosmos.gov.v1beta1.QueryVoteResponse: + type: object + properties: + vote: + description: vote defined the queried vote. + type: object + properties: + proposal_id: + type: string + format: uint64 + voter: + type: string + option: + description: >- + Deprecated: Prefer to use `options` instead. This field is set in + queries + + if and only if `len(options) == 1` and that option has weight 1. + In all + + other cases, this field will default to VOTE_OPTION_UNSPECIFIED. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + options: + type: array + items: + type: object + properties: + option: + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + description: >- + VoteOption enumerates the valid vote options for a given + governance proposal. + + - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. + - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. + - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. + - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. + - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. + weight: + type: string + description: |- + WeightedVoteOption defines a unit of vote for vote split. + + Since: cosmos-sdk 0.43 + title: 'Since: cosmos-sdk 0.43' + description: QueryVoteResponse is the response type for the Query/Vote RPC method. + cosmos.gov.v1beta1.QueryVotesResponse: + type: object + properties: + votes: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + voter: + type: string + option: + description: >- + Deprecated: Prefer to use `options` instead. This field is set + in queries + + if and only if `len(options) == 1` and that option has weight 1. + In all + + other cases, this field will default to VOTE_OPTION_UNSPECIFIED. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + options: + type: array + items: + type: object + properties: + option: + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + description: >- + VoteOption enumerates the valid vote options for a given + governance proposal. + + - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. + - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. + - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. + - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. + - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. + weight: + type: string + description: |- + WeightedVoteOption defines a unit of vote for vote split. + + Since: cosmos-sdk 0.43 + title: 'Since: cosmos-sdk 0.43' + description: |- + Vote defines a vote on a governance proposal. + A Vote consists of a proposal ID, the voter, and the vote option. + description: votes defined the queried votes. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: QueryVotesResponse is the response type for the Query/Votes RPC method. + cosmos.gov.v1beta1.TallyParams: + type: object + properties: + quorum: + type: string + format: byte + description: |- + Minimum percentage of total stake needed to vote for a result to be + considered valid. + threshold: + type: string + format: byte + description: >- + Minimum proportion of Yes votes for proposal to pass. Default value: + 0.5. + veto_threshold: + type: string + format: byte + description: |- + Minimum value of Veto votes to Total votes ratio for proposal to be + vetoed. Default value: 1/3. + description: TallyParams defines the params for tallying votes on governance proposals. + cosmos.gov.v1beta1.TallyResult: + type: object + properties: + 'yes': + type: string + abstain: + type: string + 'no': + type: string + no_with_veto: + type: string + description: TallyResult defines a standard tally for a governance proposal. + cosmos.gov.v1beta1.Vote: + type: object + properties: + proposal_id: + type: string + format: uint64 + voter: + type: string + option: + description: >- + Deprecated: Prefer to use `options` instead. This field is set in + queries + + if and only if `len(options) == 1` and that option has weight 1. In + all + + other cases, this field will default to VOTE_OPTION_UNSPECIFIED. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + options: + type: array + items: + type: object + properties: + option: + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED description: >- - LightClientAttackEvidence contains evidence of a set of - validators attempting to mislead a light client. - tendermint.types.Header: + VoteOption enumerates the valid vote options for a given + governance proposal. + + - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. + - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. + - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. + - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. + - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. + weight: + type: string + description: |- + WeightedVoteOption defines a unit of vote for vote split. + + Since: cosmos-sdk 0.43 + title: 'Since: cosmos-sdk 0.43' + description: |- + Vote defines a vote on a governance proposal. + A Vote consists of a proposal ID, the voter, and the vote option. + cosmos.gov.v1beta1.VoteOption: + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + description: >- + VoteOption enumerates the valid vote options for a given governance + proposal. + + - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. + - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. + - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. + - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. + - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. + cosmos.gov.v1beta1.VotingParams: type: object properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 + voting_period: + type: string + description: Length of the voting period. + description: VotingParams defines the params for voting on governance proposals. + cosmos.gov.v1beta1.WeightedVoteOption: + type: object + properties: + option: + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED description: >- - Consensus captures the consensus rules for processing a block in the - blockchain, + VoteOption enumerates the valid vote options for a given governance + proposal. - including all blockchain data structures and the rules of the - application's + - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. + - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. + - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. + - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. + - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. + weight: + type: string + description: |- + WeightedVoteOption defines a unit of vote for vote split. - state transition machine. - chain_id: + Since: cosmos-sdk 0.43 + cosmos.mint.v1beta1.Params: + type: object + properties: + mint_denom: type: string - height: + title: type of coin to mint + inflation_rate_change: type: string - format: int64 - time: + title: maximum annual change in inflation rate + inflation_max: type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: + title: maximum inflation rate + inflation_min: type: string - format: byte - description: commit from validators from the last block - title: hashes of block data - data_hash: + title: minimum inflation rate + goal_bonded: + type: string + title: goal of percent bonded atoms + blocks_per_year: + type: string + format: uint64 + title: expected blocks per year + description: Params holds parameters for the mint module. + cosmos.mint.v1beta1.QueryAnnualProvisionsResponse: + type: object + properties: + annual_provisions: type: string format: byte - title: transactions - validators_hash: + description: annual_provisions is the current minting annual provisions value. + description: |- + QueryAnnualProvisionsResponse is the response type for the + Query/AnnualProvisions RPC method. + cosmos.mint.v1beta1.QueryInflationResponse: + type: object + properties: + inflation: type: string format: byte - description: validators for the current block - title: hashes from the app output from the prev block - next_validators_hash: + description: inflation is the current minting inflation value. + description: |- + QueryInflationResponse is the response type for the Query/Inflation RPC + method. + cosmos.mint.v1beta1.QueryParamsResponse: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + mint_denom: + type: string + title: type of coin to mint + inflation_rate_change: + type: string + title: maximum annual change in inflation rate + inflation_max: + type: string + title: maximum inflation rate + inflation_min: + type: string + title: minimum inflation rate + goal_bonded: + type: string + title: goal of percent bonded atoms + blocks_per_year: + type: string + format: uint64 + title: expected blocks per year + description: QueryParamsResponse is the response type for the Query/Params RPC method. + cosmos.params.v1beta1.ParamChange: + type: object + properties: + subspace: type: string - format: byte - title: validators for the next block - consensus_hash: + key: type: string - format: byte - title: consensus params for current block - app_hash: + value: type: string - format: byte - title: state after txs from the previous block - last_results_hash: + description: |- + ParamChange defines an individual parameter change, for use in + ParameterChangeProposal. + cosmos.params.v1beta1.QueryParamsResponse: + type: object + properties: + param: + description: param defines the queried parameter. + type: object + properties: + subspace: + type: string + key: + type: string + value: + type: string + description: QueryParamsResponse is response type for the Query/Params RPC method. + cosmos.slashing.v1beta1.MsgUnjailResponse: + type: object + title: MsgUnjailResponse defines the Msg/Unjail response type + cosmos.slashing.v1beta1.Params: + type: object + properties: + signed_blocks_window: + type: string + format: int64 + min_signed_per_window: type: string format: byte - title: root hash of all results from the txs from the previous block - evidence_hash: + downtime_jail_duration: + type: string + slash_fraction_double_sign: type: string format: byte - description: evidence included in the block - title: consensus info - proposer_address: + slash_fraction_downtime: type: string format: byte - title: original proposer of the block - description: Header defines the structure of a block header. - tendermint.types.LightBlock: + description: Params represents the parameters used for by the slashing module. + cosmos.slashing.v1beta1.QueryParamsResponse: type: object properties: - signed_header: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules for processing a block - in the blockchain, - - including all blockchain data structures and the rules of the - application's - - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - description: commit from validators from the last block - title: hashes of block data - data_hash: - type: string - format: byte - title: transactions - validators_hash: - type: string - format: byte - description: validators for the current block - title: hashes from the app output from the prev block - next_validators_hash: - type: string - format: byte - title: validators for the next block - consensus_hash: - type: string - format: byte - title: consensus params for current block - app_hash: - type: string - format: byte - title: state after txs from the previous block - last_results_hash: - type: string - format: byte - title: root hash of all results from the txs from the previous block - evidence_hash: - type: string - format: byte - description: evidence included in the block - title: consensus info - proposer_address: - type: string - format: byte - title: original proposer of the block - description: Header defines the structure of a block header. - commit: - type: object - properties: - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: BlockIdFlag indicates which BlcokID the signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: CommitSig is a part of the Vote included in a Commit. - description: >- - Commit contains the evidence that a block was committed by a set - of validators. - validator_set: + params: type: object properties: - validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: PublicKey defines the keys available for use with Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - proposer: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: PublicKey defines the keys available for use with Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: + signed_blocks_window: type: string format: int64 - tendermint.types.LightClientAttackEvidence: + min_signed_per_window: + type: string + format: byte + downtime_jail_duration: + type: string + slash_fraction_double_sign: + type: string + format: byte + slash_fraction_downtime: + type: string + format: byte + description: Params represents the parameters used for by the slashing module. + title: QueryParamsResponse is the response type for the Query/Params RPC method + cosmos.slashing.v1beta1.QuerySigningInfoResponse: type: object properties: - conflicting_block: + val_signing_info: + title: val_signing_info is the signing info of requested val cons address type: object properties: - signed_header: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules for processing a - block in the blockchain, + address: + type: string + start_height: + type: string + format: int64 + title: Height at which validator was first a candidate OR was unjailed + index_offset: + type: string + format: int64 + description: >- + Index which is incremented each time the validator was a bonded - including all blockchain data structures and the rules of - the application's + in a block and may have signed a precommit or not. This in + conjunction with the - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - description: commit from validators from the last block - title: hashes of block data - data_hash: - type: string - format: byte - title: transactions - validators_hash: - type: string - format: byte - description: validators for the current block - title: hashes from the app output from the prev block - next_validators_hash: - type: string - format: byte - title: validators for the next block - consensus_hash: - type: string - format: byte - title: consensus params for current block - app_hash: - type: string - format: byte - title: state after txs from the previous block - last_results_hash: - type: string - format: byte - title: >- - root hash of all results from the txs from the previous - block - evidence_hash: - type: string - format: byte - description: evidence included in the block - title: consensus info - proposer_address: - type: string - format: byte - title: original proposer of the block - description: Header defines the structure of a block header. - commit: - type: object - properties: - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: >- - BlockIdFlag indicates which BlcokID the signature is - for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: CommitSig is a part of the Vote included in a Commit. - description: >- - Commit contains the evidence that a block was committed by a - set of validators. - validator_set: - type: object - properties: - validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use with - Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - proposer: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use with - Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - common_height: - type: string - format: int64 - byzantine_validators: + `SignedBlocksWindow` param determines the index in the + `MissedBlocksBitArray`. + jailed_until: + type: string + format: date-time + description: >- + Timestamp until which the validator is jailed due to liveness + downtime. + tombstoned: + type: boolean + description: >- + Whether or not a validator has been tombstoned (killed out of + validator set). It is set + + once the validator commits an equivocation or for any other + configured misbehiavor. + missed_blocks_counter: + type: string + format: int64 + description: >- + A counter kept to avoid unnecessary array reads. + + Note that `Sum(MissedBlocksBitArray)` always equals + `MissedBlocksCounter`. + description: >- + ValidatorSigningInfo defines a validator's signing info for monitoring + their + + liveness activity. + title: >- + QuerySigningInfoResponse is the response type for the Query/SigningInfo + RPC + + method + cosmos.slashing.v1beta1.QuerySigningInfosResponse: + type: object + properties: + info: type: array items: type: object properties: address: type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: PublicKey defines the keys available for use with Validators - voting_power: + start_height: type: string format: int64 - proposer_priority: + title: Height at which validator was first a candidate OR was unjailed + index_offset: type: string format: int64 - total_voting_power: + description: >- + Index which is incremented each time the validator was a bonded + + in a block and may have signed a precommit or not. This in + conjunction with the + + `SignedBlocksWindow` param determines the index in the + `MissedBlocksBitArray`. + jailed_until: + type: string + format: date-time + description: >- + Timestamp until which the validator is jailed due to liveness + downtime. + tombstoned: + type: boolean + description: >- + Whether or not a validator has been tombstoned (killed out of + validator set). It is set + + once the validator commits an equivocation or for any other + configured misbehiavor. + missed_blocks_counter: + type: string + format: int64 + description: >- + A counter kept to avoid unnecessary array reads. + + Note that `Sum(MissedBlocksBitArray)` always equals + `MissedBlocksCounter`. + description: >- + ValidatorSigningInfo defines a validator's signing info for + monitoring their + + liveness activity. + title: info is the signing info of all validators + pagination: + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + title: >- + QuerySigningInfosResponse is the response type for the Query/SigningInfos + RPC + + method + cosmos.slashing.v1beta1.ValidatorSigningInfo: + type: object + properties: + address: + type: string + start_height: type: string format: int64 - timestamp: + title: Height at which validator was first a candidate OR was unjailed + index_offset: + type: string + format: int64 + description: >- + Index which is incremented each time the validator was a bonded + + in a block and may have signed a precommit or not. This in conjunction + with the + + `SignedBlocksWindow` param determines the index in the + `MissedBlocksBitArray`. + jailed_until: type: string format: date-time + description: >- + Timestamp until which the validator is jailed due to liveness + downtime. + tombstoned: + type: boolean + description: >- + Whether or not a validator has been tombstoned (killed out of + validator set). It is set + + once the validator commits an equivocation or for any other configured + misbehiavor. + missed_blocks_counter: + type: string + format: int64 + description: >- + A counter kept to avoid unnecessary array reads. + + Note that `Sum(MissedBlocksBitArray)` always equals + `MissedBlocksCounter`. description: >- - LightClientAttackEvidence contains evidence of a set of validators - attempting to mislead a light client. - tendermint.types.PartSetHeader: + ValidatorSigningInfo defines a validator's signing info for monitoring + their + + liveness activity. + cosmos.staking.v1beta1.BondStatus: + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + description: |- + BondStatus is the status of a validator. + + - BOND_STATUS_UNSPECIFIED: UNSPECIFIED defines an invalid validator status. + - BOND_STATUS_UNBONDED: UNBONDED defines a validator that is not bonded. + - BOND_STATUS_UNBONDING: UNBONDING defines a validator that is unbonding. + - BOND_STATUS_BONDED: BONDED defines a validator that is bonded. + cosmos.staking.v1beta1.Commission: type: object properties: - total: - type: integer - format: int64 - hash: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be used for + creating a validator. + type: object + properties: + rate: + type: string + description: 'rate is the commission rate charged to delegators, as a fraction.' + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which validator can + ever charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the + validator commission, as a fraction. + update_time: + type: string + format: date-time + description: update_time is the last time the commission rate was changed. + description: Commission defines commission parameters for a given validator. + cosmos.staking.v1beta1.CommissionRates: + type: object + properties: + rate: + type: string + description: 'rate is the commission rate charged to delegators, as a fraction.' + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which validator can ever + charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the validator + commission, as a fraction. + description: >- + CommissionRates defines the initial commission rates to be used for + creating + + a validator. + cosmos.staking.v1beta1.Delegation: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the bech32-encoded address of the delegator. + validator_address: + type: string + description: validator_address is the bech32-encoded address of the validator. + shares: + type: string + description: shares define the delegation shares received. + description: |- + Delegation represents the bond with tokens held by an account. It is + owned by one delegator, and is associated with the voting power of one + validator. + cosmos.staking.v1beta1.DelegationResponse: + type: object + properties: + delegation: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the bech32-encoded address of the delegator. + validator_address: + type: string + description: validator_address is the bech32-encoded address of the validator. + shares: + type: string + description: shares define the delegation shares received. + description: |- + Delegation represents the bond with tokens held by an account. It is + owned by one delegator, and is associated with the voting power of one + validator. + balance: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: |- + DelegationResponse is equivalent to Delegation except that it contains a + balance in addition to shares which is more suitable for client responses. + cosmos.staking.v1beta1.Description: + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: type: string - format: byte - title: PartsetHeader - tendermint.types.SignedHeader: + description: >- + identity defines an optional identity signature (ex. UPort or + Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: security_contact defines an optional email for security contact. + details: + type: string + description: details define other optional details. + description: Description defines a validator description. + cosmos.staking.v1beta1.HistoricalInfo: type: object properties: header: @@ -25943,6 +39406,7 @@ definitions: type: string format: date-time last_block_id: + title: prev block info type: object properties: hash: @@ -25958,7 +39422,6 @@ definitions: type: string format: byte title: PartsetHeader - title: BlockID last_commit_hash: type: string format: byte @@ -25995,458 +39458,361 @@ definitions: description: evidence included in the block title: consensus info proposer_address: - type: string - format: byte - title: original proposer of the block - description: Header defines the structure of a block header. - commit: - type: object - properties: - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: BlockIdFlag indicates which BlcokID the signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: CommitSig is a part of the Vote included in a Commit. - description: >- - Commit contains the evidence that a block was committed by a set of - validators. - tendermint.types.SignedMsgType: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: |- - SignedMsgType is a type of signed message in the consensus. - - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - tendermint.types.Validator: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: PublicKey defines the keys available for use with Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - tendermint.types.ValidatorSet: - type: object - properties: - validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: PublicKey defines the keys available for use with Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - proposer: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: PublicKey defines the keys available for use with Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - tendermint.types.Vote: - type: object - properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: |- - SignedMsgType is a type of signed message in the consensus. - - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - description: zero if vote is nil. - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: |- - Vote represents a prevote, precommit, or commit vote from validators for - consensus. - tendermint.version.Consensus: - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules for processing a block in the - blockchain, - - including all blockchain data structures and the rules of the - application's - - state transition machine. - cosmos.crisis.v1beta1.MsgVerifyInvariantResponse: - type: object - description: MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type. - cosmos.base.v1beta1.DecCoin: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - DecCoin defines a token with a denomination and a decimal amount. - - NOTE: The amount field is an Dec which implements the custom method - signatures required by gogoproto. - cosmos.distribution.v1beta1.DelegationDelegatorReward: - type: object - properties: - validator_address: - type: string - reward: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + valset: type: array items: type: object properties: - denom: - type: string - amount: + operator_address: type: string - description: |- - DecCoin defines a token with a denomination and a decimal amount. + description: >- + operator_address defines the address of the validator's + operator; bech encoded in JSON. + consensus_pubkey: + description: >- + consensus_pubkey is the consensus public key of the validator, + as a Protobuf Any. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized - NOTE: The amount field is an Dec which implements the custom method - signatures required by gogoproto. - description: |- - DelegationDelegatorReward represents the properties - of a delegator's delegation reward. - cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse: - type: object - description: >- - MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response - type. - cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse: - type: object - description: >- - MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response - type. - cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse: - type: object - description: >- - MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward - response type. - cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse: - type: object - description: >- - MsgWithdrawValidatorCommissionResponse defines the - Msg/WithdrawValidatorCommission response type. - cosmos.distribution.v1beta1.Params: - type: object - properties: - community_tax: - type: string - base_proposer_reward: - type: string - bonus_proposer_reward: - type: string - withdraw_addr_enabled: - type: boolean - description: Params defines the set of params for the distribution module. - cosmos.distribution.v1beta1.QueryCommunityPoolResponse: - type: object - properties: - pool: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - DecCoin defines a token with a denomination and a decimal amount. + protocol buffer message. This string must contain at least - NOTE: The amount field is an Dec which implements the custom method - signatures required by gogoproto. - description: pool defines community pool's coins. - description: >- - QueryCommunityPoolResponse is the response type for the - Query/CommunityPool + one "/" character. The last segment of the URL's path must + represent - RPC method. - cosmos.distribution.v1beta1.QueryDelegationRewardsResponse: - type: object - properties: - rewards: - type: array - items: - type: object - properties: - denom: + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + jailed: + type: boolean + description: >- + jailed defined whether the validator has been jailed from bonded + status or not. + status: + description: status is the validator status (bonded/unbonding/unbonded). type: string - amount: + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: type: string - description: |- - DecCoin defines a token with a denomination and a decimal amount. - - NOTE: The amount field is an Dec which implements the custom method - signatures required by gogoproto. - description: rewards defines the rewards accrued by a delegation. - description: |- - QueryDelegationRewardsResponse is the response type for the - Query/DelegationRewards RPC method. - cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse: - type: object - properties: - rewards: - type: array - items: - type: object - properties: - validator_address: + description: tokens define the delegated tokens (incl. self-delegation). + delegator_shares: type: string - reward: + description: >- + delegator_shares defines total shares issued to a validator's + delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. UPort + or Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: >- + security_contact defines an optional email for security + contact. + details: + type: string + description: details define other optional details. + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this + validator has begun unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the + validator to complete unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be + used for creating a validator. + type: object + properties: + rate: + type: string + description: >- + rate is the commission rate charged to delegators, as a + fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which + validator can ever charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of + the validator commission, as a fraction. + update_time: + type: string + format: date-time + description: >- + update_time is the last time the commission rate was + changed. + min_self_delegation: + type: string + description: >- + min_self_delegation is the validator's self declared minimum + self delegation. + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been stopped + by external modules + unbonding_ids: type: array items: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - DecCoin defines a token with a denomination and a decimal - amount. + type: string + format: uint64 + title: >- + list of unbonding ids, each uniquely identifing an unbonding of + this validator + description: >- + Validator defines a validator, together with the total amount of the + Validator's bond shares and their exchange rate to coins. Slashing + results in - NOTE: The amount field is an Dec which implements the custom - method + a decrease in the exchange rate, allowing correct calculation of + future - signatures required by gogoproto. - description: |- - DelegationDelegatorReward represents the properties - of a delegator's delegation reward. - description: rewards defines all the rewards accrued by a delegator. - total: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - DecCoin defines a token with a denomination and a decimal amount. + undelegations without iterating over delegators. When coins are + delegated to - NOTE: The amount field is an Dec which implements the custom method - signatures required by gogoproto. - description: total defines the sum of all the rewards. - description: |- - QueryDelegationTotalRewardsResponse is the response type for the - Query/DelegationTotalRewards RPC method. - cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse: + this validator, the validator is credited with a delegation whose + number of + + bond shares is based on the amount of coins delegated divided by the + current + + exchange rate. Voting power can be calculated as total bonded shares + + multiplied by exchange rate. + description: >- + HistoricalInfo contains header and validator information for a given + block. + + It is stored as part of staking module's state, which persists the `n` + most + + recent HistoricalInfo + + (`n` is set by the staking module's `historical_entries` parameter). + cosmos.staking.v1beta1.MsgBeginRedelegateResponse: type: object properties: - validators: - type: array - items: - type: string - description: validators defines the validators a delegator is delegating for. - description: |- - QueryDelegatorValidatorsResponse is the response type for the - Query/DelegatorValidators RPC method. - cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse: + completion_time: + type: string + format: date-time + description: MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. + cosmos.staking.v1beta1.MsgCreateValidatorResponse: + type: object + description: MsgCreateValidatorResponse defines the Msg/CreateValidator response type. + cosmos.staking.v1beta1.MsgDelegateResponse: + type: object + description: MsgDelegateResponse defines the Msg/Delegate response type. + cosmos.staking.v1beta1.MsgEditValidatorResponse: + type: object + description: MsgEditValidatorResponse defines the Msg/EditValidator response type. + cosmos.staking.v1beta1.MsgUndelegateResponse: type: object properties: - withdraw_address: + completion_time: + type: string + format: date-time + description: MsgUndelegateResponse defines the Msg/Undelegate response type. + cosmos.staking.v1beta1.Params: + type: object + properties: + unbonding_time: + type: string + description: unbonding_time is the time duration of unbonding. + max_validators: + type: integer + format: int64 + description: max_validators is the maximum number of validators. + max_entries: + type: integer + format: int64 + description: >- + max_entries is the max entries for either unbonding delegation or + redelegation (per pair/trio). + historical_entries: + type: integer + format: int64 + description: historical_entries is the number of historical entries to persist. + bond_denom: + type: string + description: bond_denom defines the bondable coin denomination. + description: Params defines the parameters for the staking module. + cosmos.staking.v1beta1.Pool: + type: object + properties: + not_bonded_tokens: + type: string + bonded_tokens: type: string - description: withdraw_address defines the delegator address to query for. description: |- - QueryDelegatorWithdrawAddressResponse is the response type for the - Query/DelegatorWithdrawAddress RPC method. - cosmos.distribution.v1beta1.QueryParamsResponse: + Pool is used for tracking bonded and not-bonded token supply of the bond + denomination. + cosmos.staking.v1beta1.QueryDelegationResponse: type: object properties: - params: - description: params defines the parameters of the module. + delegation_response: + description: delegation_responses defines the delegation info of a delegation. type: object properties: - community_tax: - type: string - base_proposer_reward: - type: string - bonus_proposer_reward: - type: string - withdraw_addr_enabled: - type: boolean - description: QueryParamsResponse is the response type for the Query/Params RPC method. - cosmos.distribution.v1beta1.QueryValidatorCommissionResponse: + delegation: + type: object + properties: + delegator_address: + type: string + description: >- + delegator_address is the bech32-encoded address of the + delegator. + validator_address: + type: string + description: >- + validator_address is the bech32-encoded address of the + validator. + shares: + type: string + description: shares define the delegation shares received. + description: >- + Delegation represents the bond with tokens held by an account. It + is + + owned by one delegator, and is associated with the voting power of + one + + validator. + balance: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + description: >- + QueryDelegationResponse is response type for the Query/Delegation RPC + method. + cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse: type: object properties: - commission: - description: commission defines the commision the validator received. - type: object - properties: - commission: - type: array - items: + delegation_responses: + type: array + items: + type: object + properties: + delegation: type: object properties: - denom: + delegator_address: type: string - amount: + description: >- + delegator_address is the bech32-encoded address of the + delegator. + validator_address: + type: string + description: >- + validator_address is the bech32-encoded address of the + validator. + shares: type: string + description: shares define the delegation shares received. description: >- - DecCoin defines a token with a denomination and a decimal - amount. - + Delegation represents the bond with tokens held by an account. + It is - NOTE: The amount field is an Dec which implements the custom - method + owned by one delegator, and is associated with the voting power + of one - signatures required by gogoproto. - title: |- - QueryValidatorCommissionResponse is the response type for the - Query/ValidatorCommission RPC method - cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse: - type: object - properties: - rewards: - type: object - properties: - rewards: - type: array - items: + validator. + balance: type: object properties: denom: @@ -26454,289 +39820,1014 @@ definitions: amount: type: string description: >- - DecCoin defines a token with a denomination and a decimal - amount. + Coin defines a token with a denomination and an amount. - NOTE: The amount field is an Dec which implements the custom + NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. - description: >- - ValidatorOutstandingRewards represents outstanding (un-withdrawn) - rewards + description: >- + DelegationResponse is equivalent to Delegation except that it + contains a + + balance in addition to shares which is more suitable for client + responses. + description: delegation_responses defines all the delegations' info of a delegator. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - for a validator inexpensive to track, allows simple sanity checks. + was set, its value is undefined otherwise description: |- - QueryValidatorOutstandingRewardsResponse is the response type for the - Query/ValidatorOutstandingRewards RPC method. - cosmos.distribution.v1beta1.QueryValidatorSlashesResponse: + QueryDelegatorDelegationsResponse is response type for the + Query/DelegatorDelegations RPC method. + cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse: type: object properties: - slashes: + unbonding_responses: type: array items: type: object properties: - validator_period: + delegator_address: type: string - format: uint64 - fraction: + description: >- + delegator_address is the bech32-encoded address of the + delegator. + validator_address: type: string - description: |- - ValidatorSlashEvent represents a validator slash event. - Height is implicit within the store key. - This is needed to calculate appropriate amount of staking tokens - for delegations which are withdrawn after a slash has occurred. - description: slashes defines the slashes the validator received. + description: >- + validator_address is the bech32-encoded address of the + validator. + entries: + type: array + items: + type: object + properties: + creation_height: + type: string + format: int64 + description: >- + creation_height is the height which the unbonding took + place. + completion_time: + type: string + format: date-time + description: completion_time is the unix time for unbonding completion. + initial_balance: + type: string + description: >- + initial_balance defines the tokens initially scheduled to + receive at completion. + balance: + type: string + description: balance defines the tokens to receive at completion. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been + stopped by external modules + description: >- + UnbondingDelegationEntry defines an unbonding object with + relevant metadata. + description: |- + entries are the unbonding delegation entries. + + unbonding delegation entries + description: >- + UnbondingDelegation stores all of a single delegator's unbonding + bonds + + for a single validator in an time-ordered list. pagination: description: pagination defines the pagination in the response. type: object properties: next_key: type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + QueryUnbondingDelegatorDelegationsResponse is response type for the + Query/UnbondingDelegatorDelegations RPC method. + cosmos.staking.v1beta1.QueryDelegatorValidatorResponse: + type: object + properties: + validator: + description: validator defines the the validator info. + type: object + properties: + operator_address: + type: string + description: >- + operator_address defines the address of the validator's operator; + bech encoded in JSON. + consensus_pubkey: + description: >- + consensus_pubkey is the consensus public key of the validator, as + a Protobuf Any. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + additionalProperties: {} + jailed: + type: boolean + description: >- + jailed defined whether the validator has been jailed from bonded + status or not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegator_shares: + type: string + description: >- + delegator_shares defines total shares issued to a validator's + delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. UPort or + Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: >- + security_contact defines an optional email for security + contact. + details: + type: string + description: details define other optional details. + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this + validator has begun unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the + validator to complete unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be + used for creating a validator. + type: object + properties: + rate: + type: string + description: >- + rate is the commission rate charged to delegators, as a + fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which + validator can ever charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the + validator commission, as a fraction. + update_time: + type: string + format: date-time + description: update_time is the last time the commission rate was changed. + min_self_delegation: + type: string + description: >- + min_self_delegation is the validator's self declared minimum self + delegation. + unbonding_on_hold_ref_count: type: string - format: uint64 + format: int64 title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: |- - QueryValidatorSlashesResponse is the response type for the - Query/ValidatorSlashes RPC method. - cosmos.distribution.v1beta1.ValidatorAccumulatedCommission: - type: object - properties: - commission: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - DecCoin defines a token with a denomination and a decimal amount. - - NOTE: The amount field is an Dec which implements the custom method - signatures required by gogoproto. - description: |- - ValidatorAccumulatedCommission represents accumulated commission - for a validator kept as a running counter, can be withdrawn at any time. - cosmos.distribution.v1beta1.ValidatorOutstandingRewards: - type: object - properties: - rewards: - type: array - items: - type: object - properties: - denom: - type: string - amount: + strictly positive if this validator's unbonding has been stopped + by external modules + unbonding_ids: + type: array + items: type: string - description: |- - DecCoin defines a token with a denomination and a decimal amount. - - NOTE: The amount field is an Dec which implements the custom method - signatures required by gogoproto. - description: |- - ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards - for a validator inexpensive to track, allows simple sanity checks. - cosmos.distribution.v1beta1.ValidatorSlashEvent: - type: object - properties: - validator_period: - type: string - format: uint64 - fraction: - type: string + format: uint64 + title: >- + list of unbonding ids, each uniquely identifing an unbonding of + this validator description: |- - ValidatorSlashEvent represents a validator slash event. - Height is implicit within the store key. - This is needed to calculate appropriate amount of staking tokens - for delegations which are withdrawn after a slash has occurred. - cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse: - type: object - properties: - hash: - type: string - format: byte - description: hash defines the hash of the evidence. - description: MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type. - cosmos.evidence.v1beta1.QueryAllEvidenceResponse: + QueryDelegatorValidatorResponse response type for the + Query/DelegatorValidator RPC method. + cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse: type: object properties: - evidence: + validators: type: array items: type: object properties: - '@type': + operator_address: type: string description: >- - A URL/resource name that uniquely identifies the type of the - serialized + operator_address defines the address of the validator's + operator; bech encoded in JSON. + consensus_pubkey: + description: >- + consensus_pubkey is the consensus public key of the validator, + as a Protobuf Any. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized - protocol buffer message. This string must contain at least + protocol buffer message. This string must contain at least - one "/" character. The last segment of the URL's path must - represent + one "/" character. The last segment of the URL's path must + represent - the fully qualified name of the type (as in + the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be in a - canonical form + `path/google.protobuf.Duration`). The name should be in a + canonical form - (e.g., leading "." is not accepted). + (e.g., leading "." is not accepted). - In practice, teams usually precompile into the binary all types - that they + In practice, teams usually precompile into the binary all + types that they - expect it to use in the context of Any. However, for URLs which - use the + expect it to use in the context of Any. However, for URLs + which use the - scheme `http`, `https`, or no scheme, one can optionally set up - a type + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + jailed: + type: boolean + description: >- + jailed defined whether the validator has been jailed from bonded + status or not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegator_shares: + type: string + description: >- + delegator_shares defines total shares issued to a validator's + delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. UPort + or Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: >- + security_contact defines an optional email for security + contact. + details: + type: string + description: details define other optional details. + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this + validator has begun unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the + validator to complete unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be + used for creating a validator. + type: object + properties: + rate: + type: string + description: >- + rate is the commission rate charged to delegators, as a + fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which + validator can ever charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of + the validator commission, as a fraction. + update_time: + type: string + format: date-time + description: >- + update_time is the last time the commission rate was + changed. + min_self_delegation: + type: string + description: >- + min_self_delegation is the validator's self declared minimum + self delegation. + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been stopped + by external modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: >- + list of unbonding ids, each uniquely identifing an unbonding of + this validator + description: >- + Validator defines a validator, together with the total amount of the - server that maps type URLs to message definitions as follows: + Validator's bond shares and their exchange rate to coins. Slashing + results in + a decrease in the exchange rate, allowing correct calculation of + future - * If no scheme is provided, `https` is assumed. + undelegations without iterating over delegators. When coins are + delegated to - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + this validator, the validator is credited with a delegation whose + number of - Note: this functionality is not currently available in the - official + bond shares is based on the amount of coins delegated divided by the + current - protobuf release, and it is not used for type URLs beginning - with + exchange rate. Voting power can be calculated as total bonded shares - type.googleapis.com. + multiplied by exchange rate. + description: validators defines the the validators' info of a delegator. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + was set, its value is undefined otherwise + description: |- + QueryDelegatorValidatorsResponse is response type for the + Query/DelegatorValidators RPC method. + cosmos.staking.v1beta1.QueryHistoricalInfoResponse: + type: object + properties: + hist: + description: hist defines the historical info at the given height. + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block + in the blockchain, - Schemes other than `http`, `https` (or the empty scheme) might - be + including all blockchain data structures and the rules of the + application's - used with implementation specific semantics. - additionalProperties: {} - description: >- - `Any` contains an arbitrary serialized protocol buffer message along - with a + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + title: prev block info + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + valset: + type: array + items: + type: object + properties: + operator_address: + type: string + description: >- + operator_address defines the address of the validator's + operator; bech encoded in JSON. + consensus_pubkey: + description: >- + consensus_pubkey is the consensus public key of the + validator, as a Protobuf Any. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - URL that describes the type of the serialized message. + protocol buffer message. This string must contain at + least + one "/" character. The last segment of the URL's path + must represent - Protobuf library provides support to pack/unpack Any values in the - form + the fully qualified name of the type (as in - of utility functions or additional generated methods of the Any - type. + `path/google.protobuf.Duration`). The name should be in + a canonical form + (e.g., leading "." is not accepted). - Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + In practice, teams usually precompile into the binary + all types that they - Example 2: Pack and unpack a message in Java. + expect it to use in the context of Any. However, for + URLs which use the - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + scheme `http`, `https`, or no scheme, one can optionally + set up a type - Example 3: Pack and unpack a message in Python. + server that maps type URLs to message definitions as + follows: - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - Example 4: Pack and unpack a message in Go + * If no scheme is provided, `https` is assumed. - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - The pack methods provided by protobuf library will by default use + Note: this functionality is not currently available in + the official - 'type.googleapis.com/full.type.name' as the type URL and the unpack + protobuf release, and it is not used for type URLs + beginning with - methods only use the fully qualified type name after the last '/' + type.googleapis.com. - in the type URL, for example "foo.bar.com/x/y.z" will yield type - name "y.z". + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + jailed: + type: boolean + description: >- + jailed defined whether the validator has been jailed from + bonded status or not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegator_shares: + type: string + description: >- + delegator_shares defines total shares issued to a + validator's delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. + UPort or Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: >- + security_contact defines an optional email for security + contact. + details: + type: string + description: details define other optional details. + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which + this validator has begun unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the + validator to complete unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to + be used for creating a validator. + type: object + properties: + rate: + type: string + description: >- + rate is the commission rate charged to delegators, + as a fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which + validator can ever charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase + of the validator commission, as a fraction. + update_time: + type: string + format: date-time + description: >- + update_time is the last time the commission rate was + changed. + min_self_delegation: + type: string + description: >- + min_self_delegation is the validator's self declared minimum + self delegation. + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been + stopped by external modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: >- + list of unbonding ids, each uniquely identifing an unbonding + of this validator + description: >- + Validator defines a validator, together with the total amount of + the + Validator's bond shares and their exchange rate to coins. + Slashing results in + a decrease in the exchange rate, allowing correct calculation of + future - JSON + undelegations without iterating over delegators. When coins are + delegated to - ==== + this validator, the validator is credited with a delegation + whose number of - The JSON representation of an `Any` value uses the regular + bond shares is based on the amount of coins delegated divided by + the current - representation of the deserialized, embedded message, with an + exchange rate. Voting power can be calculated as total bonded + shares - additional field `@type` which contains the type URL. Example: + multiplied by exchange rate. + description: >- + QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo + RPC - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + method. + cosmos.staking.v1beta1.QueryParamsResponse: + type: object + properties: + params: + description: params holds all the parameters of this module. + type: object + properties: + unbonding_time: + type: string + description: unbonding_time is the time duration of unbonding. + max_validators: + type: integer + format: int64 + description: max_validators is the maximum number of validators. + max_entries: + type: integer + format: int64 + description: >- + max_entries is the max entries for either unbonding delegation or + redelegation (per pair/trio). + historical_entries: + type: integer + format: int64 + description: historical_entries is the number of historical entries to persist. + bond_denom: + type: string + description: bond_denom defines the bondable coin denomination. + description: QueryParamsResponse is response type for the Query/Params RPC method. + cosmos.staking.v1beta1.QueryPoolResponse: + type: object + properties: + pool: + description: pool defines the pool info. + type: object + properties: + not_bonded_tokens: + type: string + bonded_tokens: + type: string + description: QueryPoolResponse is response type for the Query/Pool RPC method. + cosmos.staking.v1beta1.QueryRedelegationsResponse: + type: object + properties: + redelegation_responses: + type: array + items: + type: object + properties: + redelegation: + type: object + properties: + delegator_address: + type: string + description: >- + delegator_address is the bech32-encoded address of the + delegator. + validator_src_address: + type: string + description: >- + validator_src_address is the validator redelegation source + operator address. + validator_dst_address: + type: string + description: >- + validator_dst_address is the validator redelegation + destination operator address. + entries: + type: array + items: + type: object + properties: + creation_height: + type: string + format: int64 + description: >- + creation_height defines the height which the + redelegation took place. + completion_time: + type: string + format: date-time + description: >- + completion_time defines the unix time for redelegation + completion. + initial_balance: + type: string + description: >- + initial_balance defines the initial balance when + redelegation started. + shares_dst: + type: string + description: >- + shares_dst is the amount of destination-validator + shares created by redelegation. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been + stopped by external modules + description: >- + RedelegationEntry defines a redelegation object with + relevant metadata. + description: |- + entries are the redelegation entries. - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + redelegation entries + description: >- + Redelegation contains the list of a particular delegator's + redelegating bonds - If the embedded message type is well-known and has a custom JSON + from a particular source validator to a particular destination + validator. + entries: + type: array + items: + type: object + properties: + redelegation_entry: + type: object + properties: + creation_height: + type: string + format: int64 + description: >- + creation_height defines the height which the + redelegation took place. + completion_time: + type: string + format: date-time + description: >- + completion_time defines the unix time for redelegation + completion. + initial_balance: + type: string + description: >- + initial_balance defines the initial balance when + redelegation started. + shares_dst: + type: string + description: >- + shares_dst is the amount of destination-validator + shares created by redelegation. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been + stopped by external modules + description: >- + RedelegationEntry defines a redelegation object with + relevant metadata. + balance: + type: string + description: >- + RedelegationEntryResponse is equivalent to a RedelegationEntry + except that it - representation, that representation will be embedded adding a field + contains a balance in addition to shares which is more + suitable for client - `value` which holds the custom JSON in addition to the `@type` + responses. + description: >- + RedelegationResponse is equivalent to a Redelegation except that its + entries - field. Example (for message [google.protobuf.Duration][]): + contain a balance in addition to shares which is more suitable for + client - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - description: evidence returns all evidences. + responses. pagination: description: pagination defines the pagination in the response. type: object @@ -26756,255 +40847,421 @@ definitions: was set, its value is undefined otherwise description: >- - QueryAllEvidenceResponse is the response type for the Query/AllEvidence + QueryRedelegationsResponse is response type for the Query/Redelegations RPC method. - cosmos.evidence.v1beta1.QueryEvidenceResponse: + cosmos.staking.v1beta1.QueryUnbondingDelegationResponse: type: object properties: - evidence: - description: evidence returns the requested evidence. + unbond: + description: unbond defines the unbonding information of a delegation. type: object properties: - '@type': + delegator_address: type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all types - that they - - expect it to use in the context of Any. However, for URLs which - use the - - scheme `http`, `https`, or no scheme, one can optionally set up a - type - - server that maps type URLs to message definitions as follows: - + description: delegator_address is the bech32-encoded address of the delegator. + validator_address: + type: string + description: validator_address is the bech32-encoded address of the validator. + entries: + type: array + items: + type: object + properties: + creation_height: + type: string + format: int64 + description: >- + creation_height is the height which the unbonding took + place. + completion_time: + type: string + format: date-time + description: completion_time is the unix time for unbonding completion. + initial_balance: + type: string + description: >- + initial_balance defines the tokens initially scheduled to + receive at completion. + balance: + type: string + description: balance defines the tokens to receive at completion. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped + by external modules + description: >- + UnbondingDelegationEntry defines an unbonding object with + relevant metadata. + description: |- + entries are the unbonding delegation entries. - * If no scheme is provided, `https` is assumed. + unbonding delegation entries + description: |- + QueryDelegationResponse is response type for the Query/UnbondingDelegation + RPC method. + cosmos.staking.v1beta1.QueryValidatorDelegationsResponse: + type: object + properties: + delegation_responses: + type: array + items: + type: object + properties: + delegation: + type: object + properties: + delegator_address: + type: string + description: >- + delegator_address is the bech32-encoded address of the + delegator. + validator_address: + type: string + description: >- + validator_address is the bech32-encoded address of the + validator. + shares: + type: string + description: shares define the delegation shares received. + description: >- + Delegation represents the bond with tokens held by an account. + It is - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + owned by one delegator, and is associated with the voting power + of one - Note: this functionality is not currently available in the - official + validator. + balance: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. - protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + NOTE: The amount field is an Int which implements the custom + method + signatures required by gogoproto. + description: >- + DelegationResponse is equivalent to Delegation except that it + contains a - Schemes other than `http`, `https` (or the empty scheme) might be + balance in addition to shares which is more suitable for client + responses. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - used with implementation specific semantics. - additionalProperties: {} - description: >- - QueryEvidenceResponse is the response type for the Query/Evidence RPC - method. - cosmos.feegrant.v1beta1.Grant: + was set, its value is undefined otherwise + title: |- + QueryValidatorDelegationsResponse is response type for the + Query/ValidatorDelegations RPC method + cosmos.staking.v1beta1.QueryValidatorResponse: type: object properties: - granter: - type: string - description: >- - granter is the address of the user granting an allowance of their - funds. - grantee: - type: string - description: >- - grantee is the address of the user being granted an allowance of - another user's funds. - allowance: - description: allowance can be any of basic and filtered fee allowance. + validator: + description: validator defines the the validator info. type: object properties: - '@type': + operator_address: type: string description: >- - A URL/resource name that uniquely identifies the type of the - serialized + operator_address defines the address of the validator's operator; + bech encoded in JSON. + consensus_pubkey: + description: >- + consensus_pubkey is the consensus public key of the validator, as + a Protobuf Any. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized - protocol buffer message. This string must contain at least + protocol buffer message. This string must contain at least - one "/" character. The last segment of the URL's path must - represent + one "/" character. The last segment of the URL's path must + represent - the fully qualified name of the type (as in + the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be in a - canonical form + `path/google.protobuf.Duration`). The name should be in a + canonical form - (e.g., leading "." is not accepted). + (e.g., leading "." is not accepted). - In practice, teams usually precompile into the binary all types - that they + In practice, teams usually precompile into the binary all + types that they - expect it to use in the context of Any. However, for URLs which - use the + expect it to use in the context of Any. However, for URLs + which use the - scheme `http`, `https`, or no scheme, one can optionally set up a - type + scheme `http`, `https`, or no scheme, one can optionally set + up a type - server that maps type URLs to message definitions as follows: + server that maps type URLs to message definitions as follows: - * If no scheme is provided, `https` is assumed. + * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - Note: this functionality is not currently available in the - official + Note: this functionality is not currently available in the + official - protobuf release, and it is not used for type URLs beginning with + protobuf release, and it is not used for type URLs beginning + with - type.googleapis.com. + type.googleapis.com. - Schemes other than `http`, `https` (or the empty scheme) might be + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + additionalProperties: {} + jailed: + type: boolean + description: >- + jailed defined whether the validator has been jailed from bonded + status or not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegator_shares: + type: string + description: >- + delegator_shares defines total shares issued to a validator's + delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. UPort or + Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: >- + security_contact defines an optional email for security + contact. + details: + type: string + description: details define other optional details. + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this + validator has begun unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the + validator to complete unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be + used for creating a validator. + type: object + properties: + rate: + type: string + description: >- + rate is the commission rate charged to delegators, as a + fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which + validator can ever charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the + validator commission, as a fraction. + update_time: + type: string + format: date-time + description: update_time is the last time the commission rate was changed. + min_self_delegation: + type: string + description: >- + min_self_delegation is the validator's self declared minimum self + delegation. + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been stopped + by external modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: >- + list of unbonding ids, each uniquely identifing an unbonding of + this validator + title: QueryValidatorResponse is response type for the Query/Validator RPC method + cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse: + type: object + properties: + unbonding_responses: + type: array + items: + type: object + properties: + delegator_address: + type: string + description: >- + delegator_address is the bech32-encoded address of the + delegator. + validator_address: + type: string + description: >- + validator_address is the bech32-encoded address of the + validator. + entries: + type: array + items: + type: object + properties: + creation_height: + type: string + format: int64 + description: >- + creation_height is the height which the unbonding took + place. + completion_time: + type: string + format: date-time + description: completion_time is the unix time for unbonding completion. + initial_balance: + type: string + description: >- + initial_balance defines the tokens initially scheduled to + receive at completion. + balance: + type: string + description: balance defines the tokens to receive at completion. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been + stopped by external modules + description: >- + UnbondingDelegationEntry defines an unbonding object with + relevant metadata. + description: |- + entries are the unbonding delegation entries. + + unbonding delegation entries + description: >- + UnbondingDelegation stores all of a single delegator's unbonding + bonds - used with implementation specific semantics. - additionalProperties: {} - title: Grant is stored in the KVStore to record a grant with full context - cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse: - type: object - description: >- - MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response - type. - cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse: - type: object - description: >- - MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse - response type. - cosmos.feegrant.v1beta1.QueryAllowanceResponse: - type: object - properties: - allowance: - description: allowance is a allowance granted for grantee by granter. + for a single validator in an time-ordered list. + pagination: + description: pagination defines the pagination in the response. type: object properties: - granter: + next_key: type: string - description: >- - granter is the address of the user granting an allowance of their - funds. - grantee: + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: type: string - description: >- - grantee is the address of the user being granted an allowance of - another user's funds. - allowance: - description: allowance can be any of basic and filtered fee allowance. - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all - types that they - - expect it to use in the context of Any. However, for URLs - which use the - - scheme `http`, `https`, or no scheme, one can optionally set - up a type - - server that maps type URLs to message definitions as follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the - official - - protobuf release, and it is not used for type URLs beginning - with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) might - be + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - used with implementation specific semantics. - additionalProperties: {} - title: Grant is stored in the KVStore to record a grant with full context - description: >- - QueryAllowanceResponse is the response type for the Query/Allowance RPC - method. - cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse: + was set, its value is undefined otherwise + description: |- + QueryValidatorUnbondingDelegationsResponse is response type for the + Query/ValidatorUnbondingDelegations RPC method. + cosmos.staking.v1beta1.QueryValidatorsResponse: type: object properties: - allowances: + validators: type: array items: type: object properties: - granter: + operator_address: type: string description: >- - granter is the address of the user granting an allowance of - their funds. - grantee: - type: string + operator_address defines the address of the validator's + operator; bech encoded in JSON. + consensus_pubkey: description: >- - grantee is the address of the user being granted an allowance of - another user's funds. - allowance: - description: allowance can be any of basic and filtered fee allowance. + consensus_pubkey is the consensus public key of the validator, + as a Protobuf Any. type: object properties: '@type': @@ -27041,34 +41298,161 @@ definitions: * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + jailed: + type: boolean + description: >- + jailed defined whether the validator has been jailed from bonded + status or not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegator_shares: + type: string + description: >- + delegator_shares defines total shares issued to a validator's + delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. UPort + or Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: >- + security_contact defines an optional email for security + contact. + details: + type: string + description: details define other optional details. + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this + validator has begun unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the + validator to complete unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be + used for creating a validator. + type: object + properties: + rate: + type: string + description: >- + rate is the commission rate charged to delegators, as a + fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which + validator can ever charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of + the validator commission, as a fraction. + update_time: + type: string + format: date-time + description: >- + update_time is the last time the commission rate was + changed. + min_self_delegation: + type: string + description: >- + min_self_delegation is the validator's self declared minimum + self delegation. + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been stopped + by external modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: >- + list of unbonding ids, each uniquely identifing an unbonding of + this validator + description: >- + Validator defines a validator, together with the total amount of the + + Validator's bond shares and their exchange rate to coins. Slashing + results in - Note: this functionality is not currently available in the - official + a decrease in the exchange rate, allowing correct calculation of + future - protobuf release, and it is not used for type URLs beginning - with + undelegations without iterating over delegators. When coins are + delegated to - type.googleapis.com. + this validator, the validator is credited with a delegation whose + number of + bond shares is based on the amount of coins delegated divided by the + current - Schemes other than `http`, `https` (or the empty scheme) - might be + exchange rate. Voting power can be calculated as total bonded shares - used with implementation specific semantics. - additionalProperties: {} - title: Grant is stored in the KVStore to record a grant with full context - description: allowances that have been issued by the granter. + multiplied by exchange rate. + description: validators contains all the queried validators. pagination: - description: pagination defines an pagination for the response. + description: pagination defines the pagination in the response. type: object properties: next_key: @@ -27085,188 +41469,375 @@ definitions: PageRequest.count_total was set, its value is undefined otherwise + title: >- + QueryValidatorsResponse is response type for the Query/Validators RPC + method + cosmos.staking.v1beta1.Redelegation: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the bech32-encoded address of the delegator. + validator_src_address: + type: string + description: >- + validator_src_address is the validator redelegation source operator + address. + validator_dst_address: + type: string + description: >- + validator_dst_address is the validator redelegation destination + operator address. + entries: + type: array + items: + type: object + properties: + creation_height: + type: string + format: int64 + description: >- + creation_height defines the height which the redelegation took + place. + completion_time: + type: string + format: date-time + description: >- + completion_time defines the unix time for redelegation + completion. + initial_balance: + type: string + description: >- + initial_balance defines the initial balance when redelegation + started. + shares_dst: + type: string + description: >- + shares_dst is the amount of destination-validator shares created + by redelegation. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped by + external modules + description: >- + RedelegationEntry defines a redelegation object with relevant + metadata. + description: |- + entries are the redelegation entries. + + redelegation entries description: >- - QueryAllowancesByGranterResponse is the response type for the - Query/AllowancesByGranter RPC method. - cosmos.feegrant.v1beta1.QueryAllowancesResponse: + Redelegation contains the list of a particular delegator's redelegating + bonds + + from a particular source validator to a particular destination validator. + cosmos.staking.v1beta1.RedelegationEntry: type: object properties: - allowances: + creation_height: + type: string + format: int64 + description: creation_height defines the height which the redelegation took place. + completion_time: + type: string + format: date-time + description: completion_time defines the unix time for redelegation completion. + initial_balance: + type: string + description: initial_balance defines the initial balance when redelegation started. + shares_dst: + type: string + description: >- + shares_dst is the amount of destination-validator shares created by + redelegation. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped by + external modules + description: RedelegationEntry defines a redelegation object with relevant metadata. + cosmos.staking.v1beta1.RedelegationEntryResponse: + type: object + properties: + redelegation_entry: + type: object + properties: + creation_height: + type: string + format: int64 + description: >- + creation_height defines the height which the redelegation took + place. + completion_time: + type: string + format: date-time + description: completion_time defines the unix time for redelegation completion. + initial_balance: + type: string + description: >- + initial_balance defines the initial balance when redelegation + started. + shares_dst: + type: string + description: >- + shares_dst is the amount of destination-validator shares created + by redelegation. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped by + external modules + description: >- + RedelegationEntry defines a redelegation object with relevant + metadata. + balance: + type: string + description: >- + RedelegationEntryResponse is equivalent to a RedelegationEntry except that + it + + contains a balance in addition to shares which is more suitable for client + + responses. + cosmos.staking.v1beta1.RedelegationResponse: + type: object + properties: + redelegation: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the bech32-encoded address of the delegator. + validator_src_address: + type: string + description: >- + validator_src_address is the validator redelegation source + operator address. + validator_dst_address: + type: string + description: >- + validator_dst_address is the validator redelegation destination + operator address. + entries: + type: array + items: + type: object + properties: + creation_height: + type: string + format: int64 + description: >- + creation_height defines the height which the redelegation + took place. + completion_time: + type: string + format: date-time + description: >- + completion_time defines the unix time for redelegation + completion. + initial_balance: + type: string + description: >- + initial_balance defines the initial balance when + redelegation started. + shares_dst: + type: string + description: >- + shares_dst is the amount of destination-validator shares + created by redelegation. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped + by external modules + description: >- + RedelegationEntry defines a redelegation object with relevant + metadata. + description: |- + entries are the redelegation entries. + + redelegation entries + description: >- + Redelegation contains the list of a particular delegator's + redelegating bonds + + from a particular source validator to a particular destination + validator. + entries: type: array items: type: object properties: - granter: - type: string - description: >- - granter is the address of the user granting an allowance of - their funds. - grantee: - type: string - description: >- - grantee is the address of the user being granted an allowance of - another user's funds. - allowance: - description: allowance can be any of basic and filtered fee allowance. + redelegation_entry: type: object properties: - '@type': + creation_height: type: string + format: int64 description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all - types that they - - expect it to use in the context of Any. However, for URLs - which use the - - scheme `http`, `https`, or no scheme, one can optionally set - up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the - official - - protobuf release, and it is not used for type URLs beginning - with - - type.googleapis.com. + creation_height defines the height which the redelegation + took place. + completion_time: + type: string + format: date-time + description: >- + completion_time defines the unix time for redelegation + completion. + initial_balance: + type: string + description: >- + initial_balance defines the initial balance when + redelegation started. + shares_dst: + type: string + description: >- + shares_dst is the amount of destination-validator shares + created by redelegation. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped + by external modules + description: >- + RedelegationEntry defines a redelegation object with relevant + metadata. + balance: + type: string + description: >- + RedelegationEntryResponse is equivalent to a RedelegationEntry + except that it + contains a balance in addition to shares which is more suitable for + client - Schemes other than `http`, `https` (or the empty scheme) - might be + responses. + description: >- + RedelegationResponse is equivalent to a Redelegation except that its + entries - used with implementation specific semantics. - additionalProperties: {} - title: Grant is stored in the KVStore to record a grant with full context - description: allowances are allowance's granted for grantee by granter. - pagination: - description: pagination defines an pagination for the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + contain a balance in addition to shares which is more suitable for client - was set, its value is undefined otherwise - description: >- - QueryAllowancesResponse is the response type for the Query/Allowances RPC - method. - cosmos.gov.v1beta1.Deposit: + responses. + cosmos.staking.v1beta1.UnbondingDelegation: type: object properties: - proposal_id: + delegator_address: type: string - format: uint64 - depositor: + description: delegator_address is the bech32-encoded address of the delegator. + validator_address: type: string - amount: + description: validator_address is the bech32-encoded address of the validator. + entries: type: array items: type: object properties: - denom: + creation_height: type: string - amount: + format: int64 + description: creation_height is the height which the unbonding took place. + completion_time: type: string - description: |- - Coin defines a token with a denomination and an amount. + format: date-time + description: completion_time is the unix time for unbonding completion. + initial_balance: + type: string + description: >- + initial_balance defines the tokens initially scheduled to + receive at completion. + balance: + type: string + description: balance defines the tokens to receive at completion. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped by + external modules + description: >- + UnbondingDelegationEntry defines an unbonding object with relevant + metadata. + description: |- + entries are the unbonding delegation entries. - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. + unbonding delegation entries description: |- - Deposit defines an amount deposited by an account address to an active - proposal. - cosmos.gov.v1beta1.DepositParams: + UnbondingDelegation stores all of a single delegator's unbonding bonds + for a single validator in an time-ordered list. + cosmos.staking.v1beta1.UnbondingDelegationEntry: type: object properties: - min_deposit: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. - - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - description: Minimum deposit for a proposal to enter voting period. - max_deposit_period: + creation_height: + type: string + format: int64 + description: creation_height is the height which the unbonding took place. + completion_time: + type: string + format: date-time + description: completion_time is the unix time for unbonding completion. + initial_balance: type: string description: >- - Maximum period for Atom holders to deposit on a proposal. Initial - value: 2 - months. - description: DepositParams defines the params for deposits on governance proposals. - cosmos.gov.v1beta1.MsgDepositResponse: - type: object - description: MsgDepositResponse defines the Msg/Deposit response type. - cosmos.gov.v1beta1.MsgSubmitProposalResponse: - type: object - properties: - proposal_id: + initial_balance defines the tokens initially scheduled to receive at + completion. + balance: + type: string + description: balance defines the tokens to receive at completion. + unbonding_id: type: string format: uint64 - description: MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. - cosmos.gov.v1beta1.MsgVoteResponse: - type: object - description: MsgVoteResponse defines the Msg/Vote response type. - cosmos.gov.v1beta1.MsgVoteWeightedResponse: - type: object - description: |- - MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. - - Since: cosmos-sdk 0.43 - cosmos.gov.v1beta1.Proposal: + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped by + external modules + description: >- + UnbondingDelegationEntry defines an unbonding object with relevant + metadata. + cosmos.staking.v1beta1.Validator: type: object properties: - proposal_id: + operator_address: type: string - format: uint64 - content: + description: >- + operator_address defines the address of the validator's operator; bech + encoded in JSON. + consensus_pubkey: + description: >- + consensus_pubkey is the consensus public key of the validator, as a + Protobuf Any. type: object properties: '@type': @@ -27322,560 +41893,540 @@ definitions: used with implementation specific semantics. additionalProperties: {} + jailed: + type: boolean description: >- - `Any` contains an arbitrary serialized protocol buffer message along - with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values in the - form - - of utility functions or additional generated methods of the Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by default use - - 'type.googleapis.com/full.type.name' as the type URL and the unpack - - methods only use the fully qualified type name after the last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with an - - additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom JSON - - representation, that representation will be embedded adding a field - - `value` which holds the custom JSON in addition to the `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } + jailed defined whether the validator has been jailed from bonded + status or not. status: + description: status is the validator status (bonded/unbonding/unbonded). type: string enum: - - PROPOSAL_STATUS_UNSPECIFIED - - PROPOSAL_STATUS_DEPOSIT_PERIOD - - PROPOSAL_STATUS_VOTING_PERIOD - - PROPOSAL_STATUS_PASSED - - PROPOSAL_STATUS_REJECTED - - PROPOSAL_STATUS_FAILED - default: PROPOSAL_STATUS_UNSPECIFIED - description: |- - ProposalStatus enumerates the valid statuses of a proposal. - - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. - - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - period. - - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - period. - - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - passed. - - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - been rejected. - - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - failed. - final_tally_result: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegator_shares: + type: string + description: >- + delegator_shares defines total shares issued to a validator's + delegators. + description: + description: description defines the description terms for the validator. type: object properties: - 'yes': + moniker: type: string - abstain: + description: moniker defines a human-readable name for the validator. + identity: type: string - 'no': + description: >- + identity defines an optional identity signature (ex. UPort or + Keybase). + website: type: string - no_with_veto: + description: website defines an optional website link. + security_contact: type: string - description: TallyResult defines a standard tally for a governance proposal. - submit_time: + description: security_contact defines an optional email for security contact. + details: + type: string + description: details define other optional details. + unbonding_height: type: string - format: date-time - deposit_end_time: + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this + validator has begun unbonding. + unbonding_time: type: string format: date-time - total_deposit: + description: >- + unbonding_time defines, if unbonding, the min time for the validator + to complete unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be used + for creating a validator. + type: object + properties: + rate: + type: string + description: >- + rate is the commission rate charged to delegators, as a + fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which validator + can ever charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the + validator commission, as a fraction. + update_time: + type: string + format: date-time + description: update_time is the last time the commission rate was changed. + min_self_delegation: + type: string + description: >- + min_self_delegation is the validator's self declared minimum self + delegation. + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been stopped by + external modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: >- + list of unbonding ids, each uniquely identifing an unbonding of this + validator + description: >- + Validator defines a validator, together with the total amount of the + + Validator's bond shares and their exchange rate to coins. Slashing results + in + + a decrease in the exchange rate, allowing correct calculation of future + + undelegations without iterating over delegators. When coins are delegated + to + + this validator, the validator is credited with a delegation whose number + of + + bond shares is based on the amount of coins delegated divided by the + current + + exchange rate. Voting power can be calculated as total bonded shares + + multiplied by exchange rate. + cosmos.base.abci.v1beta1.ABCIMessageLog: + type: object + properties: + msg_index: + type: integer + format: int64 + log: + type: string + events: type: array items: type: object properties: - denom: - type: string - amount: + type: type: string - description: |- - Coin defines a token with a denomination and an amount. + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + description: >- + Attribute defines an attribute wrapper where the key and value + are - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - voting_start_time: + strings instead of raw bytes. + description: |- + StringEvent defines en Event object wrapper where all the attributes + contain key/value pairs that are strings instead of raw bytes. + description: |- + Events contains a slice of Event objects that were emitted during some + execution. + description: >- + ABCIMessageLog defines a structure containing an indexed tx ABCI message + log. + cosmos.base.abci.v1beta1.Attribute: + type: object + properties: + key: type: string - format: date-time - voting_end_time: + value: type: string - format: date-time - description: Proposal defines the core field members of a governance proposal. - cosmos.gov.v1beta1.ProposalStatus: - type: string - enum: - - PROPOSAL_STATUS_UNSPECIFIED - - PROPOSAL_STATUS_DEPOSIT_PERIOD - - PROPOSAL_STATUS_VOTING_PERIOD - - PROPOSAL_STATUS_PASSED - - PROPOSAL_STATUS_REJECTED - - PROPOSAL_STATUS_FAILED - default: PROPOSAL_STATUS_UNSPECIFIED description: |- - ProposalStatus enumerates the valid statuses of a proposal. - - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. - - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - period. - - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - period. - - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - passed. - - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - been rejected. - - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - failed. - cosmos.gov.v1beta1.QueryDepositResponse: + Attribute defines an attribute wrapper where the key and value are + strings instead of raw bytes. + cosmos.base.abci.v1beta1.GasInfo: type: object properties: - deposit: - description: deposit defines the requested deposit. - type: object - properties: - proposal_id: - type: string - format: uint64 - depositor: - type: string - amount: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. - - - NOTE: The amount field is an Int which implements the custom - method - - signatures required by gogoproto. - description: >- - QueryDepositResponse is the response type for the Query/Deposit RPC - method. - cosmos.gov.v1beta1.QueryDepositsResponse: + gas_wanted: + type: string + format: uint64 + description: GasWanted is the maximum units of work we allow this tx to perform. + gas_used: + type: string + format: uint64 + description: GasUsed is the amount of gas actually consumed. + description: GasInfo defines tx execution gas context. + cosmos.base.abci.v1beta1.Result: type: object properties: - deposits: + data: + type: string + format: byte + description: >- + Data is any data returned from message or handler execution. It MUST + be + + length prefixed in order to separate data from multiple message + executions. + log: + type: string + description: Log contains the log information from message or handler execution. + events: type: array items: type: object properties: - proposal_id: - type: string - format: uint64 - depositor: + type: type: string - amount: + attributes: type: array items: type: object properties: - denom: + key: type: string - amount: + format: byte + value: type: string + format: byte + index: + type: boolean + title: nondeterministic description: >- - Coin defines a token with a denomination and an amount. - - - NOTE: The amount field is an Int which implements the custom - method - - signatures required by gogoproto. + EventAttribute is a single key-value pair, associated with an + event. description: >- - Deposit defines an amount deposited by an account address to an - active + Event allows application developers to attach additional information + to - proposal. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and + ResponseDeliverTx. - was set, its value is undefined otherwise - description: >- - QueryDepositsResponse is the response type for the Query/Deposits RPC - method. - cosmos.gov.v1beta1.QueryParamsResponse: + Later, transactions may be queried using these events. + description: >- + Events contains a slice of Event objects that were emitted during + message + + or handler execution. + description: Result is the union of ResponseFormat and ResponseCheckTx. + cosmos.base.abci.v1beta1.StringEvent: type: object properties: - voting_params: - description: voting_params defines the parameters related to voting. - type: object - properties: - voting_period: - type: string - description: Length of the voting period. - deposit_params: - description: deposit_params defines the parameters related to deposit. - type: object - properties: - min_deposit: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + description: |- + Attribute defines an attribute wrapper where the key and value are + strings instead of raw bytes. + description: |- + StringEvent defines en Event object wrapper where all the attributes + contain key/value pairs that are strings instead of raw bytes. + cosmos.base.abci.v1beta1.TxResponse: + type: object + properties: + height: + type: string + format: int64 + title: The block height + txhash: + type: string + description: The transaction hash. + codespace: + type: string + title: Namespace for the Code + code: + type: integer + format: int64 + description: Response code. + data: + type: string + description: 'Result bytes, if any.' + raw_log: + type: string + description: |- + The output of the application's logger (raw string). May be + non-deterministic. + logs: + type: array + items: + type: object + properties: + msg_index: + type: integer + format: int64 + log: + type: string + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + description: >- + Attribute defines an attribute wrapper where the key and + value are + strings instead of raw bytes. + description: >- + StringEvent defines en Event object wrapper where all the + attributes - NOTE: The amount field is an Int which implements the custom - method + contain key/value pairs that are strings instead of raw bytes. + description: >- + Events contains a slice of Event objects that were emitted + during some - signatures required by gogoproto. - description: Minimum deposit for a proposal to enter voting period. - max_deposit_period: - type: string - description: >- - Maximum period for Atom holders to deposit on a proposal. Initial - value: 2 - months. - tally_params: - description: tally_params defines the parameters related to tally. + execution. + description: >- + ABCIMessageLog defines a structure containing an indexed tx ABCI + message log. + description: >- + The output of the application's logger (typed). May be + non-deterministic. + info: + type: string + description: Additional information. May be non-deterministic. + gas_wanted: + type: string + format: int64 + description: Amount of gas requested for transaction. + gas_used: + type: string + format: int64 + description: Amount of gas consumed by transaction. + tx: + description: The request transaction bytes. type: object properties: - quorum: - type: string - format: byte - description: >- - Minimum percentage of total stake needed to vote for a result to - be - considered valid. - threshold: - type: string - format: byte - description: >- - Minimum proportion of Yes votes for proposal to pass. Default - value: 0.5. - veto_threshold: + '@type': type: string - format: byte description: >- - Minimum value of Veto votes to Total votes ratio for proposal to - be - vetoed. Default value: 1/3. - description: QueryParamsResponse is the response type for the Query/Params RPC method. - cosmos.gov.v1beta1.QueryProposalResponse: - type: object - properties: - proposal: - type: object - properties: - proposal_id: - type: string - format: uint64 - content: - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all - types that they - - expect it to use in the context of Any. However, for URLs - which use the - - scheme `http`, `https`, or no scheme, one can optionally set - up a type - - server that maps type URLs to message definitions as follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the - official + A URL/resource name that uniquely identifies the type of the + serialized - protobuf release, and it is not used for type URLs beginning - with + protocol buffer message. This string must contain at least - type.googleapis.com. + one "/" character. The last segment of the URL's path must + represent + the fully qualified name of the type (as in - Schemes other than `http`, `https` (or the empty scheme) might - be + `path/google.protobuf.Duration`). The name should be in a + canonical form - used with implementation specific semantics. - additionalProperties: {} - description: >- - `Any` contains an arbitrary serialized protocol buffer message - along with a + (e.g., leading "." is not accepted). - URL that describes the type of the serialized message. + In practice, teams usually precompile into the binary all types + that they - Protobuf library provides support to pack/unpack Any values in the - form + expect it to use in the context of Any. However, for URLs which + use the - of utility functions or additional generated methods of the Any - type. + scheme `http`, `https`, or no scheme, one can optionally set up a + type + server that maps type URLs to message definitions as follows: - Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + * If no scheme is provided, `https` is assumed. - Example 2: Pack and unpack a message in Java. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + Note: this functionality is not currently available in the + official - Example 3: Pack and unpack a message in Python. + protobuf release, and it is not used for type URLs beginning with - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + type.googleapis.com. - Example 4: Pack and unpack a message in Go - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } + Schemes other than `http`, `https` (or the empty scheme) might be - The pack methods provided by protobuf library will by default use + used with implementation specific semantics. + additionalProperties: {} + timestamp: + type: string + description: >- + Time of the previous block. For heights > 1, it's the weighted median + of - 'type.googleapis.com/full.type.name' as the type URL and the - unpack + the timestamps of the valid votes in the block.LastCommit. For height + == 1, - methods only use the fully qualified type name after the last '/' + it's genesis time. + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + format: byte + value: + type: string + format: byte + index: + type: boolean + title: nondeterministic + description: >- + EventAttribute is a single key-value pair, associated with an + event. + description: >- + Event allows application developers to attach additional information + to - in the type URL, for example "foo.bar.com/x/y.z" will yield type + ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and + ResponseDeliverTx. - name "y.z". + Later, transactions may be queried using these events. + description: >- + Events defines all the events emitted by processing a transaction. + Note, + these events include those emitted by processing all the messages and + those + emitted from the ante handler. Whereas Logs contains the events, with - JSON + additional metadata, emitted only by processing the messages. - ==== - The JSON representation of an `Any` value uses the regular + Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 + description: >- + TxResponse defines a structure containing relevant tx data and metadata. + The - representation of the deserialized, embedded message, with an + tags are stringified and the log is JSON decoded. + cosmos.crypto.multisig.v1beta1.CompactBitArray: + type: object + properties: + extra_bits_stored: + type: integer + format: int64 + elems: + type: string + format: byte + description: |- + CompactBitArray is an implementation of a space efficient bit array. + This is used to ensure that the encoded data takes up a minimal amount of + space after proto encoding. + This is not thread safe, and is not intended for concurrent usage. + cosmos.tx.signing.v1beta1.SignMode: + type: string + enum: + - SIGN_MODE_UNSPECIFIED + - SIGN_MODE_DIRECT + - SIGN_MODE_TEXTUAL + - SIGN_MODE_LEGACY_AMINO_JSON + - SIGN_MODE_EIP_191 + default: SIGN_MODE_UNSPECIFIED + description: |- + SignMode represents a signing mode with its own security guarantees. - additional field `@type` which contains the type URL. Example: + - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be + rejected + - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is + verified with raw bytes from Tx + - SIGN_MODE_TEXTUAL: SIGN_MODE_TEXTUAL is a future signing mode that will verify some + human-readable textual representation on top of the binary representation + from SIGN_MODE_DIRECT + - SIGN_MODE_LEGACY_AMINO_JSON: SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses + Amino JSON and will be removed in the future + - SIGN_MODE_EIP_191: SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos + SDK. Ref: https://eips.ethereum.org/EIPS/eip-191 - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant, + but is not implemented on the SDK by default. To enable EIP-191, you need + to pass a custom `TxConfig` that has an implementation of + `SignModeHandler` for EIP-191. The SDK may decide to fully support + EIP-191 in the future. - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + Since: cosmos-sdk 0.45.2 + cosmos.tx.v1beta1.AuthInfo: + type: object + properties: + signer_infos: + type: array + items: + type: object + $ref: '#/definitions/cosmos.tx.v1beta1.SignerInfo' + description: >- + signer_infos defines the signing modes for the required signers. The + number - If the embedded message type is well-known and has a custom JSON + and order of elements must match the required signers from TxBody's - representation, that representation will be embedded adding a - field + messages. The first element is the primary signer and the one which + pays - `value` which holds the custom JSON in addition to the `@type` + the fee. + fee: + description: >- + Fee is the fee and gas limit for the transaction. The first signer is + the - field. Example (for message [google.protobuf.Duration][]): + primary signer and the one which pays the fee. The fee can be + calculated - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - status: - type: string - enum: - - PROPOSAL_STATUS_UNSPECIFIED - - PROPOSAL_STATUS_DEPOSIT_PERIOD - - PROPOSAL_STATUS_VOTING_PERIOD - - PROPOSAL_STATUS_PASSED - - PROPOSAL_STATUS_REJECTED - - PROPOSAL_STATUS_FAILED - default: PROPOSAL_STATUS_UNSPECIFIED - description: |- - ProposalStatus enumerates the valid statuses of a proposal. + based on the cost of evaluating the body and doing signature + verification - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. - - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - period. - - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - period. - - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - passed. - - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - been rejected. - - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - failed. - final_tally_result: - type: object - properties: - 'yes': - type: string - abstain: - type: string - 'no': - type: string - no_with_veto: - type: string - description: TallyResult defines a standard tally for a governance proposal. - submit_time: - type: string - format: date-time - deposit_end_time: - type: string - format: date-time - total_deposit: + of the signers. This can be estimated via simulation. + type: object + properties: + amount: type: array items: type: object @@ -27892,1148 +42443,1255 @@ definitions: method signatures required by gogoproto. - voting_start_time: + title: amount is the amount of coins to be paid as a fee + gas_limit: type: string - format: date-time - voting_end_time: + format: uint64 + title: >- + gas_limit is the maximum gas that can be used in transaction + processing + + before an out of gas error occurs + payer: type: string - format: date-time - description: Proposal defines the core field members of a governance proposal. + description: >- + if unset, the first signer is responsible for paying the fees. If + set, the specified account must pay the fees. + + the payer must be a tx signer (and thus have signed this field in + AuthInfo). + + setting this field does *not* change the ordering of required + signers for the transaction. + granter: + type: string + title: >- + if set, the fee payer (either the first signer or the value of the + payer field) requests that a fee grant be used + + to pay fees instead of the fee payer's own balance. If an + appropriate fee grant does not exist or the chain does + + not support fee grants, this will fail + description: |- + AuthInfo describes the fee and signer modes that are used to sign a + transaction. + cosmos.tx.v1beta1.BroadcastMode: + type: string + enum: + - BROADCAST_MODE_UNSPECIFIED + - BROADCAST_MODE_BLOCK + - BROADCAST_MODE_SYNC + - BROADCAST_MODE_ASYNC + default: BROADCAST_MODE_UNSPECIFIED description: >- - QueryProposalResponse is the response type for the Query/Proposal RPC + BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC method. - cosmos.gov.v1beta1.QueryProposalsResponse: + + - BROADCAST_MODE_UNSPECIFIED: zero-value for mode ordering + - BROADCAST_MODE_BLOCK: BROADCAST_MODE_BLOCK defines a tx broadcasting mode where the client waits for + the tx to be committed in a block. + - BROADCAST_MODE_SYNC: BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for + a CheckTx execution response only. + - BROADCAST_MODE_ASYNC: BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns + immediately. + cosmos.tx.v1beta1.BroadcastTxRequest: type: object properties: - proposals: - type: array - items: - type: object - properties: - proposal_id: - type: string - format: uint64 - content: + tx_bytes: + type: string + format: byte + description: tx_bytes is the raw transaction. + mode: + type: string + enum: + - BROADCAST_MODE_UNSPECIFIED + - BROADCAST_MODE_BLOCK + - BROADCAST_MODE_SYNC + - BROADCAST_MODE_ASYNC + default: BROADCAST_MODE_UNSPECIFIED + description: >- + BroadcastMode specifies the broadcast mode for the TxService.Broadcast + RPC method. + + - BROADCAST_MODE_UNSPECIFIED: zero-value for mode ordering + - BROADCAST_MODE_BLOCK: BROADCAST_MODE_BLOCK defines a tx broadcasting mode where the client waits for + the tx to be committed in a block. + - BROADCAST_MODE_SYNC: BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for + a CheckTx execution response only. + - BROADCAST_MODE_ASYNC: BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns + immediately. + description: |- + BroadcastTxRequest is the request type for the Service.BroadcastTxRequest + RPC method. + cosmos.tx.v1beta1.BroadcastTxResponse: + type: object + properties: + tx_response: + description: tx_response is the queried TxResponses. + type: object + properties: + height: + type: string + format: int64 + title: The block height + txhash: + type: string + description: The transaction hash. + codespace: + type: string + title: Namespace for the Code + code: + type: integer + format: int64 + description: Response code. + data: + type: string + description: 'Result bytes, if any.' + raw_log: + type: string + description: |- + The output of the application's logger (raw string). May be + non-deterministic. + logs: + type: array + items: type: object properties: - '@type': + msg_index: + type: integer + format: int64 + log: type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all - types that they - - expect it to use in the context of Any. However, for URLs - which use the - - scheme `http`, `https`, or no scheme, one can optionally set - up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + description: >- + Attribute defines an attribute wrapper where the key + and value are - Note: this functionality is not currently available in the - official + strings instead of raw bytes. + description: >- + StringEvent defines en Event object wrapper where all the + attributes - protobuf release, and it is not used for type URLs beginning - with + contain key/value pairs that are strings instead of raw + bytes. + description: >- + Events contains a slice of Event objects that were emitted + during some - type.googleapis.com. + execution. + description: >- + ABCIMessageLog defines a structure containing an indexed tx ABCI + message log. + description: >- + The output of the application's logger (typed). May be + non-deterministic. + info: + type: string + description: Additional information. May be non-deterministic. + gas_wanted: + type: string + format: int64 + description: Amount of gas requested for transaction. + gas_used: + type: string + format: int64 + description: Amount of gas consumed by transaction. + tx: + description: The request transaction bytes. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + protocol buffer message. This string must contain at least - Schemes other than `http`, `https` (or the empty scheme) - might be + one "/" character. The last segment of the URL's path must + represent - used with implementation specific semantics. - additionalProperties: {} - description: >- - `Any` contains an arbitrary serialized protocol buffer message - along with a + the fully qualified name of the type (as in - URL that describes the type of the serialized message. + `path/google.protobuf.Duration`). The name should be in a + canonical form + (e.g., leading "." is not accepted). - Protobuf library provides support to pack/unpack Any values in - the form - of utility functions or additional generated methods of the Any - type. + In practice, teams usually precompile into the binary all + types that they + expect it to use in the context of Any. However, for URLs + which use the - Example 1: Pack and unpack a message in C++. + scheme `http`, `https`, or no scheme, one can optionally set + up a type - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + server that maps type URLs to message definitions as follows: - Example 2: Pack and unpack a message in Java. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + * If no scheme is provided, `https` is assumed. - Example 3: Pack and unpack a message in Python. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + Note: this functionality is not currently available in the + official - Example 4: Pack and unpack a message in Go + protobuf release, and it is not used for type URLs beginning + with - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } + type.googleapis.com. - The pack methods provided by protobuf library will by default - use - 'type.googleapis.com/full.type.name' as the type URL and the - unpack + Schemes other than `http`, `https` (or the empty scheme) might + be - methods only use the fully qualified type name after the last - '/' + used with implementation specific semantics. + additionalProperties: {} + timestamp: + type: string + description: >- + Time of the previous block. For heights > 1, it's the weighted + median of - in the type URL, for example "foo.bar.com/x/y.z" will yield type + the timestamps of the valid votes in the block.LastCommit. For + height == 1, - name "y.z". + it's genesis time. + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + format: byte + value: + type: string + format: byte + index: + type: boolean + title: nondeterministic + description: >- + EventAttribute is a single key-value pair, associated with + an event. + description: >- + Event allows application developers to attach additional + information to + ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and + ResponseDeliverTx. + Later, transactions may be queried using these events. + description: >- + Events defines all the events emitted by processing a transaction. + Note, - JSON + these events include those emitted by processing all the messages + and those - ==== + emitted from the ante handler. Whereas Logs contains the events, + with - The JSON representation of an `Any` value uses the regular + additional metadata, emitted only by processing the messages. - representation of the deserialized, embedded message, with an - additional field `@type` which contains the type URL. Example: + Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 + description: |- + BroadcastTxResponse is the response type for the + Service.BroadcastTx method. + cosmos.tx.v1beta1.Fee: + type: object + properties: + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + title: amount is the amount of coins to be paid as a fee + gas_limit: + type: string + format: uint64 + title: >- + gas_limit is the maximum gas that can be used in transaction + processing - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + before an out of gas error occurs + payer: + type: string + description: >- + if unset, the first signer is responsible for paying the fees. If set, + the specified account must pay the fees. - If the embedded message type is well-known and has a custom JSON + the payer must be a tx signer (and thus have signed this field in + AuthInfo). - representation, that representation will be embedded adding a - field + setting this field does *not* change the ordering of required signers + for the transaction. + granter: + type: string + title: >- + if set, the fee payer (either the first signer or the value of the + payer field) requests that a fee grant be used - `value` which holds the custom JSON in addition to the `@type` + to pay fees instead of the fee payer's own balance. If an appropriate + fee grant does not exist or the chain does - field. Example (for message [google.protobuf.Duration][]): + not support fee grants, this will fail + description: >- + Fee includes the amount of coins paid in fees and the maximum - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - status: - type: string - enum: - - PROPOSAL_STATUS_UNSPECIFIED - - PROPOSAL_STATUS_DEPOSIT_PERIOD - - PROPOSAL_STATUS_VOTING_PERIOD - - PROPOSAL_STATUS_PASSED - - PROPOSAL_STATUS_REJECTED - - PROPOSAL_STATUS_FAILED - default: PROPOSAL_STATUS_UNSPECIFIED - description: |- - ProposalStatus enumerates the valid statuses of a proposal. + gas to be used by the transaction. The ratio yields an effective + "gasprice", - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. - - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - period. - - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - period. - - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - passed. - - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - been rejected. - - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - failed. - final_tally_result: - type: object - properties: - 'yes': - type: string - abstain: - type: string - 'no': - type: string - no_with_veto: - type: string - description: TallyResult defines a standard tally for a governance proposal. - submit_time: - type: string - format: date-time - deposit_end_time: - type: string - format: date-time - total_deposit: - type: array - items: + which must be above some miminum to be accepted into the mempool. + cosmos.tx.v1beta1.GetBlockWithTxsResponse: + type: object + properties: + txs: + type: array + items: + type: object + $ref: '#/definitions/cosmos.tx.v1beta1.Tx' + description: txs are the transactions in the block. + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + block: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info type: object properties: - denom: + block: type: string - amount: + format: uint64 + app: type: string + format: uint64 description: >- - Coin defines a token with a denomination and an amount. - + Consensus captures the consensus rules for processing a block + in the blockchain, - NOTE: The amount field is an Int which implements the custom - method + including all blockchain data structures and the rules of the + application's - signatures required by gogoproto. - voting_start_time: - type: string - format: date-time - voting_end_time: - type: string - format: date-time - description: Proposal defines the core field members of a governance proposal. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + data: + type: object + properties: + txs: + type: array + items: + type: string + format: byte + description: >- + Txs that will be applied by state @ block.Height+1. - was set, its value is undefined otherwise - description: |- - QueryProposalsResponse is the response type for the Query/Proposals RPC - method. - cosmos.gov.v1beta1.QueryTallyResultResponse: - type: object - properties: - tally: - type: object - properties: - 'yes': - type: string - abstain: - type: string - 'no': - type: string - no_with_veto: - type: string - description: TallyResult defines a standard tally for a governance proposal. - description: >- - QueryTallyResultResponse is the response type for the Query/Tally RPC - method. - cosmos.gov.v1beta1.QueryVoteResponse: - type: object - properties: - vote: - description: vote defined the queried vote. - type: object - properties: - proposal_id: - type: string - format: uint64 - voter: - type: string - option: - description: >- - Deprecated: Prefer to use `options` instead. This field is set in - queries + NOTE: not all txs here are valid. We're just agreeing on the + order first. - if and only if `len(options) == 1` and that option has weight 1. - In all + This means that block.AppHash does not include these txs. + title: Data contains the set of transactions included in the block + evidence: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + duplicate_vote_evidence: + type: object + properties: + vote_a: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: >- + SignedMsgType is a type of signed message in the + consensus. - other cases, this field will default to VOTE_OPTION_UNSPECIFIED. - type: string - enum: - - VOTE_OPTION_UNSPECIFIED - - VOTE_OPTION_YES - - VOTE_OPTION_ABSTAIN - - VOTE_OPTION_NO - - VOTE_OPTION_NO_WITH_VETO - default: VOTE_OPTION_UNSPECIFIED - options: - type: array - items: - type: object - properties: - option: - type: string - enum: - - VOTE_OPTION_UNSPECIFIED - - VOTE_OPTION_YES - - VOTE_OPTION_ABSTAIN - - VOTE_OPTION_NO - - VOTE_OPTION_NO_WITH_VETO - default: VOTE_OPTION_UNSPECIFIED - description: >- - VoteOption enumerates the valid vote options for a given - governance proposal. + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote represents a prevote, precommit, or commit vote + from validators for - - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. - weight: - type: string - description: |- - WeightedVoteOption defines a unit of vote for vote split. + consensus. + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: >- + SignedMsgType is a type of signed message in the + consensus. - Since: cosmos-sdk 0.43 - title: 'Since: cosmos-sdk 0.43' - description: QueryVoteResponse is the response type for the Query/Vote RPC method. - cosmos.gov.v1beta1.QueryVotesResponse: - type: object - properties: - votes: - type: array - items: - type: object - properties: - proposal_id: - type: string - format: uint64 - voter: - type: string - option: - description: >- - Deprecated: Prefer to use `options` instead. This field is set - in queries + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote represents a prevote, precommit, or commit vote + from validators for + + consensus. + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + DuplicateVoteEvidence contains evidence of a validator + signed two conflicting votes. + light_client_attack_evidence: + type: object + properties: + conflicting_block: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules + for processing a block in the + blockchain, - if and only if `len(options) == 1` and that option has weight 1. - In all + including all blockchain data structures + and the rules of the application's - other cases, this field will default to VOTE_OPTION_UNSPECIFIED. - type: string - enum: - - VOTE_OPTION_UNSPECIFIED - - VOTE_OPTION_YES - - VOTE_OPTION_ABSTAIN - - VOTE_OPTION_NO - - VOTE_OPTION_NO_WITH_VETO - default: VOTE_OPTION_UNSPECIFIED - options: - type: array - items: + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: >- + commit from validators from the last + block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: >- + hashes from the app output from the prev + block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: >- + root hash of all results from the txs + from the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: >- + Header defines the structure of a block + header. + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + title: >- + BlockIdFlag indicates which BlcokID the + signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: >- + CommitSig is a part of the Vote included + in a Commit. + description: >- + Commit contains the evidence that a block + was committed by a set of validators. + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for + use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for + use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + common_height: + type: string + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use + with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + LightClientAttackEvidence contains evidence of a set of + validators attempting to mislead a light client. + last_commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: type: object properties: - option: - type: string - enum: - - VOTE_OPTION_UNSPECIFIED - - VOTE_OPTION_YES - - VOTE_OPTION_ABSTAIN - - VOTE_OPTION_NO - - VOTE_OPTION_NO_WITH_VETO - default: VOTE_OPTION_UNSPECIFIED - description: >- - VoteOption enumerates the valid vote options for a given - governance proposal. - - - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. - weight: + hash: type: string - description: |- - WeightedVoteOption defines a unit of vote for vote split. - - Since: cosmos-sdk 0.43 - title: 'Since: cosmos-sdk 0.43' - description: |- - Vote defines a vote on a governance proposal. - A Vote consists of a proposal ID, the voter, and the vote option. - description: votes defined the queried votes. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: QueryVotesResponse is the response type for the Query/Votes RPC method. - cosmos.gov.v1beta1.TallyParams: - type: object - properties: - quorum: - type: string - format: byte - description: |- - Minimum percentage of total stake needed to vote for a result to be - considered valid. - threshold: - type: string - format: byte - description: >- - Minimum proportion of Yes votes for proposal to pass. Default value: - 0.5. - veto_threshold: - type: string - format: byte - description: |- - Minimum value of Veto votes to Total votes ratio for proposal to be - vetoed. Default value: 1/3. - description: TallyParams defines the params for tallying votes on governance proposals. - cosmos.gov.v1beta1.TallyResult: - type: object - properties: - 'yes': - type: string - abstain: - type: string - 'no': - type: string - no_with_veto: - type: string - description: TallyResult defines a standard tally for a governance proposal. - cosmos.gov.v1beta1.Vote: - type: object - properties: - proposal_id: - type: string - format: uint64 - voter: - type: string - option: - description: >- - Deprecated: Prefer to use `options` instead. This field is set in - queries - - if and only if `len(options) == 1` and that option has weight 1. In - all - - other cases, this field will default to VOTE_OPTION_UNSPECIFIED. - type: string - enum: - - VOTE_OPTION_UNSPECIFIED - - VOTE_OPTION_YES - - VOTE_OPTION_ABSTAIN - - VOTE_OPTION_NO - - VOTE_OPTION_NO_WITH_VETO - default: VOTE_OPTION_UNSPECIFIED - options: - type: array - items: - type: object - properties: - option: - type: string - enum: - - VOTE_OPTION_UNSPECIFIED - - VOTE_OPTION_YES - - VOTE_OPTION_ABSTAIN - - VOTE_OPTION_NO - - VOTE_OPTION_NO_WITH_VETO - default: VOTE_OPTION_UNSPECIFIED - description: >- - VoteOption enumerates the valid vote options for a given - governance proposal. - - - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. - weight: - type: string - description: |- - WeightedVoteOption defines a unit of vote for vote split. - - Since: cosmos-sdk 0.43 - title: 'Since: cosmos-sdk 0.43' - description: |- - Vote defines a vote on a governance proposal. - A Vote consists of a proposal ID, the voter, and the vote option. - cosmos.gov.v1beta1.VoteOption: - type: string - enum: - - VOTE_OPTION_UNSPECIFIED - - VOTE_OPTION_YES - - VOTE_OPTION_ABSTAIN - - VOTE_OPTION_NO - - VOTE_OPTION_NO_WITH_VETO - default: VOTE_OPTION_UNSPECIFIED - description: >- - VoteOption enumerates the valid vote options for a given governance - proposal. - - - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. - cosmos.gov.v1beta1.VotingParams: - type: object - properties: - voting_period: - type: string - description: Length of the voting period. - description: VotingParams defines the params for voting on governance proposals. - cosmos.gov.v1beta1.WeightedVoteOption: - type: object - properties: - option: - type: string - enum: - - VOTE_OPTION_UNSPECIFIED - - VOTE_OPTION_YES - - VOTE_OPTION_ABSTAIN - - VOTE_OPTION_NO - - VOTE_OPTION_NO_WITH_VETO - default: VOTE_OPTION_UNSPECIFIED - description: >- - VoteOption enumerates the valid vote options for a given governance - proposal. - - - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. - weight: - type: string - description: |- - WeightedVoteOption defines a unit of vote for vote split. - - Since: cosmos-sdk 0.43 - cosmos.mint.v1beta1.Params: - type: object - properties: - mint_denom: - type: string - title: type of coin to mint - inflation_rate_change: - type: string - title: maximum annual change in inflation rate - inflation_max: - type: string - title: maximum inflation rate - inflation_min: - type: string - title: minimum inflation rate - goal_bonded: - type: string - title: goal of percent bonded atoms - blocks_per_year: - type: string - format: uint64 - title: expected blocks per year - description: Params holds parameters for the mint module. - cosmos.mint.v1beta1.QueryAnnualProvisionsResponse: - type: object - properties: - annual_provisions: - type: string - format: byte - description: annual_provisions is the current minting annual provisions value. - description: |- - QueryAnnualProvisionsResponse is the response type for the - Query/AnnualProvisions RPC method. - cosmos.mint.v1beta1.QueryInflationResponse: - type: object - properties: - inflation: - type: string - format: byte - description: inflation is the current minting inflation value. - description: |- - QueryInflationResponse is the response type for the Query/Inflation RPC - method. - cosmos.mint.v1beta1.QueryParamsResponse: - type: object - properties: - params: - description: params defines the parameters of the module. + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + title: BlockIdFlag indicates which BlcokID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: >- + Commit contains the evidence that a block was committed by a set + of validators. + pagination: + description: pagination defines a pagination for the response. type: object properties: - mint_denom: - type: string - title: type of coin to mint - inflation_rate_change: - type: string - title: maximum annual change in inflation rate - inflation_max: - type: string - title: maximum inflation rate - inflation_min: - type: string - title: minimum inflation rate - goal_bonded: + next_key: type: string - title: goal of percent bonded atoms - blocks_per_year: + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: type: string format: uint64 - title: expected blocks per year - description: QueryParamsResponse is the response type for the Query/Params RPC method. - cosmos.params.v1beta1.ParamChange: - type: object - properties: - subspace: - type: string - key: - type: string - value: - type: string - description: |- - ParamChange defines an individual parameter change, for use in - ParameterChangeProposal. - cosmos.params.v1beta1.QueryParamsResponse: - type: object - properties: - param: - description: param defines the queried parameter. - type: object - properties: - subspace: - type: string - key: - type: string - value: - type: string - description: QueryParamsResponse is response type for the Query/Params RPC method. - cosmos.slashing.v1beta1.MsgUnjailResponse: - type: object - title: MsgUnjailResponse defines the Msg/Unjail response type - cosmos.slashing.v1beta1.Params: - type: object - properties: - signed_blocks_window: - type: string - format: int64 - min_signed_per_window: - type: string - format: byte - downtime_jail_duration: - type: string - slash_fraction_double_sign: - type: string - format: byte - slash_fraction_downtime: - type: string - format: byte - description: Params represents the parameters used for by the slashing module. - cosmos.slashing.v1beta1.QueryParamsResponse: + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + GetBlockWithTxsResponse is the response type for the + Service.GetBlockWithTxs method. + + + Since: cosmos-sdk 0.45.2 + cosmos.tx.v1beta1.GetTxResponse: type: object properties: - params: + tx: + $ref: '#/definitions/cosmos.tx.v1beta1.Tx' + description: tx is the queried transaction. + tx_response: + description: tx_response is the queried TxResponses. type: object properties: - signed_blocks_window: + height: type: string format: int64 - min_signed_per_window: + title: The block height + txhash: type: string - format: byte - downtime_jail_duration: + description: The transaction hash. + codespace: type: string - slash_fraction_double_sign: + title: Namespace for the Code + code: + type: integer + format: int64 + description: Response code. + data: type: string - format: byte - slash_fraction_downtime: + description: 'Result bytes, if any.' + raw_log: type: string - format: byte - description: Params represents the parameters used for by the slashing module. - title: QueryParamsResponse is the response type for the Query/Params RPC method - cosmos.slashing.v1beta1.QuerySigningInfoResponse: - type: object - properties: - val_signing_info: - title: val_signing_info is the signing info of requested val cons address - type: object - properties: - address: + description: |- + The output of the application's logger (raw string). May be + non-deterministic. + logs: + type: array + items: + type: object + properties: + msg_index: + type: integer + format: int64 + log: + type: string + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + description: >- + Attribute defines an attribute wrapper where the key + and value are + + strings instead of raw bytes. + description: >- + StringEvent defines en Event object wrapper where all the + attributes + + contain key/value pairs that are strings instead of raw + bytes. + description: >- + Events contains a slice of Event objects that were emitted + during some + + execution. + description: >- + ABCIMessageLog defines a structure containing an indexed tx ABCI + message log. + description: >- + The output of the application's logger (typed). May be + non-deterministic. + info: type: string - start_height: + description: Additional information. May be non-deterministic. + gas_wanted: type: string format: int64 - title: Height at which validator was first a candidate OR was unjailed - index_offset: + description: Amount of gas requested for transaction. + gas_used: type: string format: int64 - description: >- - Index which is incremented each time the validator was a bonded - - in a block and may have signed a precommit or not. This in - conjunction with the - - `SignedBlocksWindow` param determines the index in the - `MissedBlocksBitArray`. - jailed_until: - type: string - format: date-time - description: >- - Timestamp until which the validator is jailed due to liveness - downtime. - tombstoned: - type: boolean - description: >- - Whether or not a validator has been tombstoned (killed out of - validator set). It is set + description: Amount of gas consumed by transaction. + tx: + description: The request transaction bytes. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized - once the validator commits an equivocation or for any other - configured misbehiavor. - missed_blocks_counter: - type: string - format: int64 - description: >- - A counter kept to avoid unnecessary array reads. + protocol buffer message. This string must contain at least - Note that `Sum(MissedBlocksBitArray)` always equals - `MissedBlocksCounter`. - description: >- - ValidatorSigningInfo defines a validator's signing info for monitoring - their + one "/" character. The last segment of the URL's path must + represent - liveness activity. - title: >- - QuerySigningInfoResponse is the response type for the Query/SigningInfo - RPC + the fully qualified name of the type (as in - method - cosmos.slashing.v1beta1.QuerySigningInfosResponse: - type: object - properties: - info: - type: array - items: - type: object - properties: - address: - type: string - start_height: - type: string - format: int64 - title: Height at which validator was first a candidate OR was unjailed - index_offset: - type: string - format: int64 - description: >- - Index which is incremented each time the validator was a bonded + `path/google.protobuf.Duration`). The name should be in a + canonical form - in a block and may have signed a precommit or not. This in - conjunction with the + (e.g., leading "." is not accepted). - `SignedBlocksWindow` param determines the index in the - `MissedBlocksBitArray`. - jailed_until: - type: string - format: date-time - description: >- - Timestamp until which the validator is jailed due to liveness - downtime. - tombstoned: - type: boolean - description: >- - Whether or not a validator has been tombstoned (killed out of - validator set). It is set - once the validator commits an equivocation or for any other - configured misbehiavor. - missed_blocks_counter: - type: string - format: int64 - description: >- - A counter kept to avoid unnecessary array reads. + In practice, teams usually precompile into the binary all + types that they - Note that `Sum(MissedBlocksBitArray)` always equals - `MissedBlocksCounter`. - description: >- - ValidatorSigningInfo defines a validator's signing info for - monitoring their + expect it to use in the context of Any. However, for URLs + which use the - liveness activity. - title: info is the signing info of all validators - pagination: - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + scheme `http`, `https`, or no scheme, one can optionally set + up a type - was set, its value is undefined otherwise - description: |- - PageResponse is to be embedded in gRPC response messages where the - corresponding request message has used PageRequest. + server that maps type URLs to message definitions as follows: - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } - title: >- - QuerySigningInfosResponse is the response type for the Query/SigningInfos - RPC - method - cosmos.slashing.v1beta1.ValidatorSigningInfo: - type: object - properties: - address: - type: string - start_height: - type: string - format: int64 - title: Height at which validator was first a candidate OR was unjailed - index_offset: - type: string - format: int64 - description: >- - Index which is incremented each time the validator was a bonded + * If no scheme is provided, `https` is assumed. - in a block and may have signed a precommit or not. This in conjunction - with the + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - `SignedBlocksWindow` param determines the index in the - `MissedBlocksBitArray`. - jailed_until: - type: string - format: date-time - description: >- - Timestamp until which the validator is jailed due to liveness - downtime. - tombstoned: - type: boolean - description: >- - Whether or not a validator has been tombstoned (killed out of - validator set). It is set + Note: this functionality is not currently available in the + official - once the validator commits an equivocation or for any other configured - misbehiavor. - missed_blocks_counter: - type: string - format: int64 - description: >- - A counter kept to avoid unnecessary array reads. + protobuf release, and it is not used for type URLs beginning + with - Note that `Sum(MissedBlocksBitArray)` always equals - `MissedBlocksCounter`. - description: >- - ValidatorSigningInfo defines a validator's signing info for monitoring - their + type.googleapis.com. - liveness activity. - cosmos.staking.v1beta1.BondStatus: - type: string - enum: - - BOND_STATUS_UNSPECIFIED - - BOND_STATUS_UNBONDED - - BOND_STATUS_UNBONDING - - BOND_STATUS_BONDED - default: BOND_STATUS_UNSPECIFIED - description: |- - BondStatus is the status of a validator. - - BOND_STATUS_UNSPECIFIED: UNSPECIFIED defines an invalid validator status. - - BOND_STATUS_UNBONDED: UNBONDED defines a validator that is not bonded. - - BOND_STATUS_UNBONDING: UNBONDING defines a validator that is unbonding. - - BOND_STATUS_BONDED: BONDED defines a validator that is bonded. - cosmos.staking.v1beta1.Commission: - type: object - properties: - commission_rates: - description: >- - commission_rates defines the initial commission rates to be used for - creating a validator. - type: object - properties: - rate: - type: string - description: 'rate is the commission rate charged to delegators, as a fraction.' - max_rate: - type: string - description: >- - max_rate defines the maximum commission rate which validator can - ever charge, as a fraction. - max_change_rate: - type: string - description: >- - max_change_rate defines the maximum daily increase of the - validator commission, as a fraction. - update_time: - type: string - format: date-time - description: update_time is the last time the commission rate was changed. - description: Commission defines commission parameters for a given validator. - cosmos.staking.v1beta1.CommissionRates: - type: object - properties: - rate: - type: string - description: 'rate is the commission rate charged to delegators, as a fraction.' - max_rate: - type: string - description: >- - max_rate defines the maximum commission rate which validator can ever - charge, as a fraction. - max_change_rate: - type: string - description: >- - max_change_rate defines the maximum daily increase of the validator - commission, as a fraction. - description: >- - CommissionRates defines the initial commission rates to be used for - creating + Schemes other than `http`, `https` (or the empty scheme) might + be - a validator. - cosmos.staking.v1beta1.Delegation: - type: object - properties: - delegator_address: - type: string - description: delegator_address is the bech32-encoded address of the delegator. - validator_address: - type: string - description: validator_address is the bech32-encoded address of the validator. - shares: - type: string - description: shares define the delegation shares received. - description: |- - Delegation represents the bond with tokens held by an account. It is - owned by one delegator, and is associated with the voting power of one - validator. - cosmos.staking.v1beta1.DelegationResponse: - type: object - properties: - delegation: - type: object - properties: - delegator_address: - type: string - description: delegator_address is the bech32-encoded address of the delegator. - validator_address: - type: string - description: validator_address is the bech32-encoded address of the validator. - shares: - type: string - description: shares define the delegation shares received. - description: |- - Delegation represents the bond with tokens held by an account. It is - owned by one delegator, and is associated with the voting power of one - validator. - balance: - type: object - properties: - denom: - type: string - amount: + used with implementation specific semantics. + additionalProperties: {} + timestamp: type: string - description: |- - Coin defines a token with a denomination and an amount. + description: >- + Time of the previous block. For heights > 1, it's the weighted + median of - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - description: |- - DelegationResponse is equivalent to Delegation except that it contains a - balance in addition to shares which is more suitable for client responses. - cosmos.staking.v1beta1.Description: - type: object - properties: - moniker: - type: string - description: moniker defines a human-readable name for the validator. - identity: - type: string - description: >- - identity defines an optional identity signature (ex. UPort or - Keybase). - website: - type: string - description: website defines an optional website link. - security_contact: - type: string - description: security_contact defines an optional email for security contact. - details: - type: string - description: details define other optional details. - description: Description defines a validator description. - cosmos.staking.v1beta1.HistoricalInfo: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 + the timestamps of the valid votes in the block.LastCommit. For + height == 1, + + it's genesis time. + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + format: byte + value: + type: string + format: byte + index: + type: boolean + title: nondeterministic + description: >- + EventAttribute is a single key-value pair, associated with + an event. + description: >- + Event allows application developers to attach additional + information to + + ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and + ResponseDeliverTx. + + Later, transactions may be queried using these events. description: >- - Consensus captures the consensus rules for processing a block in - the blockchain, + Events defines all the events emitted by processing a transaction. + Note, - including all blockchain data structures and the rules of the - application's + these events include those emitted by processing all the messages + and those - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - title: prev block info - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - last_commit_hash: - type: string - format: byte - description: commit from validators from the last block - title: hashes of block data - data_hash: - type: string - format: byte - title: transactions - validators_hash: - type: string - format: byte - description: validators for the current block - title: hashes from the app output from the prev block - next_validators_hash: - type: string - format: byte - title: validators for the next block - consensus_hash: - type: string - format: byte - title: consensus params for current block - app_hash: - type: string - format: byte - title: state after txs from the previous block - last_results_hash: - type: string - format: byte - title: root hash of all results from the txs from the previous block - evidence_hash: - type: string - format: byte - description: evidence included in the block - title: consensus info - proposer_address: - type: string - format: byte - title: original proposer of the block - description: Header defines the structure of a block header. - valset: + emitted from the ante handler. Whereas Logs contains the events, + with + + additional metadata, emitted only by processing the messages. + + + Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 + description: GetTxResponse is the response type for the Service.GetTx method. + cosmos.tx.v1beta1.GetTxsEventResponse: + type: object + properties: + txs: + type: array + items: + type: object + $ref: '#/definitions/cosmos.tx.v1beta1.Tx' + description: txs is the list of queried transactions. + tx_responses: type: array items: type: object properties: - operator_address: + height: type: string + format: int64 + title: The block height + txhash: + type: string + description: The transaction hash. + codespace: + type: string + title: Namespace for the Code + code: + type: integer + format: int64 + description: Response code. + data: + type: string + description: 'Result bytes, if any.' + raw_log: + type: string + description: |- + The output of the application's logger (raw string). May be + non-deterministic. + logs: + type: array + items: + type: object + properties: + msg_index: + type: integer + format: int64 + log: + type: string + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + description: >- + Attribute defines an attribute wrapper where the + key and value are + + strings instead of raw bytes. + description: >- + StringEvent defines en Event object wrapper where all + the attributes + + contain key/value pairs that are strings instead of raw + bytes. + description: >- + Events contains a slice of Event objects that were emitted + during some + + execution. + description: >- + ABCIMessageLog defines a structure containing an indexed tx + ABCI message log. description: >- - operator_address defines the address of the validator's - operator; bech encoded in JSON. - consensus_pubkey: - description: >- - consensus_pubkey is the consensus public key of the validator, - as a Protobuf Any. + The output of the application's logger (typed). May be + non-deterministic. + info: + type: string + description: Additional information. May be non-deterministic. + gas_wanted: + type: string + format: int64 + description: Amount of gas requested for transaction. + gas_used: + type: string + format: int64 + description: Amount of gas consumed by transaction. + tx: + description: The request transaction bytes. type: object properties: '@type': @@ -29081,319 +43739,83 @@ definitions: breaking changes.) Note: this functionality is not currently available in the - official - - protobuf release, and it is not used for type URLs beginning - with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - additionalProperties: {} - jailed: - type: boolean - description: >- - jailed defined whether the validator has been jailed from bonded - status or not. - status: - description: status is the validator status (bonded/unbonding/unbonded). - type: string - enum: - - BOND_STATUS_UNSPECIFIED - - BOND_STATUS_UNBONDED - - BOND_STATUS_UNBONDING - - BOND_STATUS_BONDED - default: BOND_STATUS_UNSPECIFIED - tokens: - type: string - description: tokens define the delegated tokens (incl. self-delegation). - delegator_shares: - type: string - description: >- - delegator_shares defines total shares issued to a validator's - delegators. - description: - description: description defines the description terms for the validator. - type: object - properties: - moniker: - type: string - description: moniker defines a human-readable name for the validator. - identity: - type: string - description: >- - identity defines an optional identity signature (ex. UPort - or Keybase). - website: - type: string - description: website defines an optional website link. - security_contact: - type: string - description: >- - security_contact defines an optional email for security - contact. - details: - type: string - description: details define other optional details. - unbonding_height: - type: string - format: int64 - description: >- - unbonding_height defines, if unbonding, the height at which this - validator has begun unbonding. - unbonding_time: - type: string - format: date-time - description: >- - unbonding_time defines, if unbonding, the min time for the - validator to complete unbonding. - commission: - description: commission defines the commission parameters. - type: object - properties: - commission_rates: - description: >- - commission_rates defines the initial commission rates to be - used for creating a validator. - type: object - properties: - rate: - type: string - description: >- - rate is the commission rate charged to delegators, as a - fraction. - max_rate: - type: string - description: >- - max_rate defines the maximum commission rate which - validator can ever charge, as a fraction. - max_change_rate: - type: string - description: >- - max_change_rate defines the maximum daily increase of - the validator commission, as a fraction. - update_time: - type: string - format: date-time - description: >- - update_time is the last time the commission rate was - changed. - min_self_delegation: - type: string - description: >- - min_self_delegation is the validator's self declared minimum - self delegation. - unbonding_on_hold_ref_count: - type: string - format: int64 - title: >- - strictly positive if this validator's unbonding has been stopped - by external modules - unbonding_ids: - type: array - items: - type: string - format: uint64 - title: >- - list of unbonding ids, each uniquely identifing an unbonding of - this validator - description: >- - Validator defines a validator, together with the total amount of the - - Validator's bond shares and their exchange rate to coins. Slashing - results in - - a decrease in the exchange rate, allowing correct calculation of - future - - undelegations without iterating over delegators. When coins are - delegated to - - this validator, the validator is credited with a delegation whose - number of - - bond shares is based on the amount of coins delegated divided by the - current - - exchange rate. Voting power can be calculated as total bonded shares - - multiplied by exchange rate. - description: >- - HistoricalInfo contains header and validator information for a given - block. - - It is stored as part of staking module's state, which persists the `n` - most - - recent HistoricalInfo - - (`n` is set by the staking module's `historical_entries` parameter). - cosmos.staking.v1beta1.MsgBeginRedelegateResponse: - type: object - properties: - completion_time: - type: string - format: date-time - description: MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. - cosmos.staking.v1beta1.MsgCreateValidatorResponse: - type: object - description: MsgCreateValidatorResponse defines the Msg/CreateValidator response type. - cosmos.staking.v1beta1.MsgDelegateResponse: - type: object - description: MsgDelegateResponse defines the Msg/Delegate response type. - cosmos.staking.v1beta1.MsgEditValidatorResponse: - type: object - description: MsgEditValidatorResponse defines the Msg/EditValidator response type. - cosmos.staking.v1beta1.MsgUndelegateResponse: - type: object - properties: - completion_time: - type: string - format: date-time - description: MsgUndelegateResponse defines the Msg/Undelegate response type. - cosmos.staking.v1beta1.Params: - type: object - properties: - unbonding_time: - type: string - description: unbonding_time is the time duration of unbonding. - max_validators: - type: integer - format: int64 - description: max_validators is the maximum number of validators. - max_entries: - type: integer - format: int64 - description: >- - max_entries is the max entries for either unbonding delegation or - redelegation (per pair/trio). - historical_entries: - type: integer - format: int64 - description: historical_entries is the number of historical entries to persist. - bond_denom: - type: string - description: bond_denom defines the bondable coin denomination. - description: Params defines the parameters for the staking module. - cosmos.staking.v1beta1.Pool: - type: object - properties: - not_bonded_tokens: - type: string - bonded_tokens: - type: string - description: |- - Pool is used for tracking bonded and not-bonded token supply of the bond - denomination. - cosmos.staking.v1beta1.QueryDelegationResponse: - type: object - properties: - delegation_response: - description: delegation_responses defines the delegation info of a delegation. - type: object - properties: - delegation: - type: object - properties: - delegator_address: - type: string - description: >- - delegator_address is the bech32-encoded address of the - delegator. - validator_address: - type: string - description: >- - validator_address is the bech32-encoded address of the - validator. - shares: - type: string - description: shares define the delegation shares received. - description: >- - Delegation represents the bond with tokens held by an account. It - is - - owned by one delegator, and is associated with the voting power of - one - - validator. - balance: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. + official + protobuf release, and it is not used for type URLs beginning + with - NOTE: The amount field is an Int which implements the custom - method + type.googleapis.com. - signatures required by gogoproto. - description: >- - QueryDelegationResponse is response type for the Query/Delegation RPC - method. - cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse: - type: object - properties: - delegation_responses: - type: array - items: - type: object - properties: - delegation: - type: object - properties: - delegator_address: - type: string - description: >- - delegator_address is the bech32-encoded address of the - delegator. - validator_address: - type: string - description: >- - validator_address is the bech32-encoded address of the - validator. - shares: - type: string - description: shares define the delegation shares received. + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + timestamp: + type: string description: >- - Delegation represents the bond with tokens held by an account. - It is + Time of the previous block. For heights > 1, it's the weighted + median of - owned by one delegator, and is associated with the voting power - of one + the timestamps of the valid votes in the block.LastCommit. For + height == 1, - validator. - balance: - type: object - properties: - denom: - type: string - amount: - type: string + it's genesis time. + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + format: byte + value: + type: string + format: byte + index: + type: boolean + title: nondeterministic + description: >- + EventAttribute is a single key-value pair, associated + with an event. + description: >- + Event allows application developers to attach additional + information to + + ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and + ResponseDeliverTx. + + Later, transactions may be queried using these events. description: >- - Coin defines a token with a denomination and an amount. + Events defines all the events emitted by processing a + transaction. Note, + + these events include those emitted by processing all the + messages and those + emitted from the ante handler. Whereas Logs contains the events, + with - NOTE: The amount field is an Int which implements the custom - method + additional metadata, emitted only by processing the messages. - signatures required by gogoproto. + + Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 description: >- - DelegationResponse is equivalent to Delegation except that it - contains a + TxResponse defines a structure containing relevant tx data and + metadata. The - balance in addition to shares which is more suitable for client - responses. - description: delegation_responses defines all the delegations' info of a delegator. + tags are stringified and the log is JSON decoded. + description: tx_responses is the list of queried TxResponses. pagination: - description: pagination defines the pagination in the response. + description: pagination defines a pagination for the response. type: object properties: next_key: @@ -29411,291 +43833,342 @@ definitions: was set, its value is undefined otherwise description: |- - QueryDelegatorDelegationsResponse is response type for the - Query/DelegatorDelegations RPC method. - cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse: + GetTxsEventResponse is the response type for the Service.TxsByEvents + RPC method. + cosmos.tx.v1beta1.ModeInfo: type: object properties: - unbonding_responses: + single: + title: single represents a single signer + type: object + properties: + mode: + title: mode is the signing mode of the single signer + type: string + enum: + - SIGN_MODE_UNSPECIFIED + - SIGN_MODE_DIRECT + - SIGN_MODE_TEXTUAL + - SIGN_MODE_LEGACY_AMINO_JSON + - SIGN_MODE_EIP_191 + default: SIGN_MODE_UNSPECIFIED + description: >- + SignMode represents a signing mode with its own security + guarantees. + + - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be + rejected + - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is + verified with raw bytes from Tx + - SIGN_MODE_TEXTUAL: SIGN_MODE_TEXTUAL is a future signing mode that will verify some + human-readable textual representation on top of the binary + representation + + from SIGN_MODE_DIRECT + - SIGN_MODE_LEGACY_AMINO_JSON: SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses + Amino JSON and will be removed in the future + - SIGN_MODE_EIP_191: SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos + SDK. Ref: https://eips.ethereum.org/EIPS/eip-191 + + + Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum + variant, + + but is not implemented on the SDK by default. To enable EIP-191, + you need + + to pass a custom `TxConfig` that has an implementation of + + `SignModeHandler` for EIP-191. The SDK may decide to fully support + + EIP-191 in the future. + + + Since: cosmos-sdk 0.45.2 + multi: + $ref: '#/definitions/cosmos.tx.v1beta1.ModeInfo.Multi' + title: multi represents a nested multisig signer + description: ModeInfo describes the signing mode of a single or nested multisig signer. + cosmos.tx.v1beta1.ModeInfo.Multi: + type: object + properties: + bitarray: + title: bitarray specifies which keys within the multisig are signing + type: object + properties: + extra_bits_stored: + type: integer + format: int64 + elems: + type: string + format: byte + description: >- + CompactBitArray is an implementation of a space efficient bit array. + + This is used to ensure that the encoded data takes up a minimal amount + of + + space after proto encoding. + + This is not thread safe, and is not intended for concurrent usage. + mode_infos: type: array items: type: object - properties: - delegator_address: - type: string - description: >- - delegator_address is the bech32-encoded address of the - delegator. - validator_address: - type: string - description: >- - validator_address is the bech32-encoded address of the - validator. - entries: - type: array - items: - type: object - properties: - creation_height: - type: string - format: int64 - description: >- - creation_height is the height which the unbonding took - place. - completion_time: - type: string - format: date-time - description: completion_time is the unix time for unbonding completion. - initial_balance: - type: string - description: >- - initial_balance defines the tokens initially scheduled to - receive at completion. - balance: - type: string - description: balance defines the tokens to receive at completion. - unbonding_id: - type: string - format: uint64 - title: Incrementing id that uniquely identifies this entry - unbonding_on_hold_ref_count: - type: string - format: int64 - title: >- - Strictly positive if this entry's unbonding has been - stopped by external modules - description: >- - UnbondingDelegationEntry defines an unbonding object with - relevant metadata. - description: |- - entries are the unbonding delegation entries. + $ref: '#/definitions/cosmos.tx.v1beta1.ModeInfo' + title: |- + mode_infos is the corresponding modes of the signers of the multisig + which could include nested multisig public keys + title: Multi is the mode info for a multisig public key + cosmos.tx.v1beta1.ModeInfo.Single: + type: object + properties: + mode: + title: mode is the signing mode of the single signer + type: string + enum: + - SIGN_MODE_UNSPECIFIED + - SIGN_MODE_DIRECT + - SIGN_MODE_TEXTUAL + - SIGN_MODE_LEGACY_AMINO_JSON + - SIGN_MODE_EIP_191 + default: SIGN_MODE_UNSPECIFIED + description: >- + SignMode represents a signing mode with its own security guarantees. - unbonding delegation entries - description: >- - UnbondingDelegation stores all of a single delegator's unbonding - bonds + - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be + rejected + - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is + verified with raw bytes from Tx + - SIGN_MODE_TEXTUAL: SIGN_MODE_TEXTUAL is a future signing mode that will verify some + human-readable textual representation on top of the binary + representation - for a single validator in an time-ordered list. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + from SIGN_MODE_DIRECT + - SIGN_MODE_LEGACY_AMINO_JSON: SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses + Amino JSON and will be removed in the future + - SIGN_MODE_EIP_191: SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos + SDK. Ref: https://eips.ethereum.org/EIPS/eip-191 - was set, its value is undefined otherwise - description: |- - QueryUnbondingDelegatorDelegationsResponse is response type for the - Query/UnbondingDelegatorDelegations RPC method. - cosmos.staking.v1beta1.QueryDelegatorValidatorResponse: + + Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant, + + but is not implemented on the SDK by default. To enable EIP-191, you + need + + to pass a custom `TxConfig` that has an implementation of + + `SignModeHandler` for EIP-191. The SDK may decide to fully support + + EIP-191 in the future. + + + Since: cosmos-sdk 0.45.2 + title: |- + Single is the mode info for a single signer. It is structured as a message + to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the + future + cosmos.tx.v1beta1.OrderBy: + type: string + enum: + - ORDER_BY_UNSPECIFIED + - ORDER_BY_ASC + - ORDER_BY_DESC + default: ORDER_BY_UNSPECIFIED + description: >- + - ORDER_BY_UNSPECIFIED: ORDER_BY_UNSPECIFIED specifies an unknown sorting + order. OrderBy defaults to ASC in this case. + - ORDER_BY_ASC: ORDER_BY_ASC defines ascending order + - ORDER_BY_DESC: ORDER_BY_DESC defines descending order + title: OrderBy defines the sorting order + cosmos.tx.v1beta1.SignerInfo: type: object properties: - validator: - description: validator defines the the validator info. + public_key: + description: >- + public_key is the public key of the signer. It is optional for + accounts + + that already exist in state. If unset, the verifier can use the + required \ + + signer address for this position and lookup the public key. type: object properties: - operator_address: + '@type': type: string description: >- - operator_address defines the address of the validator's operator; - bech encoded in JSON. - consensus_pubkey: - description: >- - consensus_pubkey is the consensus public key of the validator, as - a Protobuf Any. - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + A URL/resource name that uniquely identifies the type of the + serialized - protocol buffer message. This string must contain at least + protocol buffer message. This string must contain at least - one "/" character. The last segment of the URL's path must - represent + one "/" character. The last segment of the URL's path must + represent - the fully qualified name of the type (as in + the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be in a - canonical form + `path/google.protobuf.Duration`). The name should be in a + canonical form - (e.g., leading "." is not accepted). + (e.g., leading "." is not accepted). - In practice, teams usually precompile into the binary all - types that they + In practice, teams usually precompile into the binary all types + that they - expect it to use in the context of Any. However, for URLs - which use the + expect it to use in the context of Any. However, for URLs which + use the - scheme `http`, `https`, or no scheme, one can optionally set - up a type + scheme `http`, `https`, or no scheme, one can optionally set up a + type - server that maps type URLs to message definitions as follows: + server that maps type URLs to message definitions as follows: - * If no scheme is provided, `https` is assumed. + * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - Note: this functionality is not currently available in the - official + Note: this functionality is not currently available in the + official - protobuf release, and it is not used for type URLs beginning - with + protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. - Schemes other than `http`, `https` (or the empty scheme) might - be + Schemes other than `http`, `https` (or the empty scheme) might be - used with implementation specific semantics. - additionalProperties: {} - jailed: - type: boolean - description: >- - jailed defined whether the validator has been jailed from bonded - status or not. - status: - description: status is the validator status (bonded/unbonding/unbonded). - type: string - enum: - - BOND_STATUS_UNSPECIFIED - - BOND_STATUS_UNBONDED - - BOND_STATUS_UNBONDING - - BOND_STATUS_BONDED - default: BOND_STATUS_UNSPECIFIED - tokens: - type: string - description: tokens define the delegated tokens (incl. self-delegation). - delegator_shares: - type: string - description: >- - delegator_shares defines total shares issued to a validator's - delegators. - description: - description: description defines the description terms for the validator. - type: object - properties: - moniker: - type: string - description: moniker defines a human-readable name for the validator. - identity: - type: string - description: >- - identity defines an optional identity signature (ex. UPort or - Keybase). - website: - type: string - description: website defines an optional website link. - security_contact: - type: string - description: >- - security_contact defines an optional email for security - contact. - details: - type: string - description: details define other optional details. - unbonding_height: + used with implementation specific semantics. + additionalProperties: {} + mode_info: + $ref: '#/definitions/cosmos.tx.v1beta1.ModeInfo' + title: |- + mode_info describes the signing mode of the signer and is a nested + structure to support nested multisig pubkey's + sequence: + type: string + format: uint64 + description: >- + sequence is the sequence of the account, which describes the + + number of committed transactions signed by a given address. It is used + to + + prevent replay attacks. + description: |- + SignerInfo describes the public key and signing mode of a single top-level + signer. + cosmos.tx.v1beta1.SimulateRequest: + type: object + properties: + tx: + $ref: '#/definitions/cosmos.tx.v1beta1.Tx' + description: |- + tx is the transaction to simulate. + Deprecated. Send raw tx bytes instead. + tx_bytes: + type: string + format: byte + description: |- + tx_bytes is the raw transaction. + + Since: cosmos-sdk 0.43 + description: |- + SimulateRequest is the request type for the Service.Simulate + RPC method. + cosmos.tx.v1beta1.SimulateResponse: + type: object + properties: + gas_info: + description: gas_info is the information about gas used in the simulation. + type: object + properties: + gas_wanted: type: string - format: int64 + format: uint64 description: >- - unbonding_height defines, if unbonding, the height at which this - validator has begun unbonding. - unbonding_time: + GasWanted is the maximum units of work we allow this tx to + perform. + gas_used: type: string - format: date-time - description: >- - unbonding_time defines, if unbonding, the min time for the - validator to complete unbonding. - commission: - description: commission defines the commission parameters. - type: object - properties: - commission_rates: - description: >- - commission_rates defines the initial commission rates to be - used for creating a validator. - type: object - properties: - rate: - type: string - description: >- - rate is the commission rate charged to delegators, as a - fraction. - max_rate: - type: string - description: >- - max_rate defines the maximum commission rate which - validator can ever charge, as a fraction. - max_change_rate: - type: string - description: >- - max_change_rate defines the maximum daily increase of the - validator commission, as a fraction. - update_time: - type: string - format: date-time - description: update_time is the last time the commission rate was changed. - min_self_delegation: + format: uint64 + description: GasUsed is the amount of gas actually consumed. + result: + description: result is the result of the simulation. + type: object + properties: + data: type: string + format: byte description: >- - min_self_delegation is the validator's self declared minimum self - delegation. - unbonding_on_hold_ref_count: + Data is any data returned from message or handler execution. It + MUST be + + length prefixed in order to separate data from multiple message + executions. + log: type: string - format: int64 - title: >- - strictly positive if this validator's unbonding has been stopped - by external modules - unbonding_ids: + description: >- + Log contains the log information from message or handler + execution. + events: type: array items: - type: string - format: uint64 - title: >- - list of unbonding ids, each uniquely identifing an unbonding of - this validator + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + format: byte + value: + type: string + format: byte + index: + type: boolean + title: nondeterministic + description: >- + EventAttribute is a single key-value pair, associated with + an event. + description: >- + Event allows application developers to attach additional + information to + + ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and + ResponseDeliverTx. + + Later, transactions may be queried using these events. + description: >- + Events contains a slice of Event objects that were emitted during + message + + or handler execution. description: |- - QueryDelegatorValidatorResponse response type for the - Query/DelegatorValidator RPC method. - cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse: + SimulateResponse is the response type for the + Service.SimulateRPC method. + cosmos.tx.v1beta1.Tx: type: object properties: - validators: - type: array - items: - type: object - properties: - operator_address: - type: string - description: >- - operator_address defines the address of the validator's - operator; bech encoded in JSON. - consensus_pubkey: - description: >- - consensus_pubkey is the consensus public key of the validator, - as a Protobuf Any. + body: + title: body is the processable content of the transaction + type: object + properties: + messages: + type: array + items: type: object properties: '@type': @@ -29746,1948 +44219,1068 @@ definitions: official protobuf release, and it is not used for type URLs beginning - with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - additionalProperties: {} - jailed: - type: boolean - description: >- - jailed defined whether the validator has been jailed from bonded - status or not. - status: - description: status is the validator status (bonded/unbonding/unbonded). - type: string - enum: - - BOND_STATUS_UNSPECIFIED - - BOND_STATUS_UNBONDED - - BOND_STATUS_UNBONDING - - BOND_STATUS_BONDED - default: BOND_STATUS_UNSPECIFIED - tokens: - type: string - description: tokens define the delegated tokens (incl. self-delegation). - delegator_shares: - type: string - description: >- - delegator_shares defines total shares issued to a validator's - delegators. - description: - description: description defines the description terms for the validator. - type: object - properties: - moniker: - type: string - description: moniker defines a human-readable name for the validator. - identity: - type: string - description: >- - identity defines an optional identity signature (ex. UPort - or Keybase). - website: - type: string - description: website defines an optional website link. - security_contact: - type: string - description: >- - security_contact defines an optional email for security - contact. - details: - type: string - description: details define other optional details. - unbonding_height: - type: string - format: int64 - description: >- - unbonding_height defines, if unbonding, the height at which this - validator has begun unbonding. - unbonding_time: - type: string - format: date-time - description: >- - unbonding_time defines, if unbonding, the min time for the - validator to complete unbonding. - commission: - description: commission defines the commission parameters. - type: object - properties: - commission_rates: - description: >- - commission_rates defines the initial commission rates to be - used for creating a validator. - type: object - properties: - rate: - type: string - description: >- - rate is the commission rate charged to delegators, as a - fraction. - max_rate: - type: string - description: >- - max_rate defines the maximum commission rate which - validator can ever charge, as a fraction. - max_change_rate: - type: string - description: >- - max_change_rate defines the maximum daily increase of - the validator commission, as a fraction. - update_time: - type: string - format: date-time - description: >- - update_time is the last time the commission rate was - changed. - min_self_delegation: - type: string - description: >- - min_self_delegation is the validator's self declared minimum - self delegation. - unbonding_on_hold_ref_count: - type: string - format: int64 - title: >- - strictly positive if this validator's unbonding has been stopped - by external modules - unbonding_ids: - type: array - items: - type: string - format: uint64 - title: >- - list of unbonding ids, each uniquely identifing an unbonding of - this validator - description: >- - Validator defines a validator, together with the total amount of the + with - Validator's bond shares and their exchange rate to coins. Slashing - results in + type.googleapis.com. - a decrease in the exchange rate, allowing correct calculation of - future - undelegations without iterating over delegators. When coins are - delegated to + Schemes other than `http`, `https` (or the empty scheme) + might be - this validator, the validator is credited with a delegation whose - number of + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a - bond shares is based on the amount of coins delegated divided by the - current + URL that describes the type of the serialized message. - exchange rate. Voting power can be calculated as total bonded shares - multiplied by exchange rate. - description: validators defines the the validators' info of a delegator. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + Protobuf library provides support to pack/unpack Any values in + the form - was set, its value is undefined otherwise - description: |- - QueryDelegatorValidatorsResponse is response type for the - Query/DelegatorValidators RPC method. - cosmos.staking.v1beta1.QueryHistoricalInfoResponse: - type: object - properties: - hist: - description: hist defines the historical info at the given height. - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules for processing a block - in the blockchain, + of utility functions or additional generated methods of the Any + type. - including all blockchain data structures and the rules of the - application's - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - title: prev block info - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - last_commit_hash: - type: string - format: byte - description: commit from validators from the last block - title: hashes of block data - data_hash: - type: string - format: byte - title: transactions - validators_hash: - type: string - format: byte - description: validators for the current block - title: hashes from the app output from the prev block - next_validators_hash: - type: string - format: byte - title: validators for the next block - consensus_hash: - type: string - format: byte - title: consensus params for current block - app_hash: - type: string - format: byte - title: state after txs from the previous block - last_results_hash: - type: string - format: byte - title: root hash of all results from the txs from the previous block - evidence_hash: - type: string - format: byte - description: evidence included in the block - title: consensus info - proposer_address: - type: string - format: byte - title: original proposer of the block - description: Header defines the structure of a block header. - valset: + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: >- + messages is a list of messages to be executed. The required + signers of + + those messages define the number and order of elements in + AuthInfo's + + signer_infos and Tx's signatures. Each required signer address is + added to + + the list only the first time it occurs. + + By convention, the first required signer (usually from the first + message) + + is referred to as the primary signer and pays the fee for the + whole + + transaction. + memo: + type: string + description: >- + memo is any arbitrary note/comment to be added to the transaction. + + WARNING: in clients, any publicly exposed text should not be + called memo, + + but should be called `note` instead (see + https://github.com/cosmos/cosmos-sdk/issues/9122). + timeout_height: + type: string + format: uint64 + title: |- + timeout is the block height after which this transaction will not + be processed by the chain + extension_options: type: array items: type: object properties: - operator_address: + '@type': type: string description: >- - operator_address defines the address of the validator's - operator; bech encoded in JSON. - consensus_pubkey: - description: >- - consensus_pubkey is the consensus public key of the - validator, as a Protobuf Any. - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized + A URL/resource name that uniquely identifies the type of the + serialized - protocol buffer message. This string must contain at - least + protocol buffer message. This string must contain at least - one "/" character. The last segment of the URL's path - must represent + one "/" character. The last segment of the URL's path must + represent - the fully qualified name of the type (as in + the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be in - a canonical form + `path/google.protobuf.Duration`). The name should be in a + canonical form - (e.g., leading "." is not accepted). + (e.g., leading "." is not accepted). - In practice, teams usually precompile into the binary - all types that they + In practice, teams usually precompile into the binary all + types that they - expect it to use in the context of Any. However, for - URLs which use the + expect it to use in the context of Any. However, for URLs + which use the - scheme `http`, `https`, or no scheme, one can optionally - set up a type + scheme `http`, `https`, or no scheme, one can optionally set + up a type - server that maps type URLs to message definitions as - follows: + server that maps type URLs to message definitions as + follows: - * If no scheme is provided, `https` is assumed. + * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - Note: this functionality is not currently available in - the official + Note: this functionality is not currently available in the + official - protobuf release, and it is not used for type URLs - beginning with + protobuf release, and it is not used for type URLs beginning + with - type.googleapis.com. + type.googleapis.com. - Schemes other than `http`, `https` (or the empty scheme) - might be + Schemes other than `http`, `https` (or the empty scheme) + might be - used with implementation specific semantics. - additionalProperties: {} - jailed: - type: boolean - description: >- - jailed defined whether the validator has been jailed from - bonded status or not. - status: - description: status is the validator status (bonded/unbonding/unbonded). - type: string - enum: - - BOND_STATUS_UNSPECIFIED - - BOND_STATUS_UNBONDED - - BOND_STATUS_UNBONDING - - BOND_STATUS_BONDED - default: BOND_STATUS_UNSPECIFIED - tokens: - type: string - description: tokens define the delegated tokens (incl. self-delegation). - delegator_shares: - type: string - description: >- - delegator_shares defines total shares issued to a - validator's delegators. - description: - description: description defines the description terms for the validator. - type: object - properties: - moniker: - type: string - description: moniker defines a human-readable name for the validator. - identity: - type: string - description: >- - identity defines an optional identity signature (ex. - UPort or Keybase). - website: - type: string - description: website defines an optional website link. - security_contact: - type: string - description: >- - security_contact defines an optional email for security - contact. - details: - type: string - description: details define other optional details. - unbonding_height: - type: string - format: int64 - description: >- - unbonding_height defines, if unbonding, the height at which - this validator has begun unbonding. - unbonding_time: - type: string - format: date-time - description: >- - unbonding_time defines, if unbonding, the min time for the - validator to complete unbonding. - commission: - description: commission defines the commission parameters. - type: object - properties: - commission_rates: - description: >- - commission_rates defines the initial commission rates to - be used for creating a validator. - type: object - properties: - rate: - type: string - description: >- - rate is the commission rate charged to delegators, - as a fraction. - max_rate: - type: string - description: >- - max_rate defines the maximum commission rate which - validator can ever charge, as a fraction. - max_change_rate: - type: string - description: >- - max_change_rate defines the maximum daily increase - of the validator commission, as a fraction. - update_time: - type: string - format: date-time - description: >- - update_time is the last time the commission rate was - changed. - min_self_delegation: - type: string - description: >- - min_self_delegation is the validator's self declared minimum - self delegation. - unbonding_on_hold_ref_count: - type: string - format: int64 - title: >- - strictly positive if this validator's unbonding has been - stopped by external modules - unbonding_ids: - type: array - items: - type: string - format: uint64 - title: >- - list of unbonding ids, each uniquely identifing an unbonding - of this validator + used with implementation specific semantics. + additionalProperties: {} description: >- - Validator defines a validator, together with the total amount of - the + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - Validator's bond shares and their exchange rate to coins. - Slashing results in + The pack methods provided by protobuf library will by default + use - a decrease in the exchange rate, allowing correct calculation of - future + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - undelegations without iterating over delegators. When coins are - delegated to + methods only use the fully qualified type name after the last + '/' - this validator, the validator is credited with a delegation - whose number of + in the type URL, for example "foo.bar.com/x/y.z" will yield type - bond shares is based on the amount of coins delegated divided by - the current + name "y.z". - exchange rate. Voting power can be calculated as total bonded - shares - multiplied by exchange rate. - description: >- - QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo - RPC - method. - cosmos.staking.v1beta1.QueryParamsResponse: - type: object - properties: - params: - description: params holds all the parameters of this module. - type: object - properties: - unbonding_time: - type: string - description: unbonding_time is the time duration of unbonding. - max_validators: - type: integer - format: int64 - description: max_validators is the maximum number of validators. - max_entries: - type: integer - format: int64 - description: >- - max_entries is the max entries for either unbonding delegation or - redelegation (per pair/trio). - historical_entries: - type: integer - format: int64 - description: historical_entries is the number of historical entries to persist. - bond_denom: - type: string - description: bond_denom defines the bondable coin denomination. - description: QueryParamsResponse is response type for the Query/Params RPC method. - cosmos.staking.v1beta1.QueryPoolResponse: - type: object - properties: - pool: - description: pool defines the pool info. - type: object - properties: - not_bonded_tokens: - type: string - bonded_tokens: - type: string - description: QueryPoolResponse is response type for the Query/Pool RPC method. - cosmos.staking.v1beta1.QueryRedelegationsResponse: - type: object - properties: - redelegation_responses: - type: array - items: - type: object - properties: - redelegation: - type: object - properties: - delegator_address: - type: string - description: >- - delegator_address is the bech32-encoded address of the - delegator. - validator_src_address: - type: string - description: >- - validator_src_address is the validator redelegation source - operator address. - validator_dst_address: - type: string - description: >- - validator_dst_address is the validator redelegation - destination operator address. - entries: - type: array - items: - type: object - properties: - creation_height: - type: string - format: int64 - description: >- - creation_height defines the height which the - redelegation took place. - completion_time: - type: string - format: date-time - description: >- - completion_time defines the unix time for redelegation - completion. - initial_balance: - type: string - description: >- - initial_balance defines the initial balance when - redelegation started. - shares_dst: - type: string - description: >- - shares_dst is the amount of destination-validator - shares created by redelegation. - unbonding_id: - type: string - format: uint64 - title: Incrementing id that uniquely identifies this entry - unbonding_on_hold_ref_count: - type: string - format: int64 - title: >- - Strictly positive if this entry's unbonding has been - stopped by external modules - description: >- - RedelegationEntry defines a redelegation object with - relevant metadata. - description: |- - entries are the redelegation entries. + JSON - redelegation entries - description: >- - Redelegation contains the list of a particular delegator's - redelegating bonds + ==== - from a particular source validator to a particular destination - validator. - entries: - type: array - items: - type: object - properties: - redelegation_entry: - type: object - properties: - creation_height: - type: string - format: int64 - description: >- - creation_height defines the height which the - redelegation took place. - completion_time: - type: string - format: date-time - description: >- - completion_time defines the unix time for redelegation - completion. - initial_balance: - type: string - description: >- - initial_balance defines the initial balance when - redelegation started. - shares_dst: - type: string - description: >- - shares_dst is the amount of destination-validator - shares created by redelegation. - unbonding_id: - type: string - format: uint64 - title: Incrementing id that uniquely identifies this entry - unbonding_on_hold_ref_count: - type: string - format: int64 - title: >- - Strictly positive if this entry's unbonding has been - stopped by external modules - description: >- - RedelegationEntry defines a redelegation object with - relevant metadata. - balance: - type: string - description: >- - RedelegationEntryResponse is equivalent to a RedelegationEntry - except that it + The JSON representation of an `Any` value uses the regular - contains a balance in addition to shares which is more - suitable for client + representation of the deserialized, embedded message, with an - responses. - description: >- - RedelegationResponse is equivalent to a Redelegation except that its - entries + additional field `@type` which contains the type URL. Example: - contain a balance in addition to shares which is more suitable for - client + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - responses. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - was set, its value is undefined otherwise - description: >- - QueryRedelegationsResponse is response type for the Query/Redelegations - RPC + If the embedded message type is well-known and has a custom JSON - method. - cosmos.staking.v1beta1.QueryUnbondingDelegationResponse: - type: object - properties: - unbond: - description: unbond defines the unbonding information of a delegation. - type: object - properties: - delegator_address: - type: string - description: delegator_address is the bech32-encoded address of the delegator. - validator_address: - type: string - description: validator_address is the bech32-encoded address of the validator. - entries: + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: >- + extension_options are arbitrary options that can be added by + chains + + when the default options are not sufficient. If any of these are + present + + and can't be handled, the transaction will be rejected + non_critical_extension_options: type: array items: type: object properties: - creation_height: - type: string - format: int64 - description: >- - creation_height is the height which the unbonding took - place. - completion_time: - type: string - format: date-time - description: completion_time is the unix time for unbonding completion. - initial_balance: + '@type': type: string description: >- - initial_balance defines the tokens initially scheduled to - receive at completion. - balance: - type: string - description: balance defines the tokens to receive at completion. - unbonding_id: - type: string - format: uint64 - title: Incrementing id that uniquely identifies this entry - unbonding_on_hold_ref_count: - type: string - format: int64 - title: >- - Strictly positive if this entry's unbonding has been stopped - by external modules - description: >- - UnbondingDelegationEntry defines an unbonding object with - relevant metadata. - description: |- - entries are the unbonding delegation entries. + A URL/resource name that uniquely identifies the type of the + serialized - unbonding delegation entries - description: |- - QueryDelegationResponse is response type for the Query/UnbondingDelegation - RPC method. - cosmos.staking.v1beta1.QueryValidatorDelegationsResponse: - type: object - properties: - delegation_responses: - type: array - items: - type: object - properties: - delegation: - type: object - properties: - delegator_address: - type: string - description: >- - delegator_address is the bech32-encoded address of the - delegator. - validator_address: - type: string - description: >- - validator_address is the bech32-encoded address of the - validator. - shares: - type: string - description: shares define the delegation shares received. - description: >- - Delegation represents the bond with tokens held by an account. - It is + protocol buffer message. This string must contain at least - owned by one delegator, and is associated with the voting power - of one + one "/" character. The last segment of the URL's path must + represent - validator. - balance: - type: object - properties: - denom: - type: string - amount: - type: string + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} description: >- - Coin defines a token with a denomination and an amount. + `Any` contains an arbitrary serialized protocol buffer message + along with a + URL that describes the type of the serialized message. - NOTE: The amount field is an Int which implements the custom - method - signatures required by gogoproto. - description: >- - DelegationResponse is equivalent to Delegation except that it - contains a + Protobuf library provides support to pack/unpack Any values in + the form - balance in addition to shares which is more suitable for client - responses. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + of utility functions or additional generated methods of the Any + type. - was set, its value is undefined otherwise - title: |- - QueryValidatorDelegationsResponse is response type for the - Query/ValidatorDelegations RPC method - cosmos.staking.v1beta1.QueryValidatorResponse: - type: object - properties: - validator: - description: validator defines the the validator info. - type: object - properties: - operator_address: - type: string - description: >- - operator_address defines the address of the validator's operator; - bech encoded in JSON. - consensus_pubkey: - description: >- - consensus_pubkey is the consensus public key of the validator, as - a Protobuf Any. - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - protocol buffer message. This string must contain at least + Example 1: Pack and unpack a message in C++. - one "/" character. The last segment of the URL's path must - represent + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - the fully qualified name of the type (as in + Example 2: Pack and unpack a message in Java. - `path/google.protobuf.Duration`). The name should be in a - canonical form + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - (e.g., leading "." is not accepted). + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". - In practice, teams usually precompile into the binary all - types that they - expect it to use in the context of Any. However, for URLs - which use the + JSON - scheme `http`, `https`, or no scheme, one can optionally set - up a type + ==== - server that maps type URLs to message definitions as follows: + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an - * If no scheme is provided, `https` is assumed. + additional field `@type` which contains the type URL. Example: - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - Note: this functionality is not currently available in the - official + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - protobuf release, and it is not used for type URLs beginning - with + If the embedded message type is well-known and has a custom JSON - type.googleapis.com. + representation, that representation will be embedded adding a + field + `value` which holds the custom JSON in addition to the `@type` - Schemes other than `http`, `https` (or the empty scheme) might - be + field. Example (for message [google.protobuf.Duration][]): - used with implementation specific semantics. - additionalProperties: {} - jailed: - type: boolean - description: >- - jailed defined whether the validator has been jailed from bonded - status or not. - status: - description: status is the validator status (bonded/unbonding/unbonded). - type: string - enum: - - BOND_STATUS_UNSPECIFIED - - BOND_STATUS_UNBONDED - - BOND_STATUS_UNBONDING - - BOND_STATUS_BONDED - default: BOND_STATUS_UNSPECIFIED - tokens: - type: string - description: tokens define the delegated tokens (incl. self-delegation). - delegator_shares: - type: string - description: >- - delegator_shares defines total shares issued to a validator's - delegators. - description: - description: description defines the description terms for the validator. - type: object - properties: - moniker: - type: string - description: moniker defines a human-readable name for the validator. - identity: - type: string - description: >- - identity defines an optional identity signature (ex. UPort or - Keybase). - website: - type: string - description: website defines an optional website link. - security_contact: - type: string - description: >- - security_contact defines an optional email for security - contact. - details: - type: string - description: details define other optional details. - unbonding_height: - type: string - format: int64 - description: >- - unbonding_height defines, if unbonding, the height at which this - validator has begun unbonding. - unbonding_time: - type: string - format: date-time - description: >- - unbonding_time defines, if unbonding, the min time for the - validator to complete unbonding. - commission: - description: commission defines the commission parameters. - type: object - properties: - commission_rates: - description: >- - commission_rates defines the initial commission rates to be - used for creating a validator. - type: object - properties: - rate: - type: string - description: >- - rate is the commission rate charged to delegators, as a - fraction. - max_rate: - type: string - description: >- - max_rate defines the maximum commission rate which - validator can ever charge, as a fraction. - max_change_rate: - type: string - description: >- - max_change_rate defines the maximum daily increase of the - validator commission, as a fraction. - update_time: - type: string - format: date-time - description: update_time is the last time the commission rate was changed. - min_self_delegation: - type: string - description: >- - min_self_delegation is the validator's self declared minimum self - delegation. - unbonding_on_hold_ref_count: - type: string - format: int64 - title: >- - strictly positive if this validator's unbonding has been stopped - by external modules - unbonding_ids: - type: array - items: - type: string - format: uint64 + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } title: >- - list of unbonding ids, each uniquely identifing an unbonding of - this validator - title: QueryValidatorResponse is response type for the Query/Validator RPC method - cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse: - type: object - properties: - unbonding_responses: - type: array - items: - type: object - properties: - delegator_address: - type: string - description: >- - delegator_address is the bech32-encoded address of the - delegator. - validator_address: - type: string - description: >- - validator_address is the bech32-encoded address of the - validator. - entries: - type: array - items: - type: object - properties: - creation_height: - type: string - format: int64 - description: >- - creation_height is the height which the unbonding took - place. - completion_time: - type: string - format: date-time - description: completion_time is the unix time for unbonding completion. - initial_balance: - type: string - description: >- - initial_balance defines the tokens initially scheduled to - receive at completion. - balance: - type: string - description: balance defines the tokens to receive at completion. - unbonding_id: - type: string - format: uint64 - title: Incrementing id that uniquely identifies this entry - unbonding_on_hold_ref_count: - type: string - format: int64 - title: >- - Strictly positive if this entry's unbonding has been - stopped by external modules - description: >- - UnbondingDelegationEntry defines an unbonding object with - relevant metadata. - description: |- - entries are the unbonding delegation entries. + extension_options are arbitrary options that can be added by + chains - unbonding delegation entries - description: >- - UnbondingDelegation stores all of a single delegator's unbonding - bonds + when the default options are not sufficient. If any of these are + present - for a single validator in an time-ordered list. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + and can't be handled, they will be ignored + description: TxBody is the body of a transaction that all signers sign over. + auth_info: + $ref: '#/definitions/cosmos.tx.v1beta1.AuthInfo' + title: |- + auth_info is the authorization related content of the transaction, + specifically signers, signer modes and fee + signatures: + type: array + items: + type: string + format: byte + description: >- + signatures is a list of signatures that matches the length and order + of - was set, its value is undefined otherwise - description: |- - QueryValidatorUnbondingDelegationsResponse is response type for the - Query/ValidatorUnbondingDelegations RPC method. - cosmos.staking.v1beta1.QueryValidatorsResponse: + AuthInfo's signer_infos to allow connecting signature meta information + like + + public key and signing mode by position. + description: Tx is the standard type used for broadcasting transactions. + cosmos.tx.v1beta1.TxBody: type: object properties: - validators: + messages: type: array items: type: object properties: - operator_address: + '@type': type: string description: >- - operator_address defines the address of the validator's - operator; bech encoded in JSON. - consensus_pubkey: - description: >- - consensus_pubkey is the consensus public key of the validator, - as a Protobuf Any. - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + A URL/resource name that uniquely identifies the type of the + serialized - protocol buffer message. This string must contain at least + protocol buffer message. This string must contain at least - one "/" character. The last segment of the URL's path must - represent + one "/" character. The last segment of the URL's path must + represent - the fully qualified name of the type (as in + the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be in a - canonical form + `path/google.protobuf.Duration`). The name should be in a + canonical form - (e.g., leading "." is not accepted). + (e.g., leading "." is not accepted). - In practice, teams usually precompile into the binary all - types that they + In practice, teams usually precompile into the binary all types + that they - expect it to use in the context of Any. However, for URLs - which use the + expect it to use in the context of Any. However, for URLs which + use the - scheme `http`, `https`, or no scheme, one can optionally set - up a type + scheme `http`, `https`, or no scheme, one can optionally set up + a type - server that maps type URLs to message definitions as - follows: + server that maps type URLs to message definitions as follows: - * If no scheme is provided, `https` is assumed. + * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - Note: this functionality is not currently available in the - official + Note: this functionality is not currently available in the + official - protobuf release, and it is not used for type URLs beginning - with + protobuf release, and it is not used for type URLs beginning + with - type.googleapis.com. + type.googleapis.com. - Schemes other than `http`, `https` (or the empty scheme) - might be + Schemes other than `http`, `https` (or the empty scheme) might + be - used with implementation specific semantics. - additionalProperties: {} - jailed: - type: boolean - description: >- - jailed defined whether the validator has been jailed from bonded - status or not. - status: - description: status is the validator status (bonded/unbonding/unbonded). - type: string - enum: - - BOND_STATUS_UNSPECIFIED - - BOND_STATUS_UNBONDED - - BOND_STATUS_UNBONDING - - BOND_STATUS_BONDED - default: BOND_STATUS_UNSPECIFIED - tokens: - type: string - description: tokens define the delegated tokens (incl. self-delegation). - delegator_shares: - type: string - description: >- - delegator_shares defines total shares issued to a validator's - delegators. - description: - description: description defines the description terms for the validator. - type: object - properties: - moniker: - type: string - description: moniker defines a human-readable name for the validator. - identity: - type: string - description: >- - identity defines an optional identity signature (ex. UPort - or Keybase). - website: - type: string - description: website defines an optional website link. - security_contact: - type: string - description: >- - security_contact defines an optional email for security - contact. - details: - type: string - description: details define other optional details. - unbonding_height: - type: string - format: int64 - description: >- - unbonding_height defines, if unbonding, the height at which this - validator has begun unbonding. - unbonding_time: - type: string - format: date-time - description: >- - unbonding_time defines, if unbonding, the min time for the - validator to complete unbonding. - commission: - description: commission defines the commission parameters. - type: object - properties: - commission_rates: - description: >- - commission_rates defines the initial commission rates to be - used for creating a validator. - type: object - properties: - rate: - type: string - description: >- - rate is the commission rate charged to delegators, as a - fraction. - max_rate: - type: string - description: >- - max_rate defines the maximum commission rate which - validator can ever charge, as a fraction. - max_change_rate: - type: string - description: >- - max_change_rate defines the maximum daily increase of - the validator commission, as a fraction. - update_time: - type: string - format: date-time - description: >- - update_time is the last time the commission rate was - changed. - min_self_delegation: - type: string - description: >- - min_self_delegation is the validator's self declared minimum - self delegation. - unbonding_on_hold_ref_count: - type: string - format: int64 - title: >- - strictly positive if this validator's unbonding has been stopped - by external modules - unbonding_ids: - type: array - items: - type: string - format: uint64 - title: >- - list of unbonding ids, each uniquely identifing an unbonding of - this validator + used with implementation specific semantics. + additionalProperties: {} description: >- - Validator defines a validator, together with the total amount of the + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' - Validator's bond shares and their exchange rate to coins. Slashing - results in + in the type URL, for example "foo.bar.com/x/y.z" will yield type - a decrease in the exchange rate, allowing correct calculation of - future + name "y.z". - undelegations without iterating over delegators. When coins are - delegated to - this validator, the validator is credited with a delegation whose - number of - bond shares is based on the amount of coins delegated divided by the - current + JSON - exchange rate. Voting power can be calculated as total bonded shares + ==== - multiplied by exchange rate. - description: validators contains all the queried validators. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + The JSON representation of an `Any` value uses the regular - was set, its value is undefined otherwise - title: >- - QueryValidatorsResponse is response type for the Query/Validators RPC - method - cosmos.staking.v1beta1.Redelegation: - type: object - properties: - delegator_address: - type: string - description: delegator_address is the bech32-encoded address of the delegator. - validator_src_address: - type: string - description: >- - validator_src_address is the validator redelegation source operator - address. - validator_dst_address: - type: string - description: >- - validator_dst_address is the validator redelegation destination - operator address. - entries: - type: array - items: - type: object - properties: - creation_height: - type: string - format: int64 - description: >- - creation_height defines the height which the redelegation took - place. - completion_time: - type: string - format: date-time - description: >- - completion_time defines the unix time for redelegation - completion. - initial_balance: - type: string - description: >- - initial_balance defines the initial balance when redelegation - started. - shares_dst: - type: string - description: >- - shares_dst is the amount of destination-validator shares created - by redelegation. - unbonding_id: - type: string - format: uint64 - title: Incrementing id that uniquely identifies this entry - unbonding_on_hold_ref_count: - type: string - format: int64 - title: >- - Strictly positive if this entry's unbonding has been stopped by - external modules - description: >- - RedelegationEntry defines a redelegation object with relevant - metadata. - description: |- - entries are the redelegation entries. + representation of the deserialized, embedded message, with an - redelegation entries - description: >- - Redelegation contains the list of a particular delegator's redelegating - bonds + additional field `@type` which contains the type URL. Example: - from a particular source validator to a particular destination validator. - cosmos.staking.v1beta1.RedelegationEntry: - type: object - properties: - creation_height: - type: string - format: int64 - description: creation_height defines the height which the redelegation took place. - completion_time: - type: string - format: date-time - description: completion_time defines the unix time for redelegation completion. - initial_balance: - type: string - description: initial_balance defines the initial balance when redelegation started. - shares_dst: - type: string - description: >- - shares_dst is the amount of destination-validator shares created by - redelegation. - unbonding_id: - type: string - format: uint64 - title: Incrementing id that uniquely identifies this entry - unbonding_on_hold_ref_count: - type: string - format: int64 - title: >- - Strictly positive if this entry's unbonding has been stopped by - external modules - description: RedelegationEntry defines a redelegation object with relevant metadata. - cosmos.staking.v1beta1.RedelegationEntryResponse: - type: object - properties: - redelegation_entry: - type: object - properties: - creation_height: - type: string - format: int64 - description: >- - creation_height defines the height which the redelegation took - place. - completion_time: - type: string - format: date-time - description: completion_time defines the unix time for redelegation completion. - initial_balance: - type: string - description: >- - initial_balance defines the initial balance when redelegation - started. - shares_dst: - type: string - description: >- - shares_dst is the amount of destination-validator shares created - by redelegation. - unbonding_id: - type: string - format: uint64 - title: Incrementing id that uniquely identifies this entry - unbonding_on_hold_ref_count: - type: string - format: int64 - title: >- - Strictly positive if this entry's unbonding has been stopped by - external modules - description: >- - RedelegationEntry defines a redelegation object with relevant - metadata. - balance: - type: string - description: >- - RedelegationEntryResponse is equivalent to a RedelegationEntry except that - it + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - contains a balance in addition to shares which is more suitable for client + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - responses. - cosmos.staking.v1beta1.RedelegationResponse: - type: object - properties: - redelegation: - type: object - properties: - delegator_address: - type: string - description: delegator_address is the bech32-encoded address of the delegator. - validator_src_address: - type: string - description: >- - validator_src_address is the validator redelegation source - operator address. - validator_dst_address: - type: string - description: >- - validator_dst_address is the validator redelegation destination - operator address. - entries: - type: array - items: - type: object - properties: - creation_height: - type: string - format: int64 - description: >- - creation_height defines the height which the redelegation - took place. - completion_time: - type: string - format: date-time - description: >- - completion_time defines the unix time for redelegation - completion. - initial_balance: - type: string - description: >- - initial_balance defines the initial balance when - redelegation started. - shares_dst: - type: string - description: >- - shares_dst is the amount of destination-validator shares - created by redelegation. - unbonding_id: - type: string - format: uint64 - title: Incrementing id that uniquely identifies this entry - unbonding_on_hold_ref_count: - type: string - format: int64 - title: >- - Strictly positive if this entry's unbonding has been stopped - by external modules - description: >- - RedelegationEntry defines a redelegation object with relevant - metadata. - description: |- - entries are the redelegation entries. + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` - redelegation entries + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } description: >- - Redelegation contains the list of a particular delegator's - redelegating bonds + messages is a list of messages to be executed. The required signers of - from a particular source validator to a particular destination - validator. - entries: + those messages define the number and order of elements in AuthInfo's + + signer_infos and Tx's signatures. Each required signer address is + added to + + the list only the first time it occurs. + + By convention, the first required signer (usually from the first + message) + + is referred to as the primary signer and pays the fee for the whole + + transaction. + memo: + type: string + description: >- + memo is any arbitrary note/comment to be added to the transaction. + + WARNING: in clients, any publicly exposed text should not be called + memo, + + but should be called `note` instead (see + https://github.com/cosmos/cosmos-sdk/issues/9122). + timeout_height: + type: string + format: uint64 + title: |- + timeout is the block height after which this transaction will not + be processed by the chain + extension_options: type: array items: type: object properties: - redelegation_entry: - type: object - properties: - creation_height: - type: string - format: int64 - description: >- - creation_height defines the height which the redelegation - took place. - completion_time: - type: string - format: date-time - description: >- - completion_time defines the unix time for redelegation - completion. - initial_balance: - type: string - description: >- - initial_balance defines the initial balance when - redelegation started. - shares_dst: - type: string - description: >- - shares_dst is the amount of destination-validator shares - created by redelegation. - unbonding_id: - type: string - format: uint64 - title: Incrementing id that uniquely identifies this entry - unbonding_on_hold_ref_count: - type: string - format: int64 - title: >- - Strictly positive if this entry's unbonding has been stopped - by external modules - description: >- - RedelegationEntry defines a redelegation object with relevant - metadata. - balance: + '@type': type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up + a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + additionalProperties: {} description: >- - RedelegationEntryResponse is equivalent to a RedelegationEntry - except that it + `Any` contains an arbitrary serialized protocol buffer message along + with a - contains a balance in addition to shares which is more suitable for - client + URL that describes the type of the serialized message. - responses. - description: >- - RedelegationResponse is equivalent to a Redelegation except that its - entries - contain a balance in addition to shares which is more suitable for client + Protobuf library provides support to pack/unpack Any values in the + form - responses. - cosmos.staking.v1beta1.UnbondingDelegation: - type: object - properties: - delegator_address: - type: string - description: delegator_address is the bech32-encoded address of the delegator. - validator_address: - type: string - description: validator_address is the bech32-encoded address of the validator. - entries: + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: >- + extension_options are arbitrary options that can be added by chains + + when the default options are not sufficient. If any of these are + present + + and can't be handled, the transaction will be rejected + non_critical_extension_options: type: array items: type: object properties: - creation_height: - type: string - format: int64 - description: creation_height is the height which the unbonding took place. - completion_time: - type: string - format: date-time - description: completion_time is the unix time for unbonding completion. - initial_balance: + '@type': type: string description: >- - initial_balance defines the tokens initially scheduled to - receive at completion. - balance: - type: string - description: balance defines the tokens to receive at completion. - unbonding_id: - type: string - format: uint64 - title: Incrementing id that uniquely identifies this entry - unbonding_on_hold_ref_count: - type: string - format: int64 - title: >- - Strictly positive if this entry's unbonding has been stopped by - external modules - description: >- - UnbondingDelegationEntry defines an unbonding object with relevant - metadata. - description: |- - entries are the unbonding delegation entries. - - unbonding delegation entries - description: |- - UnbondingDelegation stores all of a single delegator's unbonding bonds - for a single validator in an time-ordered list. - cosmos.staking.v1beta1.UnbondingDelegationEntry: - type: object - properties: - creation_height: - type: string - format: int64 - description: creation_height is the height which the unbonding took place. - completion_time: - type: string - format: date-time - description: completion_time is the unix time for unbonding completion. - initial_balance: - type: string - description: >- - initial_balance defines the tokens initially scheduled to receive at - completion. - balance: - type: string - description: balance defines the tokens to receive at completion. - unbonding_id: - type: string - format: uint64 - title: Incrementing id that uniquely identifies this entry - unbonding_on_hold_ref_count: - type: string - format: int64 - title: >- - Strictly positive if this entry's unbonding has been stopped by - external modules - description: >- - UnbondingDelegationEntry defines an unbonding object with relevant - metadata. - cosmos.staking.v1beta1.Validator: - type: object - properties: - operator_address: - type: string - description: >- - operator_address defines the address of the validator's operator; bech - encoded in JSON. - consensus_pubkey: - description: >- - consensus_pubkey is the consensus public key of the validator, as a - Protobuf Any. - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent + A URL/resource name that uniquely identifies the type of the + serialized - the fully qualified name of the type (as in + protocol buffer message. This string must contain at least - `path/google.protobuf.Duration`). The name should be in a - canonical form + one "/" character. The last segment of the URL's path must + represent - (e.g., leading "." is not accepted). + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a + canonical form - In practice, teams usually precompile into the binary all types - that they + (e.g., leading "." is not accepted). - expect it to use in the context of Any. However, for URLs which - use the - scheme `http`, `https`, or no scheme, one can optionally set up a - type + In practice, teams usually precompile into the binary all types + that they - server that maps type URLs to message definitions as follows: + expect it to use in the context of Any. However, for URLs which + use the + scheme `http`, `https`, or no scheme, one can optionally set up + a type - * If no scheme is provided, `https` is assumed. + server that maps type URLs to message definitions as follows: - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - Note: this functionality is not currently available in the - official + * If no scheme is provided, `https` is assumed. - protobuf release, and it is not used for type URLs beginning with + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - type.googleapis.com. + Note: this functionality is not currently available in the + official + protobuf release, and it is not used for type URLs beginning + with - Schemes other than `http`, `https` (or the empty scheme) might be + type.googleapis.com. - used with implementation specific semantics. - additionalProperties: {} - jailed: - type: boolean - description: >- - jailed defined whether the validator has been jailed from bonded - status or not. - status: - description: status is the validator status (bonded/unbonding/unbonded). - type: string - enum: - - BOND_STATUS_UNSPECIFIED - - BOND_STATUS_UNBONDED - - BOND_STATUS_UNBONDING - - BOND_STATUS_BONDED - default: BOND_STATUS_UNSPECIFIED - tokens: - type: string - description: tokens define the delegated tokens (incl. self-delegation). - delegator_shares: - type: string - description: >- - delegator_shares defines total shares issued to a validator's - delegators. - description: - description: description defines the description terms for the validator. - type: object - properties: - moniker: - type: string - description: moniker defines a human-readable name for the validator. - identity: - type: string - description: >- - identity defines an optional identity signature (ex. UPort or - Keybase). - website: - type: string - description: website defines an optional website link. - security_contact: - type: string - description: security_contact defines an optional email for security contact. - details: - type: string - description: details define other optional details. - unbonding_height: - type: string - format: int64 - description: >- - unbonding_height defines, if unbonding, the height at which this - validator has begun unbonding. - unbonding_time: - type: string - format: date-time - description: >- - unbonding_time defines, if unbonding, the min time for the validator - to complete unbonding. - commission: - description: commission defines the commission parameters. - type: object - properties: - commission_rates: - description: >- - commission_rates defines the initial commission rates to be used - for creating a validator. - type: object - properties: - rate: - type: string - description: >- - rate is the commission rate charged to delegators, as a - fraction. - max_rate: - type: string - description: >- - max_rate defines the maximum commission rate which validator - can ever charge, as a fraction. - max_change_rate: - type: string - description: >- - max_change_rate defines the maximum daily increase of the - validator commission, as a fraction. - update_time: - type: string - format: date-time - description: update_time is the last time the commission rate was changed. - min_self_delegation: - type: string - description: >- - min_self_delegation is the validator's self declared minimum self - delegation. - unbonding_on_hold_ref_count: - type: string - format: int64 - title: >- - strictly positive if this validator's unbonding has been stopped by - external modules - unbonding_ids: - type: array - items: - type: string - format: uint64 - title: >- - list of unbonding ids, each uniquely identifing an unbonding of this - validator - description: >- - Validator defines a validator, together with the total amount of the - Validator's bond shares and their exchange rate to coins. Slashing results - in + Schemes other than `http`, `https` (or the empty scheme) might + be - a decrease in the exchange rate, allowing correct calculation of future + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a - undelegations without iterating over delegators. When coins are delegated - to + URL that describes the type of the serialized message. - this validator, the validator is credited with a delegation whose number - of - bond shares is based on the amount of coins delegated divided by the - current + Protobuf library provides support to pack/unpack Any values in the + form - exchange rate. Voting power can be calculated as total bonded shares + of utility functions or additional generated methods of the Any + type. - multiplied by exchange rate. - cosmos.base.abci.v1beta1.ABCIMessageLog: - type: object - properties: - msg_index: - type: integer - format: int64 - log: - type: string - events: - type: array - items: - type: object - properties: - type: - type: string - attributes: - type: array - items: - type: object - properties: - key: - type: string - value: - type: string - description: >- - Attribute defines an attribute wrapper where the key and value - are - strings instead of raw bytes. - description: |- - StringEvent defines en Event object wrapper where all the attributes - contain key/value pairs that are strings instead of raw bytes. - description: |- - Events contains a slice of Event objects that were emitted during some - execution. - description: >- - ABCIMessageLog defines a structure containing an indexed tx ABCI message - log. - cosmos.base.abci.v1beta1.Attribute: - type: object - properties: - key: - type: string - value: - type: string - description: |- - Attribute defines an attribute wrapper where the key and value are - strings instead of raw bytes. - cosmos.base.abci.v1beta1.GasInfo: - type: object - properties: - gas_wanted: - type: string - format: uint64 - description: GasWanted is the maximum units of work we allow this tx to perform. - gas_used: - type: string - format: uint64 - description: GasUsed is the amount of gas actually consumed. - description: GasInfo defines tx execution gas context. - cosmos.base.abci.v1beta1.Result: - type: object - properties: - data: - type: string - format: byte - description: >- - Data is any data returned from message or handler execution. It MUST - be + Example 1: Pack and unpack a message in C++. - length prefixed in order to separate data from multiple message - executions. - log: - type: string - description: Log contains the log information from message or handler execution. - events: - type: array - items: - type: object - properties: - type: - type: string - attributes: - type: array - items: - type: object - properties: - key: - type: string - format: byte - value: - type: string - format: byte - index: - type: boolean - title: nondeterministic - description: >- - EventAttribute is a single key-value pair, associated with an - event. - description: >- - Event allows application developers to attach additional information - to + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and - ResponseDeliverTx. + Example 2: Pack and unpack a message in Java. - Later, transactions may be queried using these events. - description: >- - Events contains a slice of Event objects that were emitted during - message + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - or handler execution. - description: Result is the union of ResponseFormat and ResponseCheckTx. - cosmos.base.abci.v1beta1.StringEvent: + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: >- + extension_options are arbitrary options that can be added by chains + + when the default options are not sufficient. If any of these are + present + + and can't be handled, they will be ignored + description: TxBody is the body of a transaction that all signers sign over. + tendermint.abci.Event: type: object properties: type: @@ -31699,99 +45292,100 @@ definitions: properties: key: type: string + format: byte value: type: string - description: |- - Attribute defines an attribute wrapper where the key and value are - strings instead of raw bytes. - description: |- - StringEvent defines en Event object wrapper where all the attributes - contain key/value pairs that are strings instead of raw bytes. - cosmos.base.abci.v1beta1.TxResponse: + format: byte + index: + type: boolean + title: nondeterministic + description: 'EventAttribute is a single key-value pair, associated with an event.' + description: >- + Event allows application developers to attach additional information to + + ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and + ResponseDeliverTx. + + Later, transactions may be queried using these events. + tendermint.abci.EventAttribute: + type: object + properties: + key: + type: string + format: byte + value: + type: string + format: byte + index: + type: boolean + title: nondeterministic + description: 'EventAttribute is a single key-value pair, associated with an event.' + cosmos.upgrade.v1beta1.ModuleVersion: type: object properties: - height: - type: string - format: int64 - title: The block height - txhash: - type: string - description: The transaction hash. - codespace: + name: type: string - title: Namespace for the Code - code: - type: integer - format: int64 - description: Response code. - data: + title: name of the app module + version: type: string - description: 'Result bytes, if any.' - raw_log: + format: uint64 + title: consensus version of the app module + description: |- + ModuleVersion specifies a module and its consensus version. + + Since: cosmos-sdk 0.43 + cosmos.upgrade.v1beta1.Plan: + type: object + properties: + name: type: string - description: |- - The output of the application's logger (raw string). May be - non-deterministic. - logs: - type: array - items: - type: object - properties: - msg_index: - type: integer - format: int64 - log: - type: string - events: - type: array - items: - type: object - properties: - type: - type: string - attributes: - type: array - items: - type: object - properties: - key: - type: string - value: - type: string - description: >- - Attribute defines an attribute wrapper where the key and - value are + description: >- + Sets the name for the upgrade. This name will be used by the upgraded - strings instead of raw bytes. - description: >- - StringEvent defines en Event object wrapper where all the - attributes + version of the software to apply any special "on-upgrade" commands + during - contain key/value pairs that are strings instead of raw bytes. - description: >- - Events contains a slice of Event objects that were emitted - during some + the first BeginBlock method after the upgrade is applied. It is also + used - execution. - description: >- - ABCIMessageLog defines a structure containing an indexed tx ABCI - message log. - description: >- - The output of the application's logger (typed). May be - non-deterministic. - info: + to detect whether a software version can handle a given upgrade. If no + + upgrade handler with this name has been set in the software, it will + be + + assumed that the software is out-of-date when the upgrade Time or + Height is + + reached and the software will exit. + time: type: string - description: Additional information. May be non-deterministic. - gas_wanted: + format: date-time + description: >- + Deprecated: Time based upgrades have been deprecated. Time based + upgrade logic + + has been removed from the SDK. + + If this field is not empty, an error will be thrown. + height: type: string format: int64 - description: Amount of gas requested for transaction. - gas_used: + description: |- + The height at which the upgrade must be performed. + Only used if Time is not set. + info: type: string - format: int64 - description: Amount of gas consumed by transaction. - tx: - description: The request transaction bytes. + title: |- + Any application specific upgrade info to be included on-chain + such as a git commit that validators could automatically upgrade to + upgraded_client_state: + description: >- + Deprecated: UpgradedClientState field has been deprecated. IBC upgrade + logic has been + + moved to the IBC module in the sub module 02-client. + + If this field is not empty, an error will be thrown. type: object properties: '@type': @@ -31813,365 +45407,803 @@ definitions: (e.g., leading "." is not accepted). - In practice, teams usually precompile into the binary all types - that they + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + Plan specifies information about a planned upgrade and when it should + occur. + cosmos.upgrade.v1beta1.QueryAppliedPlanResponse: + type: object + properties: + height: + type: string + format: int64 + description: height is the block height at which the plan was applied. + description: >- + QueryAppliedPlanResponse is the response type for the Query/AppliedPlan + RPC + + method. + cosmos.upgrade.v1beta1.QueryCurrentPlanResponse: + type: object + properties: + plan: + description: plan is the current upgrade plan. + type: object + properties: + name: + type: string + description: >- + Sets the name for the upgrade. This name will be used by the + upgraded + + version of the software to apply any special "on-upgrade" commands + during + + the first BeginBlock method after the upgrade is applied. It is + also used + + to detect whether a software version can handle a given upgrade. + If no + + upgrade handler with this name has been set in the software, it + will be + + assumed that the software is out-of-date when the upgrade Time or + Height is + + reached and the software will exit. + time: + type: string + format: date-time + description: >- + Deprecated: Time based upgrades have been deprecated. Time based + upgrade logic + + has been removed from the SDK. + + If this field is not empty, an error will be thrown. + height: + type: string + format: int64 + description: |- + The height at which the upgrade must be performed. + Only used if Time is not set. + info: + type: string + title: >- + Any application specific upgrade info to be included on-chain + + such as a git commit that validators could automatically upgrade + to + upgraded_client_state: + description: >- + Deprecated: UpgradedClientState field has been deprecated. IBC + upgrade logic has been + + moved to the IBC module in the sub module 02-client. + + If this field is not empty, an error will be thrown. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + - expect it to use in the context of Any. However, for URLs which - use the + In practice, teams usually precompile into the binary all + types that they - scheme `http`, `https`, or no scheme, one can optionally set up a - type + expect it to use in the context of Any. However, for URLs + which use the - server that maps type URLs to message definitions as follows: + scheme `http`, `https`, or no scheme, one can optionally set + up a type + server that maps type URLs to message definitions as follows: - * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + * If no scheme is provided, `https` is assumed. - Note: this functionality is not currently available in the - official + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - protobuf release, and it is not used for type URLs beginning with + Note: this functionality is not currently available in the + official - type.googleapis.com. + protobuf release, and it is not used for type URLs beginning + with + type.googleapis.com. - Schemes other than `http`, `https` (or the empty scheme) might be - used with implementation specific semantics. - additionalProperties: {} - timestamp: - type: string - description: >- - Time of the previous block. For heights > 1, it's the weighted median - of + Schemes other than `http`, `https` (or the empty scheme) might + be - the timestamps of the valid votes in the block.LastCommit. For height - == 1, + used with implementation specific semantics. + additionalProperties: {} + description: >- + QueryCurrentPlanResponse is the response type for the Query/CurrentPlan + RPC - it's genesis time. - events: + method. + cosmos.upgrade.v1beta1.QueryModuleVersionsResponse: + type: object + properties: + module_versions: type: array items: type: object properties: - type: + name: type: string - attributes: - type: array - items: - type: object - properties: - key: - type: string - format: byte - value: - type: string - format: byte - index: - type: boolean - title: nondeterministic - description: >- - EventAttribute is a single key-value pair, associated with an - event. - description: >- - Event allows application developers to attach additional information - to - - ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and - ResponseDeliverTx. + title: name of the app module + version: + type: string + format: uint64 + title: consensus version of the app module + description: |- + ModuleVersion specifies a module and its consensus version. - Later, transactions may be queried using these events. + Since: cosmos-sdk 0.43 description: >- - Events defines all the events emitted by processing a transaction. - Note, - - these events include those emitted by processing all the messages and - those - - emitted from the ante handler. Whereas Logs contains the events, with - - additional metadata, emitted only by processing the messages. + module_versions is a list of module names with their consensus + versions. + description: >- + QueryModuleVersionsResponse is the response type for the + Query/ModuleVersions + RPC method. - Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 - description: >- - TxResponse defines a structure containing relevant tx data and metadata. - The - tags are stringified and the log is JSON decoded. - cosmos.crypto.multisig.v1beta1.CompactBitArray: + Since: cosmos-sdk 0.43 + cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse: type: object properties: - extra_bits_stored: - type: integer - format: int64 - elems: + upgraded_consensus_state: type: string format: byte - description: |- - CompactBitArray is an implementation of a space efficient bit array. - This is used to ensure that the encoded data takes up a minimal amount of - space after proto encoding. - This is not thread safe, and is not intended for concurrent usage. - cosmos.tx.signing.v1beta1.SignMode: - type: string - enum: - - SIGN_MODE_UNSPECIFIED - - SIGN_MODE_DIRECT - - SIGN_MODE_TEXTUAL - - SIGN_MODE_LEGACY_AMINO_JSON - - SIGN_MODE_EIP_191 - default: SIGN_MODE_UNSPECIFIED - description: |- - SignMode represents a signing mode with its own security guarantees. - - - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be - rejected - - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is - verified with raw bytes from Tx - - SIGN_MODE_TEXTUAL: SIGN_MODE_TEXTUAL is a future signing mode that will verify some - human-readable textual representation on top of the binary representation - from SIGN_MODE_DIRECT - - SIGN_MODE_LEGACY_AMINO_JSON: SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses - Amino JSON and will be removed in the future - - SIGN_MODE_EIP_191: SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos - SDK. Ref: https://eips.ethereum.org/EIPS/eip-191 - - Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant, - but is not implemented on the SDK by default. To enable EIP-191, you need - to pass a custom `TxConfig` that has an implementation of - `SignModeHandler` for EIP-191. The SDK may decide to fully support - EIP-191 in the future. + title: 'Since: cosmos-sdk 0.43' + description: >- + QueryUpgradedConsensusStateResponse is the response type for the + Query/UpgradedConsensusState - Since: cosmos-sdk 0.45.2 - cosmos.tx.v1beta1.AuthInfo: + RPC method. + cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse: + type: object + description: >- + MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount + response type. + ibc.applications.interchain_accounts.host.v1.Params: type: object properties: - signer_infos: + host_enabled: + type: boolean + description: host_enabled enables or disables the host submodule. + allow_messages: type: array items: - type: object - $ref: '#/definitions/cosmos.tx.v1beta1.SignerInfo' + type: string description: >- - signer_infos defines the signing modes for the required signers. The - number - - and order of elements must match the required signers from TxBody's - - messages. The first element is the primary signer and the one which - pays - - the fee. - fee: + allow_messages defines a list of sdk message typeURLs allowed to be + executed on a host chain. + description: |- + Params defines the set of on-chain interchain accounts parameters. + The following parameters may be used to disable the host submodule. + ibc.applications.interchain_accounts.host.v1.QueryParamsResponse: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + host_enabled: + type: boolean + description: host_enabled enables or disables the host submodule. + allow_messages: + type: array + items: + type: string + description: >- + allow_messages defines a list of sdk message typeURLs allowed to + be executed on a host chain. + description: QueryParamsResponse is the response type for the Query/Params RPC method. + ibc.applications.transfer.v1.DenomTrace: + type: object + properties: + path: + type: string description: >- - Fee is the fee and gas limit for the transaction. The first signer is + path defines the chain of port/channel identifiers used for tracing the - primary signer and the one which pays the fee. The fee can be - calculated + source of the fungible token. + base_denom: + type: string + description: base denomination of the relayed fungible token. + description: >- + DenomTrace contains the base denomination for ICS20 fungible tokens and + the - based on the cost of evaluating the body and doing signature - verification + source tracing information path. + ibc.applications.transfer.v1.MsgTransferResponse: + type: object + properties: + sequence: + type: string + format: uint64 + title: sequence number of the transfer packet sent + description: MsgTransferResponse defines the Msg/Transfer response type. + ibc.applications.transfer.v1.Params: + type: object + properties: + send_enabled: + type: boolean + description: >- + send_enabled enables or disables all cross-chain token transfers from + this - of the signers. This can be estimated via simulation. - type: object - properties: - amount: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. + chain. + receive_enabled: + type: boolean + description: >- + receive_enabled enables or disables all cross-chain token transfers to + this + chain. + description: >- + Params defines the set of IBC transfer parameters. - NOTE: The amount field is an Int which implements the custom - method + NOTE: To prevent a single token from being transferred, set the - signatures required by gogoproto. - title: amount is the amount of coins to be paid as a fee - gas_limit: - type: string - format: uint64 - title: >- - gas_limit is the maximum gas that can be used in transaction - processing + TransfersEnabled parameter to true and then set the bank module's + SendEnabled - before an out of gas error occurs - payer: + parameter for the denomination to false. + ibc.applications.transfer.v1.QueryDenomHashResponse: + type: object + properties: + hash: + type: string + description: hash (in hex format) of the denomination trace information. + description: |- + QueryDenomHashResponse is the response type for the Query/DenomHash RPC + method. + ibc.applications.transfer.v1.QueryDenomTraceResponse: + type: object + properties: + denom_trace: + description: denom_trace returns the requested denomination trace information. + type: object + properties: + path: type: string description: >- - if unset, the first signer is responsible for paying the fees. If - set, the specified account must pay the fees. + path defines the chain of port/channel identifiers used for + tracing the - the payer must be a tx signer (and thus have signed this field in - AuthInfo). + source of the fungible token. + base_denom: + type: string + description: base denomination of the relayed fungible token. + description: |- + QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC + method. + ibc.applications.transfer.v1.QueryDenomTracesResponse: + type: object + properties: + denom_traces: + type: array + items: + type: object + properties: + path: + type: string + description: >- + path defines the chain of port/channel identifiers used for + tracing the - setting this field does *not* change the ordering of required - signers for the transaction. - granter: + source of the fungible token. + base_denom: + type: string + description: base denomination of the relayed fungible token. + description: >- + DenomTrace contains the base denomination for ICS20 fungible tokens + and the + + source tracing information path. + description: denom_traces returns all denominations trace information. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 title: >- - if set, the fee payer (either the first signer or the value of the - payer field) requests that a fee grant be used + total is total number of results available if + PageRequest.count_total - to pay fees instead of the fee payer's own balance. If an - appropriate fee grant does not exist or the chain does + was set, its value is undefined otherwise + description: >- + QueryConnectionsResponse is the response type for the Query/DenomTraces + RPC - not support fee grants, this will fail - description: |- - AuthInfo describes the fee and signer modes that are used to sign a - transaction. - cosmos.tx.v1beta1.BroadcastMode: - type: string - enum: - - BROADCAST_MODE_UNSPECIFIED - - BROADCAST_MODE_BLOCK - - BROADCAST_MODE_SYNC - - BROADCAST_MODE_ASYNC - default: BROADCAST_MODE_UNSPECIFIED + method. + ibc.applications.transfer.v1.QueryEscrowAddressResponse: + type: object + properties: + escrow_address: + type: string + title: the escrow account address description: >- - BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC + QueryEscrowAddressResponse is the response type of the EscrowAddress RPC method. + ibc.applications.transfer.v1.QueryParamsResponse: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + send_enabled: + type: boolean + description: >- + send_enabled enables or disables all cross-chain token transfers + from this - - BROADCAST_MODE_UNSPECIFIED: zero-value for mode ordering - - BROADCAST_MODE_BLOCK: BROADCAST_MODE_BLOCK defines a tx broadcasting mode where the client waits for - the tx to be committed in a block. - - BROADCAST_MODE_SYNC: BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for - a CheckTx execution response only. - - BROADCAST_MODE_ASYNC: BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns - immediately. - cosmos.tx.v1beta1.BroadcastTxRequest: + chain. + receive_enabled: + type: boolean + description: >- + receive_enabled enables or disables all cross-chain token + transfers to this + + chain. + description: QueryParamsResponse is the response type for the Query/Params RPC method. + ibc.core.client.v1.Height: type: object properties: - tx_bytes: + revision_number: type: string - format: byte - description: tx_bytes is the raw transaction. - mode: + format: uint64 + title: the revision that the client is currently on + revision_height: type: string - enum: - - BROADCAST_MODE_UNSPECIFIED - - BROADCAST_MODE_BLOCK - - BROADCAST_MODE_SYNC - - BROADCAST_MODE_ASYNC - default: BROADCAST_MODE_UNSPECIFIED - description: >- - BroadcastMode specifies the broadcast mode for the TxService.Broadcast - RPC method. - - - BROADCAST_MODE_UNSPECIFIED: zero-value for mode ordering - - BROADCAST_MODE_BLOCK: BROADCAST_MODE_BLOCK defines a tx broadcasting mode where the client waits for - the tx to be committed in a block. - - BROADCAST_MODE_SYNC: BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for - a CheckTx execution response only. - - BROADCAST_MODE_ASYNC: BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns - immediately. + format: uint64 + title: the height within the given revision description: |- - BroadcastTxRequest is the request type for the Service.BroadcastTxRequest - RPC method. - cosmos.tx.v1beta1.BroadcastTxResponse: + Normally the RevisionHeight is incremented at each height while keeping + RevisionNumber the same. However some consensus algorithms may choose to + reset the height in certain conditions e.g. hard forks, state-machine + breaking changes In these cases, the RevisionNumber is incremented so that + height continues to be monitonically increasing even as the RevisionHeight + gets reset + title: >- + Height is a monotonically increasing data type + + that can be compared against another Height for the purposes of updating + and + + freezing clients + ibc.core.channel.v1.Channel: type: object properties: - tx_response: - description: tx_response is the queried TxResponses. + state: + title: current state of the channel end + type: string + enum: + - STATE_UNINITIALIZED_UNSPECIFIED + - STATE_INIT + - STATE_TRYOPEN + - STATE_OPEN + - STATE_CLOSED + default: STATE_UNINITIALIZED_UNSPECIFIED + description: |- + State defines if a channel is in one of the following states: + CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. + + - STATE_UNINITIALIZED_UNSPECIFIED: Default State + - STATE_INIT: A channel has just started the opening handshake. + - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. + - STATE_OPEN: A channel has completed the handshake. Open channels are + ready to send and receive packets. + - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive + packets. + ordering: + title: whether the channel is ordered or unordered + type: string + enum: + - ORDER_NONE_UNSPECIFIED + - ORDER_UNORDERED + - ORDER_ORDERED + default: ORDER_NONE_UNSPECIFIED + description: |- + - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering + - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in + which they were sent. + - ORDER_ORDERED: packets are delivered exactly in the order which they were sent + counterparty: + title: counterparty channel end type: object properties: - height: - type: string - format: int64 - title: The block height - txhash: + port_id: type: string - description: The transaction hash. - codespace: + description: >- + port on the counterparty chain which owns the other end of the + channel. + channel_id: type: string - title: Namespace for the Code - code: - type: integer - format: int64 - description: Response code. - data: + title: channel end on the counterparty chain + connection_hops: + type: array + items: + type: string + title: |- + list of connection identifiers, in order, along which packets sent on + this channel will travel + version: + type: string + title: 'opaque channel version, which is agreed upon during the handshake' + description: |- + Channel defines pipeline for exactly-once packet delivery between specific + modules on separate blockchains, which has at least one end capable of + sending packets and one end capable of receiving packets. + ibc.core.channel.v1.Counterparty: + type: object + properties: + port_id: + type: string + description: >- + port on the counterparty chain which owns the other end of the + channel. + channel_id: + type: string + title: channel end on the counterparty chain + title: Counterparty defines a channel end counterparty + ibc.core.channel.v1.IdentifiedChannel: + type: object + properties: + state: + title: current state of the channel end + type: string + enum: + - STATE_UNINITIALIZED_UNSPECIFIED + - STATE_INIT + - STATE_TRYOPEN + - STATE_OPEN + - STATE_CLOSED + default: STATE_UNINITIALIZED_UNSPECIFIED + description: |- + State defines if a channel is in one of the following states: + CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. + + - STATE_UNINITIALIZED_UNSPECIFIED: Default State + - STATE_INIT: A channel has just started the opening handshake. + - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. + - STATE_OPEN: A channel has completed the handshake. Open channels are + ready to send and receive packets. + - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive + packets. + ordering: + title: whether the channel is ordered or unordered + type: string + enum: + - ORDER_NONE_UNSPECIFIED + - ORDER_UNORDERED + - ORDER_ORDERED + default: ORDER_NONE_UNSPECIFIED + description: |- + - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering + - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in + which they were sent. + - ORDER_ORDERED: packets are delivered exactly in the order which they were sent + counterparty: + title: counterparty channel end + type: object + properties: + port_id: type: string - description: 'Result bytes, if any.' - raw_log: + description: >- + port on the counterparty chain which owns the other end of the + channel. + channel_id: type: string - description: |- - The output of the application's logger (raw string). May be - non-deterministic. - logs: - type: array - items: - type: object - properties: - msg_index: - type: integer - format: int64 - log: - type: string - events: - type: array - items: - type: object - properties: - type: - type: string - attributes: - type: array - items: - type: object - properties: - key: - type: string - value: - type: string - description: >- - Attribute defines an attribute wrapper where the key - and value are + title: channel end on the counterparty chain + connection_hops: + type: array + items: + type: string + title: |- + list of connection identifiers, in order, along which packets sent on + this channel will travel + version: + type: string + title: 'opaque channel version, which is agreed upon during the handshake' + port_id: + type: string + title: port identifier + channel_id: + type: string + title: channel identifier + description: |- + IdentifiedChannel defines a channel with additional port and channel + identifier fields. + ibc.core.channel.v1.MsgAcknowledgementResponse: + type: object + properties: + result: + type: string + enum: + - RESPONSE_RESULT_TYPE_UNSPECIFIED + - RESPONSE_RESULT_TYPE_NOOP + - RESPONSE_RESULT_TYPE_SUCCESS + default: RESPONSE_RESULT_TYPE_UNSPECIFIED + description: |- + - RESPONSE_RESULT_TYPE_UNSPECIFIED: Default zero value enumeration + - RESPONSE_RESULT_TYPE_NOOP: The message did not call the IBC application callbacks (because, for example, the packet had already been relayed) + - RESPONSE_RESULT_TYPE_SUCCESS: The message was executed successfully + title: >- + ResponseResultType defines the possible outcomes of the execution of a + message + description: MsgAcknowledgementResponse defines the Msg/Acknowledgement response type. + ibc.core.channel.v1.MsgChannelCloseConfirmResponse: + type: object + description: >- + MsgChannelCloseConfirmResponse defines the Msg/ChannelCloseConfirm + response - strings instead of raw bytes. - description: >- - StringEvent defines en Event object wrapper where all the - attributes + type. + ibc.core.channel.v1.MsgChannelCloseInitResponse: + type: object + description: >- + MsgChannelCloseInitResponse defines the Msg/ChannelCloseInit response + type. + ibc.core.channel.v1.MsgChannelOpenAckResponse: + type: object + description: MsgChannelOpenAckResponse defines the Msg/ChannelOpenAck response type. + ibc.core.channel.v1.MsgChannelOpenConfirmResponse: + type: object + description: |- + MsgChannelOpenConfirmResponse defines the Msg/ChannelOpenConfirm response + type. + ibc.core.channel.v1.MsgChannelOpenInitResponse: + type: object + properties: + channel_id: + type: string + version: + type: string + description: MsgChannelOpenInitResponse defines the Msg/ChannelOpenInit response type. + ibc.core.channel.v1.MsgChannelOpenTryResponse: + type: object + properties: + version: + type: string + description: MsgChannelOpenTryResponse defines the Msg/ChannelOpenTry response type. + ibc.core.channel.v1.MsgRecvPacketResponse: + type: object + properties: + result: + type: string + enum: + - RESPONSE_RESULT_TYPE_UNSPECIFIED + - RESPONSE_RESULT_TYPE_NOOP + - RESPONSE_RESULT_TYPE_SUCCESS + default: RESPONSE_RESULT_TYPE_UNSPECIFIED + description: |- + - RESPONSE_RESULT_TYPE_UNSPECIFIED: Default zero value enumeration + - RESPONSE_RESULT_TYPE_NOOP: The message did not call the IBC application callbacks (because, for example, the packet had already been relayed) + - RESPONSE_RESULT_TYPE_SUCCESS: The message was executed successfully + title: >- + ResponseResultType defines the possible outcomes of the execution of a + message + description: MsgRecvPacketResponse defines the Msg/RecvPacket response type. + ibc.core.channel.v1.MsgTimeoutOnCloseResponse: + type: object + properties: + result: + type: string + enum: + - RESPONSE_RESULT_TYPE_UNSPECIFIED + - RESPONSE_RESULT_TYPE_NOOP + - RESPONSE_RESULT_TYPE_SUCCESS + default: RESPONSE_RESULT_TYPE_UNSPECIFIED + description: |- + - RESPONSE_RESULT_TYPE_UNSPECIFIED: Default zero value enumeration + - RESPONSE_RESULT_TYPE_NOOP: The message did not call the IBC application callbacks (because, for example, the packet had already been relayed) + - RESPONSE_RESULT_TYPE_SUCCESS: The message was executed successfully + title: >- + ResponseResultType defines the possible outcomes of the execution of a + message + description: MsgTimeoutOnCloseResponse defines the Msg/TimeoutOnClose response type. + ibc.core.channel.v1.MsgTimeoutResponse: + type: object + properties: + result: + type: string + enum: + - RESPONSE_RESULT_TYPE_UNSPECIFIED + - RESPONSE_RESULT_TYPE_NOOP + - RESPONSE_RESULT_TYPE_SUCCESS + default: RESPONSE_RESULT_TYPE_UNSPECIFIED + description: |- + - RESPONSE_RESULT_TYPE_UNSPECIFIED: Default zero value enumeration + - RESPONSE_RESULT_TYPE_NOOP: The message did not call the IBC application callbacks (because, for example, the packet had already been relayed) + - RESPONSE_RESULT_TYPE_SUCCESS: The message was executed successfully + title: >- + ResponseResultType defines the possible outcomes of the execution of a + message + description: MsgTimeoutResponse defines the Msg/Timeout response type. + ibc.core.channel.v1.Order: + type: string + enum: + - ORDER_NONE_UNSPECIFIED + - ORDER_UNORDERED + - ORDER_ORDERED + default: ORDER_NONE_UNSPECIFIED + description: |- + - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering + - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in + which they were sent. + - ORDER_ORDERED: packets are delivered exactly in the order which they were sent + title: Order defines if a channel is ORDERED or UNORDERED + ibc.core.channel.v1.Packet: + type: object + properties: + sequence: + type: string + format: uint64 + description: >- + number corresponds to the order of sends and receives, where a Packet - contain key/value pairs that are strings instead of raw - bytes. - description: >- - Events contains a slice of Event objects that were emitted - during some + with an earlier sequence number must be sent and received before a + Packet - execution. - description: >- - ABCIMessageLog defines a structure containing an indexed tx ABCI - message log. - description: >- - The output of the application's logger (typed). May be - non-deterministic. - info: + with a later sequence number. + source_port: + type: string + description: identifies the port on the sending chain. + source_channel: + type: string + description: identifies the channel end on the sending chain. + destination_port: + type: string + description: identifies the port on the receiving chain. + destination_channel: + type: string + description: identifies the channel end on the receiving chain. + data: + type: string + format: byte + title: actual opaque bytes transferred directly to the application module + timeout_height: + title: block height after which the packet times out + type: object + properties: + revision_number: type: string - description: Additional information. May be non-deterministic. - gas_wanted: + format: uint64 + title: the revision that the client is currently on + revision_height: type: string - format: int64 - description: Amount of gas requested for transaction. - gas_used: + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to + + reset the height in certain conditions e.g. hard forks, state-machine + + breaking changes In these cases, the RevisionNumber is incremented so + that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + timeout_timestamp: + type: string + format: uint64 + title: block timestamp (in nanoseconds) after which the packet times out + title: >- + Packet defines a type that carries data across different chains through + IBC + ibc.core.channel.v1.PacketState: + type: object + properties: + port_id: + type: string + description: channel port identifier. + channel_id: + type: string + description: channel unique identifier. + sequence: + type: string + format: uint64 + description: packet sequence. + data: + type: string + format: byte + description: embedded data that represents packet state. + description: |- + PacketState defines the generic type necessary to retrieve and store + packet commitments, acknowledgements, and receipts. + Caller is responsible for knowing the context necessary to interpret this + state as a commitment, acknowledgement, or a receipt. + ibc.core.channel.v1.QueryChannelClientStateResponse: + type: object + properties: + identified_client_state: + title: client state associated with the channel + type: object + properties: + client_id: type: string - format: int64 - description: Amount of gas consumed by transaction. - tx: - description: The request transaction bytes. + title: client identifier + client_state: + title: client state type: object properties: '@type': @@ -32230,699 +46262,980 @@ definitions: used with implementation specific semantics. additionalProperties: {} - timestamp: - type: string description: >- - Time of the previous block. For heights > 1, it's the weighted - median of + `Any` contains an arbitrary serialized protocol buffer message + along with a - the timestamps of the valid votes in the block.LastCommit. For - height == 1, + URL that describes the type of the serialized message. - it's genesis time. - events: - type: array - items: - type: object - properties: - type: - type: string - attributes: - type: array - items: - type: object - properties: - key: - type: string - format: byte - value: - type: string - format: byte - index: - type: boolean - title: nondeterministic - description: >- - EventAttribute is a single key-value pair, associated with - an event. - description: >- - Event allows application developers to attach additional - information to - ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and - ResponseDeliverTx. + Protobuf library provides support to pack/unpack Any values in the + form - Later, transactions may be queried using these events. - description: >- - Events defines all the events emitted by processing a transaction. - Note, + of utility functions or additional generated methods of the Any + type. - these events include those emitted by processing all the messages - and those - emitted from the ante handler. Whereas Logs contains the events, - with + Example 1: Pack and unpack a message in C++. - additional metadata, emitted only by processing the messages. + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + Example 2: Pack and unpack a message in Java. - Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 - description: |- - BroadcastTxResponse is the response type for the - Service.BroadcastTx method. - cosmos.tx.v1beta1.Fee: - type: object - properties: - amount: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - title: amount is the amount of coins to be paid as a fee - gas_limit: - type: string - format: uint64 - title: >- - gas_limit is the maximum gas that can be used in transaction - processing + Example 3: Pack and unpack a message in Python. - before an out of gas error occurs - payer: - type: string - description: >- - if unset, the first signer is responsible for paying the fees. If set, - the specified account must pay the fees. + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - the payer must be a tx signer (and thus have signed this field in - AuthInfo). + Example 4: Pack and unpack a message in Go - setting this field does *not* change the ordering of required signers - for the transaction. - granter: - type: string - title: >- - if set, the fee payer (either the first signer or the value of the - payer field) requests that a fee grant be used + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - to pay fees instead of the fee payer's own balance. If an appropriate - fee grant does not exist or the chain does + The pack methods provided by protobuf library will by default use - not support fee grants, this will fail - description: >- - Fee includes the amount of coins paid in fees and the maximum + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - gas to be used by the transaction. The ratio yields an effective - "gasprice", + methods only use the fully qualified type name after the last '/' - which must be above some miminum to be accepted into the mempool. - cosmos.tx.v1beta1.GetBlockWithTxsResponse: - type: object - properties: - txs: - type: array - items: - type: object - $ref: '#/definitions/cosmos.tx.v1beta1.Tx' - description: txs are the transactions in the block. - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - block: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules for processing a block - in the blockchain, + in the type URL, for example "foo.bar.com/x/y.z" will yield type - including all blockchain data structures and the rules of the - application's + name "y.z". - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - description: commit from validators from the last block - title: hashes of block data - data_hash: - type: string - format: byte - title: transactions - validators_hash: - type: string - format: byte - description: validators for the current block - title: hashes from the app output from the prev block - next_validators_hash: - type: string - format: byte - title: validators for the next block - consensus_hash: - type: string - format: byte - title: consensus params for current block - app_hash: - type: string - format: byte - title: state after txs from the previous block - last_results_hash: - type: string - format: byte - title: root hash of all results from the txs from the previous block - evidence_hash: - type: string - format: byte - description: evidence included in the block - title: consensus info - proposer_address: - type: string - format: byte - title: original proposer of the block - description: Header defines the structure of a block header. - data: - type: object - properties: - txs: - type: array - items: - type: string - format: byte - description: >- - Txs that will be applied by state @ block.Height+1. - NOTE: not all txs here are valid. We're just agreeing on the - order first. - This means that block.AppHash does not include these txs. - title: Data contains the set of transactions included in the block - evidence: - type: object - properties: - evidence: - type: array - items: - type: object - properties: - duplicate_vote_evidence: - type: object - properties: - vote_a: - type: object - properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: >- - SignedMsgType is a type of signed message in the - consensus. + JSON - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - description: zero if vote is nil. - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or commit vote - from validators for + ==== - consensus. - vote_b: - type: object - properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: >- - SignedMsgType is a type of signed message in the - consensus. + The JSON representation of an `Any` value uses the regular - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - description: zero if vote is nil. - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or commit vote - from validators for + representation of the deserialized, embedded message, with an - consensus. - total_voting_power: - type: string - format: int64 - validator_power: - type: string - format: int64 - timestamp: - type: string - format: date-time - description: >- - DuplicateVoteEvidence contains evidence of a validator - signed two conflicting votes. - light_client_attack_evidence: - type: object - properties: - conflicting_block: - type: object - properties: - signed_header: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules - for processing a block in the - blockchain, + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - including all blockchain data structures - and the rules of the application's + If the embedded message type is well-known and has a custom JSON - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - description: >- - commit from validators from the last - block - title: hashes of block data - data_hash: - type: string - format: byte - title: transactions - validators_hash: - type: string - format: byte - description: validators for the current block - title: >- - hashes from the app output from the prev - block - next_validators_hash: - type: string - format: byte - title: validators for the next block - consensus_hash: - type: string - format: byte - title: consensus params for current block - app_hash: - type: string - format: byte - title: state after txs from the previous block - last_results_hash: - type: string - format: byte - title: >- - root hash of all results from the txs - from the previous block - evidence_hash: - type: string - format: byte - description: evidence included in the block - title: consensus info - proposer_address: - type: string - format: byte - title: original proposer of the block - description: >- - Header defines the structure of a block - header. - commit: - type: object - properties: - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: >- - BlockIdFlag indicates which BlcokID the - signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: >- - CommitSig is a part of the Vote included - in a Commit. - description: >- - Commit contains the evidence that a block - was committed by a set of validators. - validator_set: - type: object - properties: - validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for - use with Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - proposer: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for - use with Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - common_height: - type: string - format: int64 - byzantine_validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use - with Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - timestamp: - type: string - format: date-time - description: >- - LightClientAttackEvidence contains evidence of a set of - validators attempting to mislead a light client. - last_commit: + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: |- + IdentifiedClientState defines a client state with an additional client + identifier field. + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to + + reset the height in certain conditions e.g. hard forks, state-machine + + breaking changes In these cases, the RevisionNumber is incremented so + that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryChannelClientStateResponse is the Response type for the + Query/QueryChannelClientState RPC method + ibc.core.channel.v1.QueryChannelConsensusStateResponse: + type: object + properties: + consensus_state: + title: consensus state associated with the channel + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + client_id: + type: string + title: client ID associated with the consensus state + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to + + reset the height in certain conditions e.g. hard forks, state-machine + + breaking changes In these cases, the RevisionNumber is incremented so + that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryChannelClientStateResponse is the Response type for the + Query/QueryChannelClientState RPC method + ibc.core.channel.v1.QueryChannelResponse: + type: object + properties: + channel: + title: channel associated with the request identifiers + type: object + properties: + state: + title: current state of the channel end + type: string + enum: + - STATE_UNINITIALIZED_UNSPECIFIED + - STATE_INIT + - STATE_TRYOPEN + - STATE_OPEN + - STATE_CLOSED + default: STATE_UNINITIALIZED_UNSPECIFIED + description: |- + State defines if a channel is in one of the following states: + CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. + + - STATE_UNINITIALIZED_UNSPECIFIED: Default State + - STATE_INIT: A channel has just started the opening handshake. + - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. + - STATE_OPEN: A channel has completed the handshake. Open channels are + ready to send and receive packets. + - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive + packets. + ordering: + title: whether the channel is ordered or unordered + type: string + enum: + - ORDER_NONE_UNSPECIFIED + - ORDER_UNORDERED + - ORDER_ORDERED + default: ORDER_NONE_UNSPECIFIED + description: |- + - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering + - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in + which they were sent. + - ORDER_ORDERED: packets are delivered exactly in the order which they were sent + counterparty: + title: counterparty channel end type: object properties: - height: + port_id: + type: string + description: >- + port on the counterparty chain which owns the other end of the + channel. + channel_id: + type: string + title: channel end on the counterparty chain + connection_hops: + type: array + items: + type: string + title: >- + list of connection identifiers, in order, along which packets sent + on + + this channel will travel + version: + type: string + title: 'opaque channel version, which is agreed upon during the handshake' + description: >- + Channel defines pipeline for exactly-once packet delivery between + specific + + modules on separate blockchains, which has at least one end capable of + + sending packets and one end capable of receiving packets. + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to + + reset the height in certain conditions e.g. hard forks, state-machine + + breaking changes In these cases, the RevisionNumber is incremented so + that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + description: >- + QueryChannelResponse is the response type for the Query/Channel RPC + method. + + Besides the Channel end, it includes a proof and the height from which the + + proof was retrieved. + ibc.core.channel.v1.QueryChannelsResponse: + type: object + properties: + channels: + type: array + items: + type: object + properties: + state: + title: current state of the channel end + type: string + enum: + - STATE_UNINITIALIZED_UNSPECIFIED + - STATE_INIT + - STATE_TRYOPEN + - STATE_OPEN + - STATE_CLOSED + default: STATE_UNINITIALIZED_UNSPECIFIED + description: |- + State defines if a channel is in one of the following states: + CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. + + - STATE_UNINITIALIZED_UNSPECIFIED: Default State + - STATE_INIT: A channel has just started the opening handshake. + - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. + - STATE_OPEN: A channel has completed the handshake. Open channels are + ready to send and receive packets. + - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive + packets. + ordering: + title: whether the channel is ordered or unordered + type: string + enum: + - ORDER_NONE_UNSPECIFIED + - ORDER_UNORDERED + - ORDER_ORDERED + default: ORDER_NONE_UNSPECIFIED + description: |- + - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering + - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in + which they were sent. + - ORDER_ORDERED: packets are delivered exactly in the order which they were sent + counterparty: + title: counterparty channel end + type: object + properties: + port_id: + type: string + description: >- + port on the counterparty chain which owns the other end of + the channel. + channel_id: + type: string + title: channel end on the counterparty chain + connection_hops: + type: array + items: + type: string + title: >- + list of connection identifiers, in order, along which packets + sent on + + this channel will travel + version: + type: string + title: >- + opaque channel version, which is agreed upon during the + handshake + port_id: + type: string + title: port identifier + channel_id: + type: string + title: channel identifier + description: |- + IdentifiedChannel defines a channel with additional port and channel + identifier fields. + description: list of stored channels of the chain. + pagination: + title: pagination response + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + height: + title: query block height + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to + + reset the height in certain conditions e.g. hard forks, state-machine + + breaking changes In these cases, the RevisionNumber is incremented so + that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + description: >- + QueryChannelsResponse is the response type for the Query/Channels RPC + method. + ibc.core.channel.v1.QueryConnectionChannelsResponse: + type: object + properties: + channels: + type: array + items: + type: object + properties: + state: + title: current state of the channel end + type: string + enum: + - STATE_UNINITIALIZED_UNSPECIFIED + - STATE_INIT + - STATE_TRYOPEN + - STATE_OPEN + - STATE_CLOSED + default: STATE_UNINITIALIZED_UNSPECIFIED + description: |- + State defines if a channel is in one of the following states: + CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. + + - STATE_UNINITIALIZED_UNSPECIFIED: Default State + - STATE_INIT: A channel has just started the opening handshake. + - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. + - STATE_OPEN: A channel has completed the handshake. Open channels are + ready to send and receive packets. + - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive + packets. + ordering: + title: whether the channel is ordered or unordered + type: string + enum: + - ORDER_NONE_UNSPECIFIED + - ORDER_UNORDERED + - ORDER_ORDERED + default: ORDER_NONE_UNSPECIFIED + description: |- + - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering + - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in + which they were sent. + - ORDER_ORDERED: packets are delivered exactly in the order which they were sent + counterparty: + title: counterparty channel end + type: object + properties: + port_id: + type: string + description: >- + port on the counterparty chain which owns the other end of + the channel. + channel_id: + type: string + title: channel end on the counterparty chain + connection_hops: + type: array + items: type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: BlockIdFlag indicates which BlcokID the signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: CommitSig is a part of the Vote included in a Commit. - description: >- - Commit contains the evidence that a block was committed by a set - of validators. + title: >- + list of connection identifiers, in order, along which packets + sent on + + this channel will travel + version: + type: string + title: >- + opaque channel version, which is agreed upon during the + handshake + port_id: + type: string + title: port identifier + channel_id: + type: string + title: channel identifier + description: |- + IdentifiedChannel defines a channel with additional port and channel + identifier fields. + description: list of channels associated with a connection. + pagination: + title: pagination response + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + height: + title: query block height + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to + + reset the height in certain conditions e.g. hard forks, state-machine + + breaking changes In these cases, the RevisionNumber is incremented so + that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryConnectionChannelsResponse is the Response type for the + Query/QueryConnectionChannels RPC method + ibc.core.channel.v1.QueryNextSequenceReceiveResponse: + type: object + properties: + next_sequence_receive: + type: string + format: uint64 + title: next sequence receive number + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to + + reset the height in certain conditions e.g. hard forks, state-machine + + breaking changes In these cases, the RevisionNumber is incremented so + that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QuerySequenceResponse is the request type for the + Query/QueryNextSequenceReceiveResponse RPC method + ibc.core.channel.v1.QueryPacketAcknowledgementResponse: + type: object + properties: + acknowledgement: + type: string + format: byte + title: packet associated with the request fields + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to + + reset the height in certain conditions e.g. hard forks, state-machine + + breaking changes In these cases, the RevisionNumber is incremented so + that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryPacketAcknowledgementResponse defines the client query response for a + packet which also includes a proof and the height from which the + proof was retrieved + ibc.core.channel.v1.QueryPacketAcknowledgementsResponse: + type: object + properties: + acknowledgements: + type: array + items: + type: object + properties: + port_id: + type: string + description: channel port identifier. + channel_id: + type: string + description: channel unique identifier. + sequence: + type: string + format: uint64 + description: packet sequence. + data: + type: string + format: byte + description: embedded data that represents packet state. + description: >- + PacketState defines the generic type necessary to retrieve and store + + packet commitments, acknowledgements, and receipts. + + Caller is responsible for knowing the context necessary to interpret + this + + state as a commitment, acknowledgement, or a receipt. + pagination: + title: pagination response + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + height: + title: query block height + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to + + reset the height in certain conditions e.g. hard forks, state-machine + + breaking changes In these cases, the RevisionNumber is incremented so + that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryPacketAcknowledgemetsResponse is the request type for the + Query/QueryPacketAcknowledgements RPC method + ibc.core.channel.v1.QueryPacketCommitmentResponse: + type: object + properties: + commitment: + type: string + format: byte + title: packet associated with the request fields + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to + + reset the height in certain conditions e.g. hard forks, state-machine + + breaking changes In these cases, the RevisionNumber is incremented so + that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: >- + QueryPacketCommitmentResponse defines the client query response for a + packet + + which also includes a proof and the height from which the proof was + + retrieved + ibc.core.channel.v1.QueryPacketCommitmentsResponse: + type: object + properties: + commitments: + type: array + items: + type: object + properties: + port_id: + type: string + description: channel port identifier. + channel_id: + type: string + description: channel unique identifier. + sequence: + type: string + format: uint64 + description: packet sequence. + data: + type: string + format: byte + description: embedded data that represents packet state. + description: >- + PacketState defines the generic type necessary to retrieve and store + + packet commitments, acknowledgements, and receipts. + + Caller is responsible for knowing the context necessary to interpret + this + + state as a commitment, acknowledgement, or a receipt. pagination: - description: pagination defines a pagination for the response. + title: pagination response type: object properties: next_key: @@ -32939,618 +47252,610 @@ definitions: PageRequest.count_total was set, its value is undefined otherwise - description: >- - GetBlockWithTxsResponse is the response type for the - Service.GetBlockWithTxs method. + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + height: + title: query block height + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + RevisionNumber the same. However some consensus algorithms may choose + to - Since: cosmos-sdk 0.45.2 - cosmos.tx.v1beta1.GetTxResponse: + reset the height in certain conditions e.g. hard forks, state-machine + + breaking changes In these cases, the RevisionNumber is incremented so + that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryPacketCommitmentsResponse is the request type for the + Query/QueryPacketCommitments RPC method + ibc.core.channel.v1.QueryPacketReceiptResponse: type: object properties: - tx: - $ref: '#/definitions/cosmos.tx.v1beta1.Tx' - description: tx is the queried transaction. - tx_response: - description: tx_response is the queried TxResponses. + received: + type: boolean + title: success flag for if receipt exists + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved type: object properties: - height: - type: string - format: int64 - title: The block height - txhash: + revision_number: type: string - description: The transaction hash. - codespace: + format: uint64 + title: the revision that the client is currently on + revision_height: type: string - title: Namespace for the Code - code: - type: integer - format: int64 - description: Response code. - data: + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to + + reset the height in certain conditions e.g. hard forks, state-machine + + breaking changes In these cases, the RevisionNumber is incremented so + that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: >- + QueryPacketReceiptResponse defines the client query response for a packet + + receipt which also includes a proof, and the height from which the proof + was + + retrieved + ibc.core.channel.v1.QueryUnreceivedAcksResponse: + type: object + properties: + sequences: + type: array + items: + type: string + format: uint64 + title: list of unreceived acknowledgement sequences + height: + title: query block height + type: object + properties: + revision_number: type: string - description: 'Result bytes, if any.' - raw_log: + format: uint64 + title: the revision that the client is currently on + revision_height: type: string - description: |- - The output of the application's logger (raw string). May be - non-deterministic. - logs: - type: array - items: - type: object - properties: - msg_index: - type: integer - format: int64 - log: - type: string - events: - type: array - items: - type: object - properties: - type: - type: string - attributes: - type: array - items: - type: object - properties: - key: - type: string - value: - type: string - description: >- - Attribute defines an attribute wrapper where the key - and value are + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping - strings instead of raw bytes. - description: >- - StringEvent defines en Event object wrapper where all the - attributes + RevisionNumber the same. However some consensus algorithms may choose + to - contain key/value pairs that are strings instead of raw - bytes. - description: >- - Events contains a slice of Event objects that were emitted - during some + reset the height in certain conditions e.g. hard forks, state-machine - execution. - description: >- - ABCIMessageLog defines a structure containing an indexed tx ABCI - message log. - description: >- - The output of the application's logger (typed). May be - non-deterministic. - info: + breaking changes In these cases, the RevisionNumber is incremented so + that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryUnreceivedAcksResponse is the response type for the + Query/UnreceivedAcks RPC method + ibc.core.channel.v1.QueryUnreceivedPacketsResponse: + type: object + properties: + sequences: + type: array + items: + type: string + format: uint64 + title: list of unreceived packet sequences + height: + title: query block height + type: object + properties: + revision_number: type: string - description: Additional information. May be non-deterministic. - gas_wanted: + format: uint64 + title: the revision that the client is currently on + revision_height: type: string - format: int64 - description: Amount of gas requested for transaction. - gas_used: + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to + + reset the height in certain conditions e.g. hard forks, state-machine + + breaking changes In these cases, the RevisionNumber is incremented so + that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryUnreceivedPacketsResponse is the response type for the + Query/UnreceivedPacketCommitments RPC method + ibc.core.channel.v1.ResponseResultType: + type: string + enum: + - RESPONSE_RESULT_TYPE_UNSPECIFIED + - RESPONSE_RESULT_TYPE_NOOP + - RESPONSE_RESULT_TYPE_SUCCESS + default: RESPONSE_RESULT_TYPE_UNSPECIFIED + description: |- + - RESPONSE_RESULT_TYPE_UNSPECIFIED: Default zero value enumeration + - RESPONSE_RESULT_TYPE_NOOP: The message did not call the IBC application callbacks (because, for example, the packet had already been relayed) + - RESPONSE_RESULT_TYPE_SUCCESS: The message was executed successfully + title: >- + ResponseResultType defines the possible outcomes of the execution of a + message + ibc.core.channel.v1.State: + type: string + enum: + - STATE_UNINITIALIZED_UNSPECIFIED + - STATE_INIT + - STATE_TRYOPEN + - STATE_OPEN + - STATE_CLOSED + default: STATE_UNINITIALIZED_UNSPECIFIED + description: |- + State defines if a channel is in one of the following states: + CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. + + - STATE_UNINITIALIZED_UNSPECIFIED: Default State + - STATE_INIT: A channel has just started the opening handshake. + - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. + - STATE_OPEN: A channel has completed the handshake. Open channels are + ready to send and receive packets. + - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive + packets. + ibc.core.client.v1.IdentifiedClientState: + type: object + properties: + client_id: + type: string + title: client identifier + client_state: + title: client state + type: object + properties: + '@type': type: string - format: int64 - description: Amount of gas consumed by transaction. - tx: - description: The request transaction bytes. - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might be - protocol buffer message. This string must contain at least + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a - one "/" character. The last segment of the URL's path must - represent + URL that describes the type of the serialized message. - the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be in a - canonical form + Protobuf library provides support to pack/unpack Any values in the + form - (e.g., leading "." is not accepted). + of utility functions or additional generated methods of the Any type. - In practice, teams usually precompile into the binary all - types that they + Example 1: Pack and unpack a message in C++. - expect it to use in the context of Any. However, for URLs - which use the + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - scheme `http`, `https`, or no scheme, one can optionally set - up a type + Example 2: Pack and unpack a message in Java. - server that maps type URLs to message definitions as follows: + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + Example 3: Pack and unpack a message in Python. - * If no scheme is provided, `https` is assumed. + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + Example 4: Pack and unpack a message in Go - Note: this functionality is not currently available in the - official + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - protobuf release, and it is not used for type URLs beginning - with + The pack methods provided by protobuf library will by default use - type.googleapis.com. + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' - Schemes other than `http`, `https` (or the empty scheme) might - be + in the type URL, for example "foo.bar.com/x/y.z" will yield type - used with implementation specific semantics. - additionalProperties: {} - timestamp: - type: string - description: >- - Time of the previous block. For heights > 1, it's the weighted - median of + name "y.z". - the timestamps of the valid votes in the block.LastCommit. For - height == 1, - it's genesis time. - events: - type: array - items: - type: object - properties: - type: - type: string - attributes: - type: array - items: - type: object - properties: - key: - type: string - format: byte - value: - type: string - format: byte - index: - type: boolean - title: nondeterministic - description: >- - EventAttribute is a single key-value pair, associated with - an event. - description: >- - Event allows application developers to attach additional - information to - ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and - ResponseDeliverTx. + JSON - Later, transactions may be queried using these events. - description: >- - Events defines all the events emitted by processing a transaction. - Note, + ==== - these events include those emitted by processing all the messages - and those + The JSON representation of an `Any` value uses the regular - emitted from the ante handler. Whereas Logs contains the events, - with + representation of the deserialized, embedded message, with an - additional metadata, emitted only by processing the messages. + additional field `@type` which contains the type URL. Example: + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 - description: GetTxResponse is the response type for the Service.GetTx method. - cosmos.tx.v1beta1.GetTxsEventResponse: - type: object - properties: - txs: - type: array - items: - type: object - $ref: '#/definitions/cosmos.tx.v1beta1.Tx' - description: txs is the list of queried transactions. - tx_responses: - type: array - items: - type: object - properties: - height: - type: string - format: int64 - title: The block height - txhash: - type: string - description: The transaction hash. - codespace: - type: string - title: Namespace for the Code - code: - type: integer - format: int64 - description: Response code. - data: - type: string - description: 'Result bytes, if any.' - raw_log: - type: string - description: |- - The output of the application's logger (raw string). May be - non-deterministic. - logs: - type: array - items: - type: object - properties: - msg_index: - type: integer - format: int64 - log: - type: string - events: - type: array - items: - type: object - properties: - type: - type: string - attributes: - type: array - items: - type: object - properties: - key: - type: string - value: - type: string - description: >- - Attribute defines an attribute wrapper where the - key and value are + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - strings instead of raw bytes. - description: >- - StringEvent defines en Event object wrapper where all - the attributes + If the embedded message type is well-known and has a custom JSON - contain key/value pairs that are strings instead of raw - bytes. - description: >- - Events contains a slice of Event objects that were emitted - during some + representation, that representation will be embedded adding a field - execution. - description: >- - ABCIMessageLog defines a structure containing an indexed tx - ABCI message log. - description: >- - The output of the application's logger (typed). May be - non-deterministic. - info: - type: string - description: Additional information. May be non-deterministic. - gas_wanted: - type: string - format: int64 - description: Amount of gas requested for transaction. - gas_used: - type: string - format: int64 - description: Amount of gas consumed by transaction. - tx: - description: The request transaction bytes. - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: |- + IdentifiedClientState defines a client state with an additional client + identifier field. + ibc.core.client.v1.ConsensusStateWithHeight: + type: object + properties: + height: + title: consensus state height + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping - protocol buffer message. This string must contain at least + RevisionNumber the same. However some consensus algorithms may choose + to - one "/" character. The last segment of the URL's path must - represent + reset the height in certain conditions e.g. hard forks, state-machine - the fully qualified name of the type (as in + breaking changes In these cases, the RevisionNumber is incremented so + that - `path/google.protobuf.Duration`). The name should be in a - canonical form + height continues to be monitonically increasing even as the + RevisionHeight - (e.g., leading "." is not accepted). + gets reset + consensus_state: + title: consensus state + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + protocol buffer message. This string must contain at least - In practice, teams usually precompile into the binary all - types that they + one "/" character. The last segment of the URL's path must + represent - expect it to use in the context of Any. However, for URLs - which use the + the fully qualified name of the type (as in - scheme `http`, `https`, or no scheme, one can optionally set - up a type + `path/google.protobuf.Duration`). The name should be in a + canonical form - server that maps type URLs to message definitions as - follows: + (e.g., leading "." is not accepted). - * If no scheme is provided, `https` is assumed. + In practice, teams usually precompile into the binary all types + that they - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + expect it to use in the context of Any. However, for URLs which + use the - Note: this functionality is not currently available in the - official + scheme `http`, `https`, or no scheme, one can optionally set up a + type - protobuf release, and it is not used for type URLs beginning - with + server that maps type URLs to message definitions as follows: - type.googleapis.com. + * If no scheme is provided, `https` is assumed. - Schemes other than `http`, `https` (or the empty scheme) - might be + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - used with implementation specific semantics. - additionalProperties: {} - timestamp: - type: string - description: >- - Time of the previous block. For heights > 1, it's the weighted - median of + Note: this functionality is not currently available in the + official - the timestamps of the valid votes in the block.LastCommit. For - height == 1, + protobuf release, and it is not used for type URLs beginning with - it's genesis time. - events: - type: array - items: - type: object - properties: - type: - type: string - attributes: - type: array - items: - type: object - properties: - key: - type: string - format: byte - value: - type: string - format: byte - index: - type: boolean - title: nondeterministic - description: >- - EventAttribute is a single key-value pair, associated - with an event. - description: >- - Event allows application developers to attach additional - information to + type.googleapis.com. - ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and - ResponseDeliverTx. - Later, transactions may be queried using these events. - description: >- - Events defines all the events emitted by processing a - transaction. Note, + Schemes other than `http`, `https` (or the empty scheme) might be - these events include those emitted by processing all the - messages and those + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a - emitted from the ante handler. Whereas Logs contains the events, - with + URL that describes the type of the serialized message. - additional metadata, emitted only by processing the messages. + Protobuf library provides support to pack/unpack Any values in the + form - Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 - description: >- - TxResponse defines a structure containing relevant tx data and - metadata. The + of utility functions or additional generated methods of the Any type. - tags are stringified and the log is JSON decoded. - description: tx_responses is the list of queried TxResponses. - pagination: - description: pagination defines a pagination for the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - was set, its value is undefined otherwise - description: |- - GetTxsEventResponse is the response type for the Service.TxsByEvents - RPC method. - cosmos.tx.v1beta1.ModeInfo: - type: object - properties: - single: - title: single represents a single signer - type: object - properties: - mode: - title: mode is the signing mode of the single signer - type: string - enum: - - SIGN_MODE_UNSPECIFIED - - SIGN_MODE_DIRECT - - SIGN_MODE_TEXTUAL - - SIGN_MODE_LEGACY_AMINO_JSON - - SIGN_MODE_EIP_191 - default: SIGN_MODE_UNSPECIFIED - description: >- - SignMode represents a signing mode with its own security - guarantees. + Example 1: Pack and unpack a message in C++. - - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be - rejected - - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is - verified with raw bytes from Tx - - SIGN_MODE_TEXTUAL: SIGN_MODE_TEXTUAL is a future signing mode that will verify some - human-readable textual representation on top of the binary - representation + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - from SIGN_MODE_DIRECT - - SIGN_MODE_LEGACY_AMINO_JSON: SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses - Amino JSON and will be removed in the future - - SIGN_MODE_EIP_191: SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos - SDK. Ref: https://eips.ethereum.org/EIPS/eip-191 + Example 2: Pack and unpack a message in Java. + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum - variant, + Example 3: Pack and unpack a message in Python. - but is not implemented on the SDK by default. To enable EIP-191, - you need + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - to pass a custom `TxConfig` that has an implementation of + Example 4: Pack and unpack a message in Go - `SignModeHandler` for EIP-191. The SDK may decide to fully support + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - EIP-191 in the future. + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack - Since: cosmos-sdk 0.45.2 - multi: - $ref: '#/definitions/cosmos.tx.v1beta1.ModeInfo.Multi' - title: multi represents a nested multisig signer - description: ModeInfo describes the signing mode of a single or nested multisig signer. - cosmos.tx.v1beta1.ModeInfo.Multi: - type: object - properties: - bitarray: - title: bitarray specifies which keys within the multisig are signing - type: object - properties: - extra_bits_stored: - type: integer - format: int64 - elems: - type: string - format: byte - description: >- - CompactBitArray is an implementation of a space efficient bit array. + methods only use the fully qualified type name after the last '/' - This is used to ensure that the encoded data takes up a minimal amount - of + in the type URL, for example "foo.bar.com/x/y.z" will yield type - space after proto encoding. + name "y.z". - This is not thread safe, and is not intended for concurrent usage. - mode_infos: - type: array - items: - type: object - $ref: '#/definitions/cosmos.tx.v1beta1.ModeInfo' - title: |- - mode_infos is the corresponding modes of the signers of the multisig - which could include nested multisig public keys - title: Multi is the mode info for a multisig public key - cosmos.tx.v1beta1.ModeInfo.Single: - type: object - properties: - mode: - title: mode is the signing mode of the single signer - type: string - enum: - - SIGN_MODE_UNSPECIFIED - - SIGN_MODE_DIRECT - - SIGN_MODE_TEXTUAL - - SIGN_MODE_LEGACY_AMINO_JSON - - SIGN_MODE_EIP_191 - default: SIGN_MODE_UNSPECIFIED - description: >- - SignMode represents a signing mode with its own security guarantees. - - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be - rejected - - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is - verified with raw bytes from Tx - - SIGN_MODE_TEXTUAL: SIGN_MODE_TEXTUAL is a future signing mode that will verify some - human-readable textual representation on top of the binary - representation - from SIGN_MODE_DIRECT - - SIGN_MODE_LEGACY_AMINO_JSON: SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses - Amino JSON and will be removed in the future - - SIGN_MODE_EIP_191: SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos - SDK. Ref: https://eips.ethereum.org/EIPS/eip-191 + JSON + ==== - Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant, + The JSON representation of an `Any` value uses the regular - but is not implemented on the SDK by default. To enable EIP-191, you - need + representation of the deserialized, embedded message, with an - to pass a custom `TxConfig` that has an implementation of + additional field `@type` which contains the type URL. Example: - `SignModeHandler` for EIP-191. The SDK may decide to fully support + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - EIP-191 in the future. + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field - Since: cosmos-sdk 0.45.2 - title: |- - Single is the mode info for a single signer. It is structured as a message - to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the - future - cosmos.tx.v1beta1.OrderBy: - type: string - enum: - - ORDER_BY_UNSPECIFIED - - ORDER_BY_ASC - - ORDER_BY_DESC - default: ORDER_BY_UNSPECIFIED + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } description: >- - - ORDER_BY_UNSPECIFIED: ORDER_BY_UNSPECIFIED specifies an unknown sorting - order. OrderBy defaults to ASC in this case. - - ORDER_BY_ASC: ORDER_BY_ASC defines ascending order - - ORDER_BY_DESC: ORDER_BY_DESC defines descending order - title: OrderBy defines the sorting order - cosmos.tx.v1beta1.SignerInfo: + ConsensusStateWithHeight defines a consensus state with an additional + height + + field. + ibc.core.client.v1.MsgCreateClientResponse: + type: object + description: MsgCreateClientResponse defines the Msg/CreateClient response type. + ibc.core.client.v1.MsgSubmitMisbehaviourResponse: + type: object + description: |- + MsgSubmitMisbehaviourResponse defines the Msg/SubmitMisbehaviour response + type. + ibc.core.client.v1.MsgUpdateClientResponse: + type: object + description: MsgUpdateClientResponse defines the Msg/UpdateClient response type. + ibc.core.client.v1.MsgUpgradeClientResponse: + type: object + description: MsgUpgradeClientResponse defines the Msg/UpgradeClient response type. + ibc.core.client.v1.Params: type: object properties: - public_key: - description: >- - public_key is the public key of the signer. It is optional for - accounts - - that already exist in state. If unset, the verifier can use the - required \ + allowed_clients: + type: array + items: + type: string + description: allowed_clients defines the list of allowed client state types. + description: Params defines the set of IBC light client parameters. + ibc.core.client.v1.QueryClientParamsResponse: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + allowed_clients: + type: array + items: + type: string + description: allowed_clients defines the list of allowed client state types. + description: >- + QueryClientParamsResponse is the response type for the Query/ClientParams + RPC - signer address for this position and lookup the public key. + method. + ibc.core.client.v1.QueryClientStateResponse: + type: object + properties: + client_state: + title: client state associated with the request identifier type: object properties: '@type': @@ -33606,127 +47911,159 @@ definitions: used with implementation specific semantics. additionalProperties: {} - mode_info: - $ref: '#/definitions/cosmos.tx.v1beta1.ModeInfo' - title: |- - mode_info describes the signing mode of the signer and is a nested - structure to support nested multisig pubkey's - sequence: - type: string - format: uint64 description: >- - sequence is the sequence of the account, which describes the + `Any` contains an arbitrary serialized protocol buffer message along + with a - number of committed transactions signed by a given address. It is used - to + URL that describes the type of the serialized message. - prevent replay attacks. - description: |- - SignerInfo describes the public key and signing mode of a single top-level - signer. - cosmos.tx.v1beta1.SimulateRequest: - type: object - properties: - tx: - $ref: '#/definitions/cosmos.tx.v1beta1.Tx' - description: |- - tx is the transaction to simulate. - Deprecated. Send raw tx bytes instead. - tx_bytes: - type: string - format: byte - description: |- - tx_bytes is the raw transaction. - Since: cosmos-sdk 0.43 - description: |- - SimulateRequest is the request type for the Service.Simulate - RPC method. - cosmos.tx.v1beta1.SimulateResponse: - type: object - properties: - gas_info: - description: gas_info is the information about gas used in the simulation. + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved type: object properties: - gas_wanted: + revision_number: type: string format: uint64 - description: >- - GasWanted is the maximum units of work we allow this tx to - perform. - gas_used: + title: the revision that the client is currently on + revision_height: type: string format: uint64 - description: GasUsed is the amount of gas actually consumed. - result: - description: result is the result of the simulation. - type: object - properties: - data: - type: string - format: byte - description: >- - Data is any data returned from message or handler execution. It - MUST be + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping - length prefixed in order to separate data from multiple message - executions. - log: - type: string - description: >- - Log contains the log information from message or handler - execution. - events: - type: array - items: - type: object - properties: - type: - type: string - attributes: - type: array - items: - type: object - properties: - key: - type: string - format: byte - value: - type: string - format: byte - index: - type: boolean - title: nondeterministic - description: >- - EventAttribute is a single key-value pair, associated with - an event. - description: >- - Event allows application developers to attach additional - information to + RevisionNumber the same. However some consensus algorithms may choose + to - ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and - ResponseDeliverTx. + reset the height in certain conditions e.g. hard forks, state-machine - Later, transactions may be queried using these events. - description: >- - Events contains a slice of Event objects that were emitted during - message + breaking changes In these cases, the RevisionNumber is incremented so + that - or handler execution. - description: |- - SimulateResponse is the response type for the - Service.SimulateRPC method. - cosmos.tx.v1beta1.Tx: + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + description: >- + QueryClientStateResponse is the response type for the Query/ClientState + RPC + + method. Besides the client state, it includes a proof and the height from + + which the proof was retrieved. + ibc.core.client.v1.QueryClientStatesResponse: type: object properties: - body: - title: body is the processable content of the transaction - type: object - properties: - messages: - type: array - items: + client_states: + type: array + items: + type: object + properties: + client_id: + type: string + title: client identifier + client_state: + title: client state type: object properties: '@type': @@ -33893,221 +48230,362 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - description: >- - messages is a list of messages to be executed. The required - signers of + description: >- + IdentifiedClientState defines a client state with an additional + client - those messages define the number and order of elements in - AuthInfo's + identifier field. + description: list of stored ClientStates of the chain. + pagination: + title: pagination response + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - signer_infos and Tx's signatures. Each required signer address is - added to + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. - the list only the first time it occurs. + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + description: >- + QueryClientStatesResponse is the response type for the Query/ClientStates + RPC - By convention, the first required signer (usually from the first - message) + method. + ibc.core.client.v1.QueryClientStatusResponse: + type: object + properties: + status: + type: string + description: >- + QueryClientStatusResponse is the response type for the Query/ClientStatus + RPC - is referred to as the primary signer and pays the fee for the - whole + method. It returns the current status of the IBC client. + ibc.core.client.v1.QueryConsensusStateHeightsResponse: + type: object + properties: + consensus_state_heights: + type: array + items: + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping - transaction. - memo: - type: string - description: >- - memo is any arbitrary note/comment to be added to the transaction. + RevisionNumber the same. However some consensus algorithms may + choose to - WARNING: in clients, any publicly exposed text should not be - called memo, + reset the height in certain conditions e.g. hard forks, + state-machine - but should be called `note` instead (see - https://github.com/cosmos/cosmos-sdk/issues/9122). - timeout_height: + breaking changes In these cases, the RevisionNumber is incremented + so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: >- + Height is a monotonically increasing data type + + that can be compared against another Height for the purposes of + updating and + + freezing clients + title: consensus state heights + pagination: + title: pagination response + type: object + properties: + next_key: type: string - format: uint64 + format: byte title: |- - timeout is the block height after which this transaction will not - be processed by the chain - extension_options: - type: array - items: - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - protocol buffer message. This string must contain at least + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. - one "/" character. The last segment of the URL's path must - represent + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + title: |- + QueryConsensusStateHeightsResponse is the response type for the + Query/ConsensusStateHeights RPC method + ibc.core.client.v1.QueryConsensusStateResponse: + type: object + properties: + consensus_state: + title: >- + consensus state associated with the client identifier at the given + height + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized - the fully qualified name of the type (as in + protocol buffer message. This string must contain at least - `path/google.protobuf.Duration`). The name should be in a - canonical form + one "/" character. The last segment of the URL's path must + represent - (e.g., leading "." is not accepted). + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a + canonical form - In practice, teams usually precompile into the binary all - types that they + (e.g., leading "." is not accepted). - expect it to use in the context of Any. However, for URLs - which use the - scheme `http`, `https`, or no scheme, one can optionally set - up a type + In practice, teams usually precompile into the binary all types + that they - server that maps type URLs to message definitions as - follows: + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + URL that describes the type of the serialized message. - * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + Protobuf library provides support to pack/unpack Any values in the + form - Note: this functionality is not currently available in the - official + of utility functions or additional generated methods of the Any type. - protobuf release, and it is not used for type URLs beginning - with - type.googleapis.com. + Example 1: Pack and unpack a message in C++. + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - Schemes other than `http`, `https` (or the empty scheme) - might be + Example 2: Pack and unpack a message in Java. - used with implementation specific semantics. - additionalProperties: {} - description: >- - `Any` contains an arbitrary serialized protocol buffer message - along with a + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - URL that describes the type of the serialized message. + Example 3: Pack and unpack a message in Python. + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - Protobuf library provides support to pack/unpack Any values in - the form + Example 4: Pack and unpack a message in Go - of utility functions or additional generated methods of the Any - type. + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + The pack methods provided by protobuf library will by default use - Example 1: Pack and unpack a message in C++. + 'type.googleapis.com/full.type.name' as the type URL and the unpack - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + methods only use the fully qualified type name after the last '/' - Example 2: Pack and unpack a message in Java. + in the type URL, for example "foo.bar.com/x/y.z" will yield type - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + name "y.z". - Example 3: Pack and unpack a message in Python. - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - Example 4: Pack and unpack a message in Go + JSON - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } + ==== - The pack methods provided by protobuf library will by default - use + The JSON representation of an `Any` value uses the regular - 'type.googleapis.com/full.type.name' as the type URL and the - unpack + representation of the deserialized, embedded message, with an - methods only use the fully qualified type name after the last - '/' + additional field `@type` which contains the type URL. Example: - in the type URL, for example "foo.bar.com/x/y.z" will yield type + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - name "y.z". + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field - JSON + `value` which holds the custom JSON in addition to the `@type` - ==== + field. Example (for message [google.protobuf.Duration][]): - The JSON representation of an `Any` value uses the regular + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping - representation of the deserialized, embedded message, with an + RevisionNumber the same. However some consensus algorithms may choose + to - additional field `@type` which contains the type URL. Example: + reset the height in certain conditions e.g. hard forks, state-machine - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + breaking changes In these cases, the RevisionNumber is incremented so + that - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + height continues to be monitonically increasing even as the + RevisionHeight - If the embedded message type is well-known and has a custom JSON + gets reset + title: >- + QueryConsensusStateResponse is the response type for the + Query/ConsensusState - representation, that representation will be embedded adding a - field + RPC method + ibc.core.client.v1.QueryConsensusStatesResponse: + type: object + properties: + consensus_states: + type: array + items: + type: object + properties: + height: + title: consensus state height + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping - `value` which holds the custom JSON in addition to the `@type` + RevisionNumber the same. However some consensus algorithms may + choose to - field. Example (for message [google.protobuf.Duration][]): + reset the height in certain conditions e.g. hard forks, + state-machine - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - title: >- - extension_options are arbitrary options that can be added by - chains + breaking changes In these cases, the RevisionNumber is + incremented so that - when the default options are not sufficient. If any of these are - present + height continues to be monitonically increasing even as the + RevisionHeight - and can't be handled, the transaction will be rejected - non_critical_extension_options: - type: array - items: + gets reset + consensus_state: + title: consensus state type: object properties: '@type': @@ -34274,676 +48752,858 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - title: >- - extension_options are arbitrary options that can be added by - chains - - when the default options are not sufficient. If any of these are - present + description: >- + ConsensusStateWithHeight defines a consensus state with an + additional height - and can't be handled, they will be ignored - description: TxBody is the body of a transaction that all signers sign over. - auth_info: - $ref: '#/definitions/cosmos.tx.v1beta1.AuthInfo' - title: |- - auth_info is the authorization related content of the transaction, - specifically signers, signer modes and fee - signatures: - type: array - items: - type: string - format: byte - description: >- - signatures is a list of signatures that matches the length and order - of + field. + title: consensus states associated with the identifier + pagination: + title: pagination response + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - AuthInfo's signer_infos to allow connecting signature meta information - like + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. - public key and signing mode by position. - description: Tx is the standard type used for broadcasting transactions. - cosmos.tx.v1beta1.TxBody: + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + title: |- + QueryConsensusStatesResponse is the response type for the + Query/ConsensusStates RPC method + ibc.core.client.v1.QueryUpgradedClientStateResponse: type: object properties: - messages: - type: array - items: - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + upgraded_client_state: + title: client state associated with the request identifier + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized - protocol buffer message. This string must contain at least + protocol buffer message. This string must contain at least - one "/" character. The last segment of the URL's path must - represent + one "/" character. The last segment of the URL's path must + represent - the fully qualified name of the type (as in + the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be in a - canonical form + `path/google.protobuf.Duration`). The name should be in a + canonical form - (e.g., leading "." is not accepted). + (e.g., leading "." is not accepted). - In practice, teams usually precompile into the binary all types - that they + In practice, teams usually precompile into the binary all types + that they - expect it to use in the context of Any. However, for URLs which - use the + expect it to use in the context of Any. However, for URLs which + use the - scheme `http`, `https`, or no scheme, one can optionally set up - a type + scheme `http`, `https`, or no scheme, one can optionally set up a + type - server that maps type URLs to message definitions as follows: + server that maps type URLs to message definitions as follows: - * If no scheme is provided, `https` is assumed. + * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - Note: this functionality is not currently available in the - official + Note: this functionality is not currently available in the + official - protobuf release, and it is not used for type URLs beginning - with + protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. - Schemes other than `http`, `https` (or the empty scheme) might - be + Schemes other than `http`, `https` (or the empty scheme) might be - used with implementation specific semantics. - additionalProperties: {} - description: >- - `Any` contains an arbitrary serialized protocol buffer message along - with a + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a - URL that describes the type of the serialized message. + URL that describes the type of the serialized message. - Protobuf library provides support to pack/unpack Any values in the - form + Protobuf library provides support to pack/unpack Any values in the + form - of utility functions or additional generated methods of the Any - type. + of utility functions or additional generated methods of the Any type. - Example 1: Pack and unpack a message in C++. + Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { ... - if (any.UnpackTo(&foo)) { - ... - } + } - Example 2: Pack and unpack a message in Java. + Example 2: Pack and unpack a message in Java. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. - foo = Foo(...) - any = Any() - any.Pack(foo) + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by default use - - 'type.googleapis.com/full.type.name' as the type URL and the unpack - - methods only use the fully qualified type name after the last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield type - - name "y.z". - - - - JSON + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - ==== + The pack methods provided by protobuf library will by default use - The JSON representation of an `Any` value uses the regular + 'type.googleapis.com/full.type.name' as the type URL and the unpack - representation of the deserialized, embedded message, with an + methods only use the fully qualified type name after the last '/' - additional field `@type` which contains the type URL. Example: + in the type URL, for example "foo.bar.com/x/y.z" will yield type - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + name "y.z". - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - If the embedded message type is well-known and has a custom JSON - representation, that representation will be embedded adding a field + JSON - `value` which holds the custom JSON in addition to the `@type` + ==== - field. Example (for message [google.protobuf.Duration][]): + The JSON representation of an `Any` value uses the regular - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - description: >- - messages is a list of messages to be executed. The required signers of + representation of the deserialized, embedded message, with an - those messages define the number and order of elements in AuthInfo's + additional field `@type` which contains the type URL. Example: - signer_infos and Tx's signatures. Each required signer address is - added to + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - the list only the first time it occurs. + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - By convention, the first required signer (usually from the first - message) + If the embedded message type is well-known and has a custom JSON - is referred to as the primary signer and pays the fee for the whole + representation, that representation will be embedded adding a field - transaction. - memo: - type: string - description: >- - memo is any arbitrary note/comment to be added to the transaction. + `value` which holds the custom JSON in addition to the `@type` - WARNING: in clients, any publicly exposed text should not be called - memo, + field. Example (for message [google.protobuf.Duration][]): - but should be called `note` instead (see - https://github.com/cosmos/cosmos-sdk/issues/9122). - timeout_height: - type: string - format: uint64 - title: |- - timeout is the block height after which this transaction will not - be processed by the chain - extension_options: - type: array - items: - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: |- + QueryUpgradedClientStateResponse is the response type for the + Query/UpgradedClientState RPC method. + ibc.core.client.v1.QueryUpgradedConsensusStateResponse: + type: object + properties: + upgraded_consensus_state: + title: Consensus state associated with the request identifier + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized - protocol buffer message. This string must contain at least + protocol buffer message. This string must contain at least - one "/" character. The last segment of the URL's path must - represent + one "/" character. The last segment of the URL's path must + represent - the fully qualified name of the type (as in + the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be in a - canonical form + `path/google.protobuf.Duration`). The name should be in a + canonical form - (e.g., leading "." is not accepted). + (e.g., leading "." is not accepted). - In practice, teams usually precompile into the binary all types - that they + In practice, teams usually precompile into the binary all types + that they - expect it to use in the context of Any. However, for URLs which - use the + expect it to use in the context of Any. However, for URLs which + use the - scheme `http`, `https`, or no scheme, one can optionally set up - a type + scheme `http`, `https`, or no scheme, one can optionally set up a + type - server that maps type URLs to message definitions as follows: + server that maps type URLs to message definitions as follows: - * If no scheme is provided, `https` is assumed. + * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - Note: this functionality is not currently available in the - official + Note: this functionality is not currently available in the + official - protobuf release, and it is not used for type URLs beginning - with + protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. - Schemes other than `http`, `https` (or the empty scheme) might - be + Schemes other than `http`, `https` (or the empty scheme) might be - used with implementation specific semantics. - additionalProperties: {} - description: >- - `Any` contains an arbitrary serialized protocol buffer message along - with a + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a - URL that describes the type of the serialized message. + URL that describes the type of the serialized message. - Protobuf library provides support to pack/unpack Any values in the - form + Protobuf library provides support to pack/unpack Any values in the + form - of utility functions or additional generated methods of the Any - type. + of utility functions or additional generated methods of the Any type. - Example 1: Pack and unpack a message in C++. + Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { ... - if (any.UnpackTo(&foo)) { - ... - } + } - Example 2: Pack and unpack a message in Java. + Example 2: Pack and unpack a message in Java. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. - foo = Foo(...) - any = Any() - any.Pack(foo) + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - The pack methods provided by protobuf library will by default use + The pack methods provided by protobuf library will by default use - 'type.googleapis.com/full.type.name' as the type URL and the unpack + 'type.googleapis.com/full.type.name' as the type URL and the unpack - methods only use the fully qualified type name after the last '/' + methods only use the fully qualified type name after the last '/' - in the type URL, for example "foo.bar.com/x/y.z" will yield type + in the type URL, for example "foo.bar.com/x/y.z" will yield type - name "y.z". + name "y.z". - JSON + JSON - ==== + ==== - The JSON representation of an `Any` value uses the regular + The JSON representation of an `Any` value uses the regular - representation of the deserialized, embedded message, with an + representation of the deserialized, embedded message, with an - additional field `@type` which contains the type URL. Example: + additional field `@type` which contains the type URL. Example: - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - If the embedded message type is well-known and has a custom JSON + If the embedded message type is well-known and has a custom JSON - representation, that representation will be embedded adding a field + representation, that representation will be embedded adding a field - `value` which holds the custom JSON in addition to the `@type` + `value` which holds the custom JSON in addition to the `@type` - field. Example (for message [google.protobuf.Duration][]): + field. Example (for message [google.protobuf.Duration][]): - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: |- + QueryUpgradedConsensusStateResponse is the response type for the + Query/UpgradedConsensusState RPC method. + ibc.core.commitment.v1.MerklePrefix: + type: object + properties: + key_prefix: + type: string + format: byte + title: |- + MerklePrefix is merkle path prefixed to the key. + The constructed key from the Path and the key will be append(Path.KeyPath, + append(Path.KeyPrefix, key...)) + ibc.core.connection.v1.ConnectionEnd: + type: object + properties: + client_id: + type: string + description: client associated with this connection. + versions: + type: array + items: + type: object + properties: + identifier: + type: string + title: unique version identifier + features: + type: array + items: + type: string + title: list of features compatible with the specified identifier + description: >- + Version defines the versioning scheme used to negotiate the IBC + verison in + + the connection handshake. + description: >- + IBC version which can be utilised to determine encodings or protocols + for + + channels or packets utilising this connection. + state: + description: current state of the connection end. + type: string + enum: + - STATE_UNINITIALIZED_UNSPECIFIED + - STATE_INIT + - STATE_TRYOPEN + - STATE_OPEN + default: STATE_UNINITIALIZED_UNSPECIFIED + counterparty: + description: counterparty chain associated with this connection. + type: object + properties: + client_id: + type: string + description: >- + identifies the client on the counterparty chain associated with a + given + + connection. + connection_id: + type: string + description: >- + identifies the connection end on the counterparty chain associated + with a + + given connection. + prefix: + description: commitment merkle prefix of the counterparty chain. + type: object + properties: + key_prefix: + type: string + format: byte + title: >- + MerklePrefix is merkle path prefixed to the key. + + The constructed key from the Path and the key will be + append(Path.KeyPath, + + append(Path.KeyPrefix, key...)) + delay_period: + type: string + format: uint64 + description: >- + delay period that must pass before a consensus state can be used for + + packet-verification NOTE: delay period logic is only implemented by + some + + clients. + description: |- + ConnectionEnd defines a stateful object on a chain connected to another + separate one. + NOTE: there must only be 2 defined ConnectionEnds to establish + a connection between two chains. + ibc.core.connection.v1.Counterparty: + type: object + properties: + client_id: + type: string + description: >- + identifies the client on the counterparty chain associated with a + given + + connection. + connection_id: + type: string + description: >- + identifies the connection end on the counterparty chain associated + with a + + given connection. + prefix: + description: commitment merkle prefix of the counterparty chain. + type: object + properties: + key_prefix: + type: string + format: byte title: >- - extension_options are arbitrary options that can be added by chains + MerklePrefix is merkle path prefixed to the key. - when the default options are not sufficient. If any of these are - present + The constructed key from the Path and the key will be + append(Path.KeyPath, - and can't be handled, the transaction will be rejected - non_critical_extension_options: + append(Path.KeyPrefix, key...)) + description: >- + Counterparty defines the counterparty chain associated with a connection + end. + ibc.core.connection.v1.IdentifiedConnection: + type: object + properties: + id: + type: string + description: connection identifier. + client_id: + type: string + description: client associated with this connection. + versions: type: array items: type: object properties: - '@type': + identifier: type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). + title: unique version identifier + features: + type: array + items: + type: string + title: list of features compatible with the specified identifier + description: >- + Version defines the versioning scheme used to negotiate the IBC + verison in + the connection handshake. + title: >- + IBC version which can be utilised to determine encodings or protocols + for - In practice, teams usually precompile into the binary all types - that they + channels or packets utilising this connection + state: + description: current state of the connection end. + type: string + enum: + - STATE_UNINITIALIZED_UNSPECIFIED + - STATE_INIT + - STATE_TRYOPEN + - STATE_OPEN + default: STATE_UNINITIALIZED_UNSPECIFIED + counterparty: + description: counterparty chain associated with this connection. + type: object + properties: + client_id: + type: string + description: >- + identifies the client on the counterparty chain associated with a + given - expect it to use in the context of Any. However, for URLs which - use the + connection. + connection_id: + type: string + description: >- + identifies the connection end on the counterparty chain associated + with a - scheme `http`, `https`, or no scheme, one can optionally set up - a type + given connection. + prefix: + description: commitment merkle prefix of the counterparty chain. + type: object + properties: + key_prefix: + type: string + format: byte + title: >- + MerklePrefix is merkle path prefixed to the key. - server that maps type URLs to message definitions as follows: + The constructed key from the Path and the key will be + append(Path.KeyPath, + append(Path.KeyPrefix, key...)) + delay_period: + type: string + format: uint64 + description: delay period associated with this connection. + description: |- + IdentifiedConnection defines a connection with additional connection + identifier field. + ibc.core.connection.v1.MsgConnectionOpenAckResponse: + type: object + description: >- + MsgConnectionOpenAckResponse defines the Msg/ConnectionOpenAck response + type. + ibc.core.connection.v1.MsgConnectionOpenConfirmResponse: + type: object + description: |- + MsgConnectionOpenConfirmResponse defines the Msg/ConnectionOpenConfirm + response type. + ibc.core.connection.v1.MsgConnectionOpenInitResponse: + type: object + description: |- + MsgConnectionOpenInitResponse defines the Msg/ConnectionOpenInit response + type. + ibc.core.connection.v1.MsgConnectionOpenTryResponse: + type: object + description: >- + MsgConnectionOpenTryResponse defines the Msg/ConnectionOpenTry response + type. + ibc.core.connection.v1.QueryClientConnectionsResponse: + type: object + properties: + connection_paths: + type: array + items: + type: string + description: slice of all the connection paths associated with a client. + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was generated + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping - * If no scheme is provided, `https` is assumed. + RevisionNumber the same. However some consensus algorithms may choose + to - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + reset the height in certain conditions e.g. hard forks, state-machine - Note: this functionality is not currently available in the - official + breaking changes In these cases, the RevisionNumber is incremented so + that - protobuf release, and it is not used for type URLs beginning - with + height continues to be monitonically increasing even as the + RevisionHeight - type.googleapis.com. + gets reset + title: |- + QueryClientConnectionsResponse is the response type for the + Query/ClientConnections RPC method + ibc.core.connection.v1.QueryConnectionClientStateResponse: + type: object + properties: + identified_client_state: + title: client state associated with the channel + type: object + properties: + client_id: + type: string + title: client identifier + client_state: + title: client state + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + protocol buffer message. This string must contain at least - Schemes other than `http`, `https` (or the empty scheme) might - be + one "/" character. The last segment of the URL's path must + represent - used with implementation specific semantics. - additionalProperties: {} - description: >- - `Any` contains an arbitrary serialized protocol buffer message along - with a + the fully qualified name of the type (as in - URL that describes the type of the serialized message. + `path/google.protobuf.Duration`). The name should be in a + canonical form + (e.g., leading "." is not accepted). - Protobuf library provides support to pack/unpack Any values in the - form - of utility functions or additional generated methods of the Any - type. + In practice, teams usually precompile into the binary all + types that they + expect it to use in the context of Any. However, for URLs + which use the - Example 1: Pack and unpack a message in C++. + scheme `http`, `https`, or no scheme, one can optionally set + up a type - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + server that maps type URLs to message definitions as follows: - Example 2: Pack and unpack a message in Java. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + * If no scheme is provided, `https` is assumed. - Example 3: Pack and unpack a message in Python. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + Note: this functionality is not currently available in the + official - Example 4: Pack and unpack a message in Go + protobuf release, and it is not used for type URLs beginning + with - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } + type.googleapis.com. - The pack methods provided by protobuf library will by default use - 'type.googleapis.com/full.type.name' as the type URL and the unpack + Schemes other than `http`, `https` (or the empty scheme) might + be - methods only use the fully qualified type name after the last '/' + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a - in the type URL, for example "foo.bar.com/x/y.z" will yield type + URL that describes the type of the serialized message. - name "y.z". + Protobuf library provides support to pack/unpack Any values in the + form + of utility functions or additional generated methods of the Any + type. - JSON - ==== + Example 1: Pack and unpack a message in C++. - The JSON representation of an `Any` value uses the regular + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - representation of the deserialized, embedded message, with an + Example 2: Pack and unpack a message in Java. - additional field `@type` which contains the type URL. Example: + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + Example 3: Pack and unpack a message in Python. - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - If the embedded message type is well-known and has a custom JSON + Example 4: Pack and unpack a message in Go - representation, that representation will be embedded adding a field + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - `value` which holds the custom JSON in addition to the `@type` + The pack methods provided by protobuf library will by default use - field. Example (for message [google.protobuf.Duration][]): + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - title: >- - extension_options are arbitrary options that can be added by chains + methods only use the fully qualified type name after the last '/' - when the default options are not sufficient. If any of these are - present + in the type URL, for example "foo.bar.com/x/y.z" will yield type - and can't be handled, they will be ignored - description: TxBody is the body of a transaction that all signers sign over. - tendermint.abci.Event: - type: object - properties: - type: - type: string - attributes: - type: array - items: - type: object - properties: - key: - type: string - format: byte - value: - type: string - format: byte - index: - type: boolean - title: nondeterministic - description: 'EventAttribute is a single key-value pair, associated with an event.' - description: >- - Event allows application developers to attach additional information to + name "y.z". - ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and - ResponseDeliverTx. - Later, transactions may be queried using these events. - tendermint.abci.EventAttribute: - type: object - properties: - key: - type: string - format: byte - value: - type: string - format: byte - index: - type: boolean - title: nondeterministic - description: 'EventAttribute is a single key-value pair, associated with an event.' - cosmos.upgrade.v1beta1.ModuleVersion: - type: object - properties: - name: - type: string - title: name of the app module - version: - type: string - format: uint64 - title: consensus version of the app module - description: |- - ModuleVersion specifies a module and its consensus version. - Since: cosmos-sdk 0.43 - cosmos.upgrade.v1beta1.Plan: - type: object - properties: - name: - type: string - description: >- - Sets the name for the upgrade. This name will be used by the upgraded + JSON - version of the software to apply any special "on-upgrade" commands - during + ==== - the first BeginBlock method after the upgrade is applied. It is also - used + The JSON representation of an `Any` value uses the regular - to detect whether a software version can handle a given upgrade. If no + representation of the deserialized, embedded message, with an - upgrade handler with this name has been set in the software, it will - be + additional field `@type` which contains the type URL. Example: - assumed that the software is out-of-date when the upgrade Time or - Height is + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - reached and the software will exit. - time: - type: string - format: date-time - description: >- - Deprecated: Time based upgrades have been deprecated. Time based - upgrade logic + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - has been removed from the SDK. + If the embedded message type is well-known and has a custom JSON - If this field is not empty, an error will be thrown. - height: - type: string - format: int64 + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } description: |- - The height at which the upgrade must be performed. - Only used if Time is not set. - info: + IdentifiedClientState defines a client state with an additional client + identifier field. + proof: type: string - title: |- - Any application specific upgrade info to be included on-chain - such as a git commit that validators could automatically upgrade to - upgraded_client_state: + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision description: >- - Deprecated: UpgradedClientState field has been deprecated. IBC upgrade - logic has been + Normally the RevisionHeight is incremented at each height while + keeping - moved to the IBC module in the sub module 02-client. + RevisionNumber the same. However some consensus algorithms may choose + to - If this field is not empty, an error will be thrown. + reset the height in certain conditions e.g. hard forks, state-machine + + breaking changes In these cases, the RevisionNumber is incremented so + that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryConnectionClientStateResponse is the response type for the + Query/ConnectionClientState RPC method + ibc.core.connection.v1.QueryConnectionConsensusStateResponse: + type: object + properties: + consensus_state: + title: consensus state associated with the channel type: object properties: '@type': @@ -34992,198 +49652,461 @@ definitions: protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + client_id: + type: string + title: client ID associated with the consensus state + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to + reset the height in certain conditions e.g. hard forks, state-machine - Schemes other than `http`, `https` (or the empty scheme) might be + breaking changes In these cases, the RevisionNumber is incremented so + that - used with implementation specific semantics. - additionalProperties: {} - description: >- - Plan specifies information about a planned upgrade and when it should - occur. - cosmos.upgrade.v1beta1.QueryAppliedPlanResponse: - type: object - properties: - height: - type: string - format: int64 - description: height is the block height at which the plan was applied. - description: >- - QueryAppliedPlanResponse is the response type for the Query/AppliedPlan - RPC + height continues to be monitonically increasing even as the + RevisionHeight - method. - cosmos.upgrade.v1beta1.QueryCurrentPlanResponse: + gets reset + title: |- + QueryConnectionConsensusStateResponse is the response type for the + Query/ConnectionConsensusState RPC method + ibc.core.connection.v1.QueryConnectionResponse: type: object properties: - plan: - description: plan is the current upgrade plan. + connection: + title: connection associated with the request identifier type: object properties: - name: + client_id: type: string - description: >- - Sets the name for the upgrade. This name will be used by the - upgraded - - version of the software to apply any special "on-upgrade" commands - during - - the first BeginBlock method after the upgrade is applied. It is - also used - - to detect whether a software version can handle a given upgrade. - If no - - upgrade handler with this name has been set in the software, it - will be - - assumed that the software is out-of-date when the upgrade Time or - Height is + description: client associated with this connection. + versions: + type: array + items: + type: object + properties: + identifier: + type: string + title: unique version identifier + features: + type: array + items: + type: string + title: list of features compatible with the specified identifier + description: >- + Version defines the versioning scheme used to negotiate the IBC + verison in - reached and the software will exit. - time: - type: string - format: date-time + the connection handshake. description: >- - Deprecated: Time based upgrades have been deprecated. Time based - upgrade logic - - has been removed from the SDK. + IBC version which can be utilised to determine encodings or + protocols for - If this field is not empty, an error will be thrown. - height: - type: string - format: int64 - description: |- - The height at which the upgrade must be performed. - Only used if Time is not set. - info: + channels or packets utilising this connection. + state: + description: current state of the connection end. type: string - title: >- - Any application specific upgrade info to be included on-chain - - such as a git commit that validators could automatically upgrade - to - upgraded_client_state: - description: >- - Deprecated: UpgradedClientState field has been deprecated. IBC - upgrade logic has been - - moved to the IBC module in the sub module 02-client. - - If this field is not empty, an error will be thrown. + enum: + - STATE_UNINITIALIZED_UNSPECIFIED + - STATE_INIT + - STATE_TRYOPEN + - STATE_OPEN + default: STATE_UNINITIALIZED_UNSPECIFIED + counterparty: + description: counterparty chain associated with this connection. type: object properties: - '@type': + client_id: type: string description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). + identifies the client on the counterparty chain associated + with a given + connection. + connection_id: + type: string + description: >- + identifies the connection end on the counterparty chain + associated with a - In practice, teams usually precompile into the binary all - types that they + given connection. + prefix: + description: commitment merkle prefix of the counterparty chain. + type: object + properties: + key_prefix: + type: string + format: byte + title: >- + MerklePrefix is merkle path prefixed to the key. - expect it to use in the context of Any. However, for URLs - which use the + The constructed key from the Path and the key will be + append(Path.KeyPath, - scheme `http`, `https`, or no scheme, one can optionally set - up a type + append(Path.KeyPrefix, key...)) + delay_period: + type: string + format: uint64 + description: >- + delay period that must pass before a consensus state can be used + for - server that maps type URLs to message definitions as follows: + packet-verification NOTE: delay period logic is only implemented + by some + clients. + description: >- + ConnectionEnd defines a stateful object on a chain connected to + another - * If no scheme is provided, `https` is assumed. + separate one. - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + NOTE: there must only be 2 defined ConnectionEnds to establish - Note: this functionality is not currently available in the - official + a connection between two chains. + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping - protobuf release, and it is not used for type URLs beginning - with + RevisionNumber the same. However some consensus algorithms may choose + to - type.googleapis.com. + reset the height in certain conditions e.g. hard forks, state-machine + breaking changes In these cases, the RevisionNumber is incremented so + that - Schemes other than `http`, `https` (or the empty scheme) might - be + height continues to be monitonically increasing even as the + RevisionHeight - used with implementation specific semantics. - additionalProperties: {} + gets reset description: >- - QueryCurrentPlanResponse is the response type for the Query/CurrentPlan - RPC + QueryConnectionResponse is the response type for the Query/Connection RPC - method. - cosmos.upgrade.v1beta1.QueryModuleVersionsResponse: + method. Besides the connection end, it includes a proof and the height + from + + which the proof was retrieved. + ibc.core.connection.v1.QueryConnectionsResponse: type: object properties: - module_versions: + connections: type: array items: type: object properties: - name: + id: type: string - title: name of the app module - version: + description: connection identifier. + client_id: + type: string + description: client associated with this connection. + versions: + type: array + items: + type: object + properties: + identifier: + type: string + title: unique version identifier + features: + type: array + items: + type: string + title: list of features compatible with the specified identifier + description: >- + Version defines the versioning scheme used to negotiate the + IBC verison in + + the connection handshake. + title: >- + IBC version which can be utilised to determine encodings or + protocols for + + channels or packets utilising this connection + state: + description: current state of the connection end. + type: string + enum: + - STATE_UNINITIALIZED_UNSPECIFIED + - STATE_INIT + - STATE_TRYOPEN + - STATE_OPEN + default: STATE_UNINITIALIZED_UNSPECIFIED + counterparty: + description: counterparty chain associated with this connection. + type: object + properties: + client_id: + type: string + description: >- + identifies the client on the counterparty chain associated + with a given + + connection. + connection_id: + type: string + description: >- + identifies the connection end on the counterparty chain + associated with a + + given connection. + prefix: + description: commitment merkle prefix of the counterparty chain. + type: object + properties: + key_prefix: + type: string + format: byte + title: >- + MerklePrefix is merkle path prefixed to the key. + + The constructed key from the Path and the key will be + append(Path.KeyPath, + + append(Path.KeyPrefix, key...)) + delay_period: type: string format: uint64 - title: consensus version of the app module + description: delay period associated with this connection. description: |- - ModuleVersion specifies a module and its consensus version. + IdentifiedConnection defines a connection with additional connection + identifier field. + description: list of stored connections of the chain. + pagination: + title: pagination response + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - Since: cosmos-sdk 0.43 + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + height: + title: query block height + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision description: >- - module_versions is a list of module names with their consensus - versions. - description: >- - QueryModuleVersionsResponse is the response type for the - Query/ModuleVersions + Normally the RevisionHeight is incremented at each height while + keeping - RPC method. + RevisionNumber the same. However some consensus algorithms may choose + to + reset the height in certain conditions e.g. hard forks, state-machine - Since: cosmos-sdk 0.43 - cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse: - type: object - properties: - upgraded_consensus_state: - type: string - format: byte - title: 'Since: cosmos-sdk 0.43' + breaking changes In these cases, the RevisionNumber is incremented so + that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset description: >- - QueryUpgradedConsensusStateResponse is the response type for the - Query/UpgradedConsensusState + QueryConnectionsResponse is the response type for the Query/Connections + RPC - RPC method. - cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse: + method. + ibc.core.connection.v1.State: + type: string + enum: + - STATE_UNINITIALIZED_UNSPECIFIED + - STATE_INIT + - STATE_TRYOPEN + - STATE_OPEN + default: STATE_UNINITIALIZED_UNSPECIFIED + description: |- + State defines if a connection is in one of the following states: + INIT, TRYOPEN, OPEN or UNINITIALIZED. + + - STATE_UNINITIALIZED_UNSPECIFIED: Default State + - STATE_INIT: A connection end has just started the opening handshake. + - STATE_TRYOPEN: A connection end has acknowledged the handshake step on the counterparty + chain. + - STATE_OPEN: A connection end has completed the handshake. + ibc.core.connection.v1.Version: type: object - description: >- - MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount - response type. + properties: + identifier: + type: string + title: unique version identifier + features: + type: array + items: + type: string + title: list of features compatible with the specified identifier + description: |- + Version defines the versioning scheme used to negotiate the IBC verison in + the connection handshake. pendulumlabs.market.market.Burnings: type: object properties: @@ -35387,6 +50310,9 @@ definitions: history: type: string format: uint64 + last_drop: + type: string + format: uint64 pendulumlabs.market.market.QueryAllBurningsResponse: type: object properties: @@ -35515,6 +50441,9 @@ definitions: history: type: string format: uint64 + last_drop: + type: string + format: uint64 pagination: type: object properties: @@ -35840,6 +50769,9 @@ definitions: history: type: string format: uint64 + last_drop: + type: string + format: uint64 pendulumlabs.market.market.QueryHistoryResponse: type: object properties: diff --git a/go.mod b/go.mod index 3f52d85b..a2f56487 100644 --- a/go.mod +++ b/go.mod @@ -16,8 +16,8 @@ require ( github.com/tendermint/starport v0.19.2 github.com/tendermint/tendermint v0.34.27 github.com/tendermint/tm-db v0.6.7 - google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe - google.golang.org/grpc v1.61.0 + google.golang.org/genproto/googleapis/api v0.0.0-20240513163218-0867130af1f8 + google.golang.org/grpc v1.64.0 gopkg.in/yaml.v2 v2.4.0 ) @@ -128,15 +128,15 @@ require ( github.com/zondax/hid v0.9.1 // indirect github.com/zondax/ledger-go v0.14.1 // indirect go.etcd.io/bbolt v1.3.6 // indirect - golang.org/x/crypto v0.18.0 // indirect + golang.org/x/crypto v0.21.0 // indirect golang.org/x/exp v0.0.0-20221019170559-20944726eadf // indirect - golang.org/x/net v0.20.0 // indirect - golang.org/x/sys v0.16.0 // indirect - golang.org/x/term v0.16.0 // indirect - golang.org/x/text v0.14.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect + golang.org/x/term v0.18.0 // indirect + golang.org/x/text v0.15.0 // indirect google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe // indirect - google.golang.org/protobuf v1.33.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240513163218-0867130af1f8 // indirect + google.golang.org/protobuf v1.34.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect nhooyr.io/websocket v1.8.6 // indirect diff --git a/go.sum b/go.sum index 72771814..7ae40ef6 100644 --- a/go.sum +++ b/go.sum @@ -2996,8 +2996,8 @@ golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw golang.org/x/crypto v0.2.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= -golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= -golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= +golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -3159,8 +3159,8 @@ golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= -golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180724155351-3d292e4d0cdc/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -3403,8 +3403,8 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= -golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -3419,8 +3419,8 @@ golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE= -golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= +golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= +golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -3436,8 +3436,8 @@ golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -3823,10 +3823,10 @@ google.golang.org/genproto v0.0.0-20221201164419-0e50fba7f41c/go.mod h1:rZS5c/ZV google.golang.org/genproto v0.0.0-20230125152338-dcaf20b6aeaa/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac h1:ZL/Teoy/ZGnzyrqK/Optxxp2pmVh+fmJ97slxSRyzUg= google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac/go.mod h1:+Rvu7ElI+aLzyDQhpHMFMMltsD6m7nqpuWDd2CwJw3k= -google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe h1:0poefMBYvYbs7g5UkjS6HcxBPaTRAmznle9jnxYoAI8= -google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe h1:bQnxqljG/wqi4NTXu2+DJ3n7APcEA882QZ1JvhQAq9o= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/genproto/googleapis/api v0.0.0-20240513163218-0867130af1f8 h1:W5Xj/70xIA4x60O/IFyXivR5MGqblAb8R3w26pnD6No= +google.golang.org/genproto/googleapis/api v0.0.0-20240513163218-0867130af1f8/go.mod h1:vPrPUTsDCYxXWjP7clS81mZ6/803D8K4iM9Ma27VKas= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240513163218-0867130af1f8 h1:mxSlqyb8ZAHsYDCfiXN1EDdNTdvjUJSLY+OnAUtYNYA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240513163218-0867130af1f8/go.mod h1:I7Y+G38R2bu5j1aLzfFmQfTcU/WnFuqDwLZAbvKTKpM= google.golang.org/grpc v1.33.2 h1:EQyQC3sa8M+p6Ulc8yy9SWSS2GVwyRc83gAbG8lrl4o= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= @@ -3846,8 +3846,8 @@ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/proto/market/pool.proto b/proto/market/pool.proto index 8c828462..b5640274 100644 --- a/proto/market/pool.proto +++ b/proto/market/pool.proto @@ -19,6 +19,7 @@ message Pool { (gogoproto.nullable) = false ]; uint64 history = 8; + uint64 last_drop = 9; } message Leader { diff --git a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/index.ts b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/index.ts index 539bbd48..61c575f3 100755 --- a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/index.ts +++ b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/index.ts @@ -930,18 +930,18 @@ export default { } } }, - async sendMsgCreateOrder({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgCancelOrder({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreateOrder(value) + const msg = await txClient.msgCancelOrder(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreateOrder:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCancelOrder:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgCreateOrder:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgCancelOrder:Send Could not broadcast Tx: '+ e.message) } } }, @@ -975,33 +975,33 @@ export default { } } }, - async sendMsgCancelOrder({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgMarketOrder({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCancelOrder(value) + const msg = await txClient.msgMarketOrder(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCancelOrder:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgMarketOrder:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgCancelOrder:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgMarketOrder:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgMarketOrder({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgCreateOrder({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgMarketOrder(value) + const msg = await txClient.msgCreateOrder(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgMarketOrder:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCreateOrder:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgMarketOrder:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgCreateOrder:Send Could not broadcast Tx: '+ e.message) } } }, @@ -1019,16 +1019,16 @@ export default { } } }, - async MsgCreateOrder({ rootGetters }, { value }) { + async MsgCancelOrder({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreateOrder(value) + const msg = await txClient.msgCancelOrder(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreateOrder:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCancelOrder:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgCreateOrder:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgCancelOrder:Create Could not create message: ' + e.message) } } }, @@ -1058,29 +1058,29 @@ export default { } } }, - async MsgCancelOrder({ rootGetters }, { value }) { + async MsgMarketOrder({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCancelOrder(value) + const msg = await txClient.msgMarketOrder(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCancelOrder:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgMarketOrder:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgCancelOrder:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgMarketOrder:Create Could not create message: ' + e.message) } } }, - async MsgMarketOrder({ rootGetters }, { value }) { + async MsgCreateOrder({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgMarketOrder(value) + const msg = await txClient.msgCreateOrder(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgMarketOrder:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCreateOrder:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgMarketOrder:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgCreateOrder:Create Could not create message: ' + e.message) } } }, diff --git a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/index.ts b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/index.ts index f4afa10c..221fafdc 100755 --- a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/index.ts +++ b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/index.ts @@ -5,20 +5,20 @@ import { SigningStargateClient } from "@cosmjs/stargate"; import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; import { Api } from "./rest"; import { MsgCreatePool } from "./types/market/tx"; -import { MsgCreateOrder } from "./types/market/tx"; +import { MsgCancelOrder } from "./types/market/tx"; import { MsgCreateDrop } from "./types/market/tx"; import { MsgRedeemDrop } from "./types/market/tx"; -import { MsgCancelOrder } from "./types/market/tx"; import { MsgMarketOrder } from "./types/market/tx"; +import { MsgCreateOrder } from "./types/market/tx"; const types = [ ["/pendulumlabs.market.market.MsgCreatePool", MsgCreatePool], - ["/pendulumlabs.market.market.MsgCreateOrder", MsgCreateOrder], + ["/pendulumlabs.market.market.MsgCancelOrder", MsgCancelOrder], ["/pendulumlabs.market.market.MsgCreateDrop", MsgCreateDrop], ["/pendulumlabs.market.market.MsgRedeemDrop", MsgRedeemDrop], - ["/pendulumlabs.market.market.MsgCancelOrder", MsgCancelOrder], ["/pendulumlabs.market.market.MsgMarketOrder", MsgMarketOrder], + ["/pendulumlabs.market.market.MsgCreateOrder", MsgCreateOrder], ]; export const MissingWalletError = new Error("wallet is required"); @@ -52,11 +52,11 @@ const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = return { signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), msgCreatePool: (data: MsgCreatePool): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgCreatePool", value: MsgCreatePool.fromPartial( data ) }), - msgCreateOrder: (data: MsgCreateOrder): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgCreateOrder", value: MsgCreateOrder.fromPartial( data ) }), + msgCancelOrder: (data: MsgCancelOrder): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgCancelOrder", value: MsgCancelOrder.fromPartial( data ) }), msgCreateDrop: (data: MsgCreateDrop): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgCreateDrop", value: MsgCreateDrop.fromPartial( data ) }), msgRedeemDrop: (data: MsgRedeemDrop): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgRedeemDrop", value: MsgRedeemDrop.fromPartial( data ) }), - msgCancelOrder: (data: MsgCancelOrder): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgCancelOrder", value: MsgCancelOrder.fromPartial( data ) }), msgMarketOrder: (data: MsgMarketOrder): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgMarketOrder", value: MsgMarketOrder.fromPartial( data ) }), + msgCreateOrder: (data: MsgCreateOrder): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgCreateOrder", value: MsgCreateOrder.fromPartial( data ) }), }; }; diff --git a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/rest.ts b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/rest.ts index 12a350e4..9d15ae2c 100644 --- a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/rest.ts +++ b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/rest.ts @@ -348,6 +348,9 @@ export interface MarketmarketPool { /** @format uint64 */ history?: string; + + /** @format uint64 */ + last_drop?: string; } export interface MarketmarketVolume { diff --git a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/market/pool.ts b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/market/pool.ts index 72676705..57ff2a21 100644 --- a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/market/pool.ts +++ b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/market/pool.ts @@ -13,6 +13,7 @@ export interface Pool { leaders: Leader[]; drops: string; history: number; + last_drop: number; } export interface Leader { @@ -31,6 +32,7 @@ const basePool: object = { denom2: "", drops: "", history: 0, + last_drop: 0, }; export const Pool = { @@ -59,6 +61,9 @@ export const Pool = { if (message.history !== 0) { writer.uint32(64).uint64(message.history); } + if (message.last_drop !== 0) { + writer.uint32(72).uint64(message.last_drop); + } return writer; }, @@ -94,6 +99,9 @@ export const Pool = { case 8: message.history = longToNumber(reader.uint64() as Long); break; + case 9: + message.last_drop = longToNumber(reader.uint64() as Long); + break; default: reader.skipType(tag & 7); break; @@ -145,6 +153,11 @@ export const Pool = { } else { message.history = 0; } + if (object.last_drop !== undefined && object.last_drop !== null) { + message.last_drop = Number(object.last_drop); + } else { + message.last_drop = 0; + } return message; }, @@ -170,6 +183,7 @@ export const Pool = { } message.drops !== undefined && (obj.drops = message.drops); message.history !== undefined && (obj.history = message.history); + message.last_drop !== undefined && (obj.last_drop = message.last_drop); return obj; }, @@ -216,6 +230,11 @@ export const Pool = { } else { message.history = 0; } + if (object.last_drop !== undefined && object.last_drop !== null) { + message.last_drop = object.last_drop; + } else { + message.last_drop = 0; + } return message; }, }; diff --git a/x/market/types/pool.pb.go b/x/market/types/pool.pb.go index 9155701a..74438acb 100644 --- a/x/market/types/pool.pb.go +++ b/x/market/types/pool.pb.go @@ -25,14 +25,15 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Pool struct { - Pair string `protobuf:"bytes,1,opt,name=pair,proto3" json:"pair,omitempty"` - Denom1 string `protobuf:"bytes,2,opt,name=denom1,proto3" json:"denom1,omitempty"` - Denom2 string `protobuf:"bytes,3,opt,name=denom2,proto3" json:"denom2,omitempty"` - Volume1 *Volume `protobuf:"bytes,4,opt,name=volume1,proto3" json:"volume1,omitempty"` - Volume2 *Volume `protobuf:"bytes,5,opt,name=volume2,proto3" json:"volume2,omitempty"` - Leaders []*Leader `protobuf:"bytes,6,rep,name=leaders,proto3" json:"leaders,omitempty"` - Drops github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,7,opt,name=drops,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"drops"` - History uint64 `protobuf:"varint,8,opt,name=history,proto3" json:"history,omitempty"` + Pair string `protobuf:"bytes,1,opt,name=pair,proto3" json:"pair,omitempty"` + Denom1 string `protobuf:"bytes,2,opt,name=denom1,proto3" json:"denom1,omitempty"` + Denom2 string `protobuf:"bytes,3,opt,name=denom2,proto3" json:"denom2,omitempty"` + Volume1 *Volume `protobuf:"bytes,4,opt,name=volume1,proto3" json:"volume1,omitempty"` + Volume2 *Volume `protobuf:"bytes,5,opt,name=volume2,proto3" json:"volume2,omitempty"` + Leaders []*Leader `protobuf:"bytes,6,rep,name=leaders,proto3" json:"leaders,omitempty"` + Drops github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,7,opt,name=drops,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"drops"` + History uint64 `protobuf:"varint,8,opt,name=history,proto3" json:"history,omitempty"` + LastDrop uint64 `protobuf:"varint,9,opt,name=last_drop,json=lastDrop,proto3" json:"last_drop,omitempty"` } func (m *Pool) Reset() { *m = Pool{} } @@ -153,30 +154,32 @@ func init() { func init() { proto.RegisterFile("market/pool.proto", fileDescriptor_adb392bd01694df9) } var fileDescriptor_adb392bd01694df9 = []byte{ - // 366 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x92, 0x31, 0x4f, 0xc2, 0x40, - 0x14, 0xc7, 0x7b, 0x50, 0x8a, 0x9e, 0x93, 0x17, 0x62, 0x2e, 0x0c, 0x47, 0xd3, 0xc1, 0xb0, 0x70, - 0x0d, 0x75, 0x75, 0x22, 0xc6, 0xc4, 0xc4, 0x81, 0x74, 0x70, 0x70, 0x2b, 0xf4, 0x04, 0x42, 0xdb, - 0xd7, 0xf4, 0x5a, 0x23, 0xdf, 0xc2, 0x8f, 0xc5, 0xc8, 0x48, 0x1c, 0x88, 0x80, 0x1f, 0xc4, 0xf4, - 0xda, 0x0a, 0x8b, 0x31, 0xea, 0x74, 0xef, 0xbd, 0xfe, 0x7f, 0xf7, 0x7f, 0xbd, 0xf7, 0xf0, 0x79, - 0xe8, 0x25, 0x73, 0x91, 0xda, 0x31, 0x40, 0xc0, 0xe3, 0x04, 0x52, 0x20, 0xed, 0x58, 0x44, 0x7e, - 0x16, 0x64, 0x61, 0xe0, 0x8d, 0x24, 0x2f, 0xbe, 0x97, 0x47, 0xbb, 0x35, 0x81, 0x09, 0x28, 0x99, - 0x9d, 0x47, 0x05, 0x61, 0x7d, 0xd4, 0xb0, 0x3e, 0x04, 0x08, 0x08, 0xc1, 0x7a, 0xec, 0xcd, 0x12, - 0x8a, 0x4c, 0xd4, 0x3d, 0x75, 0x55, 0x4c, 0x2e, 0xb0, 0xe1, 0x8b, 0x08, 0xc2, 0x3e, 0xad, 0xa9, - 0x6a, 0x99, 0x7d, 0xd5, 0x1d, 0x5a, 0x3f, 0xaa, 0x3b, 0xe4, 0x1a, 0x37, 0x9f, 0x21, 0xc8, 0x42, - 0xd1, 0xa7, 0xba, 0x89, 0xba, 0x67, 0x8e, 0xc5, 0xbf, 0x6f, 0x88, 0x3f, 0x28, 0xa9, 0x5b, 0x21, - 0x07, 0xda, 0xa1, 0x8d, 0xdf, 0xd2, 0xca, 0x3b, 0x10, 0x9e, 0x2f, 0x12, 0x49, 0x0d, 0xb3, 0xfe, - 0x13, 0x7d, 0xaf, 0xa4, 0x6e, 0x85, 0x90, 0x1b, 0xdc, 0xf0, 0x13, 0x88, 0x25, 0x6d, 0xe6, 0x3f, - 0x34, 0xe0, 0xcb, 0x4d, 0x47, 0x7b, 0xdb, 0x74, 0x2e, 0x27, 0xb3, 0x74, 0x9a, 0x8d, 0xf8, 0x18, - 0x42, 0x7b, 0x0c, 0x32, 0x04, 0x59, 0x1e, 0x3d, 0xe9, 0xcf, 0xed, 0x74, 0x11, 0x0b, 0xc9, 0xef, - 0xa2, 0xd4, 0x2d, 0x60, 0x42, 0x71, 0x73, 0x3a, 0x93, 0x29, 0x24, 0x0b, 0x7a, 0x62, 0xa2, 0xae, - 0xee, 0x56, 0xa9, 0x35, 0xc5, 0x46, 0x61, 0x99, 0x6b, 0x3c, 0xdf, 0x4f, 0x84, 0x94, 0xe5, 0x53, - 0x57, 0xe9, 0xa1, 0x87, 0xda, 0x3f, 0x7a, 0xb0, 0x9e, 0xb0, 0x51, 0x3c, 0x0d, 0x69, 0xe1, 0x86, - 0x9a, 0x4b, 0xe9, 0x53, 0x24, 0xe4, 0x16, 0x1b, 0x5e, 0x08, 0x59, 0x94, 0xfe, 0xd1, 0xa6, 0xa4, - 0x07, 0xc3, 0xe5, 0x96, 0x69, 0xeb, 0x2d, 0x43, 0xcb, 0x1d, 0x43, 0xab, 0x1d, 0x43, 0xef, 0x3b, - 0x86, 0x5e, 0xf7, 0x4c, 0x5b, 0xed, 0x99, 0xb6, 0xde, 0x33, 0xed, 0x91, 0x1f, 0xdd, 0x58, 0x8d, - 0xa2, 0x97, 0xcf, 0xc2, 0x2e, 0x17, 0xf7, 0xa5, 0x0a, 0xd4, 0xed, 0x23, 0x43, 0x6d, 0xe4, 0xd5, - 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9b, 0xf2, 0x98, 0x47, 0xd8, 0x02, 0x00, 0x00, + // 386 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x92, 0xb1, 0xee, 0xda, 0x30, + 0x10, 0xc6, 0x63, 0x08, 0x01, 0xdc, 0xa9, 0x16, 0xaa, 0x2c, 0x2a, 0x99, 0x28, 0x43, 0xc5, 0x82, + 0x23, 0xd2, 0xb5, 0x13, 0x42, 0x95, 0x2a, 0x75, 0x40, 0x19, 0x3a, 0x74, 0xa9, 0x02, 0x71, 0x01, + 0x91, 0xe4, 0x22, 0xdb, 0xa9, 0xca, 0xd8, 0x37, 0xe8, 0x63, 0x31, 0x32, 0xa2, 0x0e, 0xa8, 0xc0, + 0x8b, 0x54, 0x71, 0x92, 0xc2, 0x52, 0x55, 0xed, 0x7f, 0xf2, 0xdd, 0xf9, 0x7e, 0x77, 0x5f, 0xf2, + 0x19, 0x3f, 0x4f, 0x23, 0xb9, 0x13, 0xda, 0xcf, 0x01, 0x12, 0x9e, 0x4b, 0xd0, 0x40, 0x86, 0xb9, + 0xc8, 0xe2, 0x22, 0x29, 0xd2, 0x24, 0x5a, 0x2a, 0x5e, 0xdd, 0xd7, 0xc7, 0x70, 0xb0, 0x86, 0x35, + 0x98, 0x36, 0xbf, 0x8c, 0x2a, 0xc2, 0xfb, 0xd6, 0xc6, 0xf6, 0x02, 0x20, 0x21, 0x04, 0xdb, 0x79, + 0xb4, 0x95, 0x14, 0xb9, 0x68, 0xdc, 0x0f, 0x4d, 0x4c, 0x5e, 0x60, 0x27, 0x16, 0x19, 0xa4, 0x53, + 0xda, 0x32, 0xd5, 0x3a, 0xfb, 0x5d, 0x0f, 0x68, 0xfb, 0xa1, 0x1e, 0x90, 0x37, 0xb8, 0xfb, 0x05, + 0x92, 0x22, 0x15, 0x53, 0x6a, 0xbb, 0x68, 0xfc, 0x2c, 0xf0, 0xf8, 0x9f, 0x05, 0xf1, 0x0f, 0xa6, + 0x35, 0x6c, 0x90, 0x3b, 0x1d, 0xd0, 0xce, 0xbf, 0xd2, 0x66, 0x77, 0x22, 0xa2, 0x58, 0x48, 0x45, + 0x1d, 0xb7, 0xfd, 0x37, 0xfa, 0xbd, 0x69, 0x0d, 0x1b, 0x84, 0xcc, 0x71, 0x27, 0x96, 0x90, 0x2b, + 0xda, 0x2d, 0x3f, 0x68, 0xc6, 0x0f, 0xe7, 0x91, 0xf5, 0xe3, 0x3c, 0x7a, 0xb5, 0xde, 0xea, 0x4d, + 0xb1, 0xe4, 0x2b, 0x48, 0xfd, 0x15, 0xa8, 0x14, 0x54, 0x7d, 0x4c, 0x54, 0xbc, 0xf3, 0xf5, 0x3e, + 0x17, 0x8a, 0xbf, 0xcb, 0x74, 0x58, 0xc1, 0x84, 0xe2, 0xee, 0x66, 0xab, 0x34, 0xc8, 0x3d, 0xed, + 0xb9, 0x68, 0x6c, 0x87, 0x4d, 0x4a, 0x5e, 0xe2, 0x7e, 0x12, 0x29, 0xfd, 0xa9, 0xec, 0xa3, 0x7d, + 0x73, 0xd7, 0x2b, 0x0b, 0x73, 0x09, 0xb9, 0xb7, 0xc1, 0x4e, 0xa5, 0xa7, 0x1c, 0x10, 0xc5, 0xb1, + 0x14, 0x4a, 0xd5, 0x3e, 0x34, 0xe9, 0x5d, 0x60, 0xeb, 0x09, 0x02, 0xbd, 0xcf, 0xd8, 0xa9, 0xfe, + 0x1b, 0x19, 0xe0, 0x8e, 0x31, 0xad, 0xde, 0x53, 0x25, 0xe4, 0x2d, 0x76, 0xa2, 0x14, 0x8a, 0x4c, + 0xff, 0xe7, 0x9a, 0x9a, 0x9e, 0x2d, 0x0e, 0x17, 0x66, 0x9d, 0x2e, 0x0c, 0x1d, 0xae, 0x0c, 0x1d, + 0xaf, 0x0c, 0xfd, 0xbc, 0x32, 0xf4, 0xfd, 0xc6, 0xac, 0xe3, 0x8d, 0x59, 0xa7, 0x1b, 0xb3, 0x3e, + 0xf2, 0x87, 0x89, 0x8d, 0x4f, 0x93, 0xd2, 0x28, 0xbf, 0x7e, 0xd5, 0x5f, 0x9b, 0xc0, 0x4c, 0x5f, + 0x3a, 0xe6, 0xb9, 0xbe, 0xfe, 0x15, 0x00, 0x00, 0xff, 0xff, 0x3a, 0x42, 0x08, 0xe9, 0xf5, 0x02, + 0x00, 0x00, } func (m *Pool) Marshal() (dAtA []byte, err error) { @@ -199,6 +202,11 @@ func (m *Pool) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.LastDrop != 0 { + i = encodeVarintPool(dAtA, i, uint64(m.LastDrop)) + i-- + dAtA[i] = 0x48 + } if m.History != 0 { i = encodeVarintPool(dAtA, i, uint64(m.History)) i-- @@ -404,6 +412,9 @@ func (m *Pool) Size() (n int) { if m.History != 0 { n += 1 + sovPool(uint64(m.History)) } + if m.LastDrop != 0 { + n += 1 + sovPool(uint64(m.LastDrop)) + } return n } @@ -727,6 +738,25 @@ func (m *Pool) Unmarshal(dAtA []byte) error { break } } + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LastDrop", wireType) + } + m.LastDrop = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LastDrop |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipPool(dAtA[iNdEx:]) From 12e10355dd50eadfc35dae7b27033e84ca3183ae Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Sat, 8 Jun 2024 22:29:29 -0500 Subject: [PATCH 19/35] Add in checks for sqrt(XY)/drops invariant --- x/market/keeper/msg_server_create_drop.go | 31 ++++++++++++++++++----- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/x/market/keeper/msg_server_create_drop.go b/x/market/keeper/msg_server_create_drop.go index 1042f263..151e5942 100644 --- a/x/market/keeper/msg_server_create_drop.go +++ b/x/market/keeper/msg_server_create_drop.go @@ -50,9 +50,6 @@ func (k msgServer) CreateDrop(goCtx context.Context, msg *types.MsgCreateDrop) ( return nil, sdkerrors.Wrapf(types.ErrMemberBalanceZero, "Member %s", member2.DenomB) } - // Create the uid - uid := k.GetUidCount(ctx) - drops, ok := sdk.NewIntFromString(msg.Drops) if !ok { return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "drops not a valid integer") @@ -75,13 +72,29 @@ func (k msgServer) CreateDrop(goCtx context.Context, msg *types.MsgCreateDrop) ( // Drops basis is sqrt(XY) // Change in XY should always be positive - // As XY total increases then in order to get proportional - // share (drop) then should pay the same per drop or more - // than Pool Creator. Pool creator drops = sqrt(XY). + // Pool creator should get more drops per sqrt(XY) + // Pool creator drops = sqrt(XY). + // Therefore sqrt(Product) must be equal to or greater than drops if sqrtDropProduct.LT(drops) { fmt.Printf("Sqrt Product: %s", sqrtDropProduct) fmt.Printf("Drops: %s", drops) - return nil, sdkerrors.Wrapf(types.ErrProductLessThanDrops, "Sqrt of Product not greater than or equal to drops.") + return nil, sdkerrors.Wrapf(types.ErrSqrtProductLessThanDrops, "Sqrt of Product not greater than or equal to drops.") + } + + prevDrop, found := k.GetDrop(ctx, pool.LastDrop) + if !found { + return nil, sdkerrors.Wrap(types.ErrDropNotFound, "pool previous drop not found") + } + + tmp = big.NewInt(0) + tmp.Sqrt(prevDrop.Product.BigInt()) + sqrtPrevDropProduct := sdk.NewIntFromBigInt(tmp) + + // Change in XY should always be positive + // Drop creator should never pay less sqrt(Product) + // per drop than the previous drop creator. + if (sqrtDropProduct.Quo(drops)).LT(sqrtPrevDropProduct.Quo(prevDrop.Drops)) { + return nil, sdkerrors.Wrapf(types.ErrSqrtProductOverDrops, "Sqrt of Product divided by drops less than previous.") } coin1 := sdk.NewCoin(denom1, dropAmtMember1) @@ -119,7 +132,11 @@ func (k msgServer) CreateDrop(goCtx context.Context, msg *types.MsgCreateDrop) ( pool = k.updateLeaders(ctx, pool, msg.Creator, dropCreatorSum) + // Create the drop uid + uid := k.GetUidCount(ctx) + pool.Drops = pool.Drops.Add(drops) + pool.LastDrop = uid k.SetPool(ctx, pool) From aa6ed457fcdbed9b45714d2e4a1dacefd3d5793c Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Sat, 8 Jun 2024 22:33:42 -0500 Subject: [PATCH 20/35] Update test for sqrt(XY) update --- .../keeper/msg_server_create_drop_test.go | 149 ++++++++---------- 1 file changed, 65 insertions(+), 84 deletions(-) diff --git a/x/market/keeper/msg_server_create_drop_test.go b/x/market/keeper/msg_server_create_drop_test.go index 0a846b62..fe1823c5 100644 --- a/x/market/keeper/msg_server_create_drop_test.go +++ b/x/market/keeper/msg_server_create_drop_test.go @@ -14,9 +14,7 @@ import ( "github.com/stretchr/testify/require" ) -func TestCreateDrop(t *testing.T) { - testInput := keepertest.CreateTestEnvironment(t) - +func dropCommon(t *testing.T, testInput keepertest.TestInput) { // MintCoins require.NoError(t, testInput.BankKeeper.MintCoins(testInput.Context, types.ModuleName, coinPair)) @@ -41,49 +39,32 @@ func TestCreateDrop(t *testing.T) { require.NoError(t, err) require.NoError(t, testInput.BankKeeper.SendCoinsFromModuleToAccount(testInput.Context, types.ModuleName, requestAddress3, coinPair)) - // GetUidCount before CreatePool - beforecount := testInput.MarketKeeper.GetUidCount(testInput.Context) - // Create Pool var p = types.MsgCreatePool{CoinA: testdata.coinAStr, CoinB: testdata.coinBStr, Creator: addr} - response, err := keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreatePool(sdk.WrapSDKContext(testInput.Context), &p) - - // Validate CreatePool + _, err = keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreatePool(sdk.WrapSDKContext(testInput.Context), &p) require.NoError(t, err) - require.Contains(t, p.GetCreator(), response.String()) - require.Contains(t, p.GetCoinA(), response.String()) - require.Contains(t, p.GetCoinB(), response.String()) - - // Validate SetUidCount function. - aftercount := testInput.MarketKeeper.GetUidCount(testInput.Context) - require.Equal(t, beforecount+1, aftercount) +} - // Validate GetDrop - drops, dropFound := testInput.MarketKeeper.GetDrop(testInput.Context, beforecount) - require.True(t, dropFound) - require.Equal(t, drops.Pair, pair) +func TestCreateDrop(t *testing.T) { + testInput := keepertest.CreateTestEnvironment(t) - owner, ok := testInput.MarketKeeper.GetDropsOwnerPair(testInput.Context, addr, pair) - require.True(t, ok) - require.Truef(t, owner.Sum.Equal(sdk.NewInt(34)), owner.Sum.String()) + dropCommon(t, testInput) - // Validate GetPool - rst1, found := testInput.MarketKeeper.GetPool(testInput.Context, pair) - require.True(t, found) - require.Equal(t, rst1.Pair, pair) - require.Equal(t, "34", rst1.Drops.String()) - require.Equal(t, 1, len(rst1.Leaders)) - require.Equal(t, "34", rst1.Leaders[0].Drops.String()) + // GetUidCount after CreatePool + beforecount := testInput.MarketKeeper.GetUidCount(testInput.Context) - beforecount = aftercount + // Validate GetDrop + drop, dropFound := testInput.MarketKeeper.GetDrop(testInput.Context, beforecount-1) + require.True(t, dropFound) // Validate CreateDrop - var d = types.MsgCreateDrop{Creator: addr2, Pair: pair, Drops: "12"} + drops := sdk.NewIntFromUint64(12) + var d = types.MsgCreateDrop{Creator: addr2, Pair: pair, Drops: drops.String()} createDropResponse, err := keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreateDrop(sdk.WrapSDKContext(testInput.Context), &d) require.NoError(t, err) // Validate SetUidCount function. - aftercount = testInput.MarketKeeper.GetUidCount(testInput.Context) + aftercount := testInput.MarketKeeper.GetUidCount(testInput.Context) require.Equal(t, beforecount+1, aftercount) pairs, ok := testInput.MarketKeeper.GetDropPairs(testInput.Context, addr) @@ -91,13 +72,13 @@ func TestCreateDrop(t *testing.T) { require.Truef(t, pairs.Pairs[0] == pair, pairs.String()) // Validate GetPool - rst, found := testInput.MarketKeeper.GetPool(testInput.Context, pair) + pool, found := testInput.MarketKeeper.GetPool(testInput.Context, pair) require.True(t, found) - require.Equal(t, rst.Pair, pair) - require.Equal(t, "46", rst.Drops.String()) - require.Equalf(t, addr, rst.Leaders[0].Address, rst.Leaders[0].Address) - require.Equalf(t, 2, len(rst.Leaders), rst.Leaders[1].Address) - require.Equal(t, "34", rst.Leaders[0].Drops.String()) + require.Equal(t, pool.Pair, pair) + require.True(t, (drop.Drops.Add(drops)).Equal(pool.Drops)) + require.Equalf(t, addr, pool.Leaders[0].Address, pool.Leaders[0].Address) + require.Equalf(t, 2, len(pool.Leaders), pool.Leaders[1].Address) + require.Equal(t, "34", pool.Leaders[0].Drops.String()) // Validate GetMember memberA, memberfound := testInput.MarketKeeper.GetMember(testInput.Context, denomB, denomA) @@ -112,15 +93,15 @@ func TestCreateDrop(t *testing.T) { require.Equal(t, memberB.DenomB, denomB) require.Equal(t, "55", memberB.Balance.String()) - owner, ok = testInput.MarketKeeper.GetDropsOwnerPair(testInput.Context, addr, pair) + owner, ok := testInput.MarketKeeper.GetDropsOwnerPair(testInput.Context, addr, pair) require.True(t, ok) require.Truef(t, owner.Sum.Equal(sdk.NewInt(34)), owner.Sum.String()) // Validate GetDrop - drops, dropFound = testInput.MarketKeeper.GetDrop(testInput.Context, beforecount) + drop, dropFound = testInput.MarketKeeper.GetDrop(testInput.Context, beforecount) require.True(t, dropFound) - require.Equal(t, drops.Pair, pair) - require.Equal(t, drops.Drops.String(), d.Drops) + require.Equal(t, drop.Pair, pair) + require.Equal(t, drop.Drops.String(), d.Drops) require.Contains(t, d.GetCreator(), createDropResponse.String()) beforecount = aftercount @@ -149,10 +130,10 @@ func TestCreateDrop(t *testing.T) { require.Equal(t, 2, len(rst2.Leaders)) // Validate GetDrop - drops, dropFound = testInput.MarketKeeper.GetDrop(testInput.Context, beforecount) + drop, dropFound = testInput.MarketKeeper.GetDrop(testInput.Context, beforecount) require.True(t, dropFound) - require.Equal(t, drops.Pair, pair) - require.Equal(t, drops.Drops.String(), e.Drops) + require.Equal(t, drop.Pair, pair) + require.Equal(t, drop.Drops.String(), e.Drops) require.Contains(t, d.GetCreator(), createDropResponse.String()) beforecount = aftercount @@ -171,18 +152,18 @@ func TestCreateDrop(t *testing.T) { require.Truef(t, pairs.Pairs[0] == pair, pairs.String()) // Validate GetPool - rst, found = testInput.MarketKeeper.GetPool(testInput.Context, pair) + pool, found = testInput.MarketKeeper.GetPool(testInput.Context, pair) require.True(t, found) - require.Equal(t, rst.Pair, pair) - require.Equal(t, "1166", rst.Drops.String()) - require.Equal(t, 3, len(rst.Leaders)) - require.Equal(t, "1000", rst.Leaders[0].Drops.String()) + require.Equal(t, pool.Pair, pair) + require.Equal(t, "1166", pool.Drops.String()) + require.Equal(t, 3, len(pool.Leaders)) + require.Equal(t, "1000", pool.Leaders[0].Drops.String()) // Validate GetDrop - drops, dropFound = testInput.MarketKeeper.GetDrop(testInput.Context, beforecount) + drop, dropFound = testInput.MarketKeeper.GetDrop(testInput.Context, beforecount) require.True(t, dropFound) - require.Equal(t, drops.Pair, pair) - require.Equal(t, drops.Drops.String(), f.Drops) + require.Equal(t, drop.Pair, pair) + require.Equal(t, drop.Drops.String(), f.Drops) require.Contains(t, d.GetCreator(), createDropResponse.String()) beforecount = aftercount @@ -197,23 +178,23 @@ func TestCreateDrop(t *testing.T) { require.Equal(t, beforecount+1, aftercount) // Validate GetPool - rst, found = testInput.MarketKeeper.GetPool(testInput.Context, pair) + pool, found = testInput.MarketKeeper.GetPool(testInput.Context, pair) require.True(t, found) - require.Equal(t, rst.Pair, pair) - require.Equal(t, "1566", rst.Drops.String()) - require.Equal(t, 3, len(rst.Leaders)) - require.Equal(t, "1400", rst.Leaders[0].Drops.String()) - require.Equal(t, "154", rst.Leaders[1].Drops.String()) - require.Equal(t, "12", rst.Leaders[2].Drops.String()) - require.Equalf(t, addr3, rst.Leaders[0].Address, rst.Leaders[0].Address) - require.Equalf(t, addr, rst.Leaders[1].Address, addr3) - require.Equalf(t, addr2, rst.Leaders[2].Address, rst.Leaders[2].Address) + require.Equal(t, pool.Pair, pair) + require.Equal(t, "1566", pool.Drops.String()) + require.Equal(t, 3, len(pool.Leaders)) + require.Equal(t, "1400", pool.Leaders[0].Drops.String()) + require.Equal(t, "154", pool.Leaders[1].Drops.String()) + require.Equal(t, "12", pool.Leaders[2].Drops.String()) + require.Equalf(t, addr3, pool.Leaders[0].Address, pool.Leaders[0].Address) + require.Equalf(t, addr, pool.Leaders[1].Address, addr3) + require.Equalf(t, addr2, pool.Leaders[2].Address, pool.Leaders[2].Address) // Validate GetDrop - drops, dropFound = testInput.MarketKeeper.GetDrop(testInput.Context, beforecount) + drop, dropFound = testInput.MarketKeeper.GetDrop(testInput.Context, beforecount) require.True(t, dropFound) - require.Equal(t, drops.Pair, pair) - require.Equal(t, drops.Drops.String(), g.Drops) + require.Equal(t, drop.Pair, pair) + require.Equal(t, drop.Drops.String(), g.Drops) require.Contains(t, d.GetCreator(), createDropResponse.String()) // Calculate Product After @@ -223,7 +204,7 @@ func TestCreateDrop(t *testing.T) { require.True(t, memberBidFound) productAfter := memberAsk.Balance.Mul(memberBid.Balance) - require.True(t, productAfter.GTE(rst.Drops)) + require.True(t, productAfter.GTE(pool.Drops)) } func TestCreateDrop_Pool_Not_Found(t *testing.T) { @@ -255,9 +236,9 @@ func TestCreateDrop_Pool_Not_Found(t *testing.T) { require.Equal(t, beforecount+1, aftercount) // Validate GetDrop - drops, dropFound := testInput.MarketKeeper.GetDrop(testInput.Context, beforecount) + drop, dropFound := testInput.MarketKeeper.GetDrop(testInput.Context, beforecount) require.True(t, dropFound) - require.Equal(t, drops.Pair, pair) + require.Equal(t, drop.Pair, pair) // Validate CreateDrop scenarios := []struct { @@ -306,12 +287,12 @@ func TestCreateDrop_Pool_Not_Active(t *testing.T) { require.Equal(t, beforecount+1, aftercount) //validate GetDrop - drops, dropFound := testInput.MarketKeeper.GetDrop(testInput.Context, beforecount) + drop, dropFound := testInput.MarketKeeper.GetDrop(testInput.Context, beforecount) require.True(t, dropFound) - require.Equal(t, drops.Pair, pair) + require.Equal(t, drop.Pair, pair) //Validate RedeemDrop - Uid := strconv.FormatUint(drops.Uid, 10) + Uid := strconv.FormatUint(drop.Uid, 10) var rd = types.MsgRedeemDrop{Creator: addr, Uid: Uid} createRedeemDropResponse, redeemdropErr := keeper.NewMsgServerImpl(*testInput.MarketKeeper).RedeemDrop(sdk.WrapSDKContext(testInput.Context), &rd) require.NoError(t, redeemdropErr) @@ -398,9 +379,9 @@ func TestCreateDrop_Negative(t *testing.T) { require.Equal(t, beforecount+1, aftercount) //validate GetDrop - drops, dropFound := testInput.MarketKeeper.GetDrop(testInput.Context, beforecount) + drop, dropFound := testInput.MarketKeeper.GetDrop(testInput.Context, beforecount) require.True(t, dropFound) - require.Equal(t, drops.Pair, pair) + require.Equal(t, drop.Pair, pair) //validate CreateDrop var d = types.MsgCreateDrop{Creator: addr, Pair: pair, Drops: "-120"} _, err = keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreateDrop(sdk.WrapSDKContext(testInput.Context), &d) @@ -455,9 +436,9 @@ func TestCreateDrop_ValidateSenderBalance(t *testing.T) { require.Equal(t, beforecount+1, aftercount) //validate GetDrop - drops, dropFound := testInput.MarketKeeper.GetDrop(testInput.Context, beforecount) + drop, dropFound := testInput.MarketKeeper.GetDrop(testInput.Context, beforecount) require.True(t, dropFound) - require.Equal(t, drops.Pair, pair) + require.Equal(t, drop.Pair, pair) //validate CreateDrop var d = types.MsgCreateDrop{Creator: addr, Pair: pair, Drops: "2000"} _, err = keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreateDrop(sdk.WrapSDKContext(testInput.Context), &d) @@ -515,17 +496,17 @@ func TestZeroAmtPaid(t *testing.T) { require.Equal(t, beforecount+1, aftercount) // Validate GetDrop - drops, dropFound := testInput.MarketKeeper.GetDrop(testInput.Context, beforecount) + drop, dropFound := testInput.MarketKeeper.GetDrop(testInput.Context, beforecount) require.True(t, dropFound) - require.Equal(t, drops.Pair, pair) + require.Equal(t, drop.Pair, pair) // Validate GetPool - rst1, found := testInput.MarketKeeper.GetPool(testInput.Context, pair) + pool, found := testInput.MarketKeeper.GetPool(testInput.Context, pair) require.True(t, found) - require.Equal(t, rst1.Pair, pair) - require.Equal(t, "63", rst1.Drops.String()) - require.Equal(t, 1, len(rst1.Leaders)) - require.Equal(t, "63", rst1.Leaders[0].Drops.String()) + require.Equal(t, pool.Pair, pair) + require.Equal(t, "63", pool.Drops.String()) + require.Equal(t, 1, len(pool.Leaders)) + require.Equal(t, "63", pool.Leaders[0].Drops.String()) // Validate CreateDrop // There should not be a situation where zero amt is paid for either member From 5d288ca0445eee5def512e12539a9152635eca43 Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Sat, 8 Jun 2024 23:38:03 -0500 Subject: [PATCH 21/35] Add Filled Order Uid to Market Order Response --- docs/static/openapi.yml | 2 + proto/market/tx.proto | 7 +- .../pendulumlabs.market.market/index.ts | 80 +++++++++---------- .../module/index.ts | 12 +-- .../pendulumlabs.market.market/module/rest.ts | 19 +---- .../cosmos/base/query/v1beta1/pagination.ts | 30 +------ .../module/types/market/tx.ts | 29 +++++-- x/market/keeper/msg_server_market_order.go | 3 +- 8 files changed, 80 insertions(+), 102 deletions(-) diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index 2d231c73..fc770c86 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -50171,6 +50171,8 @@ definitions: pendulumlabs.market.market.MsgMarketOrderResponse: type: object properties: + uid: + type: string amountBid: type: string amountAsk: diff --git a/proto/market/tx.proto b/proto/market/tx.proto index b78563d1..24822eb8 100644 --- a/proto/market/tx.proto +++ b/proto/market/tx.proto @@ -76,9 +76,10 @@ message MsgMarketOrder { } message MsgMarketOrderResponse { - string amountBid = 1; - string amountAsk = 2; - string slippage = 3; + string uid = 1; + string amountBid = 2; + string amountAsk = 3; + string slippage = 4; } // this line is used by starport scaffolding # proto/tx/message \ No newline at end of file diff --git a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/index.ts b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/index.ts index 61c575f3..8b151dcb 100755 --- a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/index.ts +++ b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/index.ts @@ -915,78 +915,78 @@ export default { }, - async sendMsgCreatePool({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgMarketOrder({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreatePool(value) + const msg = await txClient.msgMarketOrder(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreatePool:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgMarketOrder:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgCreatePool:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgMarketOrder:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgCancelOrder({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgCreatePool({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCancelOrder(value) + const msg = await txClient.msgCreatePool(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCancelOrder:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCreatePool:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgCancelOrder:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgCreatePool:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgCreateDrop({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgRedeemDrop({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreateDrop(value) + const msg = await txClient.msgRedeemDrop(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreateDrop:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgRedeemDrop:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgCreateDrop:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgRedeemDrop:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgRedeemDrop({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgCancelOrder({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgRedeemDrop(value) + const msg = await txClient.msgCancelOrder(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgRedeemDrop:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCancelOrder:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgRedeemDrop:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgCancelOrder:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgMarketOrder({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgCreateDrop({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgMarketOrder(value) + const msg = await txClient.msgCreateDrop(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgMarketOrder:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCreateDrop:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgMarketOrder:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgCreateDrop:Send Could not broadcast Tx: '+ e.message) } } }, @@ -1006,68 +1006,68 @@ export default { } }, - async MsgCreatePool({ rootGetters }, { value }) { + async MsgMarketOrder({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreatePool(value) + const msg = await txClient.msgMarketOrder(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreatePool:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgMarketOrder:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgCreatePool:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgMarketOrder:Create Could not create message: ' + e.message) } } }, - async MsgCancelOrder({ rootGetters }, { value }) { + async MsgCreatePool({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCancelOrder(value) + const msg = await txClient.msgCreatePool(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCancelOrder:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCreatePool:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgCancelOrder:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgCreatePool:Create Could not create message: ' + e.message) } } }, - async MsgCreateDrop({ rootGetters }, { value }) { + async MsgRedeemDrop({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreateDrop(value) + const msg = await txClient.msgRedeemDrop(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreateDrop:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgRedeemDrop:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgCreateDrop:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgRedeemDrop:Create Could not create message: ' + e.message) } } }, - async MsgRedeemDrop({ rootGetters }, { value }) { + async MsgCancelOrder({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgRedeemDrop(value) + const msg = await txClient.msgCancelOrder(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgRedeemDrop:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCancelOrder:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgRedeemDrop:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgCancelOrder:Create Could not create message: ' + e.message) } } }, - async MsgMarketOrder({ rootGetters }, { value }) { + async MsgCreateDrop({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgMarketOrder(value) + const msg = await txClient.msgCreateDrop(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgMarketOrder:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCreateDrop:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgMarketOrder:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgCreateDrop:Create Could not create message: ' + e.message) } } }, diff --git a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/index.ts b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/index.ts index 221fafdc..1a4282db 100755 --- a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/index.ts +++ b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/index.ts @@ -4,20 +4,20 @@ import { StdFee } from "@cosmjs/launchpad"; import { SigningStargateClient } from "@cosmjs/stargate"; import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; import { Api } from "./rest"; +import { MsgMarketOrder } from "./types/market/tx"; import { MsgCreatePool } from "./types/market/tx"; +import { MsgRedeemDrop } from "./types/market/tx"; import { MsgCancelOrder } from "./types/market/tx"; import { MsgCreateDrop } from "./types/market/tx"; -import { MsgRedeemDrop } from "./types/market/tx"; -import { MsgMarketOrder } from "./types/market/tx"; import { MsgCreateOrder } from "./types/market/tx"; const types = [ + ["/pendulumlabs.market.market.MsgMarketOrder", MsgMarketOrder], ["/pendulumlabs.market.market.MsgCreatePool", MsgCreatePool], + ["/pendulumlabs.market.market.MsgRedeemDrop", MsgRedeemDrop], ["/pendulumlabs.market.market.MsgCancelOrder", MsgCancelOrder], ["/pendulumlabs.market.market.MsgCreateDrop", MsgCreateDrop], - ["/pendulumlabs.market.market.MsgRedeemDrop", MsgRedeemDrop], - ["/pendulumlabs.market.market.MsgMarketOrder", MsgMarketOrder], ["/pendulumlabs.market.market.MsgCreateOrder", MsgCreateOrder], ]; @@ -51,11 +51,11 @@ const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = return { signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), + msgMarketOrder: (data: MsgMarketOrder): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgMarketOrder", value: MsgMarketOrder.fromPartial( data ) }), msgCreatePool: (data: MsgCreatePool): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgCreatePool", value: MsgCreatePool.fromPartial( data ) }), + msgRedeemDrop: (data: MsgRedeemDrop): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgRedeemDrop", value: MsgRedeemDrop.fromPartial( data ) }), msgCancelOrder: (data: MsgCancelOrder): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgCancelOrder", value: MsgCancelOrder.fromPartial( data ) }), msgCreateDrop: (data: MsgCreateDrop): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgCreateDrop", value: MsgCreateDrop.fromPartial( data ) }), - msgRedeemDrop: (data: MsgRedeemDrop): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgRedeemDrop", value: MsgRedeemDrop.fromPartial( data ) }), - msgMarketOrder: (data: MsgMarketOrder): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgMarketOrder", value: MsgMarketOrder.fromPartial( data ) }), msgCreateOrder: (data: MsgCreateOrder): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgCreateOrder", value: MsgCreateOrder.fromPartial( data ) }), }; diff --git a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/rest.ts b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/rest.ts index 9d15ae2c..34cc9049 100644 --- a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/rest.ts +++ b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/rest.ts @@ -26,6 +26,7 @@ export interface MarketMsgCreateOrderResponse { export type MarketMsgCreatePoolResponse = object; export interface MarketMsgMarketOrderResponse { + uid?: string; amountBid?: string; amountAsk?: string; slippage?: string; @@ -406,13 +407,6 @@ export interface V1Beta1PageRequest { * is set. */ count_total?: boolean; - - /** - * reverse is set to true if results are to be returned in the descending order. - * - * Since: cosmos-sdk 0.43 - */ - reverse?: boolean; } /** @@ -645,7 +639,6 @@ export class Api extends HttpClient @@ -703,7 +696,6 @@ export class Api extends HttpClient @@ -745,7 +737,6 @@ export class Api extends HttpClient @@ -837,7 +828,6 @@ export class Api extends HttpClient @@ -881,7 +871,6 @@ export class Api extends HttpClient @@ -907,7 +896,6 @@ export class Api extends HttpClient @@ -949,7 +937,6 @@ export class Api extends HttpClient @@ -976,7 +963,6 @@ export class Api extends HttpClient @@ -1003,7 +989,6 @@ export class Api extends HttpClient @@ -1061,7 +1046,6 @@ export class Api extends HttpClient @@ -1119,7 +1103,6 @@ export class Api extends HttpClient diff --git a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/cosmos/base/query/v1beta1/pagination.ts b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/cosmos/base/query/v1beta1/pagination.ts index 9c87ac0c..0bc568f4 100644 --- a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/cosmos/base/query/v1beta1/pagination.ts +++ b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/cosmos/base/query/v1beta1/pagination.ts @@ -38,12 +38,6 @@ export interface PageRequest { * is set. */ count_total: boolean; - /** - * reverse is set to true if results are to be returned in the descending order. - * - * Since: cosmos-sdk 0.43 - */ - reverse: boolean; } /** @@ -68,12 +62,7 @@ export interface PageResponse { total: number; } -const basePageRequest: object = { - offset: 0, - limit: 0, - count_total: false, - reverse: false, -}; +const basePageRequest: object = { offset: 0, limit: 0, count_total: false }; export const PageRequest = { encode(message: PageRequest, writer: Writer = Writer.create()): Writer { @@ -89,9 +78,6 @@ export const PageRequest = { if (message.count_total === true) { writer.uint32(32).bool(message.count_total); } - if (message.reverse === true) { - writer.uint32(40).bool(message.reverse); - } return writer; }, @@ -114,9 +100,6 @@ export const PageRequest = { case 4: message.count_total = reader.bool(); break; - case 5: - message.reverse = reader.bool(); - break; default: reader.skipType(tag & 7); break; @@ -145,11 +128,6 @@ export const PageRequest = { } else { message.count_total = false; } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = Boolean(object.reverse); - } else { - message.reverse = false; - } return message; }, @@ -163,7 +141,6 @@ export const PageRequest = { message.limit !== undefined && (obj.limit = message.limit); message.count_total !== undefined && (obj.count_total = message.count_total); - message.reverse !== undefined && (obj.reverse = message.reverse); return obj; }, @@ -189,11 +166,6 @@ export const PageRequest = { } else { message.count_total = false; } - if (object.reverse !== undefined && object.reverse !== null) { - message.reverse = object.reverse; - } else { - message.reverse = false; - } return message; }, }; diff --git a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/market/tx.ts b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/market/tx.ts index 7bfb2278..cde5a561 100644 --- a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/market/tx.ts +++ b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/market/tx.ts @@ -60,6 +60,7 @@ export interface MsgMarketOrder { } export interface MsgMarketOrderResponse { + uid: string; amountBid: string; amountAsk: string; slippage: string; @@ -937,6 +938,7 @@ export const MsgMarketOrder = { }; const baseMsgMarketOrderResponse: object = { + uid: "", amountBid: "", amountAsk: "", slippage: "", @@ -947,14 +949,17 @@ export const MsgMarketOrderResponse = { message: MsgMarketOrderResponse, writer: Writer = Writer.create() ): Writer { + if (message.uid !== "") { + writer.uint32(10).string(message.uid); + } if (message.amountBid !== "") { - writer.uint32(10).string(message.amountBid); + writer.uint32(18).string(message.amountBid); } if (message.amountAsk !== "") { - writer.uint32(18).string(message.amountAsk); + writer.uint32(26).string(message.amountAsk); } if (message.slippage !== "") { - writer.uint32(26).string(message.slippage); + writer.uint32(34).string(message.slippage); } return writer; }, @@ -967,12 +972,15 @@ export const MsgMarketOrderResponse = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.amountBid = reader.string(); + message.uid = reader.string(); break; case 2: - message.amountAsk = reader.string(); + message.amountBid = reader.string(); break; case 3: + message.amountAsk = reader.string(); + break; + case 4: message.slippage = reader.string(); break; default: @@ -985,6 +993,11 @@ export const MsgMarketOrderResponse = { fromJSON(object: any): MsgMarketOrderResponse { const message = { ...baseMsgMarketOrderResponse } as MsgMarketOrderResponse; + if (object.uid !== undefined && object.uid !== null) { + message.uid = String(object.uid); + } else { + message.uid = ""; + } if (object.amountBid !== undefined && object.amountBid !== null) { message.amountBid = String(object.amountBid); } else { @@ -1005,6 +1018,7 @@ export const MsgMarketOrderResponse = { toJSON(message: MsgMarketOrderResponse): unknown { const obj: any = {}; + message.uid !== undefined && (obj.uid = message.uid); message.amountBid !== undefined && (obj.amountBid = message.amountBid); message.amountAsk !== undefined && (obj.amountAsk = message.amountAsk); message.slippage !== undefined && (obj.slippage = message.slippage); @@ -1015,6 +1029,11 @@ export const MsgMarketOrderResponse = { object: DeepPartial ): MsgMarketOrderResponse { const message = { ...baseMsgMarketOrderResponse } as MsgMarketOrderResponse; + if (object.uid !== undefined && object.uid !== null) { + message.uid = object.uid; + } else { + message.uid = ""; + } if (object.amountBid !== undefined && object.amountBid !== null) { message.amountBid = object.amountBid; } else { diff --git a/x/market/keeper/msg_server_market_order.go b/x/market/keeper/msg_server_market_order.go index 1e95fbe4..306e62f0 100644 --- a/x/market/keeper/msg_server_market_order.go +++ b/x/market/keeper/msg_server_market_order.go @@ -2,6 +2,7 @@ package keeper import ( "context" + "strconv" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -178,5 +179,5 @@ func (k msgServer) MarketOrder(goCtx context.Context, msg *types.MsgMarketOrder) k.SetMember(ctx, memberAsk) k.SetMember(ctx, memberBid) - return &types.MsgMarketOrderResponse{AmountBid: msg.AmountBid, AmountAsk: amountAsk.String(), Slippage: slippage.String()}, nil + return &types.MsgMarketOrderResponse{Uid: strconv.FormatUint(uid, 10), AmountBid: msg.AmountBid, AmountAsk: amountAsk.String(), Slippage: slippage.String()}, nil } From 14784f2bba2119519a7341c577607bd40b91d7a1 Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Sat, 8 Jun 2024 23:39:17 -0500 Subject: [PATCH 22/35] Add filled order check and test --- x/market/keeper/msg_server_cancel_order.go | 4 + .../keeper/msg_server_cancel_order_test.go | 78 +++++++++---------- 2 files changed, 42 insertions(+), 40 deletions(-) diff --git a/x/market/keeper/msg_server_cancel_order.go b/x/market/keeper/msg_server_cancel_order.go index 74777c4d..a1d1df7a 100644 --- a/x/market/keeper/msg_server_cancel_order.go +++ b/x/market/keeper/msg_server_cancel_order.go @@ -23,6 +23,10 @@ func (k msgServer) CancelOrder(goCtx context.Context, msg *types.MsgCancelOrder) return nil, sdkerrors.Wrapf(types.ErrOrderCanceled, "%s", msg.Uid) } + if order.Status == "filled" { + return nil, sdkerrors.Wrapf(types.ErrOrderFilled, "%s", msg.Uid) + } + if order.Owner != msg.Creator { return nil, sdkerrors.Wrapf(types.ErrNotOrderOwner, "%s", msg.Uid) } diff --git a/x/market/keeper/msg_server_cancel_order_test.go b/x/market/keeper/msg_server_cancel_order_test.go index c13ee816..915ea919 100644 --- a/x/market/keeper/msg_server_cancel_order_test.go +++ b/x/market/keeper/msg_server_cancel_order_test.go @@ -11,9 +11,7 @@ import ( "github.com/stretchr/testify/require" ) -func TestCancelOrder_case1_stop(t *testing.T) { - testInput := keepertest.CreateTestEnvironment(t) - +func orderCommon(t *testing.T, testInput keepertest.TestInput) { // MintCoins require.NoError(t, testInput.BankKeeper.MintCoins(testInput.Context, types.ModuleName, coinPair)) @@ -31,12 +29,18 @@ func TestCancelOrder_case1_stop(t *testing.T) { var d = types.MsgCreateDrop{Creator: addr, Pair: pair, Drops: "120"} _, err = keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreateDrop(sdk.WrapSDKContext(testInput.Context), &d) require.NoError(t, err) +} + +func TestCancelOrder_case1_stop(t *testing.T) { + testInput := keepertest.CreateTestEnvironment(t) + + orderCommon(t, testInput) beforecount := testInput.MarketKeeper.GetUidCount(testInput.Context) // Create Order var o = types.MsgCreateOrder{Creator: addr, DenomAsk: denomA, DenomBid: denomB, Rate: testdata.RateAstrArray, OrderType: "stop", Amount: "0", Prev: "0", Next: "0"} - _, err = keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreateOrder(sdk.WrapSDKContext(testInput.Context), &o) + _, err := keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreateOrder(sdk.WrapSDKContext(testInput.Context), &o) require.NoError(t, err) aftercount := testInput.MarketKeeper.GetUidCount(testInput.Context) require.Equal(t, beforecount+1, aftercount) @@ -88,23 +92,7 @@ func TestCancelOrder_case1_limit(t *testing.T) { testInput := keepertest.CreateTestEnvironment(t) - // MintCoins - require.NoError(t, testInput.BankKeeper.MintCoins(testInput.Context, types.ModuleName, coinPair)) - - // SendCoinsFromModuleToAccount - requestAddress, err := sdk.AccAddressFromBech32(addr) - require.NoError(t, err) - require.NoError(t, testInput.BankKeeper.SendCoinsFromModuleToAccount(testInput.Context, types.ModuleName, requestAddress, coinPair)) - - // Create Pool - var p = types.MsgCreatePool{CoinA: testdata.coinAStr, CoinB: testdata.coinBStr, Creator: addr} - _, err = keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreatePool(sdk.WrapSDKContext(testInput.Context), &p) - require.NoError(t, err) - - // CreateDrop - var d = types.MsgCreateDrop{Creator: addr, Pair: pair, Drops: "120"} - _, err = keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreateDrop(sdk.WrapSDKContext(testInput.Context), &d) - require.NoError(t, err) + orderCommon(t, testInput) beforecount := testInput.MarketKeeper.GetUidCount(testInput.Context) @@ -120,7 +108,7 @@ func TestCancelOrder_case1_limit(t *testing.T) { // Create Order var o = types.MsgCreateOrder{Creator: addr, DenomAsk: denomA, DenomBid: denomB, Rate: testdata.RateAstrArray, OrderType: "limit", Amount: "0", Prev: "0", Next: "0"} - _, err = keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreateOrder(sdk.WrapSDKContext(testInput.Context), &o) + _, err := keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreateOrder(sdk.WrapSDKContext(testInput.Context), &o) require.NoError(t, err) aftercount := testInput.MarketKeeper.GetUidCount(testInput.Context) @@ -187,23 +175,7 @@ func TestCancelOrder_case2_stop(t *testing.T) { testInput := keepertest.CreateTestEnvironment(t) - // MintCoins - require.NoError(t, testInput.BankKeeper.MintCoins(testInput.Context, types.ModuleName, coinPair)) - - // SendCoinsFromModuleToAccount - requestAddress, err := sdk.AccAddressFromBech32(addr) - require.NoError(t, err) - require.NoError(t, testInput.BankKeeper.SendCoinsFromModuleToAccount(testInput.Context, types.ModuleName, requestAddress, coinPair)) - - // Create Pool - var p = types.MsgCreatePool{CoinA: testdata.coinAStr, CoinB: testdata.coinBStr, Creator: addr} - _, err = keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreatePool(sdk.WrapSDKContext(testInput.Context), &p) - require.NoError(t, err) - - // CreateDrop - var d = types.MsgCreateDrop{Creator: addr, Pair: pair, Drops: "120"} - _, err = keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreateDrop(sdk.WrapSDKContext(testInput.Context), &d) - require.NoError(t, err) + orderCommon(t, testInput) beforecount := testInput.MarketKeeper.GetUidCount(testInput.Context) @@ -211,7 +183,7 @@ func TestCancelOrder_case2_stop(t *testing.T) { //Create Order var o = types.MsgCreateOrder{Creator: addr, DenomAsk: denomA, DenomBid: denomB, Rate: testdata.RateAstrArray, OrderType: "stop", Amount: "0", Prev: "0", Next: "0"} - _, err = keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreateOrder(sdk.WrapSDKContext(testInput.Context), &o) + _, err := keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreateOrder(sdk.WrapSDKContext(testInput.Context), &o) require.NoError(t, err) aftercount := testInput.MarketKeeper.GetUidCount(testInput.Context) require.Equal(t, beforecount+1, aftercount) @@ -334,3 +306,29 @@ func TestCancelOrderEmptyPool(t *testing.T) { require.True(t, balanceBefore.Amount.Equal(balanceAfter.Amount)) } + +func TestCancelOrder_case1_market_filled(t *testing.T) { + + testInput := keepertest.CreateTestEnvironment(t) + + orderCommon(t, testInput) + + //Validate GetMember + memberBid, memberfoundBid := testInput.MarketKeeper.GetMember(testInput.Context, denomA, denomB) + require.True(t, memberfoundBid) + require.Equal(t, memberBid.DenomA, denomA) + require.Equal(t, memberBid.DenomB, denomB) + require.Equal(t, "182", memberBid.Balance.String()) + require.Equal(t, memberBid.Stop, uint64(0)) + + //Create Order + var o = types.MsgMarketOrder{Creator: addr, DenomAsk: denomA, AmountAsk: "15", DenomBid: denomB, AmountBid: "10", Slippage: "9999"} + + order, err := keeper.NewMsgServerImpl(*testInput.MarketKeeper).MarketOrder(sdk.WrapSDKContext(testInput.Context), &o) + require.NoError(t, err) + + // Cancel Order + var co = types.MsgCancelOrder{Creator: addr, Uid: order.Uid} + _, err = keeper.NewMsgServerImpl(*testInput.MarketKeeper).CancelOrder(sdk.WrapSDKContext(testInput.Context), &co) + require.Error(t, err) +} From 65cd47563729af0c702306ef623d56fc890713d3 Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Sat, 8 Jun 2024 23:40:01 -0500 Subject: [PATCH 23/35] Add Last Drop to Pool --- x/market/keeper/msg_server_create_pool.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/x/market/keeper/msg_server_create_pool.go b/x/market/keeper/msg_server_create_pool.go index cda8952e..e8ffc9f0 100644 --- a/x/market/keeper/msg_server_create_pool.go +++ b/x/market/keeper/msg_server_create_pool.go @@ -82,9 +82,13 @@ func (k msgServer) CreatePool(goCtx context.Context, msg *types.MsgCreatePool) ( Drops: drops, } + // Create the uid + count := k.GetUidCount(ctx) + if found { pool.Drops = drops pool.Leaders = []*types.Leader{&leader} + pool.LastDrop = count member1.Balance = coinPair.AmountOf(denom1) member2.Balance = coinPair.AmountOf(denom2) } else { @@ -101,8 +105,9 @@ func (k msgServer) CreatePool(goCtx context.Context, msg *types.MsgCreatePool) ( Denom: coinPair.GetDenomByIndex(1), Amount: sdk.ZeroInt(), }, - Drops: drops, - History: uint64(0), + Drops: drops, + History: uint64(0), + LastDrop: count, } member1 = types.Member{ @@ -124,9 +129,6 @@ func (k msgServer) CreatePool(goCtx context.Context, msg *types.MsgCreatePool) ( } } - // Create the uid - count := k.GetUidCount(ctx) - var drop = types.Drop{ Uid: count, Owner: msg.Creator, From c31c2aab753465a265d4b640ece3a76fea328ebe Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Sat, 8 Jun 2024 23:40:34 -0500 Subject: [PATCH 24/35] Add error types --- x/market/types/errors.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/x/market/types/errors.go b/x/market/types/errors.go index 20457aaf..ab2888e1 100644 --- a/x/market/types/errors.go +++ b/x/market/types/errors.go @@ -56,4 +56,10 @@ var ( ErrDropNotActive = sdkerrors.Register(ModuleName, 23, "drop not active") // nolint: gomnd // ErrOrderCanceled - order is already canceled ErrOrderCanceled = sdkerrors.Register(ModuleName, 24, "order already canceled") // nolint: gomnd + // ErrSqrtProductLessThanDrops - sqrt product must never be less than drops + ErrSqrtProductLessThanDrops = sdkerrors.Register(ModuleName, 25, "sqrt product not greater than or equal to drops") // nolint: gomnd + // ErrSqrtProductOverDrops - next drop must get less drops per sqrt(XY) + ErrSqrtProductOverDrops = sdkerrors.Register(ModuleName, 26, "sqrt product over drops not less than") // nolint: gomnd + // ErrOrderFilled - order is already filled + ErrOrderFilled = sdkerrors.Register(ModuleName, 27, "order already filled") // nolint: gomnd ) From d5c22eac0744ed146cca96fa2c0f9e8a8fcf6e82 Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Sat, 8 Jun 2024 23:40:59 -0500 Subject: [PATCH 25/35] Add Uid to proto generated market order response --- x/market/types/tx.pb.go | 137 +++++++++++++++++++++++++++------------- 1 file changed, 94 insertions(+), 43 deletions(-) diff --git a/x/market/types/tx.pb.go b/x/market/types/tx.pb.go index aadb032c..b62bb1c4 100644 --- a/x/market/types/tx.pb.go +++ b/x/market/types/tx.pb.go @@ -625,9 +625,10 @@ func (m *MsgMarketOrder) GetSlippage() string { } type MsgMarketOrderResponse struct { - AmountBid string `protobuf:"bytes,1,opt,name=amountBid,proto3" json:"amountBid,omitempty"` - AmountAsk string `protobuf:"bytes,2,opt,name=amountAsk,proto3" json:"amountAsk,omitempty"` - Slippage string `protobuf:"bytes,3,opt,name=slippage,proto3" json:"slippage,omitempty"` + Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"` + AmountBid string `protobuf:"bytes,2,opt,name=amountBid,proto3" json:"amountBid,omitempty"` + AmountAsk string `protobuf:"bytes,3,opt,name=amountAsk,proto3" json:"amountAsk,omitempty"` + Slippage string `protobuf:"bytes,4,opt,name=slippage,proto3" json:"slippage,omitempty"` } func (m *MsgMarketOrderResponse) Reset() { *m = MsgMarketOrderResponse{} } @@ -663,6 +664,13 @@ func (m *MsgMarketOrderResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgMarketOrderResponse proto.InternalMessageInfo +func (m *MsgMarketOrderResponse) GetUid() string { + if m != nil { + return m.Uid + } + return "" +} + func (m *MsgMarketOrderResponse) GetAmountBid() string { if m != nil { return m.AmountBid @@ -702,42 +710,42 @@ func init() { func init() { proto.RegisterFile("market/tx.proto", fileDescriptor_2966ca2342567dca) } var fileDescriptor_2966ca2342567dca = []byte{ - // 557 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0x4d, 0x6f, 0xd3, 0x30, - 0x18, 0xc7, 0x9b, 0xa5, 0xed, 0x5a, 0x23, 0x5e, 0x14, 0xc1, 0xb0, 0xa2, 0x29, 0x9a, 0x72, 0x82, - 0x49, 0xa4, 0x62, 0x1c, 0xe1, 0xb2, 0xc2, 0x81, 0x4b, 0x05, 0x2a, 0x70, 0xe1, 0x96, 0x36, 0x56, - 0x09, 0x4b, 0x62, 0xcb, 0x49, 0xa6, 0xee, 0x5b, 0x70, 0xe2, 0xc3, 0xf0, 0x09, 0x38, 0xee, 0xc0, - 0x81, 0x23, 0x6a, 0xbf, 0x08, 0x7a, 0xec, 0xc4, 0xb1, 0xe9, 0x68, 0x22, 0xed, 0x54, 0x3f, 0x2f, - 0x7e, 0x7e, 0x7e, 0xfe, 0xea, 0x5f, 0x41, 0xf7, 0xd3, 0x90, 0x5f, 0x90, 0x62, 0x52, 0xac, 0x03, - 0xc6, 0x69, 0x41, 0x1d, 0x97, 0x91, 0x2c, 0x2a, 0x93, 0x32, 0x4d, 0xc2, 0x45, 0x1e, 0xc8, 0x6a, - 0xf5, 0xe3, 0x7f, 0x42, 0x77, 0x67, 0xf9, 0xea, 0x35, 0x27, 0x61, 0x41, 0xde, 0x53, 0x9a, 0x38, - 0x18, 0x1d, 0x2e, 0x21, 0xa2, 0x1c, 0x5b, 0x27, 0xd6, 0x93, 0xf1, 0xbc, 0x0e, 0x9d, 0x87, 0x68, - 0xb0, 0xa4, 0x71, 0x76, 0x8e, 0x0f, 0x44, 0x5e, 0x06, 0x75, 0x76, 0x8a, 0xed, 0x26, 0x3b, 0xf5, - 0x1f, 0xa3, 0x47, 0xc6, 0xd8, 0x39, 0xc9, 0x19, 0xcd, 0x72, 0xe2, 0x7f, 0xd0, 0x78, 0x6f, 0x38, - 0x65, 0x7b, 0x78, 0x0e, 0xea, 0xb3, 0x30, 0xe6, 0x15, 0x4e, 0x9c, 0x81, 0x16, 0x71, 0xca, 0xf2, - 0x9a, 0x26, 0x02, 0x83, 0x06, 0x43, 0x15, 0xed, 0xa5, 0xa0, 0xcd, 0x49, 0x44, 0x48, 0xda, 0x42, - 0x7b, 0x80, 0xec, 0x32, 0x8e, 0x2a, 0x18, 0x1c, 0xab, 0xa9, 0xcd, 0x65, 0x35, 0xf5, 0x97, 0x85, - 0xee, 0x29, 0xde, 0x3b, 0x1e, 0x11, 0xbe, 0x67, 0xae, 0x8b, 0x46, 0x11, 0xc9, 0x68, 0x7a, 0x9e, - 0x5f, 0x54, 0xc3, 0x55, 0xac, 0x6a, 0xd3, 0x38, 0xaa, 0x16, 0x52, 0xb1, 0x73, 0x8c, 0xc6, 0x14, - 0x46, 0x7f, 0xbc, 0x62, 0x04, 0xf7, 0x45, 0xb1, 0x49, 0x38, 0x47, 0x68, 0x18, 0xa6, 0xb4, 0xcc, - 0x0a, 0x3c, 0x10, 0xa5, 0x2a, 0x02, 0xcd, 0x78, 0x58, 0x10, 0x3c, 0x3c, 0xb1, 0x41, 0x33, 0x38, - 0x0b, 0x1d, 0x39, 0xb9, 0xc4, 0x87, 0x95, 0x8e, 0x9c, 0x5c, 0x42, 0x2e, 0x23, 0xeb, 0x02, 0x8f, - 0x64, 0x0e, 0xce, 0xfe, 0x29, 0x3a, 0x32, 0xb7, 0xaa, 0x17, 0xae, 0xb5, 0x81, 0xcd, 0xfa, 0x52, - 0x9b, 0x57, 0x52, 0x81, 0x30, 0x5b, 0x92, 0xa4, 0x4d, 0x81, 0x5d, 0x65, 0xb1, 0x24, 0x35, 0xb7, - 0x95, 0xb4, 0x3f, 0xa4, 0xb4, 0x33, 0xf1, 0xe7, 0xbc, 0x8d, 0xb4, 0xc7, 0x68, 0x2c, 0x25, 0x81, - 0xa2, 0xd4, 0xb6, 0x49, 0x18, 0xc2, 0xf7, 0x77, 0x85, 0x97, 0x8d, 0x50, 0x1c, 0xe8, 0x37, 0xa1, - 0xea, 0xa2, 0x51, 0x9e, 0xc4, 0x8c, 0x85, 0x2b, 0x10, 0x59, 0xdc, 0xac, 0x63, 0x9f, 0x89, 0xb5, - 0xb4, 0xb7, 0x2b, 0x01, 0x8d, 0x99, 0xd6, 0xbf, 0x33, 0x8d, 0xb7, 0x1e, 0xdc, 0xf0, 0x56, 0x45, - 0xb4, 0x4d, 0xe2, 0xd9, 0xf7, 0x01, 0xb2, 0x67, 0xf9, 0xca, 0xf9, 0x8a, 0x90, 0x66, 0xe1, 0xa7, - 0xc1, 0xff, 0x0d, 0x1f, 0x18, 0xb6, 0x74, 0x9f, 0x77, 0x6e, 0x55, 0xbb, 0x28, 0x96, 0x30, 0x54, - 0x37, 0x16, 0xb4, 0x76, 0x64, 0xe9, 0x4e, 0x03, 0x96, 0x66, 0xde, 0x36, 0x56, 0xd3, 0xda, 0xca, - 0xda, 0x75, 0xb5, 0x93, 0xa2, 0x3b, 0xba, 0xa3, 0x4f, 0x3b, 0xbd, 0x56, 0xf4, 0xba, 0x67, 0xdd, - 0x7b, 0x0d, 0x9c, 0x66, 0x9f, 0x56, 0x5c, 0xd3, 0xdb, 0x8e, 0xdb, 0x35, 0x16, 0xe0, 0x74, 0x53, - 0xb5, 0xe1, 0xb4, 0xde, 0x56, 0xdc, 0x0d, 0x7f, 0xf8, 0xe9, 0xdb, 0x9f, 0x1b, 0xcf, 0xba, 0xde, - 0x78, 0xd6, 0x9f, 0x8d, 0x67, 0x7d, 0xdb, 0x7a, 0xbd, 0xeb, 0xad, 0xd7, 0xfb, 0xbd, 0xf5, 0x7a, - 0x9f, 0x83, 0x55, 0x5c, 0x7c, 0x29, 0x17, 0xc1, 0x92, 0xa6, 0x93, 0x7a, 0xee, 0x33, 0x18, 0x3c, - 0xa9, 0x3e, 0x5b, 0xeb, 0xfa, 0x50, 0x5c, 0x31, 0x92, 0x2f, 0x86, 0xe2, 0x1b, 0xf6, 0xe2, 0x6f, - 0x00, 0x00, 0x00, 0xff, 0xff, 0xb3, 0x03, 0xf3, 0x88, 0xd6, 0x06, 0x00, 0x00, + // 559 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0x3d, 0x6f, 0xd3, 0x40, + 0x18, 0xc7, 0xe3, 0xc6, 0x49, 0x93, 0x43, 0xbc, 0xc8, 0x82, 0x72, 0xb2, 0x2a, 0xab, 0xf2, 0x04, + 0x95, 0x70, 0x44, 0x19, 0x61, 0x69, 0x60, 0x60, 0x89, 0x40, 0x01, 0x16, 0x36, 0x27, 0x3e, 0x05, + 0x53, 0xdb, 0x77, 0x3a, 0xdb, 0x55, 0xba, 0xf2, 0x09, 0x98, 0xf8, 0x30, 0x7c, 0x02, 0xc6, 0x0e, + 0x0c, 0x8c, 0x28, 0xf9, 0x22, 0xe8, 0xb9, 0xb3, 0xcf, 0x67, 0x52, 0x72, 0x96, 0x98, 0x7a, 0xcf, + 0xcb, 0x3d, 0xbf, 0x7b, 0xfe, 0xea, 0x3f, 0x46, 0x77, 0xd3, 0x90, 0x5f, 0x90, 0x62, 0x52, 0xac, + 0x03, 0xc6, 0x69, 0x41, 0x1d, 0x97, 0x91, 0x2c, 0x2a, 0x93, 0x32, 0x4d, 0xc2, 0x45, 0x1e, 0xc8, + 0x6a, 0xf5, 0xc7, 0xff, 0x80, 0x6e, 0xcf, 0xf2, 0xd5, 0x4b, 0x4e, 0xc2, 0x82, 0xbc, 0xa5, 0x34, + 0x71, 0x30, 0x3a, 0x5c, 0x42, 0x44, 0x39, 0xb6, 0x4e, 0xac, 0x47, 0xe3, 0x79, 0x1d, 0x3a, 0xf7, + 0xd1, 0x60, 0x49, 0xe3, 0xec, 0x1c, 0x1f, 0x88, 0xbc, 0x0c, 0xea, 0xec, 0x14, 0xf7, 0x9b, 0xec, + 0xd4, 0x7f, 0x88, 0x1e, 0xb4, 0xc6, 0xce, 0x49, 0xce, 0x68, 0x96, 0x13, 0xff, 0x9d, 0xc6, 0x7b, + 0xc5, 0x29, 0xdb, 0xc3, 0x73, 0x90, 0xcd, 0xc2, 0x98, 0x57, 0x38, 0x71, 0x06, 0x5a, 0xc4, 0x29, + 0xcb, 0x6b, 0x9a, 0x08, 0x5a, 0x34, 0x18, 0xaa, 0x68, 0xcf, 0x05, 0x6d, 0x4e, 0x22, 0x42, 0x52, + 0x03, 0xed, 0x1e, 0xea, 0x97, 0x71, 0x54, 0xc1, 0xe0, 0x58, 0x4d, 0x6d, 0x2e, 0xab, 0xa9, 0x3f, + 0x2d, 0x74, 0x47, 0xf1, 0xde, 0xf0, 0x88, 0xf0, 0x3d, 0x73, 0x5d, 0x34, 0x8a, 0x48, 0x46, 0xd3, + 0xf3, 0xfc, 0xa2, 0x1a, 0xae, 0x62, 0x55, 0x9b, 0xc6, 0x51, 0xb5, 0x90, 0x8a, 0x9d, 0x63, 0x34, + 0xa6, 0x30, 0xfa, 0xfd, 0x15, 0x23, 0xd8, 0x16, 0xc5, 0x26, 0xe1, 0x1c, 0xa1, 0x61, 0x98, 0xd2, + 0x32, 0x2b, 0xf0, 0x40, 0x94, 0xaa, 0x08, 0x34, 0xe3, 0x61, 0x41, 0xf0, 0xf0, 0xa4, 0x0f, 0x9a, + 0xc1, 0x59, 0xe8, 0xc8, 0xc9, 0x25, 0x3e, 0xac, 0x74, 0xe4, 0xe4, 0x12, 0x72, 0x19, 0x59, 0x17, + 0x78, 0x24, 0x73, 0x70, 0xf6, 0x4f, 0xd1, 0x51, 0x7b, 0xab, 0x7a, 0xe1, 0x5a, 0x1b, 0xd8, 0xcc, + 0x96, 0xda, 0xbc, 0x90, 0x0a, 0x84, 0xd9, 0x92, 0x24, 0x26, 0x05, 0x76, 0x95, 0xc5, 0x92, 0xd4, + 0xdc, 0x56, 0xd2, 0x7e, 0x97, 0xd2, 0xce, 0xc4, 0x3f, 0xe7, 0xff, 0x48, 0x7b, 0x8c, 0xc6, 0x52, + 0x12, 0x28, 0x4a, 0x6d, 0x9b, 0x44, 0x4b, 0x78, 0x7b, 0x57, 0x78, 0xd9, 0x08, 0xc5, 0x81, 0x7e, + 0x13, 0xaa, 0x2e, 0x1a, 0xe5, 0x49, 0xcc, 0x58, 0xb8, 0x02, 0x91, 0xc5, 0xcd, 0x3a, 0xf6, 0xbf, + 0x58, 0x62, 0x2f, 0xed, 0xf1, 0x37, 0x29, 0x28, 0x35, 0x68, 0x63, 0x0e, 0xfe, 0xc6, 0x18, 0x9f, + 0xaf, 0x1e, 0x61, 0xb7, 0x1f, 0x71, 0xf6, 0x6d, 0x80, 0xfa, 0xb3, 0x7c, 0xe5, 0x7c, 0x46, 0x48, + 0x73, 0xf5, 0xe3, 0xe0, 0xdf, 0xbf, 0x01, 0x41, 0xcb, 0xa9, 0xee, 0xd3, 0xce, 0xad, 0x6a, 0x3b, + 0xc5, 0x12, 0x1e, 0xeb, 0xc6, 0x82, 0xd6, 0x8e, 0x2c, 0xdd, 0x7c, 0xc0, 0xd2, 0xfc, 0x6c, 0x62, + 0x35, 0xad, 0x46, 0xd6, 0xae, 0xd1, 0x9d, 0x14, 0xdd, 0xd2, 0x4d, 0x7e, 0xda, 0xe9, 0xb5, 0xa2, + 0xd7, 0x3d, 0xeb, 0xde, 0xdb, 0xc2, 0x69, 0x8e, 0x32, 0xe2, 0x9a, 0x5e, 0x33, 0x6e, 0xd7, 0x6b, + 0x80, 0xd3, 0x7d, 0x66, 0xc2, 0x69, 0xbd, 0x46, 0xdc, 0x0d, 0x16, 0x98, 0xbe, 0xfe, 0xb1, 0xf1, + 0xac, 0xeb, 0x8d, 0x67, 0xfd, 0xde, 0x78, 0xd6, 0xd7, 0xad, 0xd7, 0xbb, 0xde, 0x7a, 0xbd, 0x5f, + 0x5b, 0xaf, 0xf7, 0x31, 0x58, 0xc5, 0xc5, 0xa7, 0x72, 0x11, 0x2c, 0x69, 0x3a, 0xa9, 0xe7, 0x3e, + 0x81, 0xc1, 0x93, 0xea, 0x4b, 0xb6, 0xae, 0x0f, 0xc5, 0x15, 0x23, 0xf9, 0x62, 0x28, 0x3e, 0x6b, + 0xcf, 0xfe, 0x04, 0x00, 0x00, 0xff, 0xff, 0x04, 0x21, 0x35, 0xaf, 0xe9, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1453,20 +1461,27 @@ func (m *MsgMarketOrderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) copy(dAtA[i:], m.Slippage) i = encodeVarintTx(dAtA, i, uint64(len(m.Slippage))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x22 } if len(m.AmountAsk) > 0 { i -= len(m.AmountAsk) copy(dAtA[i:], m.AmountAsk) i = encodeVarintTx(dAtA, i, uint64(len(m.AmountAsk))) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a } if len(m.AmountBid) > 0 { i -= len(m.AmountBid) copy(dAtA[i:], m.AmountBid) i = encodeVarintTx(dAtA, i, uint64(len(m.AmountBid))) i-- + dAtA[i] = 0x12 + } + if len(m.Uid) > 0 { + i -= len(m.Uid) + copy(dAtA[i:], m.Uid) + i = encodeVarintTx(dAtA, i, uint64(len(m.Uid))) + i-- dAtA[i] = 0xa } return len(dAtA) - i, nil @@ -1689,6 +1704,10 @@ func (m *MsgMarketOrderResponse) Size() (n int) { } var l int _ = l + l = len(m.Uid) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } l = len(m.AmountBid) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -3077,6 +3096,38 @@ func (m *MsgMarketOrderResponse) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Uid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AmountBid", wireType) } @@ -3108,7 +3159,7 @@ func (m *MsgMarketOrderResponse) Unmarshal(dAtA []byte) error { } m.AmountBid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AmountAsk", wireType) } @@ -3140,7 +3191,7 @@ func (m *MsgMarketOrderResponse) Unmarshal(dAtA []byte) error { } m.AmountAsk = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Slippage", wireType) } From 52f40ca3ce74ad71dd57e279d344b9889d6cddcd Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Sun, 9 Jun 2024 15:36:47 -0500 Subject: [PATCH 26/35] Update drop proto to include accounting --- docs/static/openapi.yml | 292 +++++- proto/market/drop.proto | 28 +- proto/market/tx.proto | 22 + testutil/keeper/test_common.go | 4 +- .../pendulumlabs.market.market/index.ts | 80 +- .../module/index.ts | 18 +- .../pendulumlabs.market.market/module/rest.ts | 70 +- .../cosmos/base/query/v1beta1/pagination.ts | 30 +- .../module/types/market/drop.ts | 187 +++- .../module/types/market/tx.ts | 475 ++++++++- x/market/migrations/v1/types/drop.pb.go | 955 ++++++++++++++++++ x/market/types/drop.pb.go | 398 +++++++- 12 files changed, 2387 insertions(+), 172 deletions(-) create mode 100644 x/market/migrations/v1/types/drop.pb.go diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index fc770c86..4ec1468d 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -28918,6 +28918,16 @@ paths: in: query required: false type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean tags: - Query '/pendulum-labs/market/market/bookends/{coinA}/{coinB}/{orderType}/{rate}': @@ -29132,6 +29142,16 @@ paths: in: query required: false type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean tags: - Query '/pendulum-labs/market/market/burnings/{denom}': @@ -29198,12 +29218,28 @@ paths: type: string pair: type: string + active: + type: boolean drops: type: string - product: + time_beg: + type: string + format: int64 + coin1_beg: + type: string + coin2_beg: + type: string + product_beg: + type: string + time_end: + type: string + format: int64 + coin1_end: + type: string + coin2_end: + type: string + product_end: type: string - active: - type: boolean pagination: type: object properties: @@ -29296,6 +29332,16 @@ paths: in: query required: false type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean tags: - Query '/pendulum-labs/market/market/drop/amounts/{uid}': @@ -29501,12 +29547,28 @@ paths: type: string pair: type: string + active: + type: boolean drops: type: string - product: + time_beg: + type: string + format: int64 + coin1_beg: + type: string + coin2_beg: + type: string + product_beg: + type: string + time_end: + type: string + format: int64 + coin1_end: + type: string + coin2_end: + type: string + product_end: type: string - active: - type: boolean pagination: type: object properties: @@ -29607,6 +29669,16 @@ paths: in: query required: false type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean tags: - Query '/pendulum-labs/market/market/drop/{uid}': @@ -29629,12 +29701,28 @@ paths: type: string pair: type: string + active: + type: boolean drops: type: string - product: + time_beg: + type: string + format: int64 + coin1_beg: + type: string + coin2_beg: + type: string + product_beg: + type: string + time_end: + type: string + format: int64 + coin1_end: + type: string + coin2_end: + type: string + product_end: type: string - active: - type: boolean default: description: An unexpected error response. schema: @@ -29807,6 +29895,16 @@ paths: in: query required: false type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean tags: - Query /pendulum-labs/market/market/member: @@ -29932,6 +30030,16 @@ paths: in: query required: false type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean tags: - Query '/pendulum-labs/market/market/member/{denomA}/{denomB}': @@ -30130,6 +30238,16 @@ paths: in: query required: false type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean tags: - Query '/pendulum-labs/market/market/order/uids/{address}': @@ -30246,6 +30364,16 @@ paths: in: query required: false type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean tags: - Query '/pendulum-labs/market/market/order/{address}': @@ -30390,6 +30518,16 @@ paths: in: query required: false type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean tags: - Query '/pendulum-labs/market/market/order/{uid}': @@ -30659,6 +30797,16 @@ paths: in: query required: false type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean tags: - Query '/pendulum-labs/market/market/pool/{pair}': @@ -30898,6 +31046,16 @@ paths: in: query required: false type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean tags: - Query '/pendulum-labs/market/market/volume/{denom}': @@ -50124,12 +50282,28 @@ definitions: type: string pair: type: string + active: + type: boolean drops: type: string - product: + time_beg: + type: string + format: int64 + coin1_beg: + type: string + coin2_beg: + type: string + product_beg: + type: string + time_end: + type: string + format: int64 + coin1_end: + type: string + coin2_end: + type: string + product_end: type: string - active: - type: boolean pendulumlabs.market.market.Leader: type: object properties: @@ -50160,6 +50334,20 @@ definitions: type: object pendulumlabs.market.market.MsgCreateDropResponse: type: object + properties: + creator: + type: string + uid: + type: string + format: uint64 + pair: + type: string + drops: + type: string + coin1: + type: string + coin2: + type: string pendulumlabs.market.market.MsgCreateOrderResponse: type: object properties: @@ -50168,6 +50356,20 @@ definitions: format: uint64 pendulumlabs.market.market.MsgCreatePoolResponse: type: object + properties: + creator: + type: string + drop_uid: + type: string + format: uint64 + pair: + type: string + drops: + type: string + coin1: + type: string + coin2: + type: string pendulumlabs.market.market.MsgMarketOrderResponse: type: object properties: @@ -50181,6 +50383,28 @@ definitions: type: string pendulumlabs.market.market.MsgRedeemDropResponse: type: object + properties: + creator: + type: string + uid: + type: string + format: uint64 + pair: + type: string + drops: + type: string + time_beg: + type: string + coin1_beg: + type: string + coin2_beg: + type: string + time_end: + type: string + coin1_end: + type: string + coin2_end: + type: string pendulumlabs.market.market.Order: type: object properties: @@ -50636,12 +50860,28 @@ definitions: type: string pair: type: string + active: + type: boolean drops: type: string - product: + time_beg: + type: string + format: int64 + coin1_beg: + type: string + coin2_beg: + type: string + product_beg: + type: string + time_end: + type: string + format: int64 + coin1_end: + type: string + coin2_end: + type: string + product_end: type: string - active: - type: boolean pendulumlabs.market.market.QueryDropsResponse: type: object properties: @@ -50657,12 +50897,28 @@ definitions: type: string pair: type: string + active: + type: boolean drops: type: string - product: + time_beg: + type: string + format: int64 + coin1_beg: + type: string + coin2_beg: + type: string + product_beg: + type: string + time_end: + type: string + format: int64 + coin1_end: + type: string + coin2_end: + type: string + product_end: type: string - active: - type: boolean pagination: type: object properties: diff --git a/proto/market/drop.proto b/proto/market/drop.proto index d60b0176..c4700ffc 100644 --- a/proto/market/drop.proto +++ b/proto/market/drop.proto @@ -11,15 +11,37 @@ message Drop { uint64 uid = 1; string owner = 2; string pair = 3; - string drops = 4 [ + bool active = 4; + string drops = 5 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false ]; - string product = 5 [ + int64 time_beg = 6; + string coin1_beg = 7 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", + (gogoproto.nullable) = false + ]; + string coin2_beg = 8 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", + (gogoproto.nullable) = false + ]; + string product_beg = 9 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false + ]; + int64 time_end = 10; + string coin1_end = 11 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", + (gogoproto.nullable) = false + ]; + string coin2_end = 12 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", + (gogoproto.nullable) = false ]; - bool active = 6; + string product_end = 13 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; } message Drops { diff --git a/proto/market/tx.proto b/proto/market/tx.proto index 24822eb8..ddb4a7a2 100644 --- a/proto/market/tx.proto +++ b/proto/market/tx.proto @@ -23,6 +23,12 @@ message MsgCreatePool { } message MsgCreatePoolResponse { + string creator = 1; + uint64 drop_uid = 2; + string pair = 3; + string drops = 4; + string coin1 = 5; + string coin2 = 6; } message MsgCreateDrop { @@ -32,6 +38,12 @@ message MsgCreateDrop { } message MsgCreateDropResponse { + string creator = 1; + uint64 uid = 2; + string pair = 3; + string drops = 4; + string coin1 = 5; + string coin2 = 6; } message MsgRedeemDrop { @@ -40,6 +52,16 @@ message MsgRedeemDrop { } message MsgRedeemDropResponse { + string creator = 1; + uint64 uid = 2; + string pair = 3; + string drops = 4; + string time_beg = 5; + string coin1_beg = 6; + string coin2_beg = 7; + string time_end = 8; + string coin1_end = 9; + string coin2_end = 10; } message MsgCreateOrder { diff --git a/testutil/keeper/test_common.go b/testutil/keeper/test_common.go index 4ab84cab..e85c9472 100644 --- a/testutil/keeper/test_common.go +++ b/testutil/keeper/test_common.go @@ -223,9 +223,9 @@ func MaxSupportedCoin(denom string) string { return fmt.Sprintf("5192296858534827628530496329220095%s", denom) } -// Equal to `MaxSupportedCoin` squared +// Equal to `MaxSupportedCoin` func MaxSupportedDrop(denom string) string { - return fmt.Sprintf("26959946667150639794667015087019620289043427352885315420110951809025%s", denom) + return fmt.Sprintf("5192296858534827628530496329220095%s", denom) } // This is for funding an account capable of `MaxSupportedCoin` diff --git a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/index.ts b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/index.ts index 8b151dcb..da870fd6 100755 --- a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/index.ts +++ b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/index.ts @@ -915,48 +915,48 @@ export default { }, - async sendMsgMarketOrder({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgCreateDrop({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgMarketOrder(value) + const msg = await txClient.msgCreateDrop(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgMarketOrder:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCreateDrop:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgMarketOrder:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgCreateDrop:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgCreatePool({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgMarketOrder({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreatePool(value) + const msg = await txClient.msgMarketOrder(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreatePool:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgMarketOrder:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgCreatePool:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgMarketOrder:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgRedeemDrop({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgCreateOrder({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgRedeemDrop(value) + const msg = await txClient.msgCreateOrder(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgRedeemDrop:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCreateOrder:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgRedeemDrop:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgCreateOrder:Send Could not broadcast Tx: '+ e.message) } } }, @@ -975,73 +975,73 @@ export default { } } }, - async sendMsgCreateDrop({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgCreatePool({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreateDrop(value) + const msg = await txClient.msgCreatePool(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreateDrop:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCreatePool:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgCreateDrop:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgCreatePool:Send Could not broadcast Tx: '+ e.message) } } }, - async sendMsgCreateOrder({ rootGetters }, { value, fee = [], memo = '' }) { + async sendMsgRedeemDrop({ rootGetters }, { value, fee = [], memo = '' }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreateOrder(value) + const msg = await txClient.msgRedeemDrop(value) const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee, gas: "200000" }, memo}) return result } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreateOrder:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgRedeemDrop:Init Could not initialize signing client. Wallet is required.') }else{ - throw new Error('TxClient:MsgCreateOrder:Send Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:MsgRedeemDrop:Send Could not broadcast Tx: '+ e.message) } } }, - async MsgMarketOrder({ rootGetters }, { value }) { + async MsgCreateDrop({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgMarketOrder(value) + const msg = await txClient.msgCreateDrop(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgMarketOrder:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCreateDrop:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgMarketOrder:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgCreateDrop:Create Could not create message: ' + e.message) } } }, - async MsgCreatePool({ rootGetters }, { value }) { + async MsgMarketOrder({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreatePool(value) + const msg = await txClient.msgMarketOrder(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreatePool:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgMarketOrder:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgCreatePool:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgMarketOrder:Create Could not create message: ' + e.message) } } }, - async MsgRedeemDrop({ rootGetters }, { value }) { + async MsgCreateOrder({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgRedeemDrop(value) + const msg = await txClient.msgCreateOrder(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgRedeemDrop:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCreateOrder:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgRedeemDrop:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgCreateOrder:Create Could not create message: ' + e.message) } } }, @@ -1058,29 +1058,29 @@ export default { } } }, - async MsgCreateDrop({ rootGetters }, { value }) { + async MsgCreatePool({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreateDrop(value) + const msg = await txClient.msgCreatePool(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreateDrop:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgCreatePool:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgCreateDrop:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgCreatePool:Create Could not create message: ' + e.message) } } }, - async MsgCreateOrder({ rootGetters }, { value }) { + async MsgRedeemDrop({ rootGetters }, { value }) { try { const txClient=await initTxClient(rootGetters) - const msg = await txClient.msgCreateOrder(value) + const msg = await txClient.msgRedeemDrop(value) return msg } catch (e) { if (e == MissingWalletError) { - throw new Error('TxClient:MsgCreateOrder:Init Could not initialize signing client. Wallet is required.') + throw new Error('TxClient:MsgRedeemDrop:Init Could not initialize signing client. Wallet is required.') } else{ - throw new Error('TxClient:MsgCreateOrder:Create Could not create message: ' + e.message) + throw new Error('TxClient:MsgRedeemDrop:Create Could not create message: ' + e.message) } } }, diff --git a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/index.ts b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/index.ts index 1a4282db..6bf2ded3 100755 --- a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/index.ts +++ b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/index.ts @@ -4,21 +4,21 @@ import { StdFee } from "@cosmjs/launchpad"; import { SigningStargateClient } from "@cosmjs/stargate"; import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; import { Api } from "./rest"; +import { MsgCreateDrop } from "./types/market/tx"; import { MsgMarketOrder } from "./types/market/tx"; +import { MsgCreateOrder } from "./types/market/tx"; +import { MsgCancelOrder } from "./types/market/tx"; import { MsgCreatePool } from "./types/market/tx"; import { MsgRedeemDrop } from "./types/market/tx"; -import { MsgCancelOrder } from "./types/market/tx"; -import { MsgCreateDrop } from "./types/market/tx"; -import { MsgCreateOrder } from "./types/market/tx"; const types = [ + ["/pendulumlabs.market.market.MsgCreateDrop", MsgCreateDrop], ["/pendulumlabs.market.market.MsgMarketOrder", MsgMarketOrder], + ["/pendulumlabs.market.market.MsgCreateOrder", MsgCreateOrder], + ["/pendulumlabs.market.market.MsgCancelOrder", MsgCancelOrder], ["/pendulumlabs.market.market.MsgCreatePool", MsgCreatePool], ["/pendulumlabs.market.market.MsgRedeemDrop", MsgRedeemDrop], - ["/pendulumlabs.market.market.MsgCancelOrder", MsgCancelOrder], - ["/pendulumlabs.market.market.MsgCreateDrop", MsgCreateDrop], - ["/pendulumlabs.market.market.MsgCreateOrder", MsgCreateOrder], ]; export const MissingWalletError = new Error("wallet is required"); @@ -51,12 +51,12 @@ const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = return { signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), + msgCreateDrop: (data: MsgCreateDrop): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgCreateDrop", value: MsgCreateDrop.fromPartial( data ) }), msgMarketOrder: (data: MsgMarketOrder): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgMarketOrder", value: MsgMarketOrder.fromPartial( data ) }), + msgCreateOrder: (data: MsgCreateOrder): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgCreateOrder", value: MsgCreateOrder.fromPartial( data ) }), + msgCancelOrder: (data: MsgCancelOrder): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgCancelOrder", value: MsgCancelOrder.fromPartial( data ) }), msgCreatePool: (data: MsgCreatePool): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgCreatePool", value: MsgCreatePool.fromPartial( data ) }), msgRedeemDrop: (data: MsgRedeemDrop): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgRedeemDrop", value: MsgRedeemDrop.fromPartial( data ) }), - msgCancelOrder: (data: MsgCancelOrder): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgCancelOrder", value: MsgCancelOrder.fromPartial( data ) }), - msgCreateDrop: (data: MsgCreateDrop): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgCreateDrop", value: MsgCreateDrop.fromPartial( data ) }), - msgCreateOrder: (data: MsgCreateOrder): EncodeObject => ({ typeUrl: "/pendulumlabs.market.market.MsgCreateOrder", value: MsgCreateOrder.fromPartial( data ) }), }; }; diff --git a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/rest.ts b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/rest.ts index 34cc9049..1d1e2d5a 100644 --- a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/rest.ts +++ b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/rest.ts @@ -16,14 +16,32 @@ export interface MarketLeader { export type MarketMsgCancelOrderResponse = object; -export type MarketMsgCreateDropResponse = object; +export interface MarketMsgCreateDropResponse { + creator?: string; + + /** @format uint64 */ + uid?: string; + pair?: string; + drops?: string; + coin1?: string; + coin2?: string; +} export interface MarketMsgCreateOrderResponse { /** @format uint64 */ uid?: string; } -export type MarketMsgCreatePoolResponse = object; +export interface MarketMsgCreatePoolResponse { + creator?: string; + + /** @format uint64 */ + drop_uid?: string; + pair?: string; + drops?: string; + coin1?: string; + coin2?: string; +} export interface MarketMsgMarketOrderResponse { uid?: string; @@ -32,7 +50,20 @@ export interface MarketMsgMarketOrderResponse { slippage?: string; } -export type MarketMsgRedeemDropResponse = object; +export interface MarketMsgRedeemDropResponse { + creator?: string; + + /** @format uint64 */ + uid?: string; + pair?: string; + drops?: string; + time_beg?: string; + coin1_beg?: string; + coin2_beg?: string; + time_end?: string; + coin1_end?: string; + coin2_end?: string; +} export interface MarketOrderResponse { /** @format uint64 */ @@ -285,9 +316,20 @@ export interface MarketmarketDrop { uid?: string; owner?: string; pair?: string; - drops?: string; - product?: string; active?: boolean; + drops?: string; + + /** @format int64 */ + time_beg?: string; + coin1_beg?: string; + coin2_beg?: string; + product_beg?: string; + + /** @format int64 */ + time_end?: string; + coin1_end?: string; + coin2_end?: string; + product_end?: string; } export interface MarketmarketMember { @@ -407,6 +449,13 @@ export interface V1Beta1PageRequest { * is set. */ count_total?: boolean; + + /** + * reverse is set to true if results are to be returned in the descending order. + * + * Since: cosmos-sdk 0.43 + */ + reverse?: boolean; } /** @@ -639,6 +688,7 @@ export class Api extends HttpClient @@ -696,6 +746,7 @@ export class Api extends HttpClient @@ -737,6 +788,7 @@ export class Api extends HttpClient @@ -828,6 +880,7 @@ export class Api extends HttpClient @@ -871,6 +924,7 @@ export class Api extends HttpClient @@ -896,6 +950,7 @@ export class Api extends HttpClient @@ -937,6 +992,7 @@ export class Api extends HttpClient @@ -963,6 +1019,7 @@ export class Api extends HttpClient @@ -989,6 +1046,7 @@ export class Api extends HttpClient @@ -1046,6 +1104,7 @@ export class Api extends HttpClient @@ -1103,6 +1162,7 @@ export class Api extends HttpClient diff --git a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/cosmos/base/query/v1beta1/pagination.ts b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/cosmos/base/query/v1beta1/pagination.ts index 0bc568f4..9c87ac0c 100644 --- a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/cosmos/base/query/v1beta1/pagination.ts +++ b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/cosmos/base/query/v1beta1/pagination.ts @@ -38,6 +38,12 @@ export interface PageRequest { * is set. */ count_total: boolean; + /** + * reverse is set to true if results are to be returned in the descending order. + * + * Since: cosmos-sdk 0.43 + */ + reverse: boolean; } /** @@ -62,7 +68,12 @@ export interface PageResponse { total: number; } -const basePageRequest: object = { offset: 0, limit: 0, count_total: false }; +const basePageRequest: object = { + offset: 0, + limit: 0, + count_total: false, + reverse: false, +}; export const PageRequest = { encode(message: PageRequest, writer: Writer = Writer.create()): Writer { @@ -78,6 +89,9 @@ export const PageRequest = { if (message.count_total === true) { writer.uint32(32).bool(message.count_total); } + if (message.reverse === true) { + writer.uint32(40).bool(message.reverse); + } return writer; }, @@ -100,6 +114,9 @@ export const PageRequest = { case 4: message.count_total = reader.bool(); break; + case 5: + message.reverse = reader.bool(); + break; default: reader.skipType(tag & 7); break; @@ -128,6 +145,11 @@ export const PageRequest = { } else { message.count_total = false; } + if (object.reverse !== undefined && object.reverse !== null) { + message.reverse = Boolean(object.reverse); + } else { + message.reverse = false; + } return message; }, @@ -141,6 +163,7 @@ export const PageRequest = { message.limit !== undefined && (obj.limit = message.limit); message.count_total !== undefined && (obj.count_total = message.count_total); + message.reverse !== undefined && (obj.reverse = message.reverse); return obj; }, @@ -166,6 +189,11 @@ export const PageRequest = { } else { message.count_total = false; } + if (object.reverse !== undefined && object.reverse !== null) { + message.reverse = object.reverse; + } else { + message.reverse = false; + } return message; }, }; diff --git a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/market/drop.ts b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/market/drop.ts index 92dcfafc..f7fac3e0 100644 --- a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/market/drop.ts +++ b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/market/drop.ts @@ -8,9 +8,16 @@ export interface Drop { uid: number; owner: string; pair: string; - drops: string; - product: string; active: boolean; + drops: string; + time_beg: number; + coin1_beg: string; + coin2_beg: string; + product_beg: string; + time_end: number; + coin1_end: string; + coin2_end: string; + product_end: string; } export interface Drops { @@ -26,9 +33,16 @@ const baseDrop: object = { uid: 0, owner: "", pair: "", - drops: "", - product: "", active: false, + drops: "", + time_beg: 0, + coin1_beg: "", + coin2_beg: "", + product_beg: "", + time_end: 0, + coin1_end: "", + coin2_end: "", + product_end: "", }; export const Drop = { @@ -42,14 +56,35 @@ export const Drop = { if (message.pair !== "") { writer.uint32(26).string(message.pair); } + if (message.active === true) { + writer.uint32(32).bool(message.active); + } if (message.drops !== "") { - writer.uint32(34).string(message.drops); + writer.uint32(42).string(message.drops); } - if (message.product !== "") { - writer.uint32(42).string(message.product); + if (message.time_beg !== 0) { + writer.uint32(48).int64(message.time_beg); } - if (message.active === true) { - writer.uint32(48).bool(message.active); + if (message.coin1_beg !== "") { + writer.uint32(58).string(message.coin1_beg); + } + if (message.coin2_beg !== "") { + writer.uint32(66).string(message.coin2_beg); + } + if (message.product_beg !== "") { + writer.uint32(74).string(message.product_beg); + } + if (message.time_end !== 0) { + writer.uint32(80).int64(message.time_end); + } + if (message.coin1_end !== "") { + writer.uint32(90).string(message.coin1_end); + } + if (message.coin2_end !== "") { + writer.uint32(98).string(message.coin2_end); + } + if (message.product_end !== "") { + writer.uint32(106).string(message.product_end); } return writer; }, @@ -71,13 +106,34 @@ export const Drop = { message.pair = reader.string(); break; case 4: - message.drops = reader.string(); + message.active = reader.bool(); break; case 5: - message.product = reader.string(); + message.drops = reader.string(); break; case 6: - message.active = reader.bool(); + message.time_beg = longToNumber(reader.int64() as Long); + break; + case 7: + message.coin1_beg = reader.string(); + break; + case 8: + message.coin2_beg = reader.string(); + break; + case 9: + message.product_beg = reader.string(); + break; + case 10: + message.time_end = longToNumber(reader.int64() as Long); + break; + case 11: + message.coin1_end = reader.string(); + break; + case 12: + message.coin2_end = reader.string(); + break; + case 13: + message.product_end = reader.string(); break; default: reader.skipType(tag & 7); @@ -104,20 +160,55 @@ export const Drop = { } else { message.pair = ""; } + if (object.active !== undefined && object.active !== null) { + message.active = Boolean(object.active); + } else { + message.active = false; + } if (object.drops !== undefined && object.drops !== null) { message.drops = String(object.drops); } else { message.drops = ""; } - if (object.product !== undefined && object.product !== null) { - message.product = String(object.product); + if (object.time_beg !== undefined && object.time_beg !== null) { + message.time_beg = Number(object.time_beg); } else { - message.product = ""; + message.time_beg = 0; } - if (object.active !== undefined && object.active !== null) { - message.active = Boolean(object.active); + if (object.coin1_beg !== undefined && object.coin1_beg !== null) { + message.coin1_beg = String(object.coin1_beg); } else { - message.active = false; + message.coin1_beg = ""; + } + if (object.coin2_beg !== undefined && object.coin2_beg !== null) { + message.coin2_beg = String(object.coin2_beg); + } else { + message.coin2_beg = ""; + } + if (object.product_beg !== undefined && object.product_beg !== null) { + message.product_beg = String(object.product_beg); + } else { + message.product_beg = ""; + } + if (object.time_end !== undefined && object.time_end !== null) { + message.time_end = Number(object.time_end); + } else { + message.time_end = 0; + } + if (object.coin1_end !== undefined && object.coin1_end !== null) { + message.coin1_end = String(object.coin1_end); + } else { + message.coin1_end = ""; + } + if (object.coin2_end !== undefined && object.coin2_end !== null) { + message.coin2_end = String(object.coin2_end); + } else { + message.coin2_end = ""; + } + if (object.product_end !== undefined && object.product_end !== null) { + message.product_end = String(object.product_end); + } else { + message.product_end = ""; } return message; }, @@ -127,9 +218,18 @@ export const Drop = { message.uid !== undefined && (obj.uid = message.uid); message.owner !== undefined && (obj.owner = message.owner); message.pair !== undefined && (obj.pair = message.pair); - message.drops !== undefined && (obj.drops = message.drops); - message.product !== undefined && (obj.product = message.product); message.active !== undefined && (obj.active = message.active); + message.drops !== undefined && (obj.drops = message.drops); + message.time_beg !== undefined && (obj.time_beg = message.time_beg); + message.coin1_beg !== undefined && (obj.coin1_beg = message.coin1_beg); + message.coin2_beg !== undefined && (obj.coin2_beg = message.coin2_beg); + message.product_beg !== undefined && + (obj.product_beg = message.product_beg); + message.time_end !== undefined && (obj.time_end = message.time_end); + message.coin1_end !== undefined && (obj.coin1_end = message.coin1_end); + message.coin2_end !== undefined && (obj.coin2_end = message.coin2_end); + message.product_end !== undefined && + (obj.product_end = message.product_end); return obj; }, @@ -150,20 +250,55 @@ export const Drop = { } else { message.pair = ""; } + if (object.active !== undefined && object.active !== null) { + message.active = object.active; + } else { + message.active = false; + } if (object.drops !== undefined && object.drops !== null) { message.drops = object.drops; } else { message.drops = ""; } - if (object.product !== undefined && object.product !== null) { - message.product = object.product; + if (object.time_beg !== undefined && object.time_beg !== null) { + message.time_beg = object.time_beg; } else { - message.product = ""; + message.time_beg = 0; } - if (object.active !== undefined && object.active !== null) { - message.active = object.active; + if (object.coin1_beg !== undefined && object.coin1_beg !== null) { + message.coin1_beg = object.coin1_beg; } else { - message.active = false; + message.coin1_beg = ""; + } + if (object.coin2_beg !== undefined && object.coin2_beg !== null) { + message.coin2_beg = object.coin2_beg; + } else { + message.coin2_beg = ""; + } + if (object.product_beg !== undefined && object.product_beg !== null) { + message.product_beg = object.product_beg; + } else { + message.product_beg = ""; + } + if (object.time_end !== undefined && object.time_end !== null) { + message.time_end = object.time_end; + } else { + message.time_end = 0; + } + if (object.coin1_end !== undefined && object.coin1_end !== null) { + message.coin1_end = object.coin1_end; + } else { + message.coin1_end = ""; + } + if (object.coin2_end !== undefined && object.coin2_end !== null) { + message.coin2_end = object.coin2_end; + } else { + message.coin2_end = ""; + } + if (object.product_end !== undefined && object.product_end !== null) { + message.product_end = object.product_end; + } else { + message.product_end = ""; } return message; }, diff --git a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/market/tx.ts b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/market/tx.ts index cde5a561..86a80edf 100644 --- a/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/market/tx.ts +++ b/vue/src/store/generated/pendulum-labs/market/pendulumlabs.market.market/module/types/market/tx.ts @@ -10,7 +10,14 @@ export interface MsgCreatePool { coinB: string; } -export interface MsgCreatePoolResponse {} +export interface MsgCreatePoolResponse { + creator: string; + drop_uid: number; + pair: string; + drops: string; + coin1: string; + coin2: string; +} export interface MsgCreateDrop { creator: string; @@ -18,14 +25,32 @@ export interface MsgCreateDrop { drops: string; } -export interface MsgCreateDropResponse {} +export interface MsgCreateDropResponse { + creator: string; + uid: number; + pair: string; + drops: string; + coin1: string; + coin2: string; +} export interface MsgRedeemDrop { creator: string; uid: string; } -export interface MsgRedeemDropResponse {} +export interface MsgRedeemDropResponse { + creator: string; + uid: number; + pair: string; + drops: string; + time_beg: string; + coin1_beg: string; + coin2_beg: string; + time_end: string; + coin1_end: string; + coin2_end: string; +} export interface MsgCreateOrder { creator: string; @@ -155,10 +180,38 @@ export const MsgCreatePool = { }, }; -const baseMsgCreatePoolResponse: object = {}; +const baseMsgCreatePoolResponse: object = { + creator: "", + drop_uid: 0, + pair: "", + drops: "", + coin1: "", + coin2: "", +}; export const MsgCreatePoolResponse = { - encode(_: MsgCreatePoolResponse, writer: Writer = Writer.create()): Writer { + encode( + message: MsgCreatePoolResponse, + writer: Writer = Writer.create() + ): Writer { + if (message.creator !== "") { + writer.uint32(10).string(message.creator); + } + if (message.drop_uid !== 0) { + writer.uint32(16).uint64(message.drop_uid); + } + if (message.pair !== "") { + writer.uint32(26).string(message.pair); + } + if (message.drops !== "") { + writer.uint32(34).string(message.drops); + } + if (message.coin1 !== "") { + writer.uint32(42).string(message.coin1); + } + if (message.coin2 !== "") { + writer.uint32(50).string(message.coin2); + } return writer; }, @@ -169,6 +222,24 @@ export const MsgCreatePoolResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.creator = reader.string(); + break; + case 2: + message.drop_uid = longToNumber(reader.uint64() as Long); + break; + case 3: + message.pair = reader.string(); + break; + case 4: + message.drops = reader.string(); + break; + case 5: + message.coin1 = reader.string(); + break; + case 6: + message.coin2 = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -177,18 +248,86 @@ export const MsgCreatePoolResponse = { return message; }, - fromJSON(_: any): MsgCreatePoolResponse { + fromJSON(object: any): MsgCreatePoolResponse { const message = { ...baseMsgCreatePoolResponse } as MsgCreatePoolResponse; + if (object.creator !== undefined && object.creator !== null) { + message.creator = String(object.creator); + } else { + message.creator = ""; + } + if (object.drop_uid !== undefined && object.drop_uid !== null) { + message.drop_uid = Number(object.drop_uid); + } else { + message.drop_uid = 0; + } + if (object.pair !== undefined && object.pair !== null) { + message.pair = String(object.pair); + } else { + message.pair = ""; + } + if (object.drops !== undefined && object.drops !== null) { + message.drops = String(object.drops); + } else { + message.drops = ""; + } + if (object.coin1 !== undefined && object.coin1 !== null) { + message.coin1 = String(object.coin1); + } else { + message.coin1 = ""; + } + if (object.coin2 !== undefined && object.coin2 !== null) { + message.coin2 = String(object.coin2); + } else { + message.coin2 = ""; + } return message; }, - toJSON(_: MsgCreatePoolResponse): unknown { + toJSON(message: MsgCreatePoolResponse): unknown { const obj: any = {}; + message.creator !== undefined && (obj.creator = message.creator); + message.drop_uid !== undefined && (obj.drop_uid = message.drop_uid); + message.pair !== undefined && (obj.pair = message.pair); + message.drops !== undefined && (obj.drops = message.drops); + message.coin1 !== undefined && (obj.coin1 = message.coin1); + message.coin2 !== undefined && (obj.coin2 = message.coin2); return obj; }, - fromPartial(_: DeepPartial): MsgCreatePoolResponse { + fromPartial( + object: DeepPartial + ): MsgCreatePoolResponse { const message = { ...baseMsgCreatePoolResponse } as MsgCreatePoolResponse; + if (object.creator !== undefined && object.creator !== null) { + message.creator = object.creator; + } else { + message.creator = ""; + } + if (object.drop_uid !== undefined && object.drop_uid !== null) { + message.drop_uid = object.drop_uid; + } else { + message.drop_uid = 0; + } + if (object.pair !== undefined && object.pair !== null) { + message.pair = object.pair; + } else { + message.pair = ""; + } + if (object.drops !== undefined && object.drops !== null) { + message.drops = object.drops; + } else { + message.drops = ""; + } + if (object.coin1 !== undefined && object.coin1 !== null) { + message.coin1 = object.coin1; + } else { + message.coin1 = ""; + } + if (object.coin2 !== undefined && object.coin2 !== null) { + message.coin2 = object.coin2; + } else { + message.coin2 = ""; + } return message; }, }; @@ -282,10 +421,38 @@ export const MsgCreateDrop = { }, }; -const baseMsgCreateDropResponse: object = {}; +const baseMsgCreateDropResponse: object = { + creator: "", + uid: 0, + pair: "", + drops: "", + coin1: "", + coin2: "", +}; export const MsgCreateDropResponse = { - encode(_: MsgCreateDropResponse, writer: Writer = Writer.create()): Writer { + encode( + message: MsgCreateDropResponse, + writer: Writer = Writer.create() + ): Writer { + if (message.creator !== "") { + writer.uint32(10).string(message.creator); + } + if (message.uid !== 0) { + writer.uint32(16).uint64(message.uid); + } + if (message.pair !== "") { + writer.uint32(26).string(message.pair); + } + if (message.drops !== "") { + writer.uint32(34).string(message.drops); + } + if (message.coin1 !== "") { + writer.uint32(42).string(message.coin1); + } + if (message.coin2 !== "") { + writer.uint32(50).string(message.coin2); + } return writer; }, @@ -296,6 +463,24 @@ export const MsgCreateDropResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.creator = reader.string(); + break; + case 2: + message.uid = longToNumber(reader.uint64() as Long); + break; + case 3: + message.pair = reader.string(); + break; + case 4: + message.drops = reader.string(); + break; + case 5: + message.coin1 = reader.string(); + break; + case 6: + message.coin2 = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -304,18 +489,86 @@ export const MsgCreateDropResponse = { return message; }, - fromJSON(_: any): MsgCreateDropResponse { + fromJSON(object: any): MsgCreateDropResponse { const message = { ...baseMsgCreateDropResponse } as MsgCreateDropResponse; + if (object.creator !== undefined && object.creator !== null) { + message.creator = String(object.creator); + } else { + message.creator = ""; + } + if (object.uid !== undefined && object.uid !== null) { + message.uid = Number(object.uid); + } else { + message.uid = 0; + } + if (object.pair !== undefined && object.pair !== null) { + message.pair = String(object.pair); + } else { + message.pair = ""; + } + if (object.drops !== undefined && object.drops !== null) { + message.drops = String(object.drops); + } else { + message.drops = ""; + } + if (object.coin1 !== undefined && object.coin1 !== null) { + message.coin1 = String(object.coin1); + } else { + message.coin1 = ""; + } + if (object.coin2 !== undefined && object.coin2 !== null) { + message.coin2 = String(object.coin2); + } else { + message.coin2 = ""; + } return message; }, - toJSON(_: MsgCreateDropResponse): unknown { + toJSON(message: MsgCreateDropResponse): unknown { const obj: any = {}; + message.creator !== undefined && (obj.creator = message.creator); + message.uid !== undefined && (obj.uid = message.uid); + message.pair !== undefined && (obj.pair = message.pair); + message.drops !== undefined && (obj.drops = message.drops); + message.coin1 !== undefined && (obj.coin1 = message.coin1); + message.coin2 !== undefined && (obj.coin2 = message.coin2); return obj; }, - fromPartial(_: DeepPartial): MsgCreateDropResponse { + fromPartial( + object: DeepPartial + ): MsgCreateDropResponse { const message = { ...baseMsgCreateDropResponse } as MsgCreateDropResponse; + if (object.creator !== undefined && object.creator !== null) { + message.creator = object.creator; + } else { + message.creator = ""; + } + if (object.uid !== undefined && object.uid !== null) { + message.uid = object.uid; + } else { + message.uid = 0; + } + if (object.pair !== undefined && object.pair !== null) { + message.pair = object.pair; + } else { + message.pair = ""; + } + if (object.drops !== undefined && object.drops !== null) { + message.drops = object.drops; + } else { + message.drops = ""; + } + if (object.coin1 !== undefined && object.coin1 !== null) { + message.coin1 = object.coin1; + } else { + message.coin1 = ""; + } + if (object.coin2 !== undefined && object.coin2 !== null) { + message.coin2 = object.coin2; + } else { + message.coin2 = ""; + } return message; }, }; @@ -392,10 +645,54 @@ export const MsgRedeemDrop = { }, }; -const baseMsgRedeemDropResponse: object = {}; +const baseMsgRedeemDropResponse: object = { + creator: "", + uid: 0, + pair: "", + drops: "", + time_beg: "", + coin1_beg: "", + coin2_beg: "", + time_end: "", + coin1_end: "", + coin2_end: "", +}; export const MsgRedeemDropResponse = { - encode(_: MsgRedeemDropResponse, writer: Writer = Writer.create()): Writer { + encode( + message: MsgRedeemDropResponse, + writer: Writer = Writer.create() + ): Writer { + if (message.creator !== "") { + writer.uint32(10).string(message.creator); + } + if (message.uid !== 0) { + writer.uint32(16).uint64(message.uid); + } + if (message.pair !== "") { + writer.uint32(26).string(message.pair); + } + if (message.drops !== "") { + writer.uint32(34).string(message.drops); + } + if (message.time_beg !== "") { + writer.uint32(42).string(message.time_beg); + } + if (message.coin1_beg !== "") { + writer.uint32(50).string(message.coin1_beg); + } + if (message.coin2_beg !== "") { + writer.uint32(58).string(message.coin2_beg); + } + if (message.time_end !== "") { + writer.uint32(66).string(message.time_end); + } + if (message.coin1_end !== "") { + writer.uint32(74).string(message.coin1_end); + } + if (message.coin2_end !== "") { + writer.uint32(82).string(message.coin2_end); + } return writer; }, @@ -406,6 +703,36 @@ export const MsgRedeemDropResponse = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.creator = reader.string(); + break; + case 2: + message.uid = longToNumber(reader.uint64() as Long); + break; + case 3: + message.pair = reader.string(); + break; + case 4: + message.drops = reader.string(); + break; + case 5: + message.time_beg = reader.string(); + break; + case 6: + message.coin1_beg = reader.string(); + break; + case 7: + message.coin2_beg = reader.string(); + break; + case 8: + message.time_end = reader.string(); + break; + case 9: + message.coin1_end = reader.string(); + break; + case 10: + message.coin2_end = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -414,18 +741,130 @@ export const MsgRedeemDropResponse = { return message; }, - fromJSON(_: any): MsgRedeemDropResponse { + fromJSON(object: any): MsgRedeemDropResponse { const message = { ...baseMsgRedeemDropResponse } as MsgRedeemDropResponse; + if (object.creator !== undefined && object.creator !== null) { + message.creator = String(object.creator); + } else { + message.creator = ""; + } + if (object.uid !== undefined && object.uid !== null) { + message.uid = Number(object.uid); + } else { + message.uid = 0; + } + if (object.pair !== undefined && object.pair !== null) { + message.pair = String(object.pair); + } else { + message.pair = ""; + } + if (object.drops !== undefined && object.drops !== null) { + message.drops = String(object.drops); + } else { + message.drops = ""; + } + if (object.time_beg !== undefined && object.time_beg !== null) { + message.time_beg = String(object.time_beg); + } else { + message.time_beg = ""; + } + if (object.coin1_beg !== undefined && object.coin1_beg !== null) { + message.coin1_beg = String(object.coin1_beg); + } else { + message.coin1_beg = ""; + } + if (object.coin2_beg !== undefined && object.coin2_beg !== null) { + message.coin2_beg = String(object.coin2_beg); + } else { + message.coin2_beg = ""; + } + if (object.time_end !== undefined && object.time_end !== null) { + message.time_end = String(object.time_end); + } else { + message.time_end = ""; + } + if (object.coin1_end !== undefined && object.coin1_end !== null) { + message.coin1_end = String(object.coin1_end); + } else { + message.coin1_end = ""; + } + if (object.coin2_end !== undefined && object.coin2_end !== null) { + message.coin2_end = String(object.coin2_end); + } else { + message.coin2_end = ""; + } return message; }, - toJSON(_: MsgRedeemDropResponse): unknown { + toJSON(message: MsgRedeemDropResponse): unknown { const obj: any = {}; + message.creator !== undefined && (obj.creator = message.creator); + message.uid !== undefined && (obj.uid = message.uid); + message.pair !== undefined && (obj.pair = message.pair); + message.drops !== undefined && (obj.drops = message.drops); + message.time_beg !== undefined && (obj.time_beg = message.time_beg); + message.coin1_beg !== undefined && (obj.coin1_beg = message.coin1_beg); + message.coin2_beg !== undefined && (obj.coin2_beg = message.coin2_beg); + message.time_end !== undefined && (obj.time_end = message.time_end); + message.coin1_end !== undefined && (obj.coin1_end = message.coin1_end); + message.coin2_end !== undefined && (obj.coin2_end = message.coin2_end); return obj; }, - fromPartial(_: DeepPartial): MsgRedeemDropResponse { + fromPartial( + object: DeepPartial + ): MsgRedeemDropResponse { const message = { ...baseMsgRedeemDropResponse } as MsgRedeemDropResponse; + if (object.creator !== undefined && object.creator !== null) { + message.creator = object.creator; + } else { + message.creator = ""; + } + if (object.uid !== undefined && object.uid !== null) { + message.uid = object.uid; + } else { + message.uid = 0; + } + if (object.pair !== undefined && object.pair !== null) { + message.pair = object.pair; + } else { + message.pair = ""; + } + if (object.drops !== undefined && object.drops !== null) { + message.drops = object.drops; + } else { + message.drops = ""; + } + if (object.time_beg !== undefined && object.time_beg !== null) { + message.time_beg = object.time_beg; + } else { + message.time_beg = ""; + } + if (object.coin1_beg !== undefined && object.coin1_beg !== null) { + message.coin1_beg = object.coin1_beg; + } else { + message.coin1_beg = ""; + } + if (object.coin2_beg !== undefined && object.coin2_beg !== null) { + message.coin2_beg = object.coin2_beg; + } else { + message.coin2_beg = ""; + } + if (object.time_end !== undefined && object.time_end !== null) { + message.time_end = object.time_end; + } else { + message.time_end = ""; + } + if (object.coin1_end !== undefined && object.coin1_end !== null) { + message.coin1_end = object.coin1_end; + } else { + message.coin1_end = ""; + } + if (object.coin2_end !== undefined && object.coin2_end !== null) { + message.coin2_end = object.coin2_end; + } else { + message.coin2_end = ""; + } return message; }, }; diff --git a/x/market/migrations/v1/types/drop.pb.go b/x/market/migrations/v1/types/drop.pb.go new file mode 100644 index 00000000..0a8863e8 --- /dev/null +++ b/x/market/migrations/v1/types/drop.pb.go @@ -0,0 +1,955 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: market/drop.proto + +package types + +import ( + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type Drop struct { + Uid uint64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` + Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` + Pair string `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` + Drops github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=drops,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"drops"` + Product github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=product,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"product"` + Active bool `protobuf:"varint,6,opt,name=active,proto3" json:"active,omitempty"` +} + +func (m *Drop) Reset() { *m = Drop{} } +func (m *Drop) String() string { return proto.CompactTextString(m) } +func (*Drop) ProtoMessage() {} +func (*Drop) Descriptor() ([]byte, []int) { + return fileDescriptor_3961bee11a1276cb, []int{0} +} +func (m *Drop) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Drop) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Drop.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Drop) XXX_Merge(src proto.Message) { + xxx_messageInfo_Drop.Merge(m, src) +} +func (m *Drop) XXX_Size() int { + return m.Size() +} +func (m *Drop) XXX_DiscardUnknown() { + xxx_messageInfo_Drop.DiscardUnknown(m) +} + +var xxx_messageInfo_Drop proto.InternalMessageInfo + +type Drops struct { + Uids []uint64 `protobuf:"varint,1,rep,packed,name=uids,proto3" json:"uids,omitempty"` + Sum github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=sum,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"sum"` +} + +func (m *Drops) Reset() { *m = Drops{} } +func (m *Drops) String() string { return proto.CompactTextString(m) } +func (*Drops) ProtoMessage() {} +func (*Drops) Descriptor() ([]byte, []int) { + return fileDescriptor_3961bee11a1276cb, []int{1} +} +func (m *Drops) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Drops) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Drops.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Drops) XXX_Merge(src proto.Message) { + xxx_messageInfo_Drops.Merge(m, src) +} +func (m *Drops) XXX_Size() int { + return m.Size() +} +func (m *Drops) XXX_DiscardUnknown() { + xxx_messageInfo_Drops.DiscardUnknown(m) +} + +var xxx_messageInfo_Drops proto.InternalMessageInfo + +type DropPairs struct { + Pairs []string `protobuf:"bytes,1,rep,name=pairs,proto3" json:"pairs,omitempty"` +} + +func (m *DropPairs) Reset() { *m = DropPairs{} } +func (m *DropPairs) String() string { return proto.CompactTextString(m) } +func (*DropPairs) ProtoMessage() {} +func (*DropPairs) Descriptor() ([]byte, []int) { + return fileDescriptor_3961bee11a1276cb, []int{2} +} +func (m *DropPairs) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DropPairs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DropPairs.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DropPairs) XXX_Merge(src proto.Message) { + xxx_messageInfo_DropPairs.Merge(m, src) +} +func (m *DropPairs) XXX_Size() int { + return m.Size() +} +func (m *DropPairs) XXX_DiscardUnknown() { + xxx_messageInfo_DropPairs.DiscardUnknown(m) +} + +var xxx_messageInfo_DropPairs proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Drop)(nil), "pendulumlabs.market.market.Drop") + proto.RegisterType((*Drops)(nil), "pendulumlabs.market.market.Drops") + proto.RegisterType((*DropPairs)(nil), "pendulumlabs.market.market.DropPairs") +} + +func init() { proto.RegisterFile("market/drop.proto", fileDescriptor_3961bee11a1276cb) } + +var fileDescriptor_3961bee11a1276cb = []byte{ + // 331 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x51, 0xbd, 0x6e, 0xf2, 0x30, + 0x14, 0x8d, 0xbf, 0x24, 0x7c, 0xe5, 0x4e, 0xad, 0x85, 0x2a, 0x8b, 0xc1, 0xa4, 0x0c, 0x55, 0x16, + 0x92, 0xa1, 0x2f, 0x50, 0x21, 0x86, 0x76, 0x43, 0x19, 0x2b, 0x75, 0x08, 0x49, 0x44, 0x23, 0x08, + 0xb6, 0xfc, 0xd3, 0x9f, 0xb7, 0xe8, 0x63, 0x31, 0x32, 0xa2, 0x0e, 0xa8, 0xc0, 0xd6, 0xa7, 0xa8, + 0x6c, 0x07, 0xa9, 0x6b, 0x3b, 0xdd, 0x73, 0xae, 0x7d, 0xee, 0xb1, 0xef, 0x81, 0x8b, 0x26, 0x17, + 0x8b, 0x4a, 0xa5, 0xa5, 0x60, 0x3c, 0xe1, 0x82, 0x29, 0x86, 0xfb, 0xbc, 0x5a, 0x95, 0x7a, 0xa9, + 0x9b, 0x65, 0x3e, 0x93, 0x89, 0x3b, 0x6f, 0x4b, 0xbf, 0x37, 0x67, 0x73, 0x66, 0xaf, 0xa5, 0x06, + 0x39, 0xc5, 0xf0, 0x0b, 0x41, 0x30, 0x11, 0x8c, 0xe3, 0x73, 0xf0, 0x75, 0x5d, 0x12, 0x14, 0xa1, + 0x38, 0xc8, 0x0c, 0xc4, 0x3d, 0x08, 0xd9, 0xcb, 0xaa, 0x12, 0xe4, 0x5f, 0x84, 0xe2, 0x6e, 0xe6, + 0x08, 0xc6, 0x10, 0xf0, 0xbc, 0x16, 0xc4, 0xb7, 0x4d, 0x8b, 0xf1, 0x04, 0x42, 0xf3, 0x08, 0x49, + 0x02, 0xd3, 0x1c, 0x27, 0xeb, 0xdd, 0xc0, 0xfb, 0xd8, 0x0d, 0xae, 0xe7, 0xb5, 0x7a, 0xd2, 0xb3, + 0xa4, 0x60, 0x4d, 0x5a, 0x30, 0xd9, 0x30, 0xd9, 0x96, 0x91, 0x2c, 0x17, 0xa9, 0x7a, 0xe3, 0x95, + 0x4c, 0xee, 0x57, 0x2a, 0x73, 0x62, 0x7c, 0x07, 0xff, 0xb9, 0x60, 0xa5, 0x2e, 0x14, 0x09, 0xff, + 0x34, 0xe7, 0x24, 0xc7, 0x97, 0xd0, 0xc9, 0x0b, 0x55, 0x3f, 0x57, 0xa4, 0x13, 0xa1, 0xf8, 0x2c, + 0x6b, 0xd9, 0xf0, 0x11, 0xc2, 0x89, 0xb5, 0xc2, 0x10, 0xe8, 0xba, 0x94, 0x04, 0x45, 0x7e, 0x1c, + 0x64, 0x16, 0xe3, 0x5b, 0xf0, 0xa5, 0x6e, 0xdc, 0x67, 0x7f, 0x6d, 0x6d, 0xa4, 0xc3, 0x2b, 0xe8, + 0x9a, 0xf1, 0xd3, 0xbc, 0x16, 0xd2, 0x6c, 0xcf, 0xec, 0xc6, 0x79, 0x74, 0x33, 0x47, 0xc6, 0xd3, + 0xf5, 0x9e, 0x7a, 0xdb, 0x3d, 0x45, 0xeb, 0x03, 0x45, 0x9b, 0x03, 0x45, 0x9f, 0x07, 0x8a, 0xde, + 0x8f, 0xd4, 0xdb, 0x1c, 0xa9, 0xb7, 0x3d, 0x52, 0xef, 0x21, 0xf9, 0xe1, 0x78, 0x4a, 0x73, 0x64, + 0xe2, 0x4c, 0xdb, 0xb8, 0x5f, 0x4f, 0xc0, 0xba, 0xcf, 0x3a, 0x36, 0xc7, 0x9b, 0xef, 0x00, 0x00, + 0x00, 0xff, 0xff, 0x3b, 0x24, 0x4e, 0x03, 0x0e, 0x02, 0x00, 0x00, +} + +func (m *Drop) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Drop) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Drop) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Active { + i-- + if m.Active { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } + { + size := m.Product.Size() + i -= size + if _, err := m.Product.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintDrop(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + { + size := m.Drops.Size() + i -= size + if _, err := m.Drops.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintDrop(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if len(m.Pair) > 0 { + i -= len(m.Pair) + copy(dAtA[i:], m.Pair) + i = encodeVarintDrop(dAtA, i, uint64(len(m.Pair))) + i-- + dAtA[i] = 0x1a + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintDrop(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0x12 + } + if m.Uid != 0 { + i = encodeVarintDrop(dAtA, i, uint64(m.Uid)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Drops) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Drops) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Drops) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Sum.Size() + i -= size + if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintDrop(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Uids) > 0 { + dAtA2 := make([]byte, len(m.Uids)*10) + var j1 int + for _, num := range m.Uids { + for num >= 1<<7 { + dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j1++ + } + dAtA2[j1] = uint8(num) + j1++ + } + i -= j1 + copy(dAtA[i:], dAtA2[:j1]) + i = encodeVarintDrop(dAtA, i, uint64(j1)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DropPairs) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DropPairs) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DropPairs) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Pairs) > 0 { + for iNdEx := len(m.Pairs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Pairs[iNdEx]) + copy(dAtA[i:], m.Pairs[iNdEx]) + i = encodeVarintDrop(dAtA, i, uint64(len(m.Pairs[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintDrop(dAtA []byte, offset int, v uint64) int { + offset -= sovDrop(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Drop) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Uid != 0 { + n += 1 + sovDrop(uint64(m.Uid)) + } + l = len(m.Owner) + if l > 0 { + n += 1 + l + sovDrop(uint64(l)) + } + l = len(m.Pair) + if l > 0 { + n += 1 + l + sovDrop(uint64(l)) + } + l = m.Drops.Size() + n += 1 + l + sovDrop(uint64(l)) + l = m.Product.Size() + n += 1 + l + sovDrop(uint64(l)) + if m.Active { + n += 2 + } + return n +} + +func (m *Drops) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Uids) > 0 { + l = 0 + for _, e := range m.Uids { + l += sovDrop(uint64(e)) + } + n += 1 + sovDrop(uint64(l)) + l + } + l = m.Sum.Size() + n += 1 + l + sovDrop(uint64(l)) + return n +} + +func (m *DropPairs) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Pairs) > 0 { + for _, s := range m.Pairs { + l = len(s) + n += 1 + l + sovDrop(uint64(l)) + } + } + return n +} + +func sovDrop(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozDrop(x uint64) (n int) { + return sovDrop(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Drop) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDrop + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Drop: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Drop: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Uid", wireType) + } + m.Uid = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDrop + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Uid |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDrop + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDrop + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDrop + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pair", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDrop + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDrop + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDrop + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Pair = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Drops", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDrop + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDrop + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDrop + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Drops.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Product", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDrop + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDrop + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDrop + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Product.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Active", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDrop + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Active = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipDrop(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDrop + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Drops) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDrop + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Drops: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Drops: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDrop + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Uids = append(m.Uids, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDrop + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthDrop + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthDrop + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Uids) == 0 { + m.Uids = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDrop + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Uids = append(m.Uids, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Uids", wireType) + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sum", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDrop + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDrop + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDrop + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Sum.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipDrop(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDrop + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DropPairs) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDrop + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DropPairs: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DropPairs: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pairs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDrop + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDrop + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDrop + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Pairs = append(m.Pairs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipDrop(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDrop + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipDrop(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowDrop + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowDrop + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowDrop + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthDrop + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupDrop + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthDrop + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthDrop = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowDrop = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupDrop = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/market/types/drop.pb.go b/x/market/types/drop.pb.go index 0a8863e8..86de0ee9 100644 --- a/x/market/types/drop.pb.go +++ b/x/market/types/drop.pb.go @@ -25,12 +25,19 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Drop struct { - Uid uint64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` - Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` - Pair string `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` - Drops github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=drops,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"drops"` - Product github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=product,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"product"` - Active bool `protobuf:"varint,6,opt,name=active,proto3" json:"active,omitempty"` + Uid uint64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` + Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` + Pair string `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` + Active bool `protobuf:"varint,4,opt,name=active,proto3" json:"active,omitempty"` + Drops github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=drops,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"drops"` + TimeBeg int64 `protobuf:"varint,6,opt,name=time_beg,json=timeBeg,proto3" json:"time_beg,omitempty"` + Coin1Beg github_com_cosmos_cosmos_sdk_types.Coin `protobuf:"bytes,7,opt,name=coin1_beg,json=coin1Beg,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Coin" json:"coin1_beg"` + Coin2Beg github_com_cosmos_cosmos_sdk_types.Coin `protobuf:"bytes,8,opt,name=coin2_beg,json=coin2Beg,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Coin" json:"coin2_beg"` + ProductBeg github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,9,opt,name=product_beg,json=productBeg,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"product_beg"` + TimeEnd int64 `protobuf:"varint,10,opt,name=time_end,json=timeEnd,proto3" json:"time_end,omitempty"` + Coin1End github_com_cosmos_cosmos_sdk_types.Coin `protobuf:"bytes,11,opt,name=coin1_end,json=coin1End,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Coin" json:"coin1_end"` + Coin2End github_com_cosmos_cosmos_sdk_types.Coin `protobuf:"bytes,12,opt,name=coin2_end,json=coin2End,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Coin" json:"coin2_end"` + ProductEnd github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,13,opt,name=product_end,json=productEnd,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"product_end"` } func (m *Drop) Reset() { *m = Drop{} } @@ -150,28 +157,35 @@ func init() { func init() { proto.RegisterFile("market/drop.proto", fileDescriptor_3961bee11a1276cb) } var fileDescriptor_3961bee11a1276cb = []byte{ - // 331 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x51, 0xbd, 0x6e, 0xf2, 0x30, - 0x14, 0x8d, 0xbf, 0x24, 0x7c, 0xe5, 0x4e, 0xad, 0x85, 0x2a, 0x8b, 0xc1, 0xa4, 0x0c, 0x55, 0x16, - 0x92, 0xa1, 0x2f, 0x50, 0x21, 0x86, 0x76, 0x43, 0x19, 0x2b, 0x75, 0x08, 0x49, 0x44, 0x23, 0x08, - 0xb6, 0xfc, 0xd3, 0x9f, 0xb7, 0xe8, 0x63, 0x31, 0x32, 0xa2, 0x0e, 0xa8, 0xc0, 0xd6, 0xa7, 0xa8, - 0x6c, 0x07, 0xa9, 0x6b, 0x3b, 0xdd, 0x73, 0xae, 0x7d, 0xee, 0xb1, 0xef, 0x81, 0x8b, 0x26, 0x17, - 0x8b, 0x4a, 0xa5, 0xa5, 0x60, 0x3c, 0xe1, 0x82, 0x29, 0x86, 0xfb, 0xbc, 0x5a, 0x95, 0x7a, 0xa9, - 0x9b, 0x65, 0x3e, 0x93, 0x89, 0x3b, 0x6f, 0x4b, 0xbf, 0x37, 0x67, 0x73, 0x66, 0xaf, 0xa5, 0x06, - 0x39, 0xc5, 0xf0, 0x0b, 0x41, 0x30, 0x11, 0x8c, 0xe3, 0x73, 0xf0, 0x75, 0x5d, 0x12, 0x14, 0xa1, - 0x38, 0xc8, 0x0c, 0xc4, 0x3d, 0x08, 0xd9, 0xcb, 0xaa, 0x12, 0xe4, 0x5f, 0x84, 0xe2, 0x6e, 0xe6, - 0x08, 0xc6, 0x10, 0xf0, 0xbc, 0x16, 0xc4, 0xb7, 0x4d, 0x8b, 0xf1, 0x04, 0x42, 0xf3, 0x08, 0x49, - 0x02, 0xd3, 0x1c, 0x27, 0xeb, 0xdd, 0xc0, 0xfb, 0xd8, 0x0d, 0xae, 0xe7, 0xb5, 0x7a, 0xd2, 0xb3, - 0xa4, 0x60, 0x4d, 0x5a, 0x30, 0xd9, 0x30, 0xd9, 0x96, 0x91, 0x2c, 0x17, 0xa9, 0x7a, 0xe3, 0x95, - 0x4c, 0xee, 0x57, 0x2a, 0x73, 0x62, 0x7c, 0x07, 0xff, 0xb9, 0x60, 0xa5, 0x2e, 0x14, 0x09, 0xff, - 0x34, 0xe7, 0x24, 0xc7, 0x97, 0xd0, 0xc9, 0x0b, 0x55, 0x3f, 0x57, 0xa4, 0x13, 0xa1, 0xf8, 0x2c, - 0x6b, 0xd9, 0xf0, 0x11, 0xc2, 0x89, 0xb5, 0xc2, 0x10, 0xe8, 0xba, 0x94, 0x04, 0x45, 0x7e, 0x1c, - 0x64, 0x16, 0xe3, 0x5b, 0xf0, 0xa5, 0x6e, 0xdc, 0x67, 0x7f, 0x6d, 0x6d, 0xa4, 0xc3, 0x2b, 0xe8, - 0x9a, 0xf1, 0xd3, 0xbc, 0x16, 0xd2, 0x6c, 0xcf, 0xec, 0xc6, 0x79, 0x74, 0x33, 0x47, 0xc6, 0xd3, - 0xf5, 0x9e, 0x7a, 0xdb, 0x3d, 0x45, 0xeb, 0x03, 0x45, 0x9b, 0x03, 0x45, 0x9f, 0x07, 0x8a, 0xde, - 0x8f, 0xd4, 0xdb, 0x1c, 0xa9, 0xb7, 0x3d, 0x52, 0xef, 0x21, 0xf9, 0xe1, 0x78, 0x4a, 0x73, 0x64, - 0xe2, 0x4c, 0xdb, 0xb8, 0x5f, 0x4f, 0xc0, 0xba, 0xcf, 0x3a, 0x36, 0xc7, 0x9b, 0xef, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x3b, 0x24, 0x4e, 0x03, 0x0e, 0x02, 0x00, 0x00, + // 436 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x93, 0x4f, 0x6e, 0xd4, 0x30, + 0x14, 0xc6, 0x63, 0x92, 0x4c, 0x27, 0xaf, 0x20, 0x81, 0x55, 0xa1, 0xd0, 0x45, 0x1a, 0x66, 0x01, + 0xd9, 0x34, 0x11, 0xc3, 0x05, 0xd0, 0x30, 0x5d, 0x20, 0x21, 0x51, 0x79, 0x89, 0x84, 0x50, 0x26, + 0xb6, 0x82, 0xd5, 0xc6, 0x8e, 0x6c, 0x87, 0x3f, 0xb7, 0xe0, 0x28, 0x1c, 0x63, 0x96, 0x5d, 0x56, + 0x2c, 0x2a, 0x3a, 0x73, 0x11, 0x64, 0x27, 0xa3, 0xce, 0x12, 0x9a, 0x95, 0xdf, 0x8b, 0xfd, 0x7e, + 0x5f, 0xf4, 0xe9, 0x7d, 0xf0, 0xa4, 0x29, 0xd5, 0x05, 0x33, 0x05, 0x55, 0xb2, 0xcd, 0x5b, 0x25, + 0x8d, 0xc4, 0xc7, 0x2d, 0x13, 0xb4, 0xbb, 0xec, 0x9a, 0xcb, 0x72, 0xa5, 0xf3, 0xfe, 0x7e, 0x38, + 0x8e, 0x8f, 0x6a, 0x59, 0x4b, 0xf7, 0xac, 0xb0, 0x55, 0x3f, 0x31, 0xfb, 0x15, 0x42, 0xb0, 0x54, + 0xb2, 0xc5, 0x8f, 0xc1, 0xef, 0x38, 0x8d, 0x51, 0x8a, 0xb2, 0x80, 0xd8, 0x12, 0x1f, 0x41, 0x28, + 0xbf, 0x09, 0xa6, 0xe2, 0x07, 0x29, 0xca, 0x22, 0xd2, 0x37, 0x18, 0x43, 0xd0, 0x96, 0x5c, 0xc5, + 0xbe, 0xfb, 0xe8, 0x6a, 0xfc, 0x14, 0x26, 0x65, 0x65, 0xf8, 0x57, 0x16, 0x07, 0x29, 0xca, 0xa6, + 0x64, 0xe8, 0xf0, 0x12, 0x42, 0xfb, 0x73, 0x3a, 0x0e, 0xed, 0xe3, 0x45, 0xbe, 0xbe, 0x39, 0xf1, + 0x7e, 0xdf, 0x9c, 0xbc, 0xa8, 0xb9, 0xf9, 0xd2, 0xad, 0xf2, 0x4a, 0x36, 0x45, 0x25, 0x75, 0x23, + 0xf5, 0x70, 0x9c, 0x6a, 0x7a, 0x51, 0x98, 0x1f, 0x2d, 0xd3, 0xf9, 0x3b, 0x61, 0x48, 0x3f, 0x8c, + 0x9f, 0xc1, 0xd4, 0xf0, 0x86, 0x7d, 0x5e, 0xb1, 0x3a, 0x9e, 0xa4, 0x28, 0xf3, 0xc9, 0x81, 0xed, + 0x17, 0xac, 0xc6, 0xef, 0x21, 0xaa, 0x24, 0x17, 0xaf, 0xdc, 0xdd, 0x81, 0x13, 0x29, 0x06, 0x91, + 0x97, 0xff, 0x20, 0xf2, 0x56, 0x72, 0x41, 0xa6, 0x8e, 0xb0, 0x47, 0x9b, 0x3b, 0xda, 0x74, 0x04, + 0x6d, 0x6e, 0x69, 0x1f, 0xe0, 0xb0, 0x55, 0x92, 0x76, 0x95, 0x71, 0xbc, 0xe8, 0x5e, 0x16, 0xc0, + 0x80, 0xb0, 0xc0, 0x9d, 0x0f, 0x4c, 0xd0, 0x18, 0xee, 0x7c, 0x38, 0x13, 0xf4, 0xce, 0x07, 0x7b, + 0x77, 0x38, 0xc6, 0x87, 0x3d, 0xda, 0xdc, 0xd1, 0x1e, 0x8e, 0xf1, 0xc1, 0xd2, 0xf6, 0x7c, 0xb0, + 0xbc, 0x47, 0xa3, 0x7c, 0x38, 0x13, 0x74, 0xf6, 0x09, 0xc2, 0xa5, 0x5b, 0x0c, 0x0c, 0x41, 0xc7, + 0xa9, 0x8e, 0x51, 0xea, 0x67, 0x01, 0x71, 0x35, 0x7e, 0x03, 0xbe, 0xee, 0x9a, 0x7e, 0x65, 0xff, + 0x5b, 0xc5, 0x8e, 0xce, 0x9e, 0x43, 0x64, 0xf1, 0xe7, 0x25, 0x57, 0xda, 0x66, 0xc0, 0x6e, 0x78, + 0xaf, 0x11, 0x91, 0xbe, 0x59, 0x9c, 0xaf, 0x6f, 0x13, 0xef, 0xfa, 0x36, 0x41, 0xeb, 0x4d, 0x82, + 0xae, 0x36, 0x09, 0xfa, 0xb3, 0x49, 0xd0, 0xcf, 0x6d, 0xe2, 0x5d, 0x6d, 0x13, 0xef, 0x7a, 0x9b, + 0x78, 0x1f, 0xf3, 0x3d, 0xc5, 0x5d, 0x26, 0x4f, 0x6d, 0x28, 0x8b, 0x21, 0xb4, 0xdf, 0x77, 0x85, + 0x53, 0x5f, 0x4d, 0x5c, 0x1a, 0x5f, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x5a, 0x27, 0xd8, 0x1a, + 0xd4, 0x03, 0x00, 0x00, } func (m *Drop) Marshal() (dAtA []byte, err error) { @@ -194,26 +208,76 @@ func (m *Drop) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Active { - i-- - if m.Active { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + { + size := m.ProductEnd.Size() + i -= size + if _, err := m.ProductEnd.MarshalTo(dAtA[i:]); err != nil { + return 0, err } + i = encodeVarintDrop(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x6a + { + size := m.Coin2End.Size() + i -= size + if _, err := m.Coin2End.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintDrop(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 + { + size := m.Coin1End.Size() + i -= size + if _, err := m.Coin1End.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintDrop(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + if m.TimeEnd != 0 { + i = encodeVarintDrop(dAtA, i, uint64(m.TimeEnd)) i-- - dAtA[i] = 0x30 + dAtA[i] = 0x50 } { - size := m.Product.Size() + size := m.ProductBeg.Size() i -= size - if _, err := m.Product.MarshalTo(dAtA[i:]); err != nil { + if _, err := m.ProductBeg.MarshalTo(dAtA[i:]); err != nil { return 0, err } i = encodeVarintDrop(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x2a + dAtA[i] = 0x4a + { + size := m.Coin2Beg.Size() + i -= size + if _, err := m.Coin2Beg.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintDrop(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + { + size := m.Coin1Beg.Size() + i -= size + if _, err := m.Coin1Beg.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintDrop(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + if m.TimeBeg != 0 { + i = encodeVarintDrop(dAtA, i, uint64(m.TimeBeg)) + i-- + dAtA[i] = 0x30 + } { size := m.Drops.Size() i -= size @@ -223,7 +287,17 @@ func (m *Drop) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintDrop(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 + dAtA[i] = 0x2a + if m.Active { + i-- + if m.Active { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } if len(m.Pair) > 0 { i -= len(m.Pair) copy(dAtA[i:], m.Pair) @@ -357,13 +431,29 @@ func (m *Drop) Size() (n int) { if l > 0 { n += 1 + l + sovDrop(uint64(l)) } + if m.Active { + n += 2 + } l = m.Drops.Size() n += 1 + l + sovDrop(uint64(l)) - l = m.Product.Size() + if m.TimeBeg != 0 { + n += 1 + sovDrop(uint64(m.TimeBeg)) + } + l = m.Coin1Beg.Size() n += 1 + l + sovDrop(uint64(l)) - if m.Active { - n += 2 + l = m.Coin2Beg.Size() + n += 1 + l + sovDrop(uint64(l)) + l = m.ProductBeg.Size() + n += 1 + l + sovDrop(uint64(l)) + if m.TimeEnd != 0 { + n += 1 + sovDrop(uint64(m.TimeEnd)) } + l = m.Coin1End.Size() + n += 1 + l + sovDrop(uint64(l)) + l = m.Coin2End.Size() + n += 1 + l + sovDrop(uint64(l)) + l = m.ProductEnd.Size() + n += 1 + l + sovDrop(uint64(l)) return n } @@ -519,6 +609,26 @@ func (m *Drop) Unmarshal(dAtA []byte) error { m.Pair = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Active", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDrop + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Active = bool(v != 0) + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Drops", wireType) } @@ -552,9 +662,28 @@ func (m *Drop) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 5: + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeBeg", wireType) + } + m.TimeBeg = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDrop + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TimeBeg |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Product", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Coin1Beg", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -582,15 +711,83 @@ func (m *Drop) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Product.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Coin1Beg.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 6: + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Coin2Beg", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDrop + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDrop + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDrop + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Coin2Beg.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProductBeg", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDrop + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDrop + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDrop + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ProductBeg.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Active", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TimeEnd", wireType) } - var v int + m.TimeEnd = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowDrop @@ -600,12 +797,113 @@ func (m *Drop) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.TimeEnd |= int64(b&0x7F) << shift if b < 0x80 { break } } - m.Active = bool(v != 0) + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Coin1End", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDrop + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDrop + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDrop + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Coin1End.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Coin2End", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDrop + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDrop + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDrop + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Coin2End.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProductEnd", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDrop + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDrop + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDrop + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ProductEnd.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipDrop(dAtA[iNdEx:]) From 4b08af4c9385b25ba848fdb10545d4c004d009f4 Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Sun, 9 Jun 2024 15:37:32 -0500 Subject: [PATCH 27/35] Update create drop to new proto type --- x/market/keeper/msg_server_create_drop.go | 25 +++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/x/market/keeper/msg_server_create_drop.go b/x/market/keeper/msg_server_create_drop.go index 151e5942..bcd7b249 100644 --- a/x/market/keeper/msg_server_create_drop.go +++ b/x/market/keeper/msg_server_create_drop.go @@ -87,7 +87,7 @@ func (k msgServer) CreateDrop(goCtx context.Context, msg *types.MsgCreateDrop) ( } tmp = big.NewInt(0) - tmp.Sqrt(prevDrop.Product.BigInt()) + tmp.Sqrt(prevDrop.ProductBeg.BigInt()) sqrtPrevDropProduct := sdk.NewIntFromBigInt(tmp) // Change in XY should always be positive @@ -141,12 +141,14 @@ func (k msgServer) CreateDrop(goCtx context.Context, msg *types.MsgCreateDrop) ( k.SetPool(ctx, pool) var drop = types.Drop{ - Uid: uid, - Owner: msg.Creator, - Pair: pair, - Drops: drops, - Product: dropProduct, - Active: true, + Uid: uid, + Owner: msg.Creator, + Pair: pair, + Drops: drops, + ProductBeg: dropProduct, + Coin1Beg: coin1, + Coin2Beg: coin2, + Active: true, } // Add the drop to the keeper @@ -163,7 +165,14 @@ func (k msgServer) CreateDrop(goCtx context.Context, msg *types.MsgCreateDrop) ( // Update drop uid count k.SetUidCount(ctx, uid+1) - return &types.MsgCreateDropResponse{}, nil + return &types.MsgCreateDropResponse{ + Creator: msg.Creator, + Uid: uid, + Pair: pair, + Drops: drops.String(), + Coin1: coin1.String(), + Coin2: coin2.String(), + }, nil } func (k msgServer) updateLeaders(ctx sdk.Context, pool types.Pool, dropCreator string, dropCreatorSum sdk.Int) types.Pool { From d87046758f2d303c2dd35fd8fe3a4c739d4b6489 Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Sun, 9 Jun 2024 15:38:03 -0500 Subject: [PATCH 28/35] Add fields to tx responses --- x/market/types/tx.pb.go | 1410 ++++++++++++++++++++++++++++++++++----- 1 file changed, 1246 insertions(+), 164 deletions(-) diff --git a/x/market/types/tx.pb.go b/x/market/types/tx.pb.go index b62bb1c4..9be43ec6 100644 --- a/x/market/types/tx.pb.go +++ b/x/market/types/tx.pb.go @@ -88,6 +88,12 @@ func (m *MsgCreatePool) GetCoinB() string { } type MsgCreatePoolResponse struct { + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + DropUid uint64 `protobuf:"varint,2,opt,name=drop_uid,json=dropUid,proto3" json:"drop_uid,omitempty"` + Pair string `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` + Drops string `protobuf:"bytes,4,opt,name=drops,proto3" json:"drops,omitempty"` + Coin1 string `protobuf:"bytes,5,opt,name=coin1,proto3" json:"coin1,omitempty"` + Coin2 string `protobuf:"bytes,6,opt,name=coin2,proto3" json:"coin2,omitempty"` } func (m *MsgCreatePoolResponse) Reset() { *m = MsgCreatePoolResponse{} } @@ -123,6 +129,48 @@ func (m *MsgCreatePoolResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCreatePoolResponse proto.InternalMessageInfo +func (m *MsgCreatePoolResponse) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +func (m *MsgCreatePoolResponse) GetDropUid() uint64 { + if m != nil { + return m.DropUid + } + return 0 +} + +func (m *MsgCreatePoolResponse) GetPair() string { + if m != nil { + return m.Pair + } + return "" +} + +func (m *MsgCreatePoolResponse) GetDrops() string { + if m != nil { + return m.Drops + } + return "" +} + +func (m *MsgCreatePoolResponse) GetCoin1() string { + if m != nil { + return m.Coin1 + } + return "" +} + +func (m *MsgCreatePoolResponse) GetCoin2() string { + if m != nil { + return m.Coin2 + } + return "" +} + type MsgCreateDrop struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` Pair string `protobuf:"bytes,2,opt,name=pair,proto3" json:"pair,omitempty"` @@ -184,6 +232,12 @@ func (m *MsgCreateDrop) GetDrops() string { } type MsgCreateDropResponse struct { + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + Uid uint64 `protobuf:"varint,2,opt,name=uid,proto3" json:"uid,omitempty"` + Pair string `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` + Drops string `protobuf:"bytes,4,opt,name=drops,proto3" json:"drops,omitempty"` + Coin1 string `protobuf:"bytes,5,opt,name=coin1,proto3" json:"coin1,omitempty"` + Coin2 string `protobuf:"bytes,6,opt,name=coin2,proto3" json:"coin2,omitempty"` } func (m *MsgCreateDropResponse) Reset() { *m = MsgCreateDropResponse{} } @@ -219,6 +273,48 @@ func (m *MsgCreateDropResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCreateDropResponse proto.InternalMessageInfo +func (m *MsgCreateDropResponse) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +func (m *MsgCreateDropResponse) GetUid() uint64 { + if m != nil { + return m.Uid + } + return 0 +} + +func (m *MsgCreateDropResponse) GetPair() string { + if m != nil { + return m.Pair + } + return "" +} + +func (m *MsgCreateDropResponse) GetDrops() string { + if m != nil { + return m.Drops + } + return "" +} + +func (m *MsgCreateDropResponse) GetCoin1() string { + if m != nil { + return m.Coin1 + } + return "" +} + +func (m *MsgCreateDropResponse) GetCoin2() string { + if m != nil { + return m.Coin2 + } + return "" +} + type MsgRedeemDrop struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` @@ -272,6 +368,16 @@ func (m *MsgRedeemDrop) GetUid() string { } type MsgRedeemDropResponse struct { + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + Uid uint64 `protobuf:"varint,2,opt,name=uid,proto3" json:"uid,omitempty"` + Pair string `protobuf:"bytes,3,opt,name=pair,proto3" json:"pair,omitempty"` + Drops string `protobuf:"bytes,4,opt,name=drops,proto3" json:"drops,omitempty"` + TimeBeg string `protobuf:"bytes,5,opt,name=time_beg,json=timeBeg,proto3" json:"time_beg,omitempty"` + Coin1Beg string `protobuf:"bytes,6,opt,name=coin1_beg,json=coin1Beg,proto3" json:"coin1_beg,omitempty"` + Coin2Beg string `protobuf:"bytes,7,opt,name=coin2_beg,json=coin2Beg,proto3" json:"coin2_beg,omitempty"` + TimeEnd string `protobuf:"bytes,8,opt,name=time_end,json=timeEnd,proto3" json:"time_end,omitempty"` + Coin1End string `protobuf:"bytes,9,opt,name=coin1_end,json=coin1End,proto3" json:"coin1_end,omitempty"` + Coin2End string `protobuf:"bytes,10,opt,name=coin2_end,json=coin2End,proto3" json:"coin2_end,omitempty"` } func (m *MsgRedeemDropResponse) Reset() { *m = MsgRedeemDropResponse{} } @@ -307,6 +413,76 @@ func (m *MsgRedeemDropResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgRedeemDropResponse proto.InternalMessageInfo +func (m *MsgRedeemDropResponse) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +func (m *MsgRedeemDropResponse) GetUid() uint64 { + if m != nil { + return m.Uid + } + return 0 +} + +func (m *MsgRedeemDropResponse) GetPair() string { + if m != nil { + return m.Pair + } + return "" +} + +func (m *MsgRedeemDropResponse) GetDrops() string { + if m != nil { + return m.Drops + } + return "" +} + +func (m *MsgRedeemDropResponse) GetTimeBeg() string { + if m != nil { + return m.TimeBeg + } + return "" +} + +func (m *MsgRedeemDropResponse) GetCoin1Beg() string { + if m != nil { + return m.Coin1Beg + } + return "" +} + +func (m *MsgRedeemDropResponse) GetCoin2Beg() string { + if m != nil { + return m.Coin2Beg + } + return "" +} + +func (m *MsgRedeemDropResponse) GetTimeEnd() string { + if m != nil { + return m.TimeEnd + } + return "" +} + +func (m *MsgRedeemDropResponse) GetCoin1End() string { + if m != nil { + return m.Coin1End + } + return "" +} + +func (m *MsgRedeemDropResponse) GetCoin2End() string { + if m != nil { + return m.Coin2End + } + return "" +} + type MsgCreateOrder struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` DenomAsk string `protobuf:"bytes,2,opt,name=denomAsk,proto3" json:"denomAsk,omitempty"` @@ -710,42 +886,50 @@ func init() { func init() { proto.RegisterFile("market/tx.proto", fileDescriptor_2966ca2342567dca) } var fileDescriptor_2966ca2342567dca = []byte{ - // 559 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0x3d, 0x6f, 0xd3, 0x40, - 0x18, 0xc7, 0xe3, 0xc6, 0x49, 0x93, 0x43, 0xbc, 0xc8, 0x82, 0x72, 0xb2, 0x2a, 0xab, 0xf2, 0x04, - 0x95, 0x70, 0x44, 0x19, 0x61, 0x69, 0x60, 0x60, 0x89, 0x40, 0x01, 0x16, 0x36, 0x27, 0x3e, 0x05, - 0x53, 0xdb, 0x77, 0x3a, 0xdb, 0x55, 0xba, 0xf2, 0x09, 0x98, 0xf8, 0x30, 0x7c, 0x02, 0xc6, 0x0e, - 0x0c, 0x8c, 0x28, 0xf9, 0x22, 0xe8, 0xb9, 0xb3, 0xcf, 0x67, 0x52, 0x72, 0x96, 0x98, 0x7a, 0xcf, - 0xcb, 0x3d, 0xbf, 0x7b, 0xfe, 0xea, 0x3f, 0x46, 0x77, 0xd3, 0x90, 0x5f, 0x90, 0x62, 0x52, 0xac, - 0x03, 0xc6, 0x69, 0x41, 0x1d, 0x97, 0x91, 0x2c, 0x2a, 0x93, 0x32, 0x4d, 0xc2, 0x45, 0x1e, 0xc8, - 0x6a, 0xf5, 0xc7, 0xff, 0x80, 0x6e, 0xcf, 0xf2, 0xd5, 0x4b, 0x4e, 0xc2, 0x82, 0xbc, 0xa5, 0x34, - 0x71, 0x30, 0x3a, 0x5c, 0x42, 0x44, 0x39, 0xb6, 0x4e, 0xac, 0x47, 0xe3, 0x79, 0x1d, 0x3a, 0xf7, - 0xd1, 0x60, 0x49, 0xe3, 0xec, 0x1c, 0x1f, 0x88, 0xbc, 0x0c, 0xea, 0xec, 0x14, 0xf7, 0x9b, 0xec, - 0xd4, 0x7f, 0x88, 0x1e, 0xb4, 0xc6, 0xce, 0x49, 0xce, 0x68, 0x96, 0x13, 0xff, 0x9d, 0xc6, 0x7b, - 0xc5, 0x29, 0xdb, 0xc3, 0x73, 0x90, 0xcd, 0xc2, 0x98, 0x57, 0x38, 0x71, 0x06, 0x5a, 0xc4, 0x29, - 0xcb, 0x6b, 0x9a, 0x08, 0x5a, 0x34, 0x18, 0xaa, 0x68, 0xcf, 0x05, 0x6d, 0x4e, 0x22, 0x42, 0x52, - 0x03, 0xed, 0x1e, 0xea, 0x97, 0x71, 0x54, 0xc1, 0xe0, 0x58, 0x4d, 0x6d, 0x2e, 0xab, 0xa9, 0x3f, - 0x2d, 0x74, 0x47, 0xf1, 0xde, 0xf0, 0x88, 0xf0, 0x3d, 0x73, 0x5d, 0x34, 0x8a, 0x48, 0x46, 0xd3, - 0xf3, 0xfc, 0xa2, 0x1a, 0xae, 0x62, 0x55, 0x9b, 0xc6, 0x51, 0xb5, 0x90, 0x8a, 0x9d, 0x63, 0x34, - 0xa6, 0x30, 0xfa, 0xfd, 0x15, 0x23, 0xd8, 0x16, 0xc5, 0x26, 0xe1, 0x1c, 0xa1, 0x61, 0x98, 0xd2, - 0x32, 0x2b, 0xf0, 0x40, 0x94, 0xaa, 0x08, 0x34, 0xe3, 0x61, 0x41, 0xf0, 0xf0, 0xa4, 0x0f, 0x9a, - 0xc1, 0x59, 0xe8, 0xc8, 0xc9, 0x25, 0x3e, 0xac, 0x74, 0xe4, 0xe4, 0x12, 0x72, 0x19, 0x59, 0x17, - 0x78, 0x24, 0x73, 0x70, 0xf6, 0x4f, 0xd1, 0x51, 0x7b, 0xab, 0x7a, 0xe1, 0x5a, 0x1b, 0xd8, 0xcc, - 0x96, 0xda, 0xbc, 0x90, 0x0a, 0x84, 0xd9, 0x92, 0x24, 0x26, 0x05, 0x76, 0x95, 0xc5, 0x92, 0xd4, - 0xdc, 0x56, 0xd2, 0x7e, 0x97, 0xd2, 0xce, 0xc4, 0x3f, 0xe7, 0xff, 0x48, 0x7b, 0x8c, 0xc6, 0x52, - 0x12, 0x28, 0x4a, 0x6d, 0x9b, 0x44, 0x4b, 0x78, 0x7b, 0x57, 0x78, 0xd9, 0x08, 0xc5, 0x81, 0x7e, - 0x13, 0xaa, 0x2e, 0x1a, 0xe5, 0x49, 0xcc, 0x58, 0xb8, 0x02, 0x91, 0xc5, 0xcd, 0x3a, 0xf6, 0xbf, - 0x58, 0x62, 0x2f, 0xed, 0xf1, 0x37, 0x29, 0x28, 0x35, 0x68, 0x63, 0x0e, 0xfe, 0xc6, 0x18, 0x9f, - 0xaf, 0x1e, 0x61, 0xb7, 0x1f, 0x71, 0xf6, 0x6d, 0x80, 0xfa, 0xb3, 0x7c, 0xe5, 0x7c, 0x46, 0x48, - 0x73, 0xf5, 0xe3, 0xe0, 0xdf, 0xbf, 0x01, 0x41, 0xcb, 0xa9, 0xee, 0xd3, 0xce, 0xad, 0x6a, 0x3b, - 0xc5, 0x12, 0x1e, 0xeb, 0xc6, 0x82, 0xd6, 0x8e, 0x2c, 0xdd, 0x7c, 0xc0, 0xd2, 0xfc, 0x6c, 0x62, - 0x35, 0xad, 0x46, 0xd6, 0xae, 0xd1, 0x9d, 0x14, 0xdd, 0xd2, 0x4d, 0x7e, 0xda, 0xe9, 0xb5, 0xa2, - 0xd7, 0x3d, 0xeb, 0xde, 0xdb, 0xc2, 0x69, 0x8e, 0x32, 0xe2, 0x9a, 0x5e, 0x33, 0x6e, 0xd7, 0x6b, - 0x80, 0xd3, 0x7d, 0x66, 0xc2, 0x69, 0xbd, 0x46, 0xdc, 0x0d, 0x16, 0x98, 0xbe, 0xfe, 0xb1, 0xf1, - 0xac, 0xeb, 0x8d, 0x67, 0xfd, 0xde, 0x78, 0xd6, 0xd7, 0xad, 0xd7, 0xbb, 0xde, 0x7a, 0xbd, 0x5f, - 0x5b, 0xaf, 0xf7, 0x31, 0x58, 0xc5, 0xc5, 0xa7, 0x72, 0x11, 0x2c, 0x69, 0x3a, 0xa9, 0xe7, 0x3e, - 0x81, 0xc1, 0x93, 0xea, 0x4b, 0xb6, 0xae, 0x0f, 0xc5, 0x15, 0x23, 0xf9, 0x62, 0x28, 0x3e, 0x6b, - 0xcf, 0xfe, 0x04, 0x00, 0x00, 0xff, 0xff, 0x04, 0x21, 0x35, 0xaf, 0xe9, 0x06, 0x00, 0x00, + // 678 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcd, 0x6e, 0xd3, 0x40, + 0x10, 0x8e, 0xf3, 0x6b, 0x0f, 0xe2, 0x47, 0x16, 0x54, 0x6e, 0xa8, 0xac, 0xca, 0x27, 0xa8, 0x84, + 0xa3, 0x98, 0x23, 0x5c, 0x1a, 0xa8, 0xc4, 0x25, 0x02, 0x05, 0x7a, 0xe1, 0x52, 0x39, 0xf1, 0xca, + 0xb8, 0x8d, 0xbd, 0x96, 0xed, 0xa0, 0xf4, 0xca, 0x13, 0x70, 0x02, 0x71, 0xe5, 0x31, 0x78, 0x02, + 0x8e, 0x3d, 0x70, 0xe0, 0x88, 0x92, 0x17, 0x41, 0xbb, 0xde, 0xf5, 0xae, 0x49, 0x88, 0x2d, 0x55, + 0x3d, 0x65, 0x67, 0xbe, 0xf1, 0x7c, 0xf3, 0x7d, 0xeb, 0xdd, 0x18, 0xee, 0x86, 0x6e, 0x72, 0x81, + 0xb2, 0x41, 0xb6, 0xb4, 0xe3, 0x04, 0x67, 0x58, 0xef, 0xc7, 0x28, 0xf2, 0x16, 0xf3, 0x45, 0x38, + 0x77, 0xa7, 0xa9, 0x9d, 0xa3, 0xec, 0xc7, 0x3a, 0x85, 0xdb, 0xe3, 0xd4, 0x7f, 0x91, 0x20, 0x37, + 0x43, 0x6f, 0x30, 0x9e, 0xeb, 0x06, 0xf4, 0x66, 0x24, 0xc2, 0x89, 0xa1, 0x1c, 0x2a, 0x8f, 0xb4, + 0x09, 0x0f, 0xf5, 0xfb, 0xd0, 0x99, 0xe1, 0x20, 0x3a, 0x36, 0x9a, 0x34, 0x9f, 0x07, 0x3c, 0x3b, + 0x32, 0x5a, 0x22, 0x3b, 0xb2, 0xbe, 0x2b, 0xf0, 0xa0, 0xd4, 0x77, 0x82, 0xd2, 0x18, 0x47, 0x29, + 0xda, 0xd1, 0x7f, 0x1f, 0x54, 0x2f, 0xc1, 0xf1, 0xd9, 0x22, 0xf0, 0x28, 0x45, 0x7b, 0xd2, 0x23, + 0xf1, 0x69, 0xe0, 0xe9, 0x3a, 0xb4, 0x63, 0x37, 0x48, 0x18, 0x07, 0x5d, 0x13, 0x62, 0x02, 0xa7, + 0x46, 0x3b, 0x27, 0xa6, 0x01, 0x1f, 0x67, 0x68, 0x74, 0xc4, 0x38, 0x43, 0x9e, 0x75, 0x8c, 0xae, + 0xc8, 0x3a, 0xd6, 0x5b, 0x49, 0xfb, 0xcb, 0x04, 0xc7, 0x3b, 0x66, 0xe3, 0x03, 0x34, 0xb7, 0x0d, + 0xd0, 0x92, 0x06, 0xb0, 0xbe, 0xc9, 0xca, 0x49, 0xd7, 0x1a, 0xca, 0xef, 0x41, 0x4b, 0x88, 0x26, + 0xcb, 0x1b, 0x12, 0xfc, 0x8c, 0x0a, 0x9e, 0x20, 0x0f, 0xa1, 0xb0, 0x42, 0xb0, 0x34, 0x92, 0x46, + 0x47, 0xb2, 0xbe, 0x36, 0xa9, 0x30, 0xf1, 0xf4, 0x0d, 0x0b, 0xdb, 0x07, 0x35, 0x0b, 0x42, 0x74, + 0x36, 0x45, 0x3e, 0xd3, 0xd6, 0x23, 0xf1, 0x08, 0xf9, 0xfa, 0x43, 0xd0, 0xa8, 0x4c, 0x8a, 0xe5, + 0x0a, 0x55, 0x9a, 0x90, 0x40, 0x87, 0x82, 0x3d, 0x01, 0x3a, 0x04, 0xe4, 0x4d, 0x51, 0xe4, 0x19, + 0xaa, 0x68, 0x7a, 0x12, 0x79, 0xa2, 0x29, 0xc1, 0x34, 0xa9, 0xa9, 0x04, 0x3a, 0x14, 0x04, 0xa9, + 0xe9, 0x49, 0xe4, 0x59, 0xbf, 0x14, 0xb8, 0x53, 0x6c, 0xf9, 0xeb, 0xc4, 0x43, 0xc9, 0x0e, 0x4b, + 0xfa, 0xa0, 0x7a, 0x28, 0xc2, 0xe1, 0x71, 0x7a, 0xc1, 0xdc, 0x2d, 0xe2, 0x02, 0x1b, 0x05, 0x1e, + 0x33, 0xa8, 0x88, 0xf5, 0x03, 0xd0, 0x30, 0x69, 0xfd, 0xee, 0x32, 0x46, 0xcc, 0x28, 0x91, 0xd0, + 0xf7, 0xa0, 0xeb, 0x86, 0x78, 0x11, 0x65, 0xcc, 0x2a, 0x16, 0x11, 0xbb, 0x13, 0x37, 0x43, 0x46, + 0xf7, 0xb0, 0x45, 0xec, 0x26, 0x6b, 0xba, 0x05, 0x09, 0xfa, 0xc8, 0xbc, 0xa1, 0x6b, 0x92, 0x8b, + 0xd0, 0x32, 0x63, 0x9e, 0xd0, 0xb5, 0x75, 0x04, 0x7b, 0x65, 0x55, 0xc5, 0x86, 0xb3, 0x6d, 0x55, + 0x8a, 0x6d, 0xb5, 0x9e, 0xe7, 0x0e, 0xb8, 0xd1, 0x0c, 0xcd, 0xab, 0x1c, 0xd8, 0x7c, 0xb5, 0x8c, + 0x9c, 0x49, 0x3c, 0xcd, 0x99, 0xac, 0x1f, 0xb9, 0xb5, 0x63, 0x7a, 0x59, 0x5d, 0xc7, 0xda, 0x03, + 0xd0, 0x72, 0x4b, 0x08, 0x98, 0x7b, 0x2b, 0x12, 0x25, 0xe3, 0xdb, 0x9b, 0xc6, 0xe7, 0x85, 0x04, + 0xec, 0xc8, 0x4f, 0x12, 0xb4, 0x0f, 0x6a, 0x3a, 0x0f, 0xe2, 0xd8, 0xf5, 0x11, 0x7f, 0x13, 0x79, + 0x6c, 0x7d, 0x52, 0xa8, 0x2e, 0x69, 0xf8, 0x6d, 0x0e, 0xe6, 0x1e, 0x94, 0x69, 0x9a, 0xff, 0xd2, + 0x54, 0x8e, 0x5f, 0x0c, 0xd1, 0x2e, 0x0f, 0xe1, 0x7c, 0xe9, 0x40, 0x6b, 0x9c, 0xfa, 0xfa, 0x39, + 0x80, 0x74, 0xcb, 0x3f, 0xb6, 0xff, 0xff, 0x9f, 0x60, 0x97, 0x2e, 0xee, 0xfe, 0xb0, 0x76, 0x69, + 0xa1, 0xae, 0xe0, 0xa2, 0x97, 0x4c, 0x3d, 0x2e, 0x52, 0x5a, 0x93, 0xab, 0x74, 0xf9, 0x9c, 0x03, + 0x48, 0x17, 0x5a, 0x15, 0x97, 0x28, 0xad, 0xe4, 0xda, 0x72, 0xd1, 0x85, 0x70, 0x4b, 0x3e, 0xe4, + 0x47, 0xb5, 0xa6, 0xa5, 0xb5, 0x7d, 0xa7, 0x7e, 0x6d, 0x89, 0x4e, 0x3a, 0x51, 0x95, 0x74, 0xa2, + 0xb6, 0x9a, 0x6e, 0xf3, 0xac, 0x11, 0x3a, 0xf9, 0x9c, 0x55, 0xd1, 0x49, 0xb5, 0x95, 0x74, 0x5b, + 0x8e, 0xc0, 0xe8, 0xd5, 0xcf, 0x95, 0xa9, 0x5c, 0xad, 0x4c, 0xe5, 0xcf, 0xca, 0x54, 0x3e, 0xaf, + 0xcd, 0xc6, 0xd5, 0xda, 0x6c, 0xfc, 0x5e, 0x9b, 0x8d, 0xf7, 0xb6, 0x1f, 0x64, 0x1f, 0x16, 0x53, + 0x7b, 0x86, 0xc3, 0x01, 0xef, 0xfb, 0x84, 0x34, 0x1e, 0xb0, 0x2f, 0x9b, 0x25, 0x5f, 0x64, 0x97, + 0x31, 0x4a, 0xa7, 0x5d, 0xfa, 0x99, 0xf3, 0xf4, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9e, 0xb5, + 0x1e, 0x2d, 0xf9, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1072,6 +1256,46 @@ func (m *MsgCreatePoolResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Coin2) > 0 { + i -= len(m.Coin2) + copy(dAtA[i:], m.Coin2) + i = encodeVarintTx(dAtA, i, uint64(len(m.Coin2))) + i-- + dAtA[i] = 0x32 + } + if len(m.Coin1) > 0 { + i -= len(m.Coin1) + copy(dAtA[i:], m.Coin1) + i = encodeVarintTx(dAtA, i, uint64(len(m.Coin1))) + i-- + dAtA[i] = 0x2a + } + if len(m.Drops) > 0 { + i -= len(m.Drops) + copy(dAtA[i:], m.Drops) + i = encodeVarintTx(dAtA, i, uint64(len(m.Drops))) + i-- + dAtA[i] = 0x22 + } + if len(m.Pair) > 0 { + i -= len(m.Pair) + copy(dAtA[i:], m.Pair) + i = encodeVarintTx(dAtA, i, uint64(len(m.Pair))) + i-- + dAtA[i] = 0x1a + } + if m.DropUid != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.DropUid)) + i-- + dAtA[i] = 0x10 + } + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } @@ -1139,6 +1363,46 @@ func (m *MsgCreateDropResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Coin2) > 0 { + i -= len(m.Coin2) + copy(dAtA[i:], m.Coin2) + i = encodeVarintTx(dAtA, i, uint64(len(m.Coin2))) + i-- + dAtA[i] = 0x32 + } + if len(m.Coin1) > 0 { + i -= len(m.Coin1) + copy(dAtA[i:], m.Coin1) + i = encodeVarintTx(dAtA, i, uint64(len(m.Coin1))) + i-- + dAtA[i] = 0x2a + } + if len(m.Drops) > 0 { + i -= len(m.Drops) + copy(dAtA[i:], m.Drops) + i = encodeVarintTx(dAtA, i, uint64(len(m.Drops))) + i-- + dAtA[i] = 0x22 + } + if len(m.Pair) > 0 { + i -= len(m.Pair) + copy(dAtA[i:], m.Pair) + i = encodeVarintTx(dAtA, i, uint64(len(m.Pair))) + i-- + dAtA[i] = 0x1a + } + if m.Uid != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Uid)) + i-- + dAtA[i] = 0x10 + } + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } @@ -1199,6 +1463,74 @@ func (m *MsgRedeemDropResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Coin2End) > 0 { + i -= len(m.Coin2End) + copy(dAtA[i:], m.Coin2End) + i = encodeVarintTx(dAtA, i, uint64(len(m.Coin2End))) + i-- + dAtA[i] = 0x52 + } + if len(m.Coin1End) > 0 { + i -= len(m.Coin1End) + copy(dAtA[i:], m.Coin1End) + i = encodeVarintTx(dAtA, i, uint64(len(m.Coin1End))) + i-- + dAtA[i] = 0x4a + } + if len(m.TimeEnd) > 0 { + i -= len(m.TimeEnd) + copy(dAtA[i:], m.TimeEnd) + i = encodeVarintTx(dAtA, i, uint64(len(m.TimeEnd))) + i-- + dAtA[i] = 0x42 + } + if len(m.Coin2Beg) > 0 { + i -= len(m.Coin2Beg) + copy(dAtA[i:], m.Coin2Beg) + i = encodeVarintTx(dAtA, i, uint64(len(m.Coin2Beg))) + i-- + dAtA[i] = 0x3a + } + if len(m.Coin1Beg) > 0 { + i -= len(m.Coin1Beg) + copy(dAtA[i:], m.Coin1Beg) + i = encodeVarintTx(dAtA, i, uint64(len(m.Coin1Beg))) + i-- + dAtA[i] = 0x32 + } + if len(m.TimeBeg) > 0 { + i -= len(m.TimeBeg) + copy(dAtA[i:], m.TimeBeg) + i = encodeVarintTx(dAtA, i, uint64(len(m.TimeBeg))) + i-- + dAtA[i] = 0x2a + } + if len(m.Drops) > 0 { + i -= len(m.Drops) + copy(dAtA[i:], m.Drops) + i = encodeVarintTx(dAtA, i, uint64(len(m.Drops))) + i-- + dAtA[i] = 0x22 + } + if len(m.Pair) > 0 { + i -= len(m.Pair) + copy(dAtA[i:], m.Pair) + i = encodeVarintTx(dAtA, i, uint64(len(m.Pair))) + i-- + dAtA[i] = 0x1a + } + if m.Uid != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Uid)) + i-- + dAtA[i] = 0x10 + } + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } @@ -1525,6 +1857,29 @@ func (m *MsgCreatePoolResponse) Size() (n int) { } var l int _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.DropUid != 0 { + n += 1 + sovTx(uint64(m.DropUid)) + } + l = len(m.Pair) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Drops) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Coin1) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Coin2) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } return n } @@ -1550,15 +1905,6 @@ func (m *MsgCreateDrop) Size() (n int) { } func (m *MsgCreateDropResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgRedeemDrop) Size() (n int) { if m == nil { return 0 } @@ -1568,10 +1914,42 @@ func (m *MsgRedeemDrop) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Uid) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } + if m.Uid != 0 { + n += 1 + sovTx(uint64(m.Uid)) + } + l = len(m.Pair) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Drops) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Coin1) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Coin2) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgRedeemDrop) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Uid) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } return n } @@ -1581,6 +1959,45 @@ func (m *MsgRedeemDropResponse) Size() (n int) { } var l int _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Uid != 0 { + n += 1 + sovTx(uint64(m.Uid)) + } + l = len(m.Pair) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Drops) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.TimeBeg) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Coin1Beg) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Coin2Beg) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.TimeEnd) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Coin1End) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Coin2End) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } return n } @@ -1904,56 +2321,6 @@ func (m *MsgCreatePoolResponse) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: MsgCreatePoolResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgCreateDrop) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgCreateDrop: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCreateDrop: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) @@ -1987,6 +2354,25 @@ func (m *MsgCreateDrop) Unmarshal(dAtA []byte) error { m.Creator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DropUid", wireType) + } + m.DropUid = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DropUid |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Pair", wireType) } @@ -2018,7 +2404,7 @@ func (m *MsgCreateDrop) Unmarshal(dAtA []byte) error { } m.Pair = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Drops", wireType) } @@ -2050,56 +2436,70 @@ func (m *MsgCreateDrop) Unmarshal(dAtA []byte) error { } m.Drops = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Coin1", wireType) } - if (skippy < 0) || (iNdEx+skippy) < 0 { + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - if (iNdEx + skippy) > l { + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { return io.ErrUnexpectedEOF } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgCreateDropResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx + m.Coin1 = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Coin2", wireType) } - if iNdEx >= l { - return io.ErrUnexpectedEOF + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgCreateDropResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCreateDropResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Coin2 = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -2121,7 +2521,7 @@ func (m *MsgCreateDropResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgRedeemDrop) Unmarshal(dAtA []byte) error { +func (m *MsgCreateDrop) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2144,10 +2544,10 @@ func (m *MsgRedeemDrop) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgRedeemDrop: wiretype end group for non-group") + return fmt.Errorf("proto: MsgCreateDrop: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRedeemDrop: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgCreateDrop: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2184,7 +2584,7 @@ func (m *MsgRedeemDrop) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uid", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Pair", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2212,30 +2612,62 @@ func (m *MsgRedeemDrop) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Uid = string(dAtA[iNdEx:postIndex]) + m.Pair = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Drops", wireType) } - iNdEx += skippy - } - } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Drops = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } -func (m *MsgRedeemDropResponse) Unmarshal(dAtA []byte) error { +func (m *MsgCreateDropResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2258,12 +2690,662 @@ func (m *MsgRedeemDropResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgRedeemDropResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgCreateDropResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRedeemDropResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgCreateDropResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Uid", wireType) + } + m.Uid = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Uid |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pair", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Pair = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Drops", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Drops = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Coin1", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Coin1 = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Coin2", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Coin2 = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRedeemDrop) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgRedeemDrop: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRedeemDrop: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Uid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRedeemDropResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgRedeemDropResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRedeemDropResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Uid", wireType) + } + m.Uid = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Uid |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pair", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Pair = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Drops", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Drops = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeBeg", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TimeBeg = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Coin1Beg", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Coin1Beg = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Coin2Beg", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Coin2Beg = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeEnd", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TimeEnd = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Coin1End", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Coin1End = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Coin2End", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Coin2End = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) From f59d680dcf2be43d09b24a8961257e9ac5631401 Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Sun, 9 Jun 2024 15:42:25 -0500 Subject: [PATCH 29/35] Add response fields and drop end accounting --- x/market/keeper/msg_server_redeem_drop.go | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/x/market/keeper/msg_server_redeem_drop.go b/x/market/keeper/msg_server_redeem_drop.go index 8848070b..56f174aa 100644 --- a/x/market/keeper/msg_server_redeem_drop.go +++ b/x/market/keeper/msg_server_redeem_drop.go @@ -99,8 +99,12 @@ func (k msgServer) RedeemDrop(goCtx context.Context, msg *types.MsgRedeemDrop) ( return nil, sdkError } - // Deactivate drop + // Deactivate drop and add final accounting drop.Active = false + drop.TimeEnd = ctx.BlockHeader().Time.Unix() + drop.Coin1End = coinOwner1 + drop.Coin2End = coinOwner2 + drop.ProductEnd = total1.Mul(total2) // Set Pool Member and Drop k.SetDrop( @@ -128,5 +132,16 @@ func (k msgServer) RedeemDrop(goCtx context.Context, msg *types.MsgRedeemDrop) ( member2, ) - return &types.MsgRedeemDropResponse{}, nil + return &types.MsgRedeemDropResponse{ + Creator: msg.Creator, + Uid: uid, + Pair: drop.Pair, + Drops: drop.Drops.String(), + TimeBeg: strconv.FormatInt(drop.TimeBeg, 10), + Coin1Beg: drop.Coin1Beg.String(), + Coin2Beg: drop.Coin2Beg.String(), + TimeEnd: strconv.FormatInt(drop.TimeEnd, 10), + Coin1End: coinOwner1.String(), + Coin2End: coinOwner2.String(), + }, nil } From fa126904f62aa088dee44425d7cbf970f8a8b414 Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Sun, 9 Jun 2024 15:42:56 -0500 Subject: [PATCH 30/35] Add drop beginning time --- x/market/keeper/msg_server_create_drop.go | 1 + 1 file changed, 1 insertion(+) diff --git a/x/market/keeper/msg_server_create_drop.go b/x/market/keeper/msg_server_create_drop.go index bcd7b249..c0fdd22e 100644 --- a/x/market/keeper/msg_server_create_drop.go +++ b/x/market/keeper/msg_server_create_drop.go @@ -146,6 +146,7 @@ func (k msgServer) CreateDrop(goCtx context.Context, msg *types.MsgCreateDrop) ( Pair: pair, Drops: drops, ProductBeg: dropProduct, + TimeBeg: ctx.BlockHeader().Time.Unix(), Coin1Beg: coin1, Coin2Beg: coin2, Active: true, From 89de17bdfdaa0340938ba57ac708c8d2e32d51c7 Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Sun, 9 Jun 2024 15:45:13 -0500 Subject: [PATCH 31/35] Add drop fields --- x/market/keeper/msg_server_create_pool.go | 38 +++++++++++++++-------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/x/market/keeper/msg_server_create_pool.go b/x/market/keeper/msg_server_create_pool.go index e8ffc9f0..a579f875 100644 --- a/x/market/keeper/msg_server_create_pool.go +++ b/x/market/keeper/msg_server_create_pool.go @@ -36,6 +36,8 @@ func (k msgServer) CreatePool(goCtx context.Context, msg *types.MsgCreatePool) ( // The sorted pair joined by "," is used as the key for the pool. denom1 := coinPair.GetDenomByIndex(0) denom2 := coinPair.GetDenomByIndex(1) + coin1 := coinPair[0] + coin2 := coinPair[1] pair := strings.Join([]string{denom1, denom2}, ",") // Test if pool either exists and active or exists and inactive @@ -89,14 +91,14 @@ func (k msgServer) CreatePool(goCtx context.Context, msg *types.MsgCreatePool) ( pool.Drops = drops pool.Leaders = []*types.Leader{&leader} pool.LastDrop = count - member1.Balance = coinPair.AmountOf(denom1) - member2.Balance = coinPair.AmountOf(denom2) + member1.Balance = coin1.Amount + member2.Balance = coin2.Amount } else { pool = types.Pool{ Pair: pair, Leaders: []*types.Leader{&leader}, - Denom1: coinPair.GetDenomByIndex(0), - Denom2: coinPair.GetDenomByIndex(1), + Denom1: denom1, + Denom2: denom2, Volume1: &types.Volume{ Denom: coinPair.GetDenomByIndex(0), Amount: sdk.ZeroInt(), @@ -114,7 +116,7 @@ func (k msgServer) CreatePool(goCtx context.Context, msg *types.MsgCreatePool) ( Pair: pair, DenomA: denom2, DenomB: denom1, - Balance: coinPair.AmountOf(denom1), + Balance: coin1.Amount, Limit: 0, Stop: 0, } @@ -123,19 +125,22 @@ func (k msgServer) CreatePool(goCtx context.Context, msg *types.MsgCreatePool) ( Pair: pair, DenomA: denom1, DenomB: denom2, - Balance: coinPair.AmountOf(denom2), + Balance: coin2.Amount, Limit: 0, Stop: 0, } } var drop = types.Drop{ - Uid: count, - Owner: msg.Creator, - Pair: pair, - Drops: drops, - Product: drops, - Active: true, + Uid: count, + Owner: msg.Creator, + Pair: pair, + Drops: drops, + TimeBeg: ctx.BlockHeader().Time.Unix(), + ProductBeg: drops, + Coin1Beg: coin1, + Coin2Beg: coin2, + Active: true, } k.SetPool( @@ -167,5 +172,12 @@ func (k msgServer) CreatePool(goCtx context.Context, msg *types.MsgCreatePool) ( // Update drop uid count k.SetUidCount(ctx, count+1) - return &types.MsgCreatePoolResponse{}, nil + return &types.MsgCreatePoolResponse{ + Creator: msg.Creator, + DropUid: drop.Uid, + Pair: pair, + Drops: drop.Drops.String(), + Coin1: coin1.String(), + Coin2: coin2.String(), + }, nil } From f9851e6644e7635a4e8cb3e0ac66dbee3d3a59ed Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Sun, 9 Jun 2024 15:46:09 -0500 Subject: [PATCH 32/35] Update tests to sqrt(XY) pool basis --- .../keeper/msg_server_redeem_drop_test.go | 151 +++++++----------- 1 file changed, 60 insertions(+), 91 deletions(-) diff --git a/x/market/keeper/msg_server_redeem_drop_test.go b/x/market/keeper/msg_server_redeem_drop_test.go index c91b7e1a..f8549d08 100644 --- a/x/market/keeper/msg_server_redeem_drop_test.go +++ b/x/market/keeper/msg_server_redeem_drop_test.go @@ -13,15 +13,7 @@ import ( "github.com/stretchr/testify/require" ) -func TestRedeemDrop(t *testing.T) { - testInput := keepertest.CreateTestEnvironment(t) - - // TestData - testdata := testData{coinAStr: "30CoinA", coinBStr: "40CoinB", RateAstrArray: []string{"60", "70"}, RateBstrArray: []string{"80", "90"}} - coinPair, _ := sample.SampleCoins("70CoinA", "70CoinB") - denomA, denomB := sample.SampleDenoms(coinPair) - pair := strings.Join([]string{denomA, denomB}, ",") - +func redeemCommon(t *testing.T, testInput keepertest.TestInput) { // MintCoins require.NoError(t, testInput.BankKeeper.MintCoins(testInput.Context, types.ModuleName, coinPair)) @@ -46,131 +38,108 @@ func TestRedeemDrop(t *testing.T) { require.NoError(t, err) require.NoError(t, testInput.BankKeeper.SendCoinsFromModuleToAccount(testInput.Context, types.ModuleName, requestAddress3, coinPair)) - // GetUidCount before CreatePool - beforecount := testInput.MarketKeeper.GetUidCount(testInput.Context) - // Create Pool var p = types.MsgCreatePool{CoinA: testdata.coinAStr, CoinB: testdata.coinBStr, Creator: addr} - response, err := keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreatePool(sdk.WrapSDKContext(testInput.Context), &p) + _, _ = keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreatePool(sdk.WrapSDKContext(testInput.Context), &p) - // Validate CreatePool - require.NoError(t, err) - require.Contains(t, p.GetCreator(), response.String()) - require.Contains(t, p.GetCoinA(), response.String()) - require.Contains(t, p.GetCoinB(), response.String()) - - // Validate SetUidCount function. - aftercount := testInput.MarketKeeper.GetUidCount(testInput.Context) - require.Equal(t, beforecount+1, aftercount) +} - // Validate GetDrop - drops, dropFound := testInput.MarketKeeper.GetDrop(testInput.Context, beforecount) - require.True(t, dropFound) - require.Equal(t, drops.Pair, pair) +func TestRedeemDrop(t *testing.T) { + testInput := keepertest.CreateTestEnvironment(t) - // Validate GetPool - rst1, found := testInput.MarketKeeper.GetPool(testInput.Context, pair) - require.True(t, found) - require.Equal(t, rst1.Pair, pair) - require.Equal(t, "1200", rst1.Drops.String()) - require.Equal(t, 1, len(rst1.Leaders)) - require.Equal(t, "1200", rst1.Leaders[0].Drops.String()) + redeemCommon(t, testInput) // Validate CreateDrop - var d = types.MsgCreateDrop{Creator: addr2, Pair: pair, Drops: "120"} + d := types.MsgCreateDrop{Creator: addr2, Pair: pair, Drops: "120"} createDropResponse, err := keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreateDrop(sdk.WrapSDKContext(testInput.Context), &d) require.NoError(t, err) - // Validate GetMember - members, memberfound := testInput.MarketKeeper.GetMember(testInput.Context, denomB, denomA) - members1, memberfound1 := testInput.MarketKeeper.GetMember(testInput.Context, denomA, denomB) - require.True(t, memberfound) - require.Equal(t, members.DenomA, denomB) - require.Equal(t, members.DenomB, denomA) - require.Equal(t, "33", members.Balance.String()) - - require.True(t, memberfound1) - require.Equal(t, members1.DenomA, denomA) - require.Equal(t, members1.DenomB, denomB) - require.Equal(t, "44", members1.Balance.String()) - - // Validate GetPool - rst, found := testInput.MarketKeeper.GetPool(testInput.Context, pair) - require.True(t, found) - require.Equal(t, rst.Pair, pair) - require.Equal(t, "1320", rst.Drops.String()) - require.Equal(t, 2, len(rst.Leaders)) - require.Equal(t, addr2, rst.Leaders[1].Address) - require.Equal(t, "1200", rst.Leaders[0].Drops.String()) - // Validate GetDrop - drops1, drop1Found := testInput.MarketKeeper.GetDrop(testInput.Context, aftercount) + drop1, drop1Found := testInput.MarketKeeper.GetDrop(testInput.Context, createDropResponse.Uid) require.True(t, drop1Found) - require.Equal(t, drops1.Pair, pair) - require.Equal(t, drops1.Drops.String(), d.Drops) - require.Contains(t, d.GetCreator(), createDropResponse.String()) + require.Equal(t, drop1.Pair, pair) + require.Equal(t, drop1.Drops.String(), d.Drops) + require.Contains(t, d.GetCreator(), createDropResponse.Creator) // Validate RedeemDrop - Uid := strconv.FormatUint(drops1.Uid, 10) + Uid := strconv.FormatUint(drop1.Uid, 10) var rd = types.MsgRedeemDrop{Creator: addr2, Uid: Uid} createRedeemDropResponse, redeemdropErr := keeper.NewMsgServerImpl(*testInput.MarketKeeper).RedeemDrop(sdk.WrapSDKContext(testInput.Context), &rd) require.NoError(t, redeemdropErr) - require.Contains(t, rd.GetCreator(), createRedeemDropResponse.String()) + require.Contains(t, rd.GetCreator(), createRedeemDropResponse.Creator) // Validate Drop After Redeem Drop - drops1, drop1Found = testInput.MarketKeeper.GetDrop(testInput.Context, aftercount) + drop1, drop1Found = testInput.MarketKeeper.GetDrop(testInput.Context, createDropResponse.Uid) require.True(t, drop1Found) - require.Equal(t, drops1.Pair, pair) - require.Equal(t, drops1.Drops.String(), d.Drops) - require.Contains(t, d.GetCreator(), createDropResponse.String()) - require.False(t, drops1.Active) + require.Equal(t, drop1.Pair, pair) + require.Equal(t, drop1.Drops.String(), d.Drops) + require.Contains(t, d.GetCreator(), createDropResponse.Creator) + require.False(t, drop1.Active) // Validate GetPool After Redeem Drop - rst, found = testInput.MarketKeeper.GetPool(testInput.Context, pair) + pool, found := testInput.MarketKeeper.GetPool(testInput.Context, pair) require.True(t, found) - require.Equal(t, rst.Pair, pair) - require.Equal(t, "1200", rst.Drops.String()) - require.Equal(t, "1200", rst.Leaders[0].Drops.String()) - require.Equal(t, 1, len(rst.Leaders)) - require.Equal(t, addr, rst.Leaders[0].Address) + require.Equal(t, pool.Pair, pair) + require.Equal(t, "34", pool.Drops.String()) + require.Equal(t, "34", pool.Leaders[0].Drops.String()) + require.Equal(t, 1, len(pool.Leaders)) + require.Equal(t, addr, pool.Leaders[0].Address) owner, ok := testInput.MarketKeeper.GetDropsOwnerPair(testInput.Context, addr, pair) require.True(t, ok) - require.Truef(t, owner.Sum.Equal(sdk.NewInt(1200)), owner.Sum.String()) + require.Truef(t, owner.Sum.Equal(sdk.NewInt(34)), owner.Sum.String()) pairs, ok := testInput.MarketKeeper.GetPairs(testInput.Context, addr) require.True(t, ok) require.Truef(t, pairs.Pairs[0] == pair, pairs.String()) // Validate GetMember After Redeem Drop - members, memberfound = testInput.MarketKeeper.GetMember(testInput.Context, denomB, denomA) - members1, memberfound1 = testInput.MarketKeeper.GetMember(testInput.Context, denomA, denomB) - require.True(t, memberfound) - require.Equal(t, members.DenomA, denomB) - require.Equal(t, members.DenomB, denomA) - require.Equal(t, members.Balance.String(), "30") - require.True(t, memberfound1) - require.Equal(t, members1.DenomA, denomA) - require.Equal(t, members1.DenomB, denomB) - require.Equal(t, members1.Balance.String(), "40") + memberA, memberFoundA := testInput.MarketKeeper.GetMember(testInput.Context, denomB, denomA) + memberB, memberFoundB := testInput.MarketKeeper.GetMember(testInput.Context, denomA, denomB) + require.True(t, memberFoundA) + require.Equal(t, memberA.DenomA, denomB) + require.Equal(t, memberA.DenomB, denomA) + require.Equal(t, memberA.Balance.String(), "31") + require.True(t, memberFoundB) + require.Equal(t, memberB.DenomA, denomA) + require.Equal(t, memberB.DenomB, denomB) + require.Equal(t, memberB.Balance.String(), "41") + + // Calculate Product After + memberAsk, memberAskFound := testInput.MarketKeeper.GetMember(testInput.Context, denomB, denomA) + require.True(t, memberAskFound) + memberBid, memberBidFound := testInput.MarketKeeper.GetMember(testInput.Context, denomA, denomB) + require.True(t, memberBidFound) + + productAfter := memberAsk.Balance.Mul(memberBid.Balance) + require.True(t, productAfter.GTE(pool.Drops)) // Validate RedeemDrop - Uid2 := strconv.FormatUint(beforecount, 10) + Uid2 := strconv.FormatUint(createDropResponse.Uid-1, 10) var rd2 = types.MsgRedeemDrop{Creator: addr, Uid: Uid2} createRedeemDropResponse2, redeemdropErr2 := keeper.NewMsgServerImpl(*testInput.MarketKeeper).RedeemDrop(sdk.WrapSDKContext(testInput.Context), &rd2) require.NoError(t, redeemdropErr2) - require.Contains(t, rd2.GetCreator(), createRedeemDropResponse2.String()) + require.Contains(t, rd2.GetCreator(), createRedeemDropResponse2.Creator) // Validate RedeemDrop Duplicate Error _, redeemdropErr3 := keeper.NewMsgServerImpl(*testInput.MarketKeeper).RedeemDrop(sdk.WrapSDKContext(testInput.Context), &rd2) require.Error(t, redeemdropErr3) // Validate GetPool After Redeem Drop - rst, found = testInput.MarketKeeper.GetPool(testInput.Context, pair) + pool, found = testInput.MarketKeeper.GetPool(testInput.Context, pair) require.True(t, found) - require.Equal(t, rst.Pair, pair) - require.Equal(t, rst.Drops.String(), "0") - require.Equal(t, 0, len(rst.Leaders)) + require.Equal(t, pool.Pair, pair) + require.Equal(t, pool.Drops.String(), "0") + require.Equal(t, 0, len(pool.Leaders)) + + // Calculate Product After + memberAsk, memberAskFound = testInput.MarketKeeper.GetMember(testInput.Context, denomB, denomA) + require.True(t, memberAskFound) + memberBid, memberBidFound = testInput.MarketKeeper.GetMember(testInput.Context, denomA, denomB) + require.True(t, memberBidFound) + + productAfter = memberAsk.Balance.Mul(memberBid.Balance) + require.True(t, productAfter.GTE(pool.Drops)) pairs, ok = testInput.MarketKeeper.GetPairs(testInput.Context, addr) require.True(t, ok) @@ -215,7 +184,7 @@ func TestRedeemDrop_WithBurnCoin(t *testing.T) { rst1, found := testInput.MarketKeeper.GetPool(testInput.Context, pair) require.True(t, found) require.Equal(t, rst1.Pair, pair) - require.Equal(t, "70000", rst1.Drops.String()) + require.Equal(t, "264", rst1.Drops.String()) } func TestRedeemDrop_NumericalLimits(t *testing.T) { From c94ee481703c13f6d533029d003bdb61ab419797 Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Sun, 9 Jun 2024 18:01:22 -0500 Subject: [PATCH 33/35] Fix tests --- .../keeper/msg_server_create_drop_test.go | 83 +++++++------------ 1 file changed, 28 insertions(+), 55 deletions(-) diff --git a/x/market/keeper/msg_server_create_drop_test.go b/x/market/keeper/msg_server_create_drop_test.go index fe1823c5..c35b3c65 100644 --- a/x/market/keeper/msg_server_create_drop_test.go +++ b/x/market/keeper/msg_server_create_drop_test.go @@ -50,17 +50,14 @@ func TestCreateDrop(t *testing.T) { dropCommon(t, testInput) - // GetUidCount after CreatePool beforecount := testInput.MarketKeeper.GetUidCount(testInput.Context) - // Validate GetDrop - drop, dropFound := testInput.MarketKeeper.GetDrop(testInput.Context, beforecount-1) - require.True(t, dropFound) + poolBefore, found := testInput.MarketKeeper.GetPool(testInput.Context, pair) + require.True(t, found) // Validate CreateDrop - drops := sdk.NewIntFromUint64(12) - var d = types.MsgCreateDrop{Creator: addr2, Pair: pair, Drops: drops.String()} - createDropResponse, err := keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreateDrop(sdk.WrapSDKContext(testInput.Context), &d) + var dropMsg = types.MsgCreateDrop{Creator: addr2, Pair: pair, Drops: "12"} + createDropResponse, err := keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreateDrop(sdk.WrapSDKContext(testInput.Context), &dropMsg) require.NoError(t, err) // Validate SetUidCount function. @@ -74,8 +71,9 @@ func TestCreateDrop(t *testing.T) { // Validate GetPool pool, found := testInput.MarketKeeper.GetPool(testInput.Context, pair) require.True(t, found) - require.Equal(t, pool.Pair, pair) - require.True(t, (drop.Drops.Add(drops)).Equal(pool.Drops)) + drops, ok := sdk.NewIntFromString(createDropResponse.Drops) + require.True(t, ok) + require.True(t, (poolBefore.Drops.Add(drops)).Equal(pool.Drops)) require.Equalf(t, addr, pool.Leaders[0].Address, pool.Leaders[0].Address) require.Equalf(t, 2, len(pool.Leaders), pool.Leaders[1].Address) require.Equal(t, "34", pool.Leaders[0].Drops.String()) @@ -98,11 +96,11 @@ func TestCreateDrop(t *testing.T) { require.Truef(t, owner.Sum.Equal(sdk.NewInt(34)), owner.Sum.String()) // Validate GetDrop - drop, dropFound = testInput.MarketKeeper.GetDrop(testInput.Context, beforecount) + drop, dropFound := testInput.MarketKeeper.GetDrop(testInput.Context, createDropResponse.Uid) require.True(t, dropFound) require.Equal(t, drop.Pair, pair) - require.Equal(t, drop.Drops.String(), d.Drops) - require.Contains(t, d.GetCreator(), createDropResponse.String()) + require.Equal(t, drop.Drops.String(), dropMsg.Drops) + require.Equal(t, createDropResponse.Creator, dropMsg.GetCreator()) beforecount = aftercount @@ -134,19 +132,13 @@ func TestCreateDrop(t *testing.T) { require.True(t, dropFound) require.Equal(t, drop.Pair, pair) require.Equal(t, drop.Drops.String(), e.Drops) - require.Contains(t, d.GetCreator(), createDropResponse.String()) - - beforecount = aftercount + require.Equal(t, drop.Owner, createDropResponse.GetCreator()) // Validate CreateDrop var f = types.MsgCreateDrop{Creator: addr3, Pair: pair, Drops: "1000"} createDropResponse, err = keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreateDrop(sdk.WrapSDKContext(testInput.Context), &f) require.NoError(t, err) - // Validate SetUidCount function. - aftercount = testInput.MarketKeeper.GetUidCount(testInput.Context) - require.Equal(t, beforecount+1, aftercount) - pairs, ok = testInput.MarketKeeper.GetDropPairs(testInput.Context, addr3) require.True(t, ok) require.Truef(t, pairs.Pairs[0] == pair, pairs.String()) @@ -160,23 +152,17 @@ func TestCreateDrop(t *testing.T) { require.Equal(t, "1000", pool.Leaders[0].Drops.String()) // Validate GetDrop - drop, dropFound = testInput.MarketKeeper.GetDrop(testInput.Context, beforecount) + drop, dropFound = testInput.MarketKeeper.GetDrop(testInput.Context, createDropResponse.Uid) require.True(t, dropFound) require.Equal(t, drop.Pair, pair) require.Equal(t, drop.Drops.String(), f.Drops) - require.Contains(t, d.GetCreator(), createDropResponse.String()) - - beforecount = aftercount + require.Equal(t, drop.Owner, createDropResponse.Creator) // Validate CreateDrop var g = types.MsgCreateDrop{Creator: addr3, Pair: pair, Drops: "400"} createDropResponse, err = keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreateDrop(sdk.WrapSDKContext(testInput.Context), &g) require.NoError(t, err) - // Validate SetUidCount function. - aftercount = testInput.MarketKeeper.GetUidCount(testInput.Context) - require.Equal(t, beforecount+1, aftercount) - // Validate GetPool pool, found = testInput.MarketKeeper.GetPool(testInput.Context, pair) require.True(t, found) @@ -191,11 +177,11 @@ func TestCreateDrop(t *testing.T) { require.Equalf(t, addr2, pool.Leaders[2].Address, pool.Leaders[2].Address) // Validate GetDrop - drop, dropFound = testInput.MarketKeeper.GetDrop(testInput.Context, beforecount) + drop, dropFound = testInput.MarketKeeper.GetDrop(testInput.Context, createDropResponse.Uid) require.True(t, dropFound) require.Equal(t, drop.Pair, pair) require.Equal(t, drop.Drops.String(), g.Drops) - require.Contains(t, d.GetCreator(), createDropResponse.String()) + require.Equal(t, drop.Owner, createDropResponse.Creator) // Calculate Product After memberAsk, memberAskFound := testInput.MarketKeeper.GetMember(testInput.Context, denomB, denomA) @@ -227,9 +213,9 @@ func TestCreateDrop_Pool_Not_Found(t *testing.T) { // Validate CreatePool require.NoError(t, err) - require.Contains(t, p.GetCreator(), response.String()) - require.Contains(t, p.GetCoinA(), response.String()) - require.Contains(t, p.GetCoinB(), response.String()) + require.Equal(t, p.GetCreator(), response.Creator) + require.Contains(t, response.String(), p.GetCoinA()) + require.Contains(t, response.String(), p.GetCoinB()) // Validate SetUidCount function. aftercount := testInput.MarketKeeper.GetUidCount(testInput.Context) @@ -279,9 +265,9 @@ func TestCreateDrop_Pool_Not_Active(t *testing.T) { response, err := keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreatePool(sdk.WrapSDKContext(testInput.Context), &p) //validate CreatePool require.NoError(t, err) - require.Contains(t, p.GetCreator(), response.String()) - require.Contains(t, p.GetCoinA(), response.String()) - require.Contains(t, p.GetCoinB(), response.String()) + require.Contains(t, response.String(), p.GetCreator()) + require.Contains(t, response.String(), p.GetCoinA()) + require.Contains(t, response.String(), p.GetCoinB()) //validate SetUidCount function. aftercount := testInput.MarketKeeper.GetUidCount(testInput.Context) require.Equal(t, beforecount+1, aftercount) @@ -296,7 +282,7 @@ func TestCreateDrop_Pool_Not_Active(t *testing.T) { var rd = types.MsgRedeemDrop{Creator: addr, Uid: Uid} createRedeemDropResponse, redeemdropErr := keeper.NewMsgServerImpl(*testInput.MarketKeeper).RedeemDrop(sdk.WrapSDKContext(testInput.Context), &rd) require.NoError(t, redeemdropErr) - require.Contains(t, rd.GetCreator(), createRedeemDropResponse.String()) + require.Contains(t, createRedeemDropResponse.String(), rd.GetCreator()) //validate CreateDrop (Inactive Pool) scenarios := []struct { @@ -327,9 +313,9 @@ func TestCreateDrop_Pool_Not_Active(t *testing.T) { response, err = keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreatePool(sdk.WrapSDKContext(testInput.Context), &p) //validate CreatePool require.NoError(t, err) - require.Contains(t, p.GetCreator(), response.String()) - require.Contains(t, p.GetCoinA(), response.String()) - require.Contains(t, p.GetCoinB(), response.String()) + require.Contains(t, response.String(), p.GetCreator()) + require.Contains(t, response.String(), p.GetCoinA()) + require.Contains(t, response.String(), p.GetCoinB()) //validate SetUidCount function. aftercount = testInput.MarketKeeper.GetUidCount(testInput.Context) require.Equal(t, beforecount+1, aftercount) @@ -368,12 +354,8 @@ func TestCreateDrop_Negative(t *testing.T) { beforecount := testInput.MarketKeeper.GetUidCount(testInput.Context) //Create Pool var p = types.MsgCreatePool{CoinA: testdata.coinAStr, CoinB: testdata.coinBStr, Creator: addr} - response, err := keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreatePool(sdk.WrapSDKContext(testInput.Context), &p) - //validate CreatePool + _, err = keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreatePool(sdk.WrapSDKContext(testInput.Context), &p) require.NoError(t, err) - require.Contains(t, p.GetCreator(), response.String()) - require.Contains(t, p.GetCoinA(), response.String()) - require.Contains(t, p.GetCoinB(), response.String()) //validate SetUidCount function. aftercount := testInput.MarketKeeper.GetUidCount(testInput.Context) require.Equal(t, beforecount+1, aftercount) @@ -425,12 +407,8 @@ func TestCreateDrop_ValidateSenderBalance(t *testing.T) { beforecount := testInput.MarketKeeper.GetUidCount(testInput.Context) //Create Pool var p = types.MsgCreatePool{CoinA: testdata.coinAStr, CoinB: testdata.coinBStr, Creator: addr} - response, err := keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreatePool(sdk.WrapSDKContext(testInput.Context), &p) - //validate CreatePool + _, err = keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreatePool(sdk.WrapSDKContext(testInput.Context), &p) require.NoError(t, err) - require.Contains(t, p.GetCreator(), response.String()) - require.Contains(t, p.GetCoinA(), response.String()) - require.Contains(t, p.GetCoinB(), response.String()) //validate SetUidCount function. aftercount := testInput.MarketKeeper.GetUidCount(testInput.Context) require.Equal(t, beforecount+1, aftercount) @@ -483,13 +461,8 @@ func TestZeroAmtPaid(t *testing.T) { // Create Pool var p = types.MsgCreatePool{CoinA: testdata.coinAStr, CoinB: testdata.coinBStr, Creator: addr} - response, err := keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreatePool(sdk.WrapSDKContext(testInput.Context), &p) - - // Validate CreatePool + _, err = keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreatePool(sdk.WrapSDKContext(testInput.Context), &p) require.NoError(t, err) - require.Contains(t, p.GetCreator(), response.String()) - require.Contains(t, p.GetCoinA(), response.String()) - require.Contains(t, p.GetCoinB(), response.String()) // Validate SetUidCount function. aftercount := testInput.MarketKeeper.GetUidCount(testInput.Context) From 25c21aaa1b3d92fc36cc6c63c1b753f90227760a Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Sun, 9 Jun 2024 19:01:01 -0500 Subject: [PATCH 34/35] Add intType --- testutil/nullify/nullify.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/testutil/nullify/nullify.go b/testutil/nullify/nullify.go index 3b968c09..0b94e94b 100644 --- a/testutil/nullify/nullify.go +++ b/testutil/nullify/nullify.go @@ -11,6 +11,7 @@ import ( var ( coinType = reflect.TypeOf(sdk.Coin{}) coinsType = reflect.TypeOf(sdk.Coins{}) + intType = reflect.TypeOf(sdk.NewIntFromUint64(1)) ) // Fill analyze all struct fields and slices with @@ -45,6 +46,10 @@ func Fill(x interface{}) interface{} { coins := reflect.New(coinsType).Interface() s := reflect.ValueOf(coins).Elem() f.Set(s) + case intType: + int := reflect.New(intType).Interface() + s := reflect.ValueOf(int).Elem() + f.Set(s) default: objPt := reflect.NewAt(f.Type(), unsafe.Pointer(f.UnsafeAddr())).Interface() s := Fill(objPt) From 94f7ce31e203f3fcfcb608996273262ee7368d57 Mon Sep 17 00:00:00 2001 From: Charles Dusek Date: Sun, 9 Jun 2024 22:38:52 -0500 Subject: [PATCH 35/35] Add events and tests pass --- x/market/client/cli/query_drop_test.go | 10 +- x/market/genesis_test.go | 24 ++-- x/market/keeper/drop.go | 40 ++++++ x/market/keeper/drop_test.go | 2 +- .../keeper/msg_server_cancel_order_test.go | 26 ++-- x/market/keeper/msg_server_create_drop.go | 2 +- .../keeper/msg_server_create_drop_test.go | 122 +++++------------- .../keeper/msg_server_create_pool_test.go | 49 +++---- .../keeper/msg_server_redeem_drop_test.go | 12 +- x/market/types/events.go | 20 +-- x/market/types/genesis_test.go | 24 ++-- 11 files changed, 168 insertions(+), 163 deletions(-) diff --git a/x/market/client/cli/query_drop_test.go b/x/market/client/cli/query_drop_test.go index 22944885..e55f8c9f 100644 --- a/x/market/client/cli/query_drop_test.go +++ b/x/market/client/cli/query_drop_test.go @@ -30,11 +30,11 @@ func networkWithDropObjects(t *testing.T, n int) (*network.Network, []types.Drop for i := 0; i < n; i++ { drop := types.Drop{ - Uid: uint64(i), - Owner: strconv.Itoa(i), - Pair: strconv.Itoa(i), - Drops: sdk.NewIntFromUint64(uint64(i)), - Product: sdk.NewIntFromUint64(uint64(i)), + Uid: uint64(i), + Owner: strconv.Itoa(i), + Pair: strconv.Itoa(i), + Drops: sdk.NewIntFromUint64(uint64(i)), + ProductBeg: sdk.NewIntFromUint64(uint64(i)), } nullify.Fill(&drop) state.DropList = append(state.DropList, drop) diff --git a/x/market/genesis_test.go b/x/market/genesis_test.go index 7277a8b6..b7ad2385 100644 --- a/x/market/genesis_test.go +++ b/x/market/genesis_test.go @@ -42,20 +42,20 @@ func TestGenesis(t *testing.T) { }, DropList: []types.Drop{ { - Uid: 0, - Owner: "0", - Pair: "0", - Drops: sdk.NewIntFromUint64(uint64(0)), - Product: sdk.NewIntFromUint64(uint64(0)), - Active: true, + Uid: 0, + Owner: "0", + Pair: "0", + Drops: sdk.NewIntFromUint64(uint64(0)), + ProductBeg: sdk.NewIntFromUint64(uint64(0)), + Active: true, }, { - Uid: 1, - Owner: "1", - Pair: "1", - Drops: sdk.NewIntFromUint64(uint64(1)), - Product: sdk.NewIntFromUint64(uint64(0)), - Active: true, + Uid: 1, + Owner: "1", + Pair: "1", + Drops: sdk.NewIntFromUint64(uint64(1)), + ProductBeg: sdk.NewIntFromUint64(uint64(0)), + Active: true, }, }, MemberList: []types.Member{ diff --git a/x/market/keeper/drop.go b/x/market/keeper/drop.go index 1da418e2..3cbba687 100644 --- a/x/market/keeper/drop.go +++ b/x/market/keeper/drop.go @@ -3,6 +3,7 @@ package keeper import ( "math/big" "sort" + "strconv" "strings" "github.com/cosmos/cosmos-sdk/store/prefix" @@ -21,6 +22,45 @@ func (k Keeper) SetDrop(ctx sdk.Context, drop types.Drop) { store.Set(types.DropKey( drop.Uid, ), a) + + if drop.Active { + // drop creation event + ctx.EventManager().EmitEvent( + sdk.NewEvent( + types.EventTypeDrop, + sdk.NewAttribute(types.AttributeKeyUid, strconv.FormatUint(drop.Uid, 10)), + sdk.NewAttribute(types.AttributeKeyOwner, drop.Owner), + sdk.NewAttribute(types.AttributeKeyActive, strconv.FormatBool(drop.Active)), + sdk.NewAttribute(types.AttributeKeyPair, drop.Pair), + sdk.NewAttribute(types.AttributeKeyDrops, drop.Drops.String()), + sdk.NewAttribute(types.AttributeKeyBeginTime, strconv.FormatInt(drop.TimeBeg, 10)), + sdk.NewAttribute(types.AttributeKeyCoin1Beg, drop.Coin1Beg.String()), + sdk.NewAttribute(types.AttributeKeyCoin2Beg, drop.Coin2Beg.String()), + sdk.NewAttribute(types.AttributeKeyProductBeg, drop.ProductBeg.String()), + ), + ) + } else { + // drop end event + ctx.EventManager().EmitEvent( + sdk.NewEvent( + types.EventTypeDrop, + sdk.NewAttribute(types.AttributeKeyUid, strconv.FormatUint(drop.Uid, 10)), + sdk.NewAttribute(types.AttributeKeyOwner, drop.Owner), + sdk.NewAttribute(types.AttributeKeyActive, strconv.FormatBool(drop.Active)), + sdk.NewAttribute(types.AttributeKeyPair, drop.Pair), + sdk.NewAttribute(types.AttributeKeyDrops, drop.Drops.String()), + sdk.NewAttribute(types.AttributeKeyBeginTime, strconv.FormatInt(drop.TimeBeg, 10)), + sdk.NewAttribute(types.AttributeKeyCoin1Beg, drop.Coin1Beg.String()), + sdk.NewAttribute(types.AttributeKeyCoin2Beg, drop.Coin2Beg.String()), + sdk.NewAttribute(types.AttributeKeyProductBeg, drop.ProductBeg.String()), + sdk.NewAttribute(types.AttributeKeyEndTime, strconv.FormatInt(drop.TimeBeg, 10)), + sdk.NewAttribute(types.AttributeKeyCoin1End, drop.Coin1End.String()), + sdk.NewAttribute(types.AttributeKeyCoin2End, drop.Coin2End.String()), + sdk.NewAttribute(types.AttributeKeyProductEnd, drop.ProductEnd.String()), + ), + ) + } + } // GetDrop returns a drop from its index diff --git a/x/market/keeper/drop_test.go b/x/market/keeper/drop_test.go index 1a2c7fd5..377aa26c 100644 --- a/x/market/keeper/drop_test.go +++ b/x/market/keeper/drop_test.go @@ -22,7 +22,7 @@ func createNDrop(keeper *keeper.Keeper, ctx sdk.Context, n int) []types.Drop { items[i].Owner = strconv.Itoa(i) items[i].Pair = strconv.Itoa(i) items[i].Drops = sdk.NewIntFromUint64(uint64(i)) - items[i].Product = sdk.NewIntFromUint64(uint64(i)) + items[i].ProductBeg = sdk.NewIntFromUint64(uint64(i)) keeper.SetDrop(ctx, items[i]) } diff --git a/x/market/keeper/msg_server_cancel_order_test.go b/x/market/keeper/msg_server_cancel_order_test.go index 915ea919..90a0208b 100644 --- a/x/market/keeper/msg_server_cancel_order_test.go +++ b/x/market/keeper/msg_server_cancel_order_test.go @@ -2,16 +2,24 @@ package keeper_test import ( "strconv" + "strings" "testing" sdk "github.com/cosmos/cosmos-sdk/types" keepertest "github.com/pendulum-labs/market/testutil/keeper" + "github.com/pendulum-labs/market/testutil/sample" "github.com/pendulum-labs/market/x/market/keeper" "github.com/pendulum-labs/market/x/market/types" "github.com/stretchr/testify/require" ) -func orderCommon(t *testing.T, testInput keepertest.TestInput) { +func orderCommon(t *testing.T, testInput keepertest.TestInput) (pair string, denomA string, denomB string, testdata testData) { + coinPair, _ := sample.SampleCoins("10000CoinA", "10000CoinB") + testdata = testData{coinAStr: "30CoinA", coinBStr: "40CoinB", RateAstrArray: []string{"60", "70"}, RateBstrArray: []string{"80", "90"}} + denomA = "CoinA" + denomB = "CoinB" + pair = strings.Join([]string{denomA, denomB}, ",") + // MintCoins require.NoError(t, testInput.BankKeeper.MintCoins(testInput.Context, types.ModuleName, coinPair)) @@ -29,12 +37,14 @@ func orderCommon(t *testing.T, testInput keepertest.TestInput) { var d = types.MsgCreateDrop{Creator: addr, Pair: pair, Drops: "120"} _, err = keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreateDrop(sdk.WrapSDKContext(testInput.Context), &d) require.NoError(t, err) + + return } func TestCancelOrder_case1_stop(t *testing.T) { testInput := keepertest.CreateTestEnvironment(t) - orderCommon(t, testInput) + _, denomA, denomB, testdata := orderCommon(t, testInput) beforecount := testInput.MarketKeeper.GetUidCount(testInput.Context) @@ -92,7 +102,7 @@ func TestCancelOrder_case1_limit(t *testing.T) { testInput := keepertest.CreateTestEnvironment(t) - orderCommon(t, testInput) + pair, denomA, denomB, testdata := orderCommon(t, testInput) beforecount := testInput.MarketKeeper.GetUidCount(testInput.Context) @@ -175,7 +185,7 @@ func TestCancelOrder_case2_stop(t *testing.T) { testInput := keepertest.CreateTestEnvironment(t) - orderCommon(t, testInput) + _, denomA, denomB, testdata := orderCommon(t, testInput) beforecount := testInput.MarketKeeper.GetUidCount(testInput.Context) @@ -280,16 +290,14 @@ func TestCancelOrderEmptyPool(t *testing.T) { // Validate RedeemDrop Uid := strconv.FormatUint(1, 10) var rd = types.MsgRedeemDrop{Creator: addr, Uid: Uid} - createRedeemDropResponse, redeemdropErr := keeper.NewMsgServerImpl(*testInput.MarketKeeper).RedeemDrop(sdk.WrapSDKContext(testInput.Context), &rd) + _, redeemdropErr := keeper.NewMsgServerImpl(*testInput.MarketKeeper).RedeemDrop(sdk.WrapSDKContext(testInput.Context), &rd) require.NoError(t, redeemdropErr) - require.Contains(t, rd.GetCreator(), createRedeemDropResponse.String()) // Validate RedeemDrop Uid = strconv.FormatUint(2, 10) rd = types.MsgRedeemDrop{Creator: addr, Uid: Uid} - createRedeemDropResponse, redeemdropErr = keeper.NewMsgServerImpl(*testInput.MarketKeeper).RedeemDrop(sdk.WrapSDKContext(testInput.Context), &rd) + _, redeemdropErr = keeper.NewMsgServerImpl(*testInput.MarketKeeper).RedeemDrop(sdk.WrapSDKContext(testInput.Context), &rd) require.NoError(t, redeemdropErr) - require.Contains(t, rd.GetCreator(), createRedeemDropResponse.String()) // Create Pool var p = types.MsgCreatePool{CoinA: testdata.coinAStr, CoinB: testdata.coinBStr, Creator: addr} @@ -311,7 +319,7 @@ func TestCancelOrder_case1_market_filled(t *testing.T) { testInput := keepertest.CreateTestEnvironment(t) - orderCommon(t, testInput) + _, denomA, denomB, _ := orderCommon(t, testInput) //Validate GetMember memberBid, memberfoundBid := testInput.MarketKeeper.GetMember(testInput.Context, denomA, denomB) diff --git a/x/market/keeper/msg_server_create_drop.go b/x/market/keeper/msg_server_create_drop.go index c0fdd22e..145e0b39 100644 --- a/x/market/keeper/msg_server_create_drop.go +++ b/x/market/keeper/msg_server_create_drop.go @@ -76,7 +76,7 @@ func (k msgServer) CreateDrop(goCtx context.Context, msg *types.MsgCreateDrop) ( // Pool creator drops = sqrt(XY). // Therefore sqrt(Product) must be equal to or greater than drops if sqrtDropProduct.LT(drops) { - fmt.Printf("Sqrt Product: %s", sqrtDropProduct) + fmt.Printf("Sqrt ProductBeg: %s", sqrtDropProduct) fmt.Printf("Drops: %s", drops) return nil, sdkerrors.Wrapf(types.ErrSqrtProductLessThanDrops, "Sqrt of Product not greater than or equal to drops.") } diff --git a/x/market/keeper/msg_server_create_drop_test.go b/x/market/keeper/msg_server_create_drop_test.go index c35b3c65..85ad3e4e 100644 --- a/x/market/keeper/msg_server_create_drop_test.go +++ b/x/market/keeper/msg_server_create_drop_test.go @@ -14,7 +14,14 @@ import ( "github.com/stretchr/testify/require" ) -func dropCommon(t *testing.T, testInput keepertest.TestInput) { +func dropCommon(t *testing.T, testInput keepertest.TestInput) (pair string, denomA string, denomB string, testdata testData) { + + coinPair, _ := sample.SampleCoins("10000CoinA", "10000CoinB") + testdata = testData{coinAStr: "30CoinA", coinBStr: "40CoinB", RateAstrArray: []string{"60", "70"}, RateBstrArray: []string{"80", "90"}} + denomA = "CoinA" + denomB = "CoinB" + pair = strings.Join([]string{denomA, denomB}, ",") + // MintCoins require.NoError(t, testInput.BankKeeper.MintCoins(testInput.Context, types.ModuleName, coinPair)) @@ -40,15 +47,17 @@ func dropCommon(t *testing.T, testInput keepertest.TestInput) { require.NoError(t, testInput.BankKeeper.SendCoinsFromModuleToAccount(testInput.Context, types.ModuleName, requestAddress3, coinPair)) // Create Pool - var p = types.MsgCreatePool{CoinA: testdata.coinAStr, CoinB: testdata.coinBStr, Creator: addr} + p := types.MsgCreatePool{CoinA: testdata.coinAStr, CoinB: testdata.coinBStr, Creator: addr} _, err = keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreatePool(sdk.WrapSDKContext(testInput.Context), &p) require.NoError(t, err) + + return } func TestCreateDrop(t *testing.T) { testInput := keepertest.CreateTestEnvironment(t) - dropCommon(t, testInput) + pair, denomA, denomB, _ := dropCommon(t, testInput) beforecount := testInput.MarketKeeper.GetUidCount(testInput.Context) @@ -196,35 +205,7 @@ func TestCreateDrop(t *testing.T) { func TestCreateDrop_Pool_Not_Found(t *testing.T) { testInput := keepertest.CreateTestEnvironment(t) - // MintCoins - require.NoError(t, testInput.BankKeeper.MintCoins(testInput.Context, types.ModuleName, coinPair)) - - // SendCoinsFromModuleToAccount - requestAddress, err := sdk.AccAddressFromBech32(addr) - require.NoError(t, err) - require.NoError(t, testInput.BankKeeper.SendCoinsFromModuleToAccount(testInput.Context, types.ModuleName, requestAddress, coinPair)) - - // GetUidCount before CreatePool - beforecount := testInput.MarketKeeper.GetUidCount(testInput.Context) - - // Create Pool - var p = types.MsgCreatePool{CoinA: testdata.coinAStr, CoinB: testdata.coinBStr, Creator: addr} - response, err := keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreatePool(sdk.WrapSDKContext(testInput.Context), &p) - - // Validate CreatePool - require.NoError(t, err) - require.Equal(t, p.GetCreator(), response.Creator) - require.Contains(t, response.String(), p.GetCoinA()) - require.Contains(t, response.String(), p.GetCoinB()) - - // Validate SetUidCount function. - aftercount := testInput.MarketKeeper.GetUidCount(testInput.Context) - require.Equal(t, beforecount+1, aftercount) - - // Validate GetDrop - drop, dropFound := testInput.MarketKeeper.GetDrop(testInput.Context, beforecount) - require.True(t, dropFound) - require.Equal(t, drop.Pair, pair) + dropCommon(t, testInput) // Validate CreateDrop scenarios := []struct { @@ -238,48 +219,25 @@ func TestCreateDrop_Pool_Not_Found(t *testing.T) { {coinAStr: "20CoinD", coinBStr: "20CoinA", RateAstrArray: []string{"10", "20"}, RateBstrArray: []string{"20", "30"}, Creator: sample.AccAddress()}, } for _, s := range scenarios { - coinPair, _ = sample.SampleCoins(s.coinAStr, s.coinBStr) - denomA, denomB = sample.SampleDenoms(coinPair) - pair = strings.Join([]string{denomA, denomB}, ",") + coinPair, _ := sample.SampleCoins(s.coinAStr, s.coinBStr) + denomA, denomB := sample.SampleDenoms(coinPair) + pair := strings.Join([]string{denomA, denomB}, ",") var d = types.MsgCreateDrop{Creator: s.Creator, Pair: pair, Drops: "70"} _, err := keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreateDrop(sdk.WrapSDKContext(testInput.Context), &d) require.Error(t, err) require.ErrorContains(t, err, "the pool not found") - } } func TestCreateDrop_Pool_Not_Active(t *testing.T) { testInput := keepertest.CreateTestEnvironment(t) - //MintCoins - require.NoError(t, testInput.BankKeeper.MintCoins(testInput.Context, types.ModuleName, coinPair)) - //SendCoinsFromModuleToAccount - requestAddress, err := sdk.AccAddressFromBech32(addr) - require.NoError(t, err) - require.NoError(t, testInput.BankKeeper.SendCoinsFromModuleToAccount(testInput.Context, types.ModuleName, requestAddress, coinPair)) - // GetUidCount before CreatePool - beforecount := testInput.MarketKeeper.GetUidCount(testInput.Context) - //Create Pool - var p = types.MsgCreatePool{CoinA: testdata.coinAStr, CoinB: testdata.coinBStr, Creator: addr} - response, err := keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreatePool(sdk.WrapSDKContext(testInput.Context), &p) - //validate CreatePool - require.NoError(t, err) - require.Contains(t, response.String(), p.GetCreator()) - require.Contains(t, response.String(), p.GetCoinA()) - require.Contains(t, response.String(), p.GetCoinB()) - //validate SetUidCount function. - aftercount := testInput.MarketKeeper.GetUidCount(testInput.Context) - require.Equal(t, beforecount+1, aftercount) + pair, _, _, testdata := dropCommon(t, testInput) - //validate GetDrop - drop, dropFound := testInput.MarketKeeper.GetDrop(testInput.Context, beforecount) - require.True(t, dropFound) - require.Equal(t, drop.Pair, pair) + pool, found := testInput.MarketKeeper.GetPool(testInput.Context, pair) + require.True(t, found) - //Validate RedeemDrop - Uid := strconv.FormatUint(drop.Uid, 10) - var rd = types.MsgRedeemDrop{Creator: addr, Uid: Uid} + var rd = types.MsgRedeemDrop{Creator: addr, Uid: strconv.FormatUint(pool.LastDrop, 10)} createRedeemDropResponse, redeemdropErr := keeper.NewMsgServerImpl(*testInput.MarketKeeper).RedeemDrop(sdk.WrapSDKContext(testInput.Context), &rd) require.NoError(t, redeemdropErr) require.Contains(t, createRedeemDropResponse.String(), rd.GetCreator()) @@ -296,8 +254,8 @@ func TestCreateDrop_Pool_Not_Active(t *testing.T) { {coinAStr: "20CoinB", coinBStr: "20CoinA", RateAstrArray: []string{"10", "20"}, RateBstrArray: []string{"20", "30"}, Creator: sample.AccAddress()}, } for _, s := range scenarios { - coinPair, _ = sample.SampleCoins(s.coinAStr, s.coinBStr) - denomA, denomB = sample.SampleDenoms(coinPair) + coinPair, _ := sample.SampleCoins(s.coinAStr, s.coinBStr) + denomA, denomB := sample.SampleDenoms(coinPair) pair = strings.Join([]string{denomA, denomB}, ",") var d = types.MsgCreateDrop{Creator: s.Creator, Pair: pair, Drops: "70"} _, err := keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreateDrop(sdk.WrapSDKContext(testInput.Context), &d) @@ -306,19 +264,14 @@ func TestCreateDrop_Pool_Not_Active(t *testing.T) { } - // GetUidCount before CreatePool - beforecount = testInput.MarketKeeper.GetUidCount(testInput.Context) //Create Pool - p = types.MsgCreatePool{CoinA: testdata.coinAStr, CoinB: testdata.coinBStr, Creator: addr} - response, err = keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreatePool(sdk.WrapSDKContext(testInput.Context), &p) + p := types.MsgCreatePool{CoinA: testdata.coinAStr, CoinB: testdata.coinBStr, Creator: addr} + response, err := keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreatePool(sdk.WrapSDKContext(testInput.Context), &p) //validate CreatePool require.NoError(t, err) require.Contains(t, response.String(), p.GetCreator()) require.Contains(t, response.String(), p.GetCoinA()) require.Contains(t, response.String(), p.GetCoinB()) - //validate SetUidCount function. - aftercount = testInput.MarketKeeper.GetUidCount(testInput.Context) - require.Equal(t, beforecount+1, aftercount) //validate CreateDrop (Active Pool) scenarios = []struct { @@ -331,8 +284,8 @@ func TestCreateDrop_Pool_Not_Active(t *testing.T) { {coinAStr: "20CoinA", coinBStr: "20CoinB", RateAstrArray: []string{"10", "20"}, RateBstrArray: []string{"20", "30"}, Creator: addr}, } for _, s := range scenarios { - coinPair, _ = sample.SampleCoins(s.coinAStr, s.coinBStr) - denomA, denomB = sample.SampleDenoms(coinPair) + coinPair, _ := sample.SampleCoins(s.coinAStr, s.coinBStr) + denomA, denomB := sample.SampleDenoms(coinPair) pair = strings.Join([]string{denomA, denomB}, ",") var d = types.MsgCreateDrop{Creator: s.Creator, Pair: pair, Drops: "70"} _, err := keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreateDrop(sdk.WrapSDKContext(testInput.Context), &d) @@ -344,29 +297,18 @@ func TestCreateDrop_Pool_Not_Active(t *testing.T) { func TestCreateDrop_Negative(t *testing.T) { testInput := keepertest.CreateTestEnvironment(t) - //MintCoins - require.NoError(t, testInput.BankKeeper.MintCoins(testInput.Context, types.ModuleName, coinPair)) - //SendCoinsFromModuleToAccount - requestAddress, err := sdk.AccAddressFromBech32(addr) - require.NoError(t, err) - require.NoError(t, testInput.BankKeeper.SendCoinsFromModuleToAccount(testInput.Context, types.ModuleName, requestAddress, coinPair)) - // GetUidCount before CreatePool - beforecount := testInput.MarketKeeper.GetUidCount(testInput.Context) - //Create Pool - var p = types.MsgCreatePool{CoinA: testdata.coinAStr, CoinB: testdata.coinBStr, Creator: addr} - _, err = keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreatePool(sdk.WrapSDKContext(testInput.Context), &p) - require.NoError(t, err) - //validate SetUidCount function. - aftercount := testInput.MarketKeeper.GetUidCount(testInput.Context) - require.Equal(t, beforecount+1, aftercount) + pair, denomA, denomB, _ := dropCommon(t, testInput) + + pool, found := testInput.MarketKeeper.GetPool(testInput.Context, pair) + require.True(t, found) //validate GetDrop - drop, dropFound := testInput.MarketKeeper.GetDrop(testInput.Context, beforecount) + drop, dropFound := testInput.MarketKeeper.GetDrop(testInput.Context, pool.LastDrop) require.True(t, dropFound) require.Equal(t, drop.Pair, pair) //validate CreateDrop var d = types.MsgCreateDrop{Creator: addr, Pair: pair, Drops: "-120"} - _, err = keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreateDrop(sdk.WrapSDKContext(testInput.Context), &d) + _, err := keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreateDrop(sdk.WrapSDKContext(testInput.Context), &d) require.Error(t, err) //validate CreateDrop diff --git a/x/market/keeper/msg_server_create_pool_test.go b/x/market/keeper/msg_server_create_pool_test.go index 11525205..533465bf 100644 --- a/x/market/keeper/msg_server_create_pool_test.go +++ b/x/market/keeper/msg_server_create_pool_test.go @@ -25,14 +25,15 @@ var addr string = sample.AccAddress() var addr2 string = sample.AccAddress() var addr3 string = sample.AccAddress() -var testdata = testData{coinAStr: "30CoinA", coinBStr: "40CoinB", RateAstrArray: []string{"60", "70"}, RateBstrArray: []string{"80", "90"}} -var coinPair, _ = sample.SampleCoins("10000CoinA", "10000CoinB") -var denomA, denomB = sample.SampleDenoms(coinPair) -var pair = strings.Join([]string{denomA, denomB}, ",") - func TestCreatePool(t *testing.T) { testInput := keepertest.CreateTestEnvironment(t) + coinPair, _ := sample.SampleCoins("10000CoinA", "10000CoinB") + testdata := testData{coinAStr: "30CoinA", coinBStr: "40CoinB", RateAstrArray: []string{"60", "70"}, RateBstrArray: []string{"80", "90"}} + denomA := "CoinA" + denomB := "CoinB" + pair := strings.Join([]string{denomA, denomB}, ",") + // MintCoins require.NoError(t, testInput.BankKeeper.MintCoins(testInput.Context, types.ModuleName, coinPair)) @@ -50,9 +51,9 @@ func TestCreatePool(t *testing.T) { // Validate CreatePool require.NoError(t, err) - require.Contains(t, MsgCreatePool.GetCreator(), response.String()) - require.Contains(t, MsgCreatePool.GetCoinA(), response.String()) - require.Contains(t, MsgCreatePool.GetCoinB(), response.String()) + require.Contains(t, response.String(), MsgCreatePool.GetCreator()) + require.Contains(t, response.String(), MsgCreatePool.GetCoinA()) + require.Contains(t, response.String(), MsgCreatePool.GetCoinB()) // Validate SetUidCount function. aftercount := testInput.MarketKeeper.GetUidCount(testInput.Context) @@ -88,6 +89,7 @@ func TestCreatePool(t *testing.T) { func TestCreatePool_PoolAlreadyExist(t *testing.T) { testInput := keepertest.CreateTestEnvironment(t) + count := 0 scenarios := []struct { coinAStr string @@ -101,8 +103,7 @@ func TestCreatePool_PoolAlreadyExist(t *testing.T) { {coinAStr: "20CoinB", coinBStr: "20CoinA", RateAstrArray: []string{"20", "30"}, RateBstrArray: []string{"10", "20"}}, } for _, s := range scenarios { - coinPair, _ := sample.SampleCoins("20CoinA", "20CoinB") - + coinPair, _ := sample.SampleCoins("10000CoinA", "10000CoinB") require.NoError(t, testInput.BankKeeper.MintCoins(testInput.Context, types.ModuleName, coinPair)) requestAddress, _ := sdk.AccAddressFromBech32(addr) require.NoError(t, testInput.BankKeeper.SendCoinsFromModuleToAccount(testInput.Context, types.ModuleName, requestAddress, coinPair)) @@ -110,12 +111,12 @@ func TestCreatePool_PoolAlreadyExist(t *testing.T) { response, err := keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreatePool(sdk.WrapSDKContext(testInput.Context), &p) if count == 0 { require.NoError(t, err) - require.Contains(t, p.GetCreator(), response.String()) + require.Contains(t, response.String(), p.GetCreator()) } else { require.Error(t, err) //Pool Already exists require.ErrorContains(t, err, "pool already exists") - require.NotContains(t, p.GetCreator(), response.String()) + require.NotContains(t, response.String(), p.GetCreator()) } count++ @@ -129,7 +130,6 @@ func TestCreatePool_Insufficient_Funds(t *testing.T) { //TestData testdata := testData{coinAStr: "15CoinA", coinBStr: "15CoinB", RateAstrArray: []string{"10", "20"}, RateBstrArray: []string{"20", "30"}} coinPair, _ := sample.SampleCoins("10CoinA", "10CoinB") - require.NoError(t, testInput.BankKeeper.MintCoins(testInput.Context, types.ModuleName, coinPair)) requestAddress, _ := sdk.AccAddressFromBech32(addr) require.NoError(t, testInput.BankKeeper.SendCoinsFromModuleToAccount(testInput.Context, types.ModuleName, requestAddress, coinPair)) @@ -143,7 +143,8 @@ func TestCreatePool_Insufficient_Funds(t *testing.T) { func TestCreatePool_PoolAlready_Exists_ReSubmit(t *testing.T) { testInput := keepertest.CreateTestEnvironment(t) - coinPair, _ := sample.SampleCoins("20CoinA", "20CoinB") + + coinPair, _ := sample.SampleCoins("10000CoinA", "10000CoinB") require.NoError(t, testInput.BankKeeper.MintCoins(testInput.Context, types.ModuleName, coinPair)) requestAddress, _ := sdk.AccAddressFromBech32(addr) @@ -155,7 +156,7 @@ func TestCreatePool_PoolAlready_Exists_ReSubmit(t *testing.T) { require.NoError(t, err) require.Error(t, err1) require.ErrorContains(t, err1, "pool already exists") - require.Contains(t, p.GetCreator(), response.String()) + require.Contains(t, response.String(), p.GetCreator()) require.NotContains(t, p.GetCreator(), response1.String()) } @@ -164,7 +165,7 @@ func TestCreatePool_With_New_Creator(t *testing.T) { testInput := keepertest.CreateTestEnvironment(t) //TestData testdata := testData{coinAStr: "15CoinA", coinBStr: "15CoinB", RateAstrArray: []string{"10", "20"}, RateBstrArray: []string{"20", "30"}} - coinPair, _ := sample.SampleCoins("10CoinA", "10CoinB") + coinPair, _ := sample.SampleCoins("10000CoinA", "10000CoinB") require.NoError(t, testInput.BankKeeper.MintCoins(testInput.Context, types.ModuleName, coinPair)) requestAddress, _ := sdk.AccAddressFromBech32(addr) @@ -181,7 +182,8 @@ func TestCreatePool_With_Empty_Rates(t *testing.T) { testInput := keepertest.CreateTestEnvironment(t) //TestData testdata := testData{coinAStr: "15CoinA", coinBStr: "15CoinB", RateAstrArray: []string{"0", "0"}, RateBstrArray: []string{"0", "0"}} - coinPair, _ := sample.SampleCoins("20CoinA", "20CoinB") + coinPair, _ := sample.SampleCoins("10000CoinA", "10000CoinB") + denomA, denomB := sample.SampleDenoms(coinPair) pair := strings.Join([]string{denomA, denomB}, ",") require.NoError(t, testInput.BankKeeper.MintCoins(testInput.Context, types.ModuleName, coinPair)) @@ -193,7 +195,7 @@ func TestCreatePool_With_Empty_Rates(t *testing.T) { var p = types.MsgCreatePool{CoinA: testdata.coinAStr, CoinB: testdata.coinBStr, Creator: addr} response, err := keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreatePool(sdk.WrapSDKContext(testInput.Context), &p) require.NoError(t, err) - require.Contains(t, p.GetCreator(), response.String()) + require.Contains(t, response.String(), p.GetCreator()) //validate SetUidCount function. aftercount := testInput.MarketKeeper.GetUidCount(testInput.Context) require.Equal(t, beforecount+1, aftercount) @@ -220,9 +222,12 @@ func TestCreatePool_With_Swap_Coins(t *testing.T) { testInput := keepertest.CreateTestEnvironment(t) //TestData testdata := testData{coinAStr: "15CoinB", coinBStr: "15CoinA", RateAstrArray: []string{"0", "0"}, RateBstrArray: []string{"0", "0"}} - coinPair, _ := sample.SampleCoins("20CoinA", "20CoinB") - denomA, denomB := sample.SampleDenoms(coinPair) + + coinPair, _ := sample.SampleCoins("10000CoinA", "10000CoinB") + denomA := "CoinA" + denomB := "CoinB" pair := strings.Join([]string{denomA, denomB}, ",") + require.NoError(t, testInput.BankKeeper.MintCoins(testInput.Context, types.ModuleName, coinPair)) requestAddress, _ := sdk.AccAddressFromBech32(addr) require.NoError(t, testInput.BankKeeper.SendCoinsFromModuleToAccount(testInput.Context, types.ModuleName, requestAddress, coinPair)) @@ -232,7 +237,7 @@ func TestCreatePool_With_Swap_Coins(t *testing.T) { var p = types.MsgCreatePool{CoinA: testdata.coinAStr, CoinB: testdata.coinBStr, Creator: addr} response, err := keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreatePool(sdk.WrapSDKContext(testInput.Context), &p) require.NoError(t, err) - require.Contains(t, p.GetCreator(), response.String()) + require.Contains(t, response.String(), p.GetCreator()) //validate SetUidCount function. aftercount := testInput.MarketKeeper.GetUidCount(testInput.Context) require.Equal(t, beforecount+1, aftercount) @@ -270,7 +275,7 @@ func TestCreatePool_Invalid_Coins(t *testing.T) { //{coinAStr: "20CoinA", coinBStr: "20", RateAstrArray: []string{"10", "20"}, RateBstrArray: []string{"20", "30"}}, } for _, s := range scenarios { - coinPair, _ := sample.SampleCoins("20CoinA", "20CoinB") + coinPair, _ := sample.SampleCoins("10000CoinA", "10000CoinB") require.NoError(t, testInput.BankKeeper.MintCoins(testInput.Context, types.ModuleName, coinPair)) requestAddress, _ := sdk.AccAddressFromBech32(addr) require.NoError(t, testInput.BankKeeper.SendCoinsFromModuleToAccount(testInput.Context, types.ModuleName, requestAddress, coinPair)) diff --git a/x/market/keeper/msg_server_redeem_drop_test.go b/x/market/keeper/msg_server_redeem_drop_test.go index f8549d08..c5c532fd 100644 --- a/x/market/keeper/msg_server_redeem_drop_test.go +++ b/x/market/keeper/msg_server_redeem_drop_test.go @@ -13,7 +13,13 @@ import ( "github.com/stretchr/testify/require" ) -func redeemCommon(t *testing.T, testInput keepertest.TestInput) { +func redeemCommon(t *testing.T, testInput keepertest.TestInput) (pair string, denomA string, denomB string, testdata testData) { + coinPair, _ := sample.SampleCoins("10000CoinA", "10000CoinB") + testdata = testData{coinAStr: "30CoinA", coinBStr: "40CoinB", RateAstrArray: []string{"60", "70"}, RateBstrArray: []string{"80", "90"}} + denomA = "CoinA" + denomB = "CoinB" + pair = strings.Join([]string{denomA, denomB}, ",") + // MintCoins require.NoError(t, testInput.BankKeeper.MintCoins(testInput.Context, types.ModuleName, coinPair)) @@ -41,13 +47,13 @@ func redeemCommon(t *testing.T, testInput keepertest.TestInput) { // Create Pool var p = types.MsgCreatePool{CoinA: testdata.coinAStr, CoinB: testdata.coinBStr, Creator: addr} _, _ = keeper.NewMsgServerImpl(*testInput.MarketKeeper).CreatePool(sdk.WrapSDKContext(testInput.Context), &p) - + return } func TestRedeemDrop(t *testing.T) { testInput := keepertest.CreateTestEnvironment(t) - redeemCommon(t, testInput) + pair, denomA, denomB, _ := redeemCommon(t, testInput) // Validate CreateDrop d := types.MsgCreateDrop{Creator: addr2, Pair: pair, Drops: "120"} diff --git a/x/market/types/events.go b/x/market/types/events.go index e34912e9..6ec8d1c1 100644 --- a/x/market/types/events.go +++ b/x/market/types/events.go @@ -12,16 +12,17 @@ const ( EventTypeCreateMember = "new_member" EventTypeUpdateMember = "update_member" - EventTypeCreateDrop = "create_drop" - EventTypeUpdateDrop = "update_drop" - EventTypeRedeemDrop = "redeem_drop" - + EventTypeDrop = "drop" EventTypeOrder = "order" - AttributeKeyActive = "active" - AttributeKeyAmount = "amount" - AttributeKeyBalance = "balance" - AttributeKeyDenom = "denom" + AttributeKeyActive = "active" + AttributeKeyAmount = "amount" + AttributeKeyBalance = "balance" + AttributeKeyCoin1Beg = "coin_1_beg" + AttributeKeyCoin2Beg = "coin_2_beg" + AttributeKeyCoin1End = "coin_1_end" + AttributeKeyCoin2End = "coin_2_end" + AttributeKeyDenom = "denom" // Alpha-numeric ordered denom for pool pair AttributeKeyDenom1 = "denom_1" AttributeKeyDenom2 = "denom_2" @@ -39,10 +40,13 @@ const ( AttributeKeyPair = "pair" AttributeKeyPrev = "prev" AttributeKeyProduct = "product" + AttributeKeyProductBeg = "product-beg" + AttributeKeyProductEnd = "product-end" AttributeKeyRate = "rate" AttributeKeyStatus = "status" AttributeKeyStop = "stop" AttributeKeyBeginTime = "begin-time" + AttributeKeyEndTime = "end-time" AttributeKeyUpdateTime = "update-time" AttributeKeyUid = "uid" ) diff --git a/x/market/types/genesis_test.go b/x/market/types/genesis_test.go index 61f68657..aaf6e66d 100644 --- a/x/market/types/genesis_test.go +++ b/x/market/types/genesis_test.go @@ -51,20 +51,20 @@ func TestGenesisState_Validate(t *testing.T) { }, DropList: []types.Drop{ { - Uid: 0, - Owner: "0", - Pair: "0", - Drops: sdk.NewIntFromUint64(uint64(0)), - Product: sdk.NewIntFromUint64(uint64(0)), - Active: true, + Uid: 0, + Owner: "0", + Pair: "0", + Drops: sdk.NewIntFromUint64(uint64(0)), + ProductBeg: sdk.NewIntFromUint64(uint64(0)), + Active: true, }, { - Uid: 1, - Owner: "1", - Pair: "1", - Drops: sdk.NewIntFromUint64(uint64(1)), - Product: sdk.NewIntFromUint64(uint64(0)), - Active: true, + Uid: 1, + Owner: "1", + Pair: "1", + Drops: sdk.NewIntFromUint64(uint64(1)), + ProductBeg: sdk.NewIntFromUint64(uint64(0)), + Active: true, }, }, MemberList: []types.Member{